summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaciag.artur <maciag.artur@0805d722-a2c2-11dd-9b86-41075523de00>2009-08-09 14:37:35 +0000
committermaciag.artur <maciag.artur@0805d722-a2c2-11dd-9b86-41075523de00>2009-08-09 14:37:35 +0000
commitde0c4ba4a7201eb35f1f525af11b062acaef9a1b (patch)
tree3dd5de0ee1335c0c61dce9b0ceb2ad9204156f8c
parentDolphin Wii emulator initial ebuild added (diff)
downloadpiczu-de0c4ba4a7201eb35f1f525af11b062acaef9a1b.tar.gz
piczu-de0c4ba4a7201eb35f1f525af11b062acaef9a1b.tar.bz2
piczu-de0c4ba4a7201eb35f1f525af11b062acaef9a1b.zip
wiiuse ebuild added
git-svn-id: http://piczu-overlay.googlecode.com/svn/trunk@60 0805d722-a2c2-11dd-9b86-41075523de00
-rw-r--r--games-util/wiiuse/Manifest3
-rw-r--r--games-util/wiiuse/files/wiiuse-0.12-makefile.patch56
-rw-r--r--games-util/wiiuse/wiiuse-0.12.ebuild62
3 files changed, 121 insertions, 0 deletions
diff --git a/games-util/wiiuse/Manifest b/games-util/wiiuse/Manifest
new file mode 100644
index 0000000..01728b4
--- /dev/null
+++ b/games-util/wiiuse/Manifest
@@ -0,0 +1,3 @@
+AUX wiiuse-0.12-makefile.patch 1694 RMD160 1854fd0e68ad57ff8f4b301e2cff3b2eca11b672 SHA1 962b177f3edd273c6c714e2eebf0650a47727ef4 SHA256 1bad8ffc107ea6d22e7a16899aeedd1374b866433437f1f81dc19662dc55088c
+DIST wiiuse_v0.12_src.tar.gz 108263 RMD160 aeb30495da8fd9f3e744a48f2e71fb2c7505991c SHA1 141e3c60807e931898e32903138830f71e3c683b SHA256 afc86b05ab201842c7f258e3d854171ede80167bd257272ae59d0cfbd342fb0d
+EBUILD wiiuse-0.12.ebuild 1460 RMD160 22e58bbe15d3edfeaeed8abeb5a392d43b1774cb SHA1 88f8e9b7fb466d185ffa9fcfb979b14afa8e282c SHA256 5a647789fe8ad759503898e6382f3a68a39e9c7fa62889bdfb7015d52837c49c
diff --git a/games-util/wiiuse/files/wiiuse-0.12-makefile.patch b/games-util/wiiuse/files/wiiuse-0.12-makefile.patch
new file mode 100644
index 0000000..0314258
--- /dev/null
+++ b/games-util/wiiuse/files/wiiuse-0.12-makefile.patch
@@ -0,0 +1,56 @@
+diff -Nur wiiuse_v0.12.old/example/Makefile wiiuse_v0.12/example/Makefile
+--- wiiuse_v0.12.old/example/Makefile 2008-04-02 02:45:40.000000000 +0200
++++ wiiuse_v0.12/example/Makefile 2009-01-22 16:32:34.343707633 +0100
+@@ -64,7 +64,7 @@
+
+ install:
+ @if [ -e $(BIN) ]; then \
+- cp -v $(BIN) /usr/bin ; \
++ install -D -m 755 $(BIN) $(DESTDIR)/usr/bin/wiiuse-example ; \
+ fi
+
+
+diff -Nur wiiuse_v0.12.old/example-sdl/Makefile wiiuse_v0.12/example-sdl/Makefile
+--- wiiuse_v0.12.old/example-sdl/Makefile 2008-04-02 02:45:53.000000000 +0200
++++ wiiuse_v0.12/example-sdl/Makefile 2009-01-22 16:32:34.343707633 +0100
+@@ -64,7 +64,7 @@
+
+ install:
+ @if [ -e $(BIN) ]; then \
+- cp -v $(BIN) /usr/bin ;\
++ install -D -m 755 $(BIN) $(DESTDIR)/usr/bin/wiiuse-sdl ; \
+ fi
+
+ $(BIN): mkdir $(OBJS)
+diff -Nur wiiuse_v0.12.old/Makefile wiiuse_v0.12/Makefile
+--- wiiuse_v0.12.old/Makefile 2008-02-26 02:18:47.000000000 +0100
++++ wiiuse_v0.12/Makefile 2009-01-22 16:33:42.855708421 +0100
+@@ -10,10 +10,10 @@
+ wiiuse:
+ @$(MAKE) -C src
+
+-ex:
++ex: wiiuse
+ @$(MAKE) -C example
+
+-sdl-ex:
++sdl-ex: wiiuse
+ @$(MAKE) -C example-sdl
+
+ distclean:
+diff -Nur wiiuse_v0.12.old/src/Makefile wiiuse_v0.12/src/Makefile
+--- wiiuse_v0.12.old/src/Makefile 2008-03-03 00:30:04.000000000 +0100
++++ wiiuse_v0.12/src/Makefile 2009-01-22 16:32:34.343707633 +0100
+@@ -73,10 +73,8 @@
+ @-rm -r debug-* release-* 2> /dev/null
+
+ install:
+- @if [ -e $(BIN) ]; then \
+- cp -v $(BIN) /usr/lib ; \
+- fi
+- @cp -v wiiuse.h /usr/include
++ @install -D -m 644 $(BIN) $(DESTDIR)/usr/lib/libwiiuse.so
++ @install -D -m 644 wiiuse.h $(DESTDIR)/usr/include/wiiuse.h
+
+ $(BIN): mkdir $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(BIN)
diff --git a/games-util/wiiuse/wiiuse-0.12.ebuild b/games-util/wiiuse/wiiuse-0.12.ebuild
new file mode 100644
index 0000000..4f6b5ec
--- /dev/null
+++ b/games-util/wiiuse/wiiuse-0.12.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+
+inherit eutils flag-o-matic games
+
+MY_P="${PN}_v${PV}_src"
+
+DESCRIPTION="Library written in C that communicates with several Nintendo Wii remotes."
+HOMEPAGE="http://wiiuse.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="debug examples sdl"
+
+RDEPEND="net-wireless/bluez-utils
+ virtual/glut
+ examples? (
+ sdl? ( media-libs/libsdl ) )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P/_src/}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-makefile.patch"
+
+ # -fomit-frame-pointer shouldn't be used with USE="debug"
+ use debug && filter-flags "-fomit-frame-pointer"
+
+ sed -i \
+ -e "s|-Wall -pipe -fPIC -funroll-loops|${CFLAGS} -fPIC|" \
+ -e "s|/usr/lib|`games_get_libdir`|" \
+ src/Makefile || die "sed src/Makefile failed"
+
+ sed -i \
+ -e "s|CFLAGS = -Wall -pipe -fPIC -funroll-loops|CFLAGS = ${CFLAGS} -fPIC|" \
+ -e "s|/usr/bin|${GAMES_BINDIR}|" \
+ example/Makefile example-sdl/Makefile || die "sed failed"
+}
+
+src_compile() {
+ local opts=""
+ # set default build target
+ local bld="wiiuse"
+ use examples && bld="${bld} ex"
+ use sdl && bld="${bld} sdl-ex"
+
+ use debug && opts="debug=1"
+ opts="${opts} ${bld}"
+
+ emake ${opts} || die "emake failed"
+}
+
+src_install() {
+ local instopts
+ use debug && instopts="debug=1"
+ emake DESTDIR="${D}" ${instopts} install || die "einstall failed"
+}