1 |
commit: 699301515a1645745a66f4eb237677df4354abd6 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 29 12:37:02 2018 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 29 13:06:40 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69930151 |
7 |
|
8 |
games-emulation/zsnes: Stop using games.eclass |
9 |
|
10 |
Package-Manager: Portage-2.3.31, Repoman-2.3.9 |
11 |
|
12 |
games-emulation/zsnes/files/zsnes-1.51-arch.patch | 4 +- |
13 |
.../files/zsnes-1.51-archopt-july-23-update.patch | 4 +- |
14 |
.../zsnes/files/zsnes-1.51-buffer.patch | 12 +-- |
15 |
.../zsnes/files/zsnes-1.51-cross-compile.patch | 8 +- |
16 |
games-emulation/zsnes/files/zsnes-1.51-gcc47.patch | 4 +- |
17 |
.../zsnes/files/zsnes-1.51-libao-thread.patch | 4 +- |
18 |
.../zsnes/files/zsnes-1.51-libpng.patch | 4 +- |
19 |
.../zsnes/files/zsnes-1.51-stack-align.patch | 4 +- |
20 |
games-emulation/zsnes/zsnes-1.51-r6.ebuild | 117 +++++++++++++++++++++ |
21 |
9 files changed, 139 insertions(+), 22 deletions(-) |
22 |
|
23 |
diff --git a/games-emulation/zsnes/files/zsnes-1.51-arch.patch b/games-emulation/zsnes/files/zsnes-1.51-arch.patch |
24 |
index 2c8b690587b..b39549871b7 100644 |
25 |
--- a/games-emulation/zsnes/files/zsnes-1.51-arch.patch |
26 |
+++ b/games-emulation/zsnes/files/zsnes-1.51-arch.patch |
27 |
@@ -1,5 +1,5 @@ |
28 |
---- configure.in.orig |
29 |
-+++ configure.in |
30 |
+--- a/configure.in.orig |
31 |
++++ b/configure.in |
32 |
@@ -233,72 +233,8 @@ |
33 |
debug=no) |
34 |
AC_MSG_CHECKING(if you want gdb friendly executable) |
35 |
|
36 |
diff --git a/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch b/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch |
37 |
index ba118878a2b..b3e466036f2 100644 |
38 |
--- a/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch |
39 |
+++ b/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch |
40 |
@@ -1,5 +1,5 @@ |
41 |
---- tools/archopt.c.old |
42 |
-+++ tools/archopt.c |
43 |
+--- a/tools/archopt.c.old |
44 |
++++ b/tools/archopt.c |
45 |
@@ -1,8 +1,30 @@ |
46 |
+/* |
47 |
+Copyright (C) 2005-2007 Nach, grinvader ( http://www.zsnes.com ) |
48 |
|
49 |
diff --git a/games-emulation/zsnes/files/zsnes-1.51-buffer.patch b/games-emulation/zsnes/files/zsnes-1.51-buffer.patch |
50 |
index 5f3049b315e..eb463682196 100644 |
51 |
--- a/games-emulation/zsnes/files/zsnes-1.51-buffer.patch |
52 |
+++ b/games-emulation/zsnes/files/zsnes-1.51-buffer.patch |
53 |
@@ -1,5 +1,5 @@ |
54 |
---- zsnes_1_51/src/initc.c.fortify |
55 |
-+++ zsnes_1_51/src/initc.c |
56 |
+--- src/initc.c.fortify |
57 |
++++ src/initc.c |
58 |
@@ -1464,8 +1464,8 @@ |
59 |
clearmem2(); |
60 |
} |
61 |
@@ -38,8 +38,8 @@ |
62 |
|
63 |
if (yesoutofmemory) { asm_call(outofmemfix); } |
64 |
asm_call(GUIDoReset); |
65 |
---- zsnes_1_51/src/zstate.c.fortify |
66 |
-+++ zsnes_1_51/src/zstate.c |
67 |
+--- src/zstate.c.fortify |
68 |
++++ src/zstate.c |
69 |
@@ -99,15 +99,15 @@ |
70 |
copy_func(buffer, &cycpbl, 4); |
71 |
copy_func(buffer, &cycpblt, 4); |
72 |
@@ -68,8 +68,8 @@ |
73 |
} |
74 |
*/ |
75 |
} |
76 |
---- zsnes_1_51/src/gblvars.h.fortify |
77 |
-+++ zsnes_1_51/src/gblvars.h |
78 |
+--- src/gblvars.h.fortify |
79 |
++++ src/gblvars.h |
80 |
@@ -33,9 +33,9 @@ |
81 |
extern unsigned int SfxR0, *setaramdata, ramsize, *sram, nmiprevaddrh; |
82 |
extern unsigned int tempesi, tempedi, tempedx, tempebp; |
83 |
|
84 |
diff --git a/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch b/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch |
85 |
index 5823c6aa6ad..5c412e3e649 100644 |
86 |
--- a/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch |
87 |
+++ b/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch |
88 |
@@ -1,5 +1,5 @@ |
89 |
---- a/src/acinclude.m4 |
90 |
-+++ b/src/acinclude.m4 |
91 |
+--- src/acinclude.m4 |
92 |
++++ src/acinclude.m4 |
93 |
@@ -107,7 +107,7 @@ int main (int argc, char *argv[]) |
94 |
with_zlib=yes, |
95 |
with_zlib=no, |
96 |
@@ -18,8 +18,8 @@ |
97 |
ZLIB_CFLAGS="" |
98 |
ZLIB_LIBS="" |
99 |
ZLIB_VERSION="" |
100 |
---- a/src/Makefile.in |
101 |
-+++ b/src/Makefile.in |
102 |
+--- src/Makefile.in |
103 |
++++ src/Makefile.in |
104 |
@@ -103,8 +103,10 @@ main: makefile.dep $(Z_OBJS) |
105 |
@ZC@ -o @ZSNESEXE@ $(Z_OBJS) @ZCFLAGS@ @LDFLAGS@ |
106 |
rm -f version.o |
107 |
|
108 |
diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch b/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch |
109 |
index e5810241521..b3250fee679 100644 |
110 |
--- a/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch |
111 |
+++ b/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch |
112 |
@@ -3,8 +3,8 @@ Bug #419635 |
113 |
https://bugs.gentoo.org/show_bug.cgi?id=419635 |
114 |
Submitted by Nikos Chantziaras |
115 |
|
116 |
---- a/src/tools/depbuild.cpp |
117 |
-+++ b/src/tools/depbuild.cpp |
118 |
+--- src/tools/depbuild.cpp |
119 |
++++ src/tools/depbuild.cpp |
120 |
@@ -25,6 +25,7 @@ |
121 |
#include <string> |
122 |
#include <cstdio> |
123 |
|
124 |
diff --git a/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch b/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch |
125 |
index 880e08c698f..1ae0a1467b3 100644 |
126 |
--- a/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch |
127 |
+++ b/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch |
128 |
@@ -1,5 +1,5 @@ |
129 |
---- linux/audio.c.old 2007-01-09 20:19:12.000000000 -0500 |
130 |
-+++ linux/audio.c 2007-12-30 20:33:07.000000000 -0500 |
131 |
+--- a/linux/audio.c.old 2007-01-09 20:19:12.000000000 -0500 |
132 |
++++ b/linux/audio.c 2007-12-30 20:33:07.000000000 -0500 |
133 |
@@ -177,11 +177,7 @@ |
134 |
} |
135 |
else |
136 |
|
137 |
diff --git a/games-emulation/zsnes/files/zsnes-1.51-libpng.patch b/games-emulation/zsnes/files/zsnes-1.51-libpng.patch |
138 |
index 4e49054c097..fd974e799e3 100644 |
139 |
--- a/games-emulation/zsnes/files/zsnes-1.51-libpng.patch |
140 |
+++ b/games-emulation/zsnes/files/zsnes-1.51-libpng.patch |
141 |
@@ -1,5 +1,5 @@ |
142 |
---- acinclude.m4 |
143 |
-+++ acinclude.m4 |
144 |
+--- a/acinclude.m4 |
145 |
++++ b/acinclude.m4 |
146 |
@@ -163,21 +163,21 @@ |
147 |
libpng_prefix="") |
148 |
|
149 |
|
150 |
diff --git a/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch b/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch |
151 |
index 32136643cae..5dcbf3ad9eb 100644 |
152 |
--- a/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch |
153 |
+++ b/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch |
154 |
@@ -1,5 +1,5 @@ |
155 |
---- zsnes_1_51/src/linux/sdllink.c.old |
156 |
-+++ zsnes_1_51/src/linux/sdllink.c |
157 |
+--- src/linux/sdllink.c.old |
158 |
++++ src/linux/sdllink.c |
159 |
@@ -773,11 +773,11 @@ BOOL InitInput() |
160 |
{ |
161 |
InitJoystickInput(); |
162 |
|
163 |
diff --git a/games-emulation/zsnes/zsnes-1.51-r6.ebuild b/games-emulation/zsnes/zsnes-1.51-r6.ebuild |
164 |
new file mode 100644 |
165 |
index 00000000000..bf1934226ab |
166 |
--- /dev/null |
167 |
+++ b/games-emulation/zsnes/zsnes-1.51-r6.ebuild |
168 |
@@ -0,0 +1,117 @@ |
169 |
+# Copyright 1999-2018 Gentoo Foundation |
170 |
+# Distributed under the terms of the GNU General Public License v2 |
171 |
+ |
172 |
+EAPI=6 |
173 |
+inherit autotools desktop flag-o-matic toolchain-funcs pax-utils |
174 |
+ |
175 |
+DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly" |
176 |
+HOMEPAGE="http://www.zsnes.com/ http://ipherswipsite.com/zsnes/" |
177 |
+SRC_URI="mirror://sourceforge/zsnes/${PN}${PV//./}src.tar.bz2" |
178 |
+ |
179 |
+LICENSE="GPL-2" |
180 |
+SLOT="0" |
181 |
+KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" |
182 |
+IUSE="ao custom-cflags +debug opengl pax_kernel png" |
183 |
+ |
184 |
+RDEPEND=" |
185 |
+ media-libs/libsdl[sound,video,abi_x86_32(-)] |
186 |
+ >=sys-libs/zlib-1.2.3-r1[abi_x86_32(-)] |
187 |
+ ao? ( media-libs/libao[abi_x86_32(-)] ) |
188 |
+ debug? ( sys-libs/ncurses:0=[abi_x86_32(-)] ) |
189 |
+ opengl? ( virtual/opengl[abi_x86_32(-)] ) |
190 |
+ png? ( media-libs/libpng:0=[abi_x86_32(-)] ) |
191 |
+" |
192 |
+DEPEND="${RDEPEND} |
193 |
+ dev-lang/nasm |
194 |
+ debug? ( virtual/pkgconfig ) |
195 |
+" |
196 |
+ |
197 |
+S="${WORKDIR}/${PN}_${PV//./_}/src" |
198 |
+ |
199 |
+src_prepare() { |
200 |
+ default |
201 |
+ |
202 |
+ # Fixing compilation without libpng installed |
203 |
+ # Fix bug #186111 |
204 |
+ # Fix bug #214697 |
205 |
+ # Fix bug #170108 |
206 |
+ # Fix bug #260247 |
207 |
+ # Fix compability with libpng15 wrt #378735 |
208 |
+ # Fix buffer overwrite #257963 |
209 |
+ # Fix gcc47 compile #419635 |
210 |
+ # Fix stack alignment issue #503138 |
211 |
+ eapply \ |
212 |
+ "${FILESDIR}"/${P}-libpng.patch \ |
213 |
+ "${FILESDIR}"/${P}-archopt-july-23-update.patch \ |
214 |
+ "${FILESDIR}"/${P}-gcc43.patch \ |
215 |
+ "${FILESDIR}"/${P}-libao-thread.patch \ |
216 |
+ "${FILESDIR}"/${P}-depbuild.patch \ |
217 |
+ "${FILESDIR}"/${P}-CC-quotes.patch \ |
218 |
+ "${FILESDIR}"/${P}-libpng15.patch \ |
219 |
+ "${FILESDIR}"/${P}-buffer.patch \ |
220 |
+ "${FILESDIR}"/${P}-gcc47.patch \ |
221 |
+ "${FILESDIR}"/${P}-stack-align.patch \ |
222 |
+ "${FILESDIR}"/${P}-cross-compile.patch \ |
223 |
+ "${FILESDIR}"/${P}-arch.patch |
224 |
+ |
225 |
+ # The sdl detection logic uses AC_PROG_PATH instead of |
226 |
+ # AC_PROG_TOOL, so force the var to get set the way we |
227 |
+ # need for things to work correctly. |
228 |
+ tc-is-cross-compiler && export ac_cv_path_SDL_CONFIG=${CHOST}-sdl-config |
229 |
+ |
230 |
+ sed -i -e '67i#define OF(x) x' zip/zunzip.h || die |
231 |
+ |
232 |
+ # Remove hardcoded CFLAGS and LDFLAGS |
233 |
+ sed -i \ |
234 |
+ -e '/^CFLAGS=.*local/s:-pipe.*:-Wall -I.":' \ |
235 |
+ -e '/^LDFLAGS=.*local/d' \ |
236 |
+ -e '/\w*CFLAGS=.*fomit/s:-O3.*$STRIP::' \ |
237 |
+ -e '/lncurses/s:-lncurses:`pkg-config ncurses --libs`:' \ |
238 |
+ -e '/lcurses/s:-lcurses:`pkg-config ncurses --libs`:' \ |
239 |
+ configure.in || die |
240 |
+ sed -i \ |
241 |
+ -e 's/configure.in/configure.ac/' \ |
242 |
+ Makefile.in || die |
243 |
+ mv configure.in configure.ac || die |
244 |
+ eautoreconf |
245 |
+} |
246 |
+ |
247 |
+src_configure() { |
248 |
+ tc-export CC |
249 |
+ export BUILD_CXX=$(tc-getBUILD_CXX) |
250 |
+ export NFLAGS=-O1 |
251 |
+ use amd64 && multilib_toolchain_setup x86 |
252 |
+ use custom-cflags || strip-flags |
253 |
+ |
254 |
+ append-cppflags -U_FORTIFY_SOURCE #257963 |
255 |
+ |
256 |
+ econf \ |
257 |
+ $(use_enable ao libao) \ |
258 |
+ $(use_enable debug debugger) \ |
259 |
+ $(use_enable png libpng) \ |
260 |
+ $(use_enable opengl) \ |
261 |
+ --disable-debug \ |
262 |
+ --disable-cpucheck |
263 |
+} |
264 |
+ |
265 |
+src_compile() { |
266 |
+ emake makefile.dep |
267 |
+ emake |
268 |
+} |
269 |
+ |
270 |
+src_install() { |
271 |
+ dobin zsnes |
272 |
+ if use pax_kernel; then |
273 |
+ pax-mark m "${D}""${GAMES_BINDIR}"/zsnes || die |
274 |
+ fi |
275 |
+ |
276 |
+ newman linux/zsnes.1 zsnes.6 |
277 |
+ |
278 |
+ dodoc \ |
279 |
+ ../docs/{readme.1st,authors.txt,srcinfo.txt,stdards.txt,support.txt,thanks.txt,todo.txt,README.LINUX} \ |
280 |
+ ../docs/readme.txt/* |
281 |
+ HTML_DOCS="../docs/readme.htm/*" einstalldocs |
282 |
+ |
283 |
+ make_desktop_entry zsnes ZSNES |
284 |
+ newicon icons/48x48x32.png ${PN}.png |
285 |
+} |