summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/higan/Manifest1
-rw-r--r--games-emulation/higan/files/higan-116_pre20210818-paths.patch44
-rw-r--r--games-emulation/higan/higan-116_pre20210818.ebuild122
3 files changed, 167 insertions, 0 deletions
diff --git a/games-emulation/higan/Manifest b/games-emulation/higan/Manifest
index b6fe03d83b0d..8c4d29547d09 100644
--- a/games-emulation/higan/Manifest
+++ b/games-emulation/higan/Manifest
@@ -1 +1,2 @@
DIST higan-116_pre20210404.tar.gz 9130899 BLAKE2B bb9830901d7014f9d442f3a3bd9bd82ad791d2ba62a3264cfc187e5d7498a5ec6eae1fff6509f5206d9a21294e2a3ef710fbed5fac3626ecc88c4156bd50f289 SHA512 8ee40d8b9867fe767d5321dc4df3e73039fa39b7ecad2eddb58c3114bcf42b1b2074396ae5c4783ca060057aeb4bca7110101cc44d9608fe7c4d5f561b3f40a5
+DIST higan-116_pre20210818.tar.gz 9131284 BLAKE2B 4d3a514b9b8ec46353066b7257814c42024bff86c462b7a121aad5b5d1969d21cd7a96097e7d9d89d35e7a7f66a14c11a35cd77be05e73eca96caa3990e1c9b5 SHA512 d218feab3a3a39cd58fd2a727320ac88a4f006aa987c26860463f577039a9124b93119ee162f7d120f3bb4c23974eec53c7a0850c6e5743a8fdc8e48d108125d
diff --git a/games-emulation/higan/files/higan-116_pre20210818-paths.patch b/games-emulation/higan/files/higan-116_pre20210818-paths.patch
new file mode 100644
index 000000000000..0652b164cfd9
--- /dev/null
+++ b/games-emulation/higan/files/higan-116_pre20210818-paths.patch
@@ -0,0 +1,44 @@
+Based on patch from Arch additionally using system's Shaders/
+
+Resulting paths:
+/usr/share/higan/{Database,Firmware,Shaders,Templates}
+~/higan/ -> ~/.local/share/higan/Systems
+
+Templates+Systems can be changed in ~/.config/higan/paths.bml and
+does not disrupt existing configurations. Shaders will use default
+~/.config/higan/Shaders over system's if it exists.
+
+https://bugs.gentoo.org/828108
+--- a/higan-ui/higan-ui.cpp
++++ b/higan-ui/higan-ui.cpp
+@@ -44,9 +44,8 @@
+ }
+ if(!directory::exists(Path::templates)) {
+- Path::templates = {Path::userData(), "higan/"};
+- directory::create(Path::templates);
++ Path::templates = {Path::sharedData(), "higan/Templates/"};
+ }
+ if(!directory::exists(Path::data)) {
+- Path::data = {Path::user(), "higan/"};
++ Path::data = {Path::userData(), "higan/Systems/"};
+ directory::create(Path::data);
+ }
+--- a/higan-ui/menus/settings.cpp
++++ b/higan-ui/menus/settings.cpp
+@@ -78,4 +78,6 @@
+
+ string location{Path::settings, "Shaders/"};
++ if(!directory::exists(location))
++ location = string{Path::sharedData(), "higan/Shaders/"};
+
+ if(settings.video.driver == "OpenGL 3.2") {
+--- a/icarus/icarus.cpp
++++ b/icarus/icarus.cpp
+@@ -9,6 +9,5 @@
+ if(inode::exists(location)) return location;
+
+- directory::create({Path::userData(), "icarus/"});
+- return {Path::userData(), "icarus/", name};
++ return {Path::sharedData(), "higan/", name};
+ }
+
diff --git a/games-emulation/higan/higan-116_pre20210818.ebuild b/games-emulation/higan/higan-116_pre20210818.ebuild
new file mode 100644
index 000000000000..e484fdff7aa0
--- /dev/null
+++ b/games-emulation/higan/higan-116_pre20210818.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop toolchain-funcs
+
+HIGAN_COMMIT="9bf1b3314b2bcc73cbc11d344b369c31562aff10"
+
+DESCRIPTION="Multi-system emulator focused on accuracy, preservation, and configurability"
+HOMEPAGE="https://github.com/higan-emu/higan"
+SRC_URI="https://github.com/higan-emu/higan/archive/${HIGAN_COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${HIGAN_COMMIT}"
+
+LICENSE="GPL-3+ ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="alsa ao +gtk openal +opengl oss +pulseaudio +sdl udev xv"
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrandr
+ alsa? ( media-libs/alsa-lib )
+ ao? ( media-libs/libao )
+ openal? ( media-libs/openal )
+ opengl? ( virtual/opengl )
+ pulseaudio? ( media-sound/pulseaudio )
+ sdl? ( media-libs/libsdl2[joystick] )
+ udev? ( virtual/libudev:= )
+ xv? ( x11-libs/libXv )
+ gtk? (
+ dev-libs/glib:2
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:3
+ x11-libs/gtksourceview:3.0=
+ x11-libs/pango
+ )
+ !gtk? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ )"
+DEPEND="
+ ${RDEPEND}
+ x11-base/xorg-proto"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ # insane build system, reinvents every built-in rule
+ "${FILESDIR}"/${PN}-116_pre20210404-makefile.patch
+ "${FILESDIR}"/${PN}-116_pre20210818-paths.patch
+)
+
+src_prepare() {
+ default
+
+ use !prefix || sed -i "s|/usr/share|${EPREFIX}&|" nall/path.hpp || die
+}
+
+src_compile() {
+ local makeopts=(
+ platform=linux
+ compiler="$(tc-getCXX)"
+ hiro=$(usex gtk gtk3 qt5)
+ )
+
+ local drivers=(
+ video.xshm
+ input.xlib
+ $(usev alsa audio.alsa)
+ $(usev ao audio.ao)
+ $(usev openal audio.openal)
+ $(usev opengl "video.glx video.glx2")
+ $(usev oss audio.oss)
+ $(usev pulseaudio "audio.pulseaudio audio.pulseaudiosimple")
+ $(usev sdl input.sdl)
+ $(usev udev input.udev)
+ $(usev xv video.xvideo)
+ )
+
+ local coreopts=(
+ cores="cv fc gb gba md ms msx ngp pce sfc sg ws"
+ ruby="${drivers[*]}"
+ build=performance
+ local=false
+ )
+
+ emake "${makeopts[@]}" "${coreopts[@]}" -C higan-ui
+
+ emake "${makeopts[@]}" -C icarus
+}
+
+src_install() {
+ dobin higan-ui/out/higan
+ domenu higan-ui/resource/higan.desktop
+ doicon higan-ui/resource/higan.png
+
+ dobin icarus/out/icarus
+ domenu icarus/resource/icarus.desktop
+ doicon icarus/resource/icarus.svg
+
+ insinto /usr/share/higan
+ doins -r icarus/{Database,Firmware}
+ use opengl && doins -r extras/Shaders
+
+ insinto /usr/share/higan/Templates
+ doins -r higan/System/.
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} ]] &&
+ ver_test ${REPLACING_VERSIONS} -lt 116_pre20210818; then
+ elog "On new installs, higan now uses ~/.local/share/higan/Systems/ rather than"
+ elog "~/higan/, and reads Templates from ${EROOT}/usr/share/higan/ on Gentoo."
+ elog "Will need to edit/delete ~/.config/higan/paths.bml for this to take effect."
+ elog
+ elog "Additionally, system's shaders will be used if ~/.config/higan/Shaders"
+ elog "does not exist, and icarus now uses the system's Database+Firmware files."
+ fi
+}