Add higan v104

This commit is contained in:
Austen Adler 2017-09-21 15:39:10 -04:00
parent ba4a5f4688
commit 2a984b078d
5 changed files with 258 additions and 0 deletions

View File

@ -0,0 +1,5 @@
AUX higan-104-QA.patch 2597 SHA256 6add96752eb7388fb7ef0ca0db47439caf2b90c8055305fbf36acaeaa814bc2e SHA512 421584e9c26ae66117b5f4d95a7afb3b21674fd112ca33fca7cb0c33e7382f8dda100900536eab3f413a6a3cf0f98cc079644b8cee309f17f50c1bd99604728e WHIRLPOOL e7ce4aa4b573fb0cd5ca836d3f353633607670715c31b2e6d2de6c9b97a6eddf20a38402e30d8270705cb33597fdfab1a556f0a74808a0017247c746329d4aed
AUX higan-wrapper 124 SHA256 a2640df99434ad820ead4015e071681b05ddd10a44eaed9571d7a28bba4b8def SHA512 af3163d06f3bc14b14ec38cf84d11cc706eb6359727743eea35670b4f1ac120af40102ee5409695eba00ead70fcf964073c24d2f47d6824776391927ebbf3f45 WHIRLPOOL 74e4a9232668dc61c300a49fbe05d654313a5867946497e1e95c46d9d4140634d0eb74eef8969fad5ab38b0d635069698a7e635058809ed2bf8792e89401c81d
DIST higan_v104-source.7z 922223 SHA256 342400ba494b37a95210f11e6d941566e50a772095586406c14d75293f525544 SHA512 acb53f53ab79558d65eaba2aacbf42eaeae7fd4d831a8ef7c96c8b77c1bd67571ea480764f9cb8b376d5c02f380d4a835b44decbd4cece420329c14ef86909f8 WHIRLPOOL 9c6ae66a739f6a5e1f31786efd54fc445cfc78aa92556a99007cc503fda160ec778d26a8b881494f0fe263d05d8555774ca72a83799f2f12438fea6c163e0529
EBUILD higan-104.ebuild 3321 SHA256 f71305983e895ea8dc68fa130c62e8d5f346d0ad2f5c1ebdb7d97237571df547 SHA512 826e888abda2b7f5340277b0b6d2b470b553449cf36a1e7ff748b559df0ad69079ebff49770155529b8c314429d43ec15a03f3be69c599f407fa9782ddb270ca WHIRLPOOL fde570c54a4ca436c3b0ed05bbac7374c05247fec4c393c4f28ff6b1408e15056454805f7fa9e83b78dfbcbdea7b44065da96cd2c5175b04023ce9af0ddb272c
MISC metadata.xml 636 SHA256 c566d8169f12d492471e65ca8a9bdd7a255b71d27cbafbd883f97eef53d998dd SHA512 a835b9cb4fa482754349eaddee279a6bca17cbc070806c0a59c923502159375bbfb481964faae23bbee8379fdbe7e9f0e070cbc783e3c2e62ddd2d88f511170b WHIRLPOOL 667f7810cd3fb187c024604c697338c3524bc170673120a28a6fce7eb74c1d156bf86bd237c618e90d3b8582a9d17ef20749bd89433965ad76c7cb6a3b37201f

View File

@ -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/

View File

@ -0,0 +1,7 @@
#!/bin/sh
[ -e $HOME/.config/ ] || mkdir $HOME/.config/
cp -ru "%GAMES_DATADIR%/higan" $HOME/.config/
exec ${0}.bin "$@"

View File

@ -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
}

View File

@ -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>