summaryrefslogtreecommitdiff
path: root/games-emulation/higan
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-emulation/higan
reinit the tree, so we can have metadata
Diffstat (limited to 'games-emulation/higan')
-rw-r--r--games-emulation/higan/Manifest10
-rw-r--r--games-emulation/higan/files/higan-094-QA.patch90
-rw-r--r--games-emulation/higan/files/higan-099-QA.patch79
-rw-r--r--games-emulation/higan/files/higan-wrapper7
-rw-r--r--games-emulation/higan/higan-094.ebuild154
-rw-r--r--games-emulation/higan/higan-099.ebuild149
-rw-r--r--games-emulation/higan/metadata.xml18
7 files changed, 507 insertions, 0 deletions
diff --git a/games-emulation/higan/Manifest b/games-emulation/higan/Manifest
new file mode 100644
index 000000000000..b4ad6356c5cb
--- /dev/null
+++ b/games-emulation/higan/Manifest
@@ -0,0 +1,10 @@
+AUX higan-094-QA.patch 2611 SHA256 0da243ec55b2af19ccfc344d735a9c3a8596490de44bbb58a6e53f2b014c1659 SHA512 12ea06fb32af29136965150029f19ba95cf3690cbd8e2531d84b06a31d40083047d96e463d77194d1cc07365f966b6040886bff789ba6401df90dd5687990844 WHIRLPOOL 35143f3728ed1823c6c05315dd50d4f2d8b81a96f0722fddf6891cbbb5ac94e912590620d5af63bb72682ab619a52c9cef13dcf8e8b3d56dc611e813de933211
+AUX higan-099-QA.patch 2597 SHA256 6add96752eb7388fb7ef0ca0db47439caf2b90c8055305fbf36acaeaa814bc2e SHA512 421584e9c26ae66117b5f4d95a7afb3b21674fd112ca33fca7cb0c33e7382f8dda100900536eab3f413a6a3cf0f98cc079644b8cee309f17f50c1bd99604728e WHIRLPOOL e7ce4aa4b573fb0cd5ca836d3f353633607670715c31b2e6d2de6c9b97a6eddf20a38402e30d8270705cb33597fdfab1a556f0a74808a0017247c746329d4aed
+AUX higan-wrapper 124 SHA256 a2640df99434ad820ead4015e071681b05ddd10a44eaed9571d7a28bba4b8def SHA512 af3163d06f3bc14b14ec38cf84d11cc706eb6359727743eea35670b4f1ac120af40102ee5409695eba00ead70fcf964073c24d2f47d6824776391927ebbf3f45 WHIRLPOOL 74e4a9232668dc61c300a49fbe05d654313a5867946497e1e95c46d9d4140634d0eb74eef8969fad5ab38b0d635069698a7e635058809ed2bf8792e89401c81d
+DIST higan_v094-source.tar.xz 882732 SHA256 5e149df9d50c1066eb97c0d66665428d75304da782bba5a87078b87fc311151b SHA512 e7e48c76cdc93d2d66db1fa0c71e64903cf4188571b2d5ecb8066dd4e2172a67da4dee68bed6fd0a532b6fd397fa4f537b97de58cc5043a9e970d48d0b66b0da WHIRLPOOL 42e2b628e83b6cb8d87ce82c2e91105b0be06790a1927aa7d52f0b1a181af5d627f467009d15daffd470e3c38a2bb7d67ba84919fb1aa9c8d06ad88ca3163641
+DIST higan_v099-source.7z 1012348 SHA256 1c62f2f1ec98da9d098c2df5c8b539a192b5a70eff0896c3e27d541fb4d28e86 SHA512 567f0c9841fb3fed1c78f2afcd9865cbfe06d04b995d4dc468269e459249b758daed949b461b5b8645ebab40edc1f4f28a566de5795325dae4f604190ca9eae6 WHIRLPOOL 096b4da32f9f030a402690e81dc64e0a242072fd7cb3aa1520783a3a69bd76ff73d3fbcfb3624ad9cf9396e5123777a9cd4fd13f04191fe7faf9ec385c1a929e
+EBUILD higan-094.ebuild 3594 SHA256 4b1f646f7e8bedede27e86b97cd07893a536b7f0ad4c22eab2283b76ed6b4352 SHA512 de30475eba1dd2826d1795b33fc428b420653611f3e08d39e3a914cb01e96a7f9fcb6b4017dfb27064aa5dd7607acbf9935ce404ccbd2b7a835153e57bc171c4 WHIRLPOOL da216786d2b2b774f2b1aee98571fe1e9675ef69822115138b126a2cc61e6600f4764860d1117819fb0b1bbd58ea2506857f251d91fabca36e21939f0e92fda8
+EBUILD higan-099.ebuild 3321 SHA256 f71305983e895ea8dc68fa130c62e8d5f346d0ad2f5c1ebdb7d97237571df547 SHA512 826e888abda2b7f5340277b0b6d2b470b553449cf36a1e7ff748b559df0ad69079ebff49770155529b8c314429d43ec15a03f3be69c599f407fa9782ddb270ca WHIRLPOOL fde570c54a4ca436c3b0ed05bbac7374c05247fec4c393c4f28ff6b1408e15056454805f7fa9e83b78dfbcbdea7b44065da96cd2c5175b04023ce9af0ddb272c
+MISC ChangeLog 3280 SHA256 bfa403141d184d759fa74989e3a38a3350276aa063a91bb0ba8a9d3b7f28dfca SHA512 ba95dcb38cf48569fe2649e8f12508de778eede9d4982d8dc4db6c00bab9882afc3b30ac5cd5697687e7cbc8d22da8f5b620b420a8bf329457a95991770e86f5 WHIRLPOOL 850977615763a3986411ca0762883b98d2048fb509f78f05c30971bf9cbc81938dbdfbc2b384a79608ab2ecf71aea1c040988e12078f05285943eff412d78235
+MISC ChangeLog-2015 1300 SHA256 660cf2b12ba21c26b26d1c7fa18e6f0e7a908ff7fc0ad9aff4194e6970012843 SHA512 284a48e91eb3058e7bbedda08a58c0effe74313091f76ae2bc0bb8461c7593c277dfb965d6930c4565eab594e72b7aaf3311fb2098eb99b73f27a93d6095a0a6 WHIRLPOOL 6f5731721b907e2e0ccae62d672bbdd013a1adab45a0ee2db2852f57e4bfe861ba79b9f56f6d2f647fcc67bbd1bcbd633279ce8fb295dcfa1905282b540065de
+MISC metadata.xml 636 SHA256 c566d8169f12d492471e65ca8a9bdd7a255b71d27cbafbd883f97eef53d998dd SHA512 a835b9cb4fa482754349eaddee279a6bca17cbc070806c0a59c923502159375bbfb481964faae23bbee8379fdbe7e9f0e070cbc783e3c2e62ddd2d88f511170b WHIRLPOOL 667f7810cd3fb187c024604c697338c3524bc170673120a28a6fce7eb74c1d156bf86bd237c618e90d3b8582a9d17ef20749bd89433965ad76c7cb6a3b37201f
diff --git a/games-emulation/higan/files/higan-094-QA.patch b/games-emulation/higan/files/higan-094-QA.patch
new file mode 100644
index 000000000000..69aaedf3d3de
--- /dev/null
+++ b/games-emulation/higan/files/higan-094-QA.patch
@@ -0,0 +1,90 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sun Jun 9 10:23:38 UTC 2013
+Subject:
+
+--- a/Makefile
++++ b/Makefile
+@@ -13,8 +13,8 @@
+ # console := true
+
+ # compiler
+-flags += -I. -O3 -fomit-frame-pointer
+-link +=
++flags += -I.
++link += $(LDFLAGS)
+ objects := libco
+
+ # profile-guided optimization mode
+@@ -41,14 +41,12 @@
+ endif
+ link += -s -mthreads -luuid -lkernel32 -luser32 -lgdi32 -lcomctl32 -lcomdlg32 -lshell32 -lole32 -lws2_32
+ link += -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
+-else ifeq ($(platform),macosx)
+- flags += -march=native
+ else ifeq ($(platform),linux)
+- flags += -march=native
+- link += -s -Wl,-export-dynamic -lX11 -lXext -ldl
++ flags +=
++ link += -Wl,-export-dynamic -lX11 -lXext -ldl
+ else ifeq ($(platform),bsd)
+- flags += -march=native
+- link += -s -Wl,-export-dynamic -lX11 -lXext
++ flags +=
++ link += -Wl,-export-dynamic -lX11 -lXext
+ else
+ $(error unsupported platform.)
+ endif
+@@ -59,9 +57,9 @@
+ compile = \
+ $(strip \
+ $(if $(filter %.c,$<), \
+- $(compiler) $(cflags) $(flags) $1 -c $< -o $@, \
++ $(compiler) $(cflags) $(flags) $(CFLAGS) $1 -c $< -o $@, \
+ $(if $(filter %.cpp,$<), \
+- $(compiler) $(cppflags) $(flags) $1 -c $< -o $@ \
++ $(compiler) $(cppflags) $(flags) $(CXXFLAGS) $1 -c $< -o $@ \
+ ) \
+ ) \
+ )
+--- a/target-ethos/Makefile
++++ b/target-ethos/Makefile
+@@ -55,10 +55,10 @@
+ obj/ui-tools.o: $(ui)/tools/tools.cpp $(call rwildcard,$(ui)/)
+
+ obj/ruby.o: ruby/ruby.cpp $(call rwildcard,ruby/*)
+- $(compiler) $(rubyflags) -c $< -o $@
++ $(compiler) $(rubyflags) $(CXXFLAGS) -c $< -o $@
+
+ obj/phoenix.o: phoenix/phoenix.cpp $(call rwildcard,phoenix/*)
+- $(compiler) $(phoenixflags) -c $< -o $@
++ $(compiler) $(phoenixflags) $(CXXFLAGS) -c $< -o $@
+
+ obj/resource.o: $(ui)/resource.rc
+ ifeq ($(arch),win32)
+@@ -82,7 +82,7 @@
+ sips -s format icns data/higan.png --out out/$(name).app/Contents/Resources/higan.icns
+ $(strip $(compiler) -o out/$(name).app/Contents/MacOS/$(name) $(objects) $(link))
+ else
+- $(strip $(compiler) -o out/$(name) $(objects) $(link))
++ $(strip $(CXX) $(CXXFLAGS) -o out/$(name) $(objects) $(link))
+ endif
+
+ resource:
+--- a/nall/Makefile
++++ b/nall/Makefile
+@@ -53,11 +53,11 @@
+ link :=
+ endif
+
+- cflags := -x c -std=c99
+- objcflags := -x objective-c -std=c99
+- cppflags := -x c++ -std=c++11
+- objcppflags := -x objective-c++ -std=c++11
+ endif
++cflags := -x c -std=c99
++objcflags := -x objective-c -std=c99
++cppflags := -x c++ -std=c++11
++objcppflags := -x objective-c++ -std=c++11
+
+ # cross-compilation support
+ ifeq ($(arch),x86)
diff --git a/games-emulation/higan/files/higan-099-QA.patch b/games-emulation/higan/files/higan-099-QA.patch
new file mode 100644
index 000000000000..fd4eb13dd34e
--- /dev/null
+++ b/games-emulation/higan/files/higan-099-QA.patch
@@ -0,0 +1,79 @@
+diff -Naur a/higan/GNUmakefile b/higan/GNUmakefile
+--- a/higan/GNUmakefile 2016-06-17 18:56:06.414883957 +0200
++++ b/higan/GNUmakefile 2016-06-17 18:56:19.075903050 +0200
+@@ -4,7 +4,7 @@
+ # target := loki
+ # console := true
+
+-flags += -I. -I.. -O3
++flags += -I. -I..
+ objects := libco audio video resource
+
+ # profile-guided optimization mode
+@@ -31,7 +31,7 @@
+ else ifeq ($(platform),macosx)
+ flags += -march=native
+ else ifneq ($(filter $(platform),linux bsd),)
+- flags += -march=native -fopenmp
++ flags += -fopenmp
+ link += -fopenmp
+ link += -Wl,-export-dynamic
+ link += -lX11 -lXext
+@@ -42,9 +42,9 @@
+ compile = \
+ $(strip \
+ $(if $(filter %.c,$<), \
+- $(compiler) $(cflags) $(flags) $1 -c $< -o $@, \
++ $(compiler) $(cflags) $(flags) $(CFLAGS) $1 -c $< -o $@, \
+ $(if $(filter %.cpp,$<), \
+- $(compiler) $(cppflags) $(flags) $1 -c $< -o $@ \
++ $(compiler) $(cppflags) $(flags) $(CXXFLAGS) $1 -c $< -o $@ \
+ ) \
+ ) \
+ )
+
+--- a/higan/target-tomoko/GNUmakefile 2016-06-17 19:10:27.729182818 +0200
++++ b/higan/target-tomoko/GNUmakefile 2016-06-17 19:14:34.034554246 +0200
+@@ -45,10 +45,10 @@
+ objects := $(patsubst %,obj/%.o,$(objects))
+
+ obj/ruby.o: ../ruby/ruby.cpp $(call rwildcard,../ruby/)
+- $(compiler) $(rubyflags) -c $< -o $@
++ $(compiler) $(rubyflags) $(CXXFLAGS) -c $< -o $@
+
+ obj/hiro.o: ../hiro/hiro.cpp $(call rwildcard,../hiro/)
+- $(compiler) $(hiroflags) -c $< -o $@
++ $(compiler) $(hiroflags) $(CXXFLAGS) -c $< -o $@
+
+ obj/ui-tomoko.o: $(ui)/tomoko.cpp $(call rwildcard,$(ui)/)
+ obj/ui-program.o: $(ui)/program/program.cpp $(call rwildcard,$(ui)/)
+@@ -64,7 +64,7 @@
+
+ # targets
+ build: $(objects)
+- $(strip $(compiler) -o out/$(name) $(objects) $(link))
++ $(strip $(CXX) $(CXXFLAGS) -o out/$(name) $(objects) $(link))
+ ifeq ($(platform),macosx)
+ @if [ -d out/$(name).app ]; then rm -r out/$(name).app; fi
+ mkdir -p out/$(name).app/Contents/MacOS/
+
+--- a/icarus/GNUmakefile 2016-07-05 16:42:09.198091772 +0200
++++ b/icarus/GNUmakefile 2016-07-05 16:48:14.388351427 +0200
+@@ -2,7 +2,7 @@
+ include ../hiro/GNUmakefile
+
+ name := icarus
+-flags += -I.. -O3
++flags += -I.. $(CXXFLAGS)
+ link +=
+
+ ifeq ($(platform),windows)
+@@ -14,7 +14,7 @@
+ objects += $(if $(call streq,$(platform),windows),obj/resource.o)
+
+ all: $(objects)
+- $(call unique,$(compiler) -o out/$(name) $(objects) $(link) $(hirolink))
++ $(call unique,$(compiler) -o out/$(name) $(objects) $(link) $(hirolink) $(LDFLAGS))
+ ifeq ($(platform),macosx)
+ @if [ -d out/$(name).app ]; then rm -r out/$(name).app; fi
+ mkdir -p out/$(name).app/Contents/MacOS/
diff --git a/games-emulation/higan/files/higan-wrapper b/games-emulation/higan/files/higan-wrapper
new file mode 100644
index 000000000000..e2d9257a4b65
--- /dev/null
+++ b/games-emulation/higan/files/higan-wrapper
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ -e $HOME/.config/ ] || mkdir $HOME/.config/
+
+cp -ru "%GAMES_DATADIR%/higan" $HOME/.config/
+
+exec ${0}.bin "$@"
diff --git a/games-emulation/higan/higan-094.ebuild b/games-emulation/higan/higan-094.ebuild
new file mode 100644
index 000000000000..ed1be748a708
--- /dev/null
+++ b/games-emulation/higan/higan-094.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils gnome2-utils toolchain-funcs qmake-utils games
+
+MY_P=${PN}_v${PV}-source
+
+DESCRIPTION="A Nintendo multi-system emulator formerly known as bsnes"
+HOMEPAGE="http://byuu.org/higan/ https://code.google.com/p/higan/"
+SRC_URI="http://byuu.org/files/${MY_P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="ao +alsa openal opengl oss profile_accuracy +profile_balanced profile_performance pulseaudio qt4 +sdl udev xv"
+REQUIRED_USE="|| ( ao openal alsa pulseaudio oss )
+ || ( xv opengl sdl )
+ || ( profile_accuracy profile_balanced profile_performance )"
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/libXext
+ ao? ( media-libs/libao )
+ openal? ( media-libs/openal )
+ alsa? ( media-libs/alsa-lib )
+ pulseaudio? ( media-sound/pulseaudio )
+ xv? ( x11-libs/libXv )
+ opengl? ( virtual/opengl )
+ sdl? ( media-libs/libsdl[X,joystick,video] )
+ udev? ( virtual/udev )
+ !qt4? ( x11-libs/gtk+:2 )
+ qt4? ( >=dev-qt/qtgui-4.5:4 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+disable_module() {
+ sed -i \
+ -e "s|$1\b||" \
+ "${S}"/target-ethos/Makefile || die
+}
+
+src_prepare() {
+ local i
+
+ epatch "${FILESDIR}"/${P}-QA.patch
+
+ sed -i \
+ -e "/handle/s#/usr/local/lib#/usr/$(get_libdir)#" \
+ nall/dl.hpp || die "fixing libdir failed!"
+
+ # audio modules
+ use ao || disable_module audio.ao
+ use openal || disable_module audio.openal
+ use pulseaudio || { disable_module audio.pulseaudio
+ disable_module audio.pulseaudiosimple ;}
+ use oss || disable_module audio.oss
+ use alsa || disable_module audio.alsa
+
+ # video modules
+ use opengl || disable_module video.glx
+ use xv || disable_module video.xv
+ use sdl || disable_module video.sdl
+
+ # input modules
+ use sdl || disable_module input.sdl
+ use udev || disable_module input.udev
+
+ # regenerate .moc if needed
+ if use qt4; then
+ cd phoenix/qt || die
+ "$(qt4_get_bindir)"/moc -i -I. -o platform.moc platform.moc.hpp || die
+ fi
+
+ for i in profile_accuracy profile_balanced profile_performance ; do
+ if use ${i} ; then
+ cp -dRP "${S}" "${S}_${i}" || die
+ fi
+ done
+}
+
+src_compile() {
+ local mytoolkit i
+
+ if use qt4; then
+ mytoolkit="qt"
+ else
+ mytoolkit="gtk"
+ fi
+
+ for i in profile_accuracy profile_balanced profile_performance ; do
+ if use ${i} ; then
+ cd "${S}_${i}" || die
+ emake \
+ platform="linux" \
+ compiler="$(tc-getCXX)" \
+ profile="${i#profile_}" \
+ phoenix="${mytoolkit}"
+
+ sed \
+ -e "s:%GAMES_DATADIR%:${GAMES_DATADIR}:" \
+ < "${FILESDIR}"/${PN}-wrapper \
+ > out/${PN}-wrapper || die "generating wrapper failed!"
+ fi
+ done
+}
+
+src_install() {
+ local i
+
+ for i in profile_accuracy profile_balanced profile_performance ; do
+ if use ${i} ; then
+ # install higan
+ newgamesbin "${S}_${i}"/out/${PN} ${PN}-${i#profile_}.bin
+ newgamesbin "${S}_${i}"/out/${PN}-wrapper ${PN}-${i#profile_}
+ make_desktop_entry "${PN}-${i#profile_}" "${PN} (${i#profile_})"
+ fi
+ done
+
+ # copy home directory stuff to a global location
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r data/cheats.bml profile/*
+
+ # install shaders
+ if use opengl; then
+ insinto "${GAMES_DATADIR}/${PN}/Video Shaders"
+ doins -r shaders/*.shader
+ fi
+
+ doicon -s 48 data/${PN}.png
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ elog "optional dependencies:"
+ elog " dev-games/higan-ananke (extra rom load options)"
+ elog " games-util/higan-purify (Rom purifier)"
+
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-emulation/higan/higan-099.ebuild b/games-emulation/higan/higan-099.ebuild
new file mode 100644
index 000000000000..2a660f3b6e1e
--- /dev/null
+++ b/games-emulation/higan/higan-099.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils gnome2-utils toolchain-funcs qmake-utils games
+
+MY_P=${PN}_v${PV}-source
+
+DESCRIPTION="A Nintendo multi-system emulator formerly known as bsnes"
+HOMEPAGE="http://byuu.org/higan/ https://code.google.com/p/higan/"
+SRC_URI="http://download.byuu.org/${MY_P}.7z"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ao +alsa +icarus openal opengl oss pulseaudio qt4 +sdl udev xv"
+REQUIRED_USE="|| ( ao openal alsa pulseaudio oss )
+ || ( xv opengl sdl )"
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/libXext
+ icarus? ( x11-libs/gtksourceview:2.0
+ x11-libs/gtk+:2
+ x11-libs/pango
+ dev-libs/atk
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf
+ dev-libs/glib:2
+ media-libs/fontconfig
+ media-libs/freetype
+ )
+ ao? ( media-libs/libao )
+ openal? ( media-libs/openal )
+ alsa? ( media-libs/alsa-lib )
+ pulseaudio? ( media-sound/pulseaudio )
+ xv? ( x11-libs/libXv )
+ opengl? ( virtual/opengl )
+ sdl? ( media-libs/libsdl[X,joystick,video] )
+ udev? ( virtual/udev )
+ !qt4? ( x11-libs/gtk+:2 )
+ qt4? ( dev-qt/qtcore:4
+ >=dev-qt/qtgui-4.5:4 )"
+DEPEND="${RDEPEND}
+ app-arch/p7zip
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+disable_module() {
+ sed -i \
+ -e "s|$1\b||" \
+ "${S}"/higan/target-tomoko/GNUmakefile || die
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-QA.patch
+
+ sed -i \
+ -e "/handle/s#/usr/local/lib#/usr/$(get_libdir)#" \
+ nall/dl.hpp || die "fixing libdir failed!"
+
+ # audio modules
+ use ao || disable_module audio.ao
+ use openal || disable_module audio.openal
+ use pulseaudio || { disable_module audio.pulseaudio
+ disable_module audio.pulseaudiosimple ;}
+ use oss || disable_module audio.oss
+ use alsa || disable_module audio.alsa
+
+ # video modules
+ use opengl || disable_module video.glx
+ use xv || disable_module video.xv
+ use sdl || disable_module video.sdl
+
+ # input modules
+ use sdl || disable_module input.sdl
+ use udev || disable_module input.udev
+
+ # regenerate .moc if needed
+ if use qt4; then
+ cd hiro/qt || die
+ "$(qt4_get_bindir)"/moc -i -I. -o qt.moc qt.hpp || die
+ fi
+}
+
+src_compile() {
+ local mytoolkit
+
+ if use qt4; then
+ mytoolkit="qt"
+ else
+ mytoolkit="gtk"
+ fi
+
+ if use icarus; then
+ cd "${S}/icarus" || die
+ emake \
+ platform="linux" \
+ compiler="$(tc-getCXX)"
+ fi
+
+ cd "${S}/higan" || die
+ emake \
+ platform="linux" \
+ compiler="$(tc-getCXX)" \
+ hiro="${mytoolkit}"
+
+ sed \
+ -e "s:%GAMES_DATADIR%:${GAMES_DATADIR}:" \
+ < "${FILESDIR}"/${PN}-wrapper \
+ > out/${PN}-wrapper || die "generating wrapper failed!"
+}
+
+src_install() {
+ if use icarus; then
+ newgamesbin "${S}"/icarus/out/icarus icarus
+ fi
+ newgamesbin "${S}"/higan/out/${PN} ${PN}.bin
+ newgamesbin "${S}"/higan/out/${PN}-wrapper ${PN}
+ make_desktop_entry "${PN}" "${PN}"
+
+ # copy home directory stuff to a global location
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r higan/data/cheats.bml higan/profile/*
+
+ doicon -s 512 higan/data/${PN}.png
+
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ #elog "optional dependencies:"
+ #elog " dev-games/higan-ananke (extra rom load options)"
+ #elog " games-util/higan-purify (Rom purifier)"
+
+ games_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/games-emulation/higan/metadata.xml b/games-emulation/higan/metadata.xml
new file mode 100644
index 000000000000..fad703a696a7
--- /dev/null
+++ b/games-emulation/higan/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="icarus">Build icarus library manager</flag>
+ <flag name="profile_accuracy">
+ Compile a binary optimized for accuracy</flag>
+ <flag name="profile_balanced">
+ Compile a binary with balanced optimization</flag>
+ <flag name="profile_performance">
+ Compile a binary optimized for performance</flag>
+ <flag name="udev">Enable udev based input</flag>
+ </use>
+</pkgmetadata>