Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/higan/files/, games-emulation/higan/
Date: Fri, 08 Jul 2016 18:56:02
Message-Id: 1468002479.d5a251319c0441428d1cad733669e56e8afdd7b9.monsieurp@gentoo
1 commit: d5a251319c0441428d1cad733669e56e8afdd7b9
2 Author: Andrea Blankenstijn <a.b <AT> kaze <DOT> ch>
3 AuthorDate: Thu Jul 7 11:44:44 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 8 18:27:59 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5a25131
7
8 games-emulation/higan: version bump to 099.
9
10 * new USE icarus: replace ananke.
11
12 * remove USE performance profiles doesn't exist anymore (?).
13
14 Package-Manager: portage-2.2.26
15 Closes: https://github.com/gentoo/gentoo/pull/1841
16
17 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
18
19 games-emulation/higan/Manifest | 1 +
20 games-emulation/higan/files/higan-099-QA.patch | 79 ++++++++++++++
21 games-emulation/higan/higan-099.ebuild | 138 +++++++++++++++++++++++++
22 games-emulation/higan/metadata.xml | 1 +
23 4 files changed, 219 insertions(+)
24
25 diff --git a/games-emulation/higan/Manifest b/games-emulation/higan/Manifest
26 index 69de8c5..1500194 100644
27 --- a/games-emulation/higan/Manifest
28 +++ b/games-emulation/higan/Manifest
29 @@ -1 +1,2 @@
30 DIST higan_v094-source.tar.xz 882732 SHA256 5e149df9d50c1066eb97c0d66665428d75304da782bba5a87078b87fc311151b SHA512 e7e48c76cdc93d2d66db1fa0c71e64903cf4188571b2d5ecb8066dd4e2172a67da4dee68bed6fd0a532b6fd397fa4f537b97de58cc5043a9e970d48d0b66b0da WHIRLPOOL 42e2b628e83b6cb8d87ce82c2e91105b0be06790a1927aa7d52f0b1a181af5d627f467009d15daffd470e3c38a2bb7d67ba84919fb1aa9c8d06ad88ca3163641
31 +DIST higan_v099-source.7z 1012348 SHA256 1c62f2f1ec98da9d098c2df5c8b539a192b5a70eff0896c3e27d541fb4d28e86 SHA512 567f0c9841fb3fed1c78f2afcd9865cbfe06d04b995d4dc468269e459249b758daed949b461b5b8645ebab40edc1f4f28a566de5795325dae4f604190ca9eae6 WHIRLPOOL 096b4da32f9f030a402690e81dc64e0a242072fd7cb3aa1520783a3a69bd76ff73d3fbcfb3624ad9cf9396e5123777a9cd4fd13f04191fe7faf9ec385c1a929e
32
33 diff --git a/games-emulation/higan/files/higan-099-QA.patch b/games-emulation/higan/files/higan-099-QA.patch
34 new file mode 100644
35 index 0000000..fd4eb13
36 --- /dev/null
37 +++ b/games-emulation/higan/files/higan-099-QA.patch
38 @@ -0,0 +1,79 @@
39 +diff -Naur a/higan/GNUmakefile b/higan/GNUmakefile
40 +--- a/higan/GNUmakefile 2016-06-17 18:56:06.414883957 +0200
41 ++++ b/higan/GNUmakefile 2016-06-17 18:56:19.075903050 +0200
42 +@@ -4,7 +4,7 @@
43 + # target := loki
44 + # console := true
45 +
46 +-flags += -I. -I.. -O3
47 ++flags += -I. -I..
48 + objects := libco audio video resource
49 +
50 + # profile-guided optimization mode
51 +@@ -31,7 +31,7 @@
52 + else ifeq ($(platform),macosx)
53 + flags += -march=native
54 + else ifneq ($(filter $(platform),linux bsd),)
55 +- flags += -march=native -fopenmp
56 ++ flags += -fopenmp
57 + link += -fopenmp
58 + link += -Wl,-export-dynamic
59 + link += -lX11 -lXext
60 +@@ -42,9 +42,9 @@
61 + compile = \
62 + $(strip \
63 + $(if $(filter %.c,$<), \
64 +- $(compiler) $(cflags) $(flags) $1 -c $< -o $@, \
65 ++ $(compiler) $(cflags) $(flags) $(CFLAGS) $1 -c $< -o $@, \
66 + $(if $(filter %.cpp,$<), \
67 +- $(compiler) $(cppflags) $(flags) $1 -c $< -o $@ \
68 ++ $(compiler) $(cppflags) $(flags) $(CXXFLAGS) $1 -c $< -o $@ \
69 + ) \
70 + ) \
71 + )
72 +
73 +--- a/higan/target-tomoko/GNUmakefile 2016-06-17 19:10:27.729182818 +0200
74 ++++ b/higan/target-tomoko/GNUmakefile 2016-06-17 19:14:34.034554246 +0200
75 +@@ -45,10 +45,10 @@
76 + objects := $(patsubst %,obj/%.o,$(objects))
77 +
78 + obj/ruby.o: ../ruby/ruby.cpp $(call rwildcard,../ruby/)
79 +- $(compiler) $(rubyflags) -c $< -o $@
80 ++ $(compiler) $(rubyflags) $(CXXFLAGS) -c $< -o $@
81 +
82 + obj/hiro.o: ../hiro/hiro.cpp $(call rwildcard,../hiro/)
83 +- $(compiler) $(hiroflags) -c $< -o $@
84 ++ $(compiler) $(hiroflags) $(CXXFLAGS) -c $< -o $@
85 +
86 + obj/ui-tomoko.o: $(ui)/tomoko.cpp $(call rwildcard,$(ui)/)
87 + obj/ui-program.o: $(ui)/program/program.cpp $(call rwildcard,$(ui)/)
88 +@@ -64,7 +64,7 @@
89 +
90 + # targets
91 + build: $(objects)
92 +- $(strip $(compiler) -o out/$(name) $(objects) $(link))
93 ++ $(strip $(CXX) $(CXXFLAGS) -o out/$(name) $(objects) $(link))
94 + ifeq ($(platform),macosx)
95 + @if [ -d out/$(name).app ]; then rm -r out/$(name).app; fi
96 + mkdir -p out/$(name).app/Contents/MacOS/
97 +
98 +--- a/icarus/GNUmakefile 2016-07-05 16:42:09.198091772 +0200
99 ++++ b/icarus/GNUmakefile 2016-07-05 16:48:14.388351427 +0200
100 +@@ -2,7 +2,7 @@
101 + include ../hiro/GNUmakefile
102 +
103 + name := icarus
104 +-flags += -I.. -O3
105 ++flags += -I.. $(CXXFLAGS)
106 + link +=
107 +
108 + ifeq ($(platform),windows)
109 +@@ -14,7 +14,7 @@
110 + objects += $(if $(call streq,$(platform),windows),obj/resource.o)
111 +
112 + all: $(objects)
113 +- $(call unique,$(compiler) -o out/$(name) $(objects) $(link) $(hirolink))
114 ++ $(call unique,$(compiler) -o out/$(name) $(objects) $(link) $(hirolink) $(LDFLAGS))
115 + ifeq ($(platform),macosx)
116 + @if [ -d out/$(name).app ]; then rm -r out/$(name).app; fi
117 + mkdir -p out/$(name).app/Contents/MacOS/
118
119 diff --git a/games-emulation/higan/higan-099.ebuild b/games-emulation/higan/higan-099.ebuild
120 new file mode 100644
121 index 0000000..58bee1c
122 --- /dev/null
123 +++ b/games-emulation/higan/higan-099.ebuild
124 @@ -0,0 +1,138 @@
125 +# Copyright 1999-2016 Gentoo Foundation
126 +# Distributed under the terms of the GNU General Public License v2
127 +# $Id$
128 +
129 +EAPI=5
130 +
131 +inherit eutils gnome2-utils toolchain-funcs qmake-utils games
132 +
133 +MY_P=${PN}_v${PV}-source
134 +
135 +DESCRIPTION="A Nintendo multi-system emulator formerly known as bsnes"
136 +HOMEPAGE="http://byuu.org/higan/ https://code.google.com/p/higan/"
137 +SRC_URI="http://download.byuu.org/${MY_P}.7z"
138 +
139 +LICENSE="GPL-3"
140 +SLOT="0"
141 +KEYWORDS="~amd64 ~x86"
142 +IUSE="ao +alsa +icarus openal opengl oss pulseaudio qt4 +sdl udev xv"
143 +REQUIRED_USE="|| ( ao openal alsa pulseaudio oss )
144 + || ( xv opengl sdl )"
145 +
146 +RDEPEND="
147 + x11-libs/libX11
148 + x11-libs/libXext
149 + ao? ( media-libs/libao )
150 + openal? ( media-libs/openal )
151 + alsa? ( media-libs/alsa-lib )
152 + pulseaudio? ( media-sound/pulseaudio )
153 + xv? ( x11-libs/libXv )
154 + opengl? ( virtual/opengl )
155 + sdl? ( media-libs/libsdl[X,joystick,video] )
156 + udev? ( virtual/udev )
157 + !qt4? ( x11-libs/gtk+:2 )
158 + qt4? ( >=dev-qt/qtgui-4.5:4 )"
159 +DEPEND="${RDEPEND}
160 + virtual/pkgconfig"
161 +
162 +S=${WORKDIR}/${MY_P}
163 +
164 +disable_module() {
165 + sed -i \
166 + -e "s|$1\b||" \
167 + "${S}"/higan/target-tomoko/GNUmakefile || die
168 +}
169 +
170 +src_prepare() {
171 + epatch "${FILESDIR}"/${P}-QA.patch
172 +
173 + sed -i \
174 + -e "/handle/s#/usr/local/lib#/usr/$(get_libdir)#" \
175 + nall/dl.hpp || die "fixing libdir failed!"
176 +
177 + # audio modules
178 + use ao || disable_module audio.ao
179 + use openal || disable_module audio.openal
180 + use pulseaudio || { disable_module audio.pulseaudio
181 + disable_module audio.pulseaudiosimple ;}
182 + use oss || disable_module audio.oss
183 + use alsa || disable_module audio.alsa
184 +
185 + # video modules
186 + use opengl || disable_module video.glx
187 + use xv || disable_module video.xv
188 + use sdl || disable_module video.sdl
189 +
190 + # input modules
191 + use sdl || disable_module input.sdl
192 + use udev || disable_module input.udev
193 +
194 + # regenerate .moc if needed
195 + if use qt4; then
196 + cd hiro/qt || die
197 + "$(qt4_get_bindir)"/moc -i -I. -o qt.moc qt.hpp || die
198 + fi
199 +}
200 +
201 +src_compile() {
202 + local mytoolkit
203 +
204 + if use qt4; then
205 + mytoolkit="qt"
206 + else
207 + mytoolkit="gtk"
208 + fi
209 +
210 + if use icarus; then
211 + cd "${S}/icarus" || die
212 + emake \
213 + platform="linux" \
214 + compiler="$(tc-getCXX)"
215 + fi
216 +
217 + cd "${S}/higan" || die
218 + emake \
219 + platform="linux" \
220 + compiler="$(tc-getCXX)" \
221 + hiro="${mytoolkit}"
222 +
223 + sed \
224 + -e "s:%GAMES_DATADIR%:${GAMES_DATADIR}:" \
225 + < "${FILESDIR}"/${PN}-wrapper \
226 + > out/${PN}-wrapper || die "generating wrapper failed!"
227 +}
228 +
229 +src_install() {
230 + if use icarus; then
231 + newgamesbin "${S}"/icarus/out/icarus icarus
232 + fi
233 + newgamesbin "${S}"/higan/out/${PN} ${PN}.bin
234 + newgamesbin "${S}"/higan/out/${PN}-wrapper ${PN}
235 + make_desktop_entry "${PN}" "${PN}"
236 +
237 + # copy home directory stuff to a global location
238 + insinto "${GAMES_DATADIR}"/${PN}
239 + doins -r higan/data/cheats.bml higan/profile/*
240 +
241 + doicon -s 512 higan/data/${PN}.png
242 +
243 + prepgamesdirs
244 +}
245 +
246 +pkg_preinst() {
247 + games_pkg_preinst
248 + gnome2_icon_savelist
249 +}
250 +
251 +pkg_postinst() {
252 + #elog "optional dependencies:"
253 + #elog " dev-games/higan-ananke (extra rom load options)"
254 + #elog " games-util/higan-purify (Rom purifier)"
255 +
256 + games_pkg_postinst
257 + gnome2_icon_cache_update
258 +}
259 +
260 +pkg_postrm() {
261 + gnome2_icon_cache_update
262 +}
263
264 diff --git a/games-emulation/higan/metadata.xml b/games-emulation/higan/metadata.xml
265 index e8be774..fad703a 100644
266 --- a/games-emulation/higan/metadata.xml
267 +++ b/games-emulation/higan/metadata.xml
268 @@ -6,6 +6,7 @@
269 <name>Gentoo Games Project</name>
270 </maintainer>
271 <use>
272 + <flag name="icarus">Build icarus library manager</flag>
273 <flag name="profile_accuracy">
274 Compile a binary optimized for accuracy</flag>
275 <flag name="profile_balanced">