From 0f15659d48c193027158492acb726297501202c5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 25 Dec 2021 20:34:27 +0000 Subject: gentoo xmass resync : 25.12.2021 --- games-emulation/zsnes/Manifest | 24 +--- .../zsnes/files/zsnes-1.51-CC-quotes.patch | 20 ---- .../zsnes/files/zsnes-1.51-ao-crash.patch | 30 ----- games-emulation/zsnes/files/zsnes-1.51-arch.patch | 77 ------------ .../zsnes/files/zsnes-1.51-buffer.patch | 85 -------------- games-emulation/zsnes/files/zsnes-1.51-c++17.patch | 76 ------------ .../zsnes/files/zsnes-1.51-cross-compile.patch | 34 ------ .../zsnes/files/zsnes-1.51-depbuild.patch | 24 ---- .../zsnes/files/zsnes-1.51-gcc-10.patch | 11 -- .../zsnes/files/zsnes-1.51-gcc43-20071031.patch | 39 ------- games-emulation/zsnes/files/zsnes-1.51-gcc47.patch | 15 --- .../zsnes/files/zsnes-1.51-libao-thread.patch | 25 ---- .../zsnes/files/zsnes-1.51-libpng.patch | 33 ------ .../zsnes/files/zsnes-1.51-libpng15.patch | 12 -- .../zsnes/files/zsnes-1.51-stack-align-v2.patch | 56 --------- .../zsnes/files/zsnes-1.51-stack-align-v3.patch | 40 ------- .../zsnes/files/zsnes-1.51-stack-align-v4.patch | 45 ------- .../zsnes/files/zsnes-2.0.9-cc-quotes.patch | 8 ++ .../zsnes/files/zsnes-2.0.9-gentoo-zlib.patch | 12 ++ games-emulation/zsnes/metadata.xml | 18 ++- games-emulation/zsnes/zsnes-1.51-r11.ebuild | 129 --------------------- games-emulation/zsnes/zsnes-2.0.9.ebuild | 63 ++++++++++ 22 files changed, 96 insertions(+), 780 deletions(-) delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-CC-quotes.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-ao-crash.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-arch.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-buffer.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-c++17.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-depbuild.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-gcc-10.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-gcc47.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-libpng.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-libpng15.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-stack-align-v2.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch delete mode 100644 games-emulation/zsnes/files/zsnes-1.51-stack-align-v4.patch create mode 100644 games-emulation/zsnes/files/zsnes-2.0.9-cc-quotes.patch create mode 100644 games-emulation/zsnes/files/zsnes-2.0.9-gentoo-zlib.patch delete mode 100644 games-emulation/zsnes/zsnes-1.51-r11.ebuild create mode 100644 games-emulation/zsnes/zsnes-2.0.9.ebuild (limited to 'games-emulation/zsnes') diff --git a/games-emulation/zsnes/Manifest b/games-emulation/zsnes/Manifest index 95d184a36b66..3fb9332efcca 100644 --- a/games-emulation/zsnes/Manifest +++ b/games-emulation/zsnes/Manifest @@ -1,19 +1,5 @@ -AUX zsnes-1.51-CC-quotes.patch 740 BLAKE2B f41e66a5d2f9b54c8ed4f17fafc7afdd73e35202c083d1db375b26b89f03b991d36d279d10c7c17076f31b87d1fbad276e5c5c4ce333d2cb0f0fc7641b562845 SHA512 2347910158934a7c8b90a6739f923d7a1f94e963515dca42d45eb97e6165c5f80c30d28fd151537a7a80bba16d2462568ff1c1dac93a855990f0418aaf059776 -AUX zsnes-1.51-ao-crash.patch 1769 BLAKE2B f5b9c43c6c5c6eb0c211c60890fa11aa1e1fcc3f327f4a8a0864c494f0b9badadd287620001efb8d174865fb4449684b770aa10563229221980e424d4e112faa SHA512 a7a4a71bac72cd467ea2c0c98effb704f86817209dc9fbd034c35ca205270e5651d9223559a95523a91a2d9b17e61afac12d8d0375810e971b37d73c248c16f9 -AUX zsnes-1.51-arch.patch 2484 BLAKE2B 036f749d832efc976a7225e47d6b7ac5e1b69af235a4196e9706fe46d447793a1e3f88e49fe34229cd71353b987b7ef123bbebf7c822ca32025c60b0c9813b57 SHA512 cc75584780e442d7fbcd4e26a9395d8e85570883f93f63b1fcb604d601acde88295861e15a6cee1d50bca836fc52efd4f5df9c84fb73fbe04fa76ec34ae3b4a1 -AUX zsnes-1.51-buffer.patch 3091 BLAKE2B a87e0b6547aeaa9f585d76a8ee080895573015fe42b0df2161268754ff01c046fd234997000ef484f66710dfd30e145d9d4db2f373a568e99deec2a8637db285 SHA512 0faf34338ff3fd85985dc16d2a58aa9e2ac1887db8d26bc210fc6965f6cc743c6c56b8b58bea72341d8ee1fed59c438db801000be5ae6bf4e26789e9bed89d25 -AUX zsnes-1.51-c++17.patch 2520 BLAKE2B 0295b0e211e2ec8f4988f42299a78d477ba29128519fdb6542f3495d7770b44c245d76264d3dbf97008a9a857da270ce753b90974b705af4b6a319f3389b47dd SHA512 abb9dd3cbc24ace02f132e44a44c3454402c34dcbcf40b2d3118befbe7553e71111382bd48ce281f05ecf2832ce814001f17b1598d155b9abb20943500ab5e99 -AUX zsnes-1.51-cross-compile.patch 934 BLAKE2B be18829454407c99aba00cb8126573f5f3e3ed8e18b2bb50811b855ba81137a16b90601c28cab9fce8d865e522cb66bb797d46a22090dd994c71aef672be99f2 SHA512 ece4a9f51314c7318babaf689fb44c1502ec5bc32808613211865daf1368cc1069b70ad4c1c4ec7b127cf707a0b093c356a8b50e5357099894656c78cf28738f -AUX zsnes-1.51-depbuild.patch 559 BLAKE2B 38309177599aee8dafcbded6a027d66b991e85aac4c77fda0485b7777467c056386797041223a556b3cfff4b926e5a0b4004baae4264a765354a6dc2cb39ac75 SHA512 46955153ec6d2ecd5a295117c3ecc911a566de69f29f4d29decc98867d03e4a53a980a3c75d8ff19bbd1655eb291069fbbd598e002a73ebdbdc94c135f852c6e -AUX zsnes-1.51-gcc-10.patch 409 BLAKE2B 4508e17379148a504a171110ddb121df3666dc9430a477d67b33fbd3544dff6799b159c9fe1f8c51fe2ffdf6d5c3fd1d809181942b774639cb7aad03fdaa2929 SHA512 28f1e215c0b85ffaae8f5128a79778532119bb51a89f7e4a6ee655aee0bcf520086f25c60ff303a5a3f8ea0b976aa4c29a3f68db0d320109ecd4349311bfedfe -AUX zsnes-1.51-gcc43-20071031.patch 739 BLAKE2B 798bb1b45bd82a7e25c5923a2653aa61e2f2b197e26ca1e6cecdf5d55ecd83263c5aae17aee18419d0a14f58c6a24b02d0c31212189561d4a355d9f3e2fc386e SHA512 0ab19c1fadaf0ac07a7641366a56c5a2f7227e2fc39fe904e27954596ebee64174242b98a873abf6ee52b8e8335ce277189606e7a376ae02d4a95498cce24a40 -AUX zsnes-1.51-gcc47.patch 312 BLAKE2B 927c6179fbbcd3fb161b5b18e025090acce178eae0586b7c20e48cdba091572d30c224aa80bb8a49c16d29fb9045c0207b26692651a15a53c2b4b90780c3f0c2 SHA512 aa9f111359e96118729e684562618d72231c5c475e736c53862cfe9d21b8c4db29056ec0476dcc7e50dd501a77619671fb8834be093086c7e752100c917060fc -AUX zsnes-1.51-libao-thread.patch 667 BLAKE2B 76bc0abf16f68c9752a727817cff209daa2c0c29f31e6045441e202083f47559cb50c1a6a998c12621a298fa3901bc1d52701b176b8fd594ca116f990d3c5208 SHA512 43c28d4539df5c8ea4d3d0415c65afec3eb9215971a5ff0532b3b147b2fa3f870aadf07eb1e643e986c39d56760c0292447d467418865826ddc8c7aea64cc005 -AUX zsnes-1.51-libpng.patch 858 BLAKE2B f0ad46176cf5729d0a5be9e4307a28628e38c3d18043f0ff897dfd1cf901f0f9fb7ff80d25095fdaa9b6b1be52fe3c95f4e28b65042b4c4aad33a27125c7eb02 SHA512 2c25fb3294357a38ed8e119d4b4d60f7bd6f28724b2274a620465962e96e008f2a29273f46d4813e91b9128879218f401bb91b1a6df4c156b9ff7856b26657b0 -AUX zsnes-1.51-libpng15.patch 510 BLAKE2B 6281a27c6029ee94947b282fe5c06a67e7670d3168d5f4ae90573d12e8e6d5c467a9691cdd161158f117e341466bc7a3e99d516b95624534773027279aba4f7a SHA512 4191987cad2f8dd7d7fd1d4f8f0c60de07059f18a60cb9bb94f1e5c35c06122032de9887762ebcf2d255f24c3e90aa5b4f6a7540a8e4dbdc4ce5f7d3b3e3b532 -AUX zsnes-1.51-stack-align-v2.patch 1451 BLAKE2B b4570fa9d614d516375f1b7d2a9b3b7c9bf432f453425d2ee3035e78d8d946355551044d712528907c3a1f29b3531034b5949224398801e04270df85ada5ab00 SHA512 c3be01f36973615c55c643d1d916742f8e3a34e9957b42d1d7224a99790713025bb154e5e8c2833fd1e8d26240c6251a70c8a9f36fefe661480077b1b06871c8 -AUX zsnes-1.51-stack-align-v3.patch 1015 BLAKE2B 65e23f78a801f8633847ece88fe49471cd7244795c1eacfe16310790a7b8f7270368573b2fe73df124504f6792e993895c697d9a04c5338e7f9759fd14bda56c SHA512 b93c28f7ada13fe30497ab32ca35c6ad2fa52aa1a34cceb87c911abf76f1cb5f1ecf73350da03a2333ffc0f0747ab013d25a7822e00833db71ea3a4e1ab10540 -AUX zsnes-1.51-stack-align-v4.patch 1072 BLAKE2B bea28efa6092244ab5bc8cfd21b37d694dc9aab8ad998cced361a4187f41102c00df2fb24b63f495be2b24e83e848023dbf1dee025738f92b89ec84fbfa5e602 SHA512 405963bc84026289001bb375af81879f80716015af774f4c5f9ff185763f489e9982efabdd9fb1146706e5be4bc20d847179ffc5fc6a56564498aa9400e942c2 -DIST zsnes-1.51-20071031.tar.bz2 1072340 BLAKE2B d67c92e382ca130d4138d21fbb2effc06539d1c7e3aabf0339c9b7e773521daf2d3cb0bcef75991e1a4453fcc86903d3dead48d90806489c8b4bf7677f8ebf3b SHA512 b10373cf81b201a33dc60c728431d4f69d36de31fcf6f137b623ea206a2998f722dcd6132daec1d0bf14a05ae52f3ee9ecee4334517039be554db85c9f7b8274 -EBUILD zsnes-1.51-r11.ebuild 3373 BLAKE2B a5491a745a38fb571d5c4b7a14bfc0e1799217d854e5c1bf09e9994ffb9b10582fc3fdfb862290a6cec214748eff5ea4d4b779267bb1adee68f075054397f191 SHA512 2d456c41301d564a8eef53ed005b77445f3dd848731b2424ecae4665f612b00515d178456891cb5fb9c8cd9a0bcdd77b87c10658f1fd667de4a013d1e4e75b79 -MISC metadata.xml 414 BLAKE2B 129654ddc5418524da79ecc07737f2ae53574d6513e15034154e60493620741d6dc3e64f0dcfebfb1767254cf02b7bb5b2a73e56c5fdb2633ae3a2aa637c132d SHA512 568ccc1d7492b3afe34a419e87e21d40c2905f2b02b457353b79eab3752830217416031024f8804e2501babc788271b7593d561d3ed6d5f0f267772b206f6be0 +AUX zsnes-2.0.9-cc-quotes.patch 375 BLAKE2B 8d9295648dbed975c36494f6d8f8253d40e03b21d41ee41d306439411fb989962ea787c231b00b0f61ddeef459b7cead357b01c49df281380cd8a10b3983fc32 SHA512 554b3634edb5a4d542b359e4a3bd248ecaa3888e273d04d846389716b637bb167e1b8eb19abcaf025051a31a1b459d3fb84a648f413f0654265d1ca30c0e5448 +AUX zsnes-2.0.9-gentoo-zlib.patch 310 BLAKE2B de05b0595eb37fad0eebed9b4c667bc4f21c3b1445864c0c9e2142d457ee7adda87ff283ad183698bc60ceb4a40766804da21640ec600a9af5100796405ee9de SHA512 5f7852a818ae55e15f7d81df34be56f756e2c4a7c2c4084a417cdba847ea50a94f04a184c85305005400a285f05966d08e234c16c0ec3c7508e9c6741e84459e +DIST zsnes-2.0.9.tar.gz 935183 BLAKE2B a9b72ed15b2ed6d9e4631b4f12b2291ddca76a7236da008eba0f8b3ee27c94b98f00ff16a4929929adf484bc16554474b942b9f8306f46ab713e8a40e1f64624 SHA512 ea9244e98a175db9bceddf14e8212b3474ddaba1f508d698d8cfc43270fa3dabf51dca43dd30255272aba3cd061bf450bef04e005ce8087d550400e66faea565 +EBUILD zsnes-2.0.9.ebuild 1761 BLAKE2B 82f2fd40b0b20f2fe6977b0b86788bd6524dd02337fd8816cd7cc788a8a732284820864bf9da5ed84674465c9d86d994871d8a3012a351ae13d7e82c554297e6 SHA512 e60f4b88e425d46cec5e32b3ec0b5bf82fd0e1b95f67c100fbef26874b3af44a7287902448fd5daf0b68d358bdf0965c263ed12ab36c8bfbb214720f3fb771c4 +MISC metadata.xml 382 BLAKE2B 7e932fa492112a2a6b697f1abe12fda2c22992e079211e561fa6c0ea0ae0949503251193975a10848c6ba464e82e3306edb594269bea681e2106872304d26614 SHA512 16503e242acdd3ac96aaffc2df7521f936e5eaebccac4b409ecd4780cf5fb823a3a851df387b0035db749a2cf4d2e05276ffe7075d5f4834b1cf63f39adb8988 diff --git a/games-emulation/zsnes/files/zsnes-1.51-CC-quotes.patch b/games-emulation/zsnes/files/zsnes-1.51-CC-quotes.patch deleted file mode 100644 index d3230d6d70d5..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-CC-quotes.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- src/Makefile.in.orig -+++ src/Makefile.in -@@ -95,7 +95,7 @@ - %.o: %.cpp - @CXX@ @CXXFLAGS@ -o $@ -c $< - %.o %.h: %.psr $(PSR) -- ./$(PSR) @PSRFLAGS@ -gcc @CC@ -compile -flags "@CFLAGS@ -O1" -cheader $*.h -fname $* $*.o $< -+ ./$(PSR) @PSRFLAGS@ -gcc "@CC@" -compile -flags "@CFLAGS@ -O1" -cheader $*.h -fname $* $*.o $< - - default: main - all: main tools--- zsnes_1_51/src/Makefile.in.orig 2009-02-25 18:02:07.000000000 +0100 -@@ -133,7 +133,7 @@ - - include makefile.dep - makefile.dep: $(TOOL_D)/depbuild Makefile -- $(TOOL_D)/depbuild @CC@ "@CFLAGS@" @NASMPATH@ "@NFLAGS@" $(Z_OBJS) > makefile.dep -+ $(TOOL_D)/depbuild "@CC@" "@CFLAGS@" @NASMPATH@ "@NFLAGS@" $(Z_OBJS) > makefile.dep - - Makefile: Makefile.in config.status - ./config.status diff --git a/games-emulation/zsnes/files/zsnes-1.51-ao-crash.patch b/games-emulation/zsnes/files/zsnes-1.51-ao-crash.patch deleted file mode 100644 index 6ce142d9c27c..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-ao-crash.patch +++ /dev/null @@ -1,30 +0,0 @@ -Fix frash in uninitialized driver_format.matrix. - -Thread 1 "zsnes" received signal SIGSEGV, Segmentation fault. -__strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50 -50 ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S: Нет такого файла или каталога. -(gdb) bt -#0 __strlen_sse2_bsf () at ../sysdeps/i386/i686/multiarch/strlen-sse2-bsf.S:50 -#1 0xf7e3c491 in _sanitize_matrix (maxchannels=2, matrix=0x1c00200 , device=device@entry=0x57057100) - at ../../libao-1.2.2/src/audio_out.c:634 -#2 0xf7e3e9bc in _open_device (driver_id=, format=format@entry=0xffffc638, options=options@entry=0x0, file=0x0) at ../../libao-1.2.2/src/audio_out.c:991 -#3 0xf7e3f579 in ao_open_live (driver_id=, format=0xffffc638, options=0x0) at ../../libao-1.2.2/src/audio_out.c:1337 -#4 0x5699fbb5 in SoundInit_ao () at linux/audio.c:197 -#5 InitSound () at linux/audio.c:338 -#6 0x569a2f7f in initwinvideo () at linux/sdllink.c:1080 -#7 0x569a07d3 in initvideo () -#8 0x56ad59bc in regptwa () -#9 0x56a3c490 in SA1tableG () -#10 0xffffc808 in ?? () -#11 0xf78619b5 in __libc_start_main (main=0x1, argc=1450015920, argv=0x0, init=0x566d7ce1 <_start+49>, fini=0x566d7c00
, rtld_fini=0x1, stack_end=0xffffc8c4) at ../csu/libc-start.c:332 -#12 0x569cd000 in ?? () ---- a/linux/audio.c -+++ b/linux/audio.c -@@ -166,6 +166,7 @@ static int SoundInit_ao() - if (driver_id < 0) { driver_id = ao_default_driver_id(); } - - ao_sample_format driver_format; -+ memset(&driver_format, 0, sizeof(driver_format)); - driver_format.bits = 16; - driver_format.channels = StereoSound+1; - driver_format.rate = freqtab[SoundQuality = ((SoundQuality > 6) ? 1 : SoundQuality)]; diff --git a/games-emulation/zsnes/files/zsnes-1.51-arch.patch b/games-emulation/zsnes/files/zsnes-1.51-arch.patch deleted file mode 100644 index b39549871b7f..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-arch.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- a/configure.in.orig -+++ b/configure.in -@@ -233,72 +233,8 @@ - debug=no) - AC_MSG_CHECKING(if you want gdb friendly executable) - AC_MSG_RESULT($debug) --if test x$debug = xyes; then --dnl - It is easier to debug zsnes with no optimization enabled. -- ZSNESEXE="zsnesd" -- PSR_TEMP="" -- CFLAGS="$CFLAGS -Wall -W -DDEBUG -O0 -fno-omit-frame-pointer -gstabs3" -- NFLAGS="$NFLAGS -DDEBUG -g -F stabs -s -O0" --else -- ZSNESEXE="zsnes" -- PSR_TEMP=" rm -f t_\$*.c" -- -- CFLAGSBAK="$CFLAGS" -- AC_ARG_VAR(force_arch, [Force architecture to optimize GCC/G++ for]) -- AC_MSG_CHECKING(which cpu architecture to optimize for) -- if test x$force_arch != x; then -- CFLAGS="$CFLAGS -march=$force_arch" -- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]])], -- [AC_MSG_RESULT(forcing $force_arch)], -- [AC_MSG_RESULT($force_arch ??) -- AC_MSG_WARN(incorrect force_arch parameter) -- force_arch="" -- CFLAGS="$CFLAGSBAK" -- AC_MSG_CHECKING(for autodetected architecture)]) -- else -- if test x$ARCH_INFO = x; then -- case x$target in -- i686-*-*) -- AC_MSG_RESULT(guessing i686) -- CFLAGS="$CFLAGS -march=i686" -- ;; -- i586-*-*) -- AC_MSG_RESULT(guessing i586) -- CFLAGS="$CFLAGS -march=i586" -- ;; -- i486-*-*) -- AC_MSG_RESULT(guessing i486) -- CFLAGS="$CFLAGS -march=i486" -- ;; -- *) -- AC_MSG_RESULT(guessing i386) -- CFLAGS="$CFLAGS -march=i386" -- AC_MSG_WARN([This is not what you want, use --target or force-arch]) -- ;; -- esac -- else -- AC_MSG_RESULT($ARCH_INFO) -- CFLAGS="$CFLAGS -march=$ARCH_INFO" -- fi -- fi -- -- AC_ARG_ENABLE(release, -- [ --enable-release Build ultra-optimized release binary (zsnes)], -- release=$enableval, -- release=no) -- AC_MSG_CHECKING(if you want crazy optimizations) -- AC_MSG_RESULT($release) -- if test x$release = xyes; then -- if test x$force_arch = x; then -- AC_MSG_WARN([If you intend to distribute this binary, make sure you use force_arch and set to i586 (or whichever CPU Arch you intend for)]) -- fi -- CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr $STRIP -D__RELEASE__" -- NFLAGS="$NFLAGS -O99999999 -D__RELEASE__" -- else -- CFLAGS="$CFLAGS -O3 -fomit-frame-pointer $STRIP" -- NFLAGS="$NFLAGS -O1" -- fi --fi -+ZSNESEXE="zsnes" -+PSR_TEMP=" rm -f t_\$*.c" - CXXFLAGS="$CFLAGS -fno-rtti" - - if test x$enable_jma != xno; then diff --git a/games-emulation/zsnes/files/zsnes-1.51-buffer.patch b/games-emulation/zsnes/files/zsnes-1.51-buffer.patch deleted file mode 100644 index eb463682196d..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-buffer.patch +++ /dev/null @@ -1,85 +0,0 @@ ---- src/initc.c.fortify -+++ src/initc.c -@@ -1464,8 +1464,8 @@ - clearmem2(); - } - --extern unsigned char BRRBuffer[32]; --extern unsigned char echoon0; -+extern unsigned char BRRBuffer[]; -+extern unsigned char echoon0[]; - extern unsigned int PHdspsave; - extern unsigned int PHdspsave2; - unsigned char echobuf[90000]; -@@ -1479,7 +1479,7 @@ - memset(vidmemch4, 0, 4096); - memset(vidmemch8, 0, 4096); - memset(BRRBuffer, 0, PHdspsave); -- memset(&echoon0, 0, PHdspsave2); -+ memset(echoon0, 0, PHdspsave2); - memset(echobuf, 0, 90000); - memset(spcBuffera, 0, 65536*4+4096); - memset(DSPMem, 0, 256); -@@ -1822,7 +1822,7 @@ - - extern unsigned int nmiprevaddrl, nmiprevaddrh, nmirept, nmiprevline, nmistatus; - extern unsigned char spcnumread, yesoutofmemory; --extern unsigned char NextLineCache, sramsavedis, sndrot, regsbackup[3019]; -+extern unsigned char NextLineCache, sramsavedis, sndrot[], regsbackup[3019]; - extern unsigned int Voice0Freq, Voice1Freq, Voice2Freq, Voice3Freq; - extern unsigned int Voice4Freq, Voice5Freq, Voice6Freq, Voice7Freq; - extern unsigned int dspPAdj; -@@ -2621,7 +2621,7 @@ - } - - sramsavedis = 0; -- memcpy(&sndrot, regsbackup, 3019); -+ memcpy(sndrot, regsbackup, 3019); - - if (yesoutofmemory) { asm_call(outofmemfix); } - asm_call(GUIDoReset); ---- src/zstate.c.fortify -+++ src/zstate.c -@@ -99,15 +99,15 @@ - copy_func(buffer, &cycpbl, 4); - copy_func(buffer, &cycpblt, 4); - //SNES PPU Register status -- copy_func(buffer, &sndrot, 3019); -+ copy_func(buffer, sndrot, 3019); - } - - static void copy_spc_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t)) - { - //SPC stuff, DSP stuff - copy_func(buffer, SPCRAM, PHspcsave); -- copy_func(buffer, &BRRBuffer, PHdspsave); -- copy_func(buffer, &DSPMem, sizeof(DSPMem)); -+ copy_func(buffer, BRRBuffer, PHdspsave); -+ copy_func(buffer, DSPMem, sizeof(DSPMem)); - } - - static void copy_extra_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t)) -@@ -156,7 +156,7 @@ - /* - if (buffer) //Rewind stuff - { -- copy_func(&buffer, &echoon0, PHdspsave2); -+ copy_func(&buffer, echoon0, PHdspsave2); - } - */ - } ---- src/gblvars.h.fortify -+++ src/gblvars.h -@@ -33,9 +33,9 @@ - extern unsigned int SfxR0, *setaramdata, ramsize, *sram, nmiprevaddrh; - extern unsigned int tempesi, tempedi, tempedx, tempebp; - extern unsigned int SPCMultA, PHnum2writespc7110reg, PHdspsave2; --extern unsigned char sndrot, SPCRAM[65472], DSPMem[256], SA1Status, *SA1RAMArea; --extern unsigned char DSP1Enable, DSP1COp, prevoamptr, BRRBuffer[32], *romdata; --extern unsigned char curcyc, echoon0, spcnumread, NextLineCache, HIRQNextExe; -+extern unsigned char sndrot[], SPCRAM[65472], DSPMem[256], SA1Status, *SA1RAMArea; -+extern unsigned char DSP1Enable, DSP1COp, prevoamptr, BRRBuffer[], *romdata; -+extern unsigned char curcyc, echoon0[], spcnumread, NextLineCache, HIRQNextExe; - extern unsigned char vidmemch4[4096], vidmemch8[4096], vidmemch2[4096]; - - extern bool C4Enable, SFXEnable, SA1Enable, SPC7110Enable, SETAEnable, DSP4Enable, spcon; diff --git a/games-emulation/zsnes/files/zsnes-1.51-c++17.patch b/games-emulation/zsnes/files/zsnes-1.51-c++17.patch deleted file mode 100644 index 537f32540c58..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-c++17.patch +++ /dev/null @@ -1,76 +0,0 @@ ---- a/jma/jma.cpp -+++ b/jma/jma.cpp -@@ -48,7 +48,7 @@ namespace JMA - - - //Retreive the file block, what else? -- void jma_open::retrieve_file_block() throw(jma_errors) -+ void jma_open::retrieve_file_block() - { - unsigned char uint_buffer[UINT_SIZE]; - unsigned char ushort_buffer[USHORT_SIZE]; -@@ -168,7 +168,7 @@ namespace JMA - } - - //Constructor for opening JMA files for reading -- jma_open::jma_open(const char *compressed_file_name) throw (jma_errors) -+ jma_open::jma_open(const char *compressed_file_name) - { - decompressed_buffer = 0; - compressed_buffer = 0; -@@ -229,7 +229,7 @@ namespace JMA - } - - //Skip forward a given number of chunks -- void jma_open::chunk_seek(unsigned int chunk_num) throw(jma_errors) -+ void jma_open::chunk_seek(unsigned int chunk_num) - { - //Check the stream is open - if (!stream.is_open()) -@@ -257,7 +257,7 @@ namespace JMA - - //Return a vector of pointers to each file in the JMA, the buffer to hold all the files - //must be initilized outside. -- vector jma_open::get_all_files(unsigned char *buffer) throw(jma_errors) -+ vector jma_open::get_all_files(unsigned char *buffer) - { - //If there's no stream we can't read from it, so exit - if (!stream.is_open()) -@@ -396,7 +396,7 @@ namespace JMA - } - - //Extracts the file with a given name found in the archive to the given buffer -- void jma_open::extract_file(string& name, unsigned char *buffer) throw(jma_errors) -+ void jma_open::extract_file(string& name, unsigned char *buffer) - { - if (!stream.is_open()) - { ---- a/jma/jma.h -+++ b/jma/jma.h -@@ -64,12 +64,12 @@ namespace JMA - class jma_open - { - public: -- jma_open(const char *) throw(jma_errors); -+ jma_open(const char *); - ~jma_open(); - - std::vector get_files_info(); -- std::vector get_all_files(unsigned char *) throw(jma_errors); -- void extract_file(std::string& name, unsigned char *) throw(jma_errors); -+ std::vector get_all_files(unsigned char *); -+ void extract_file(std::string& name, unsigned char *); - bool is_solid(); - - private: -@@ -79,8 +79,8 @@ namespace JMA - unsigned char *decompressed_buffer; - unsigned char *compressed_buffer; - -- void chunk_seek(unsigned int) throw(jma_errors); -- void retrieve_file_block() throw(jma_errors); -+ void chunk_seek(unsigned int); -+ void retrieve_file_block(); - }; - - const char *jma_error_text(jma_errors); diff --git a/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch b/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch deleted file mode 100644 index 5c412e3e649b..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- src/acinclude.m4 -+++ src/acinclude.m4 -@@ -107,7 +107,7 @@ int main (int argc, char *argv[]) - with_zlib=yes, - with_zlib=no, - [AC_MSG_RESULT(cross-compiling) -- with_zlib="" -+ with_zlib="cross" - AC_MSG_WARN(Assuming zlib is available)]) - - if test x$with_zlib != x; then -@@ -116,7 +116,7 @@ fi - if test x$with_zlib = xyes; then - ZLIB_VERSION=$( - #include - #include -+#include - using namespace std; - - #include ---- src/tools/depbuild.cpp -+++ src/tools/depbuild.cpp -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - using namespace std; - - #include "fileutil.h" -@@ -183,7 +184,7 @@ - } - } - --int main(size_t argc, const char *const *const argv) -+int main(int argc, const char *const *const argv) - { - if (argc < 5) - { ---- src/tools/strutil.h -+++ src/tools/strutil.h -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - - struct ci_char_traits : public std::char_traits - { diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch b/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch deleted file mode 100644 index b3250fee679b..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch +++ /dev/null @@ -1,15 +0,0 @@ -Fix compile with gcc47 -Bug #419635 -https://bugs.gentoo.org/show_bug.cgi?id=419635 -Submitted by Nikos Chantziaras - ---- src/tools/depbuild.cpp -+++ src/tools/depbuild.cpp -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - using namespace std; - - #include "fileutil.h" diff --git a/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch b/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch deleted file mode 100644 index 1ae0a1467b3e..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/linux/audio.c.old 2007-01-09 20:19:12.000000000 -0500 -+++ b/linux/audio.c 2007-12-30 20:33:07.000000000 -0500 -@@ -177,11 +177,7 @@ - } - else - { -- if (pthread_create(&audio_thread, 0, SoundThread_ao, 0)) -- { -- puts("pthread_create() failed."); -- } -- else if (pthread_mutex_init(&audio_mutex, 0)) -+ if (pthread_mutex_init(&audio_mutex, 0)) - { - puts("pthread_mutex_init() failed."); - } -@@ -189,6 +185,10 @@ - { - puts("pthread_cond_init() failed."); - } -+ else if (pthread_create(&audio_thread, 0, SoundThread_ao, 0)) -+ { -+ puts("pthread_create() failed."); -+ } - InitSampleControl(); - } diff --git a/games-emulation/zsnes/files/zsnes-1.51-libpng.patch b/games-emulation/zsnes/files/zsnes-1.51-libpng.patch deleted file mode 100644 index fd974e799e30..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-libpng.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -163,21 +163,21 @@ - libpng_prefix="") - - min_libpng_version=ifelse([$1], ,1.2.0,$1) --tempLIBS="$LIBS" --tempCFLAGS="$CFLAGS" --if test x$libpng_prefix != x ; then -- LIBPNG_LIBS="-L$libpng_prefix" -- LIBPNG_CFLAGS="-I$libpng_prefix" --fi --LIBPNG_LIBS="$LIBPNG_LIBS -lpng -lm" --LIBS="$LIBS $LIBPNG_LIBS" --CFLAGS="$CFLAGS $LIBPNG_CFLAGS" - - AC_MSG_CHECKING(for libpng - version >= $min_libpng_version) - - dnl <--- disable for no user choice part #2 - if test x$enable_libpng != xno; then - dnl ---> -+ tempLIBS="$LIBS" -+ tempCFLAGS="$CFLAGS" -+ if test x$libpng_prefix != x ; then -+ LIBPNG_LIBS="-L$libpng_prefix" -+ LIBPNG_CFLAGS="-I$libpng_prefix" -+ fi -+ LIBPNG_LIBS="$LIBPNG_LIBS -lpng -lm" -+ LIBS="$LIBS $LIBPNG_LIBS" -+ CFLAGS="$CFLAGS $LIBPNG_CFLAGS" - - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include diff --git a/games-emulation/zsnes/files/zsnes-1.51-libpng15.patch b/games-emulation/zsnes/files/zsnes-1.51-libpng15.patch deleted file mode 100644 index b32c30967547..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-libpng15.patch +++ /dev/null @@ -1,12 +0,0 @@ -Use existing png_set_IHDR() and stop accessing PNG structure members directly - ---- src/zip/zpng.c -+++ src/zip/zpng.c -@@ -129,7 +129,6 @@ - png_set_IHDR(png_ptr, info_ptr, width, height, 8, - PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, - PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); -- info_ptr->color_type = PNG_COLOR_TYPE_RGB; - - //Allocate an array of scanline pointers - row_pointers = (png_bytep*)malloc(height*sizeof(png_bytep)); diff --git a/games-emulation/zsnes/files/zsnes-1.51-stack-align-v2.patch b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v2.patch deleted file mode 100644 index 35613a953596..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-stack-align-v2.patch +++ /dev/null @@ -1,56 +0,0 @@ -zsnes call C initialization code from assembler. - -Example backtrace: - - Thread 1 "zsnes" received signal SIGSEGV, Segmentation fault. - => 0xf7550275 <+37>: vmovdqa (%esp),%xmm1 - ... - #13 0x5699ef82 in InitSound () at linux/audio.c:336 - #14 0x569a25af in initwinvideo () at linux/sdllink.c:1080 - #15 0x5699fc13 in initvideo () at linux/sdllink.c:1298 - #16 0x56f9d5bc in regptwa () - #17 0x56a34b50 in SA1tableG () - #18 0x56f84788 in selcB800 () - ... - -Call to 'initwinvideo' (first C function) looks like that: - NEWSYM InitPreGame ; Executes before starting/continuing a game - mov byte[pressed+1],2 - pushad - call Start60HZ - %ifdef __OPENGL__ - call drawscreenwin - %endif - call initwinvideo - -Note: pushad / call does not 16-byte maintain stack alignment -and breaks i386 ABI. - -We apply realignment attribute to all functions noticed by users. -Bug: https://bugs.gentoo.org/503138 ---- src/linux/sdllink.c.old -+++ src/linux/sdllink.c -@@ -773,11 +773,11 @@ BOOL InitInput() - { - InitJoystickInput(); - return TRUE; - } - --int startgame() -+int __attribute__((force_align_arg_pointer)) startgame() - { - static bool ranonce = false; - int status; - - if (!ranonce) ---- a/linux/sdllink.c -+++ b/linux/sdllink.c -@@ -897,7 +897,7 @@ bool OGLModeCheck() - return(cvidmode > 4); - } - --void initwinvideo(void) -+void __attribute__((force_align_arg_pointer)) initwinvideo(void) - { - DWORD newmode = 0; - diff --git a/games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch deleted file mode 100644 index 914c9afc4495..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/linux/sdllink.c -+++ b/linux/sdllink.c -@@ -133,7 +133,7 @@ extern unsigned char romispal; - - /* FUNCTION DECLARATIONS */ - void clearwin (void); --void drawscreenwin(void); -+void __attribute__((force_align_arg_pointer)) drawscreenwin(void); - void initwinvideo(); - unsigned int sdl_keysym_to_pc_scancode(int); - void ProcessKeyBuf(int); ---- a/ztimec.c -+++ b/ztimec.c -@@ -25,7 +25,7 @@ short SystemTimewHour; - short SystemTimewMinute; - short SystemTimewSecond; - --void GetLocalTime() -+void __attribute__((force_align_arg_pointer)) GetLocalTime() - { - time_t current; - struct tm *timeptr; -@@ -37,7 +37,7 @@ void GetLocalTime() - SystemTimewSecond = timeptr->tm_sec; - } - --unsigned int GetTime() -+unsigned __attribute__((force_align_arg_pointer)) int GetTime() - { - unsigned int value; - struct tm *newtime; -@@ -52,7 +52,7 @@ unsigned int GetTime() - return(value); - } - --unsigned int GetDate() -+unsigned __attribute__((force_align_arg_pointer)) int GetDate() - { - unsigned int value; - struct tm *newtime; diff --git a/games-emulation/zsnes/files/zsnes-1.51-stack-align-v4.patch b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v4.patch deleted file mode 100644 index 7e015d53ebd9..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-stack-align-v4.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- a/linux/sdllink.c -+++ b/linux/sdllink.c -@@ -1170,7 +1170,7 @@ void sem_sleep_die(void) - } - } - --void UpdateVFrame(void) -+void __attribute__((force_align_arg_pointer)) UpdateVFrame(void) - { - //Quick fix for GUI CPU usage - if (GUIOn || GUIOn2 || EMUPause) { usleep(6000); } -@@ -1237,16 +1237,16 @@ void UnloadSDL() - SDL_Quit(); - } - --int GetMouseX(void) -+int __attribute__((force_align_arg_pointer)) GetMouseX(void) - { - return ((int) MouseX); - } --int GetMouseY(void) -+int __attribute__((force_align_arg_pointer)) GetMouseY(void) - { - return ((int) MouseY); - } - --int GetMouseMoveX(void) -+int __attribute__((force_align_arg_pointer)) GetMouseMoveX(void) - { - // InputRead(); - //SDL_GetRelativeMouseState(&MouseMove2X, NULL); -@@ -1254,11 +1254,11 @@ int GetMouseMoveX(void) - return (MouseMove2X); - } - --int GetMouseMoveY(void) -+int __attribute__((force_align_arg_pointer)) GetMouseMoveY(void) - { - return (MouseMove2Y); - } --int GetMouseButton(void) -+int __attribute__((force_align_arg_pointer)) GetMouseButton(void) - { - return ((int) MouseButton); - } diff --git a/games-emulation/zsnes/files/zsnes-2.0.9-cc-quotes.patch b/games-emulation/zsnes/files/zsnes-2.0.9-cc-quotes.patch new file mode 100644 index 000000000000..d2615149601b --- /dev/null +++ b/games-emulation/zsnes/files/zsnes-2.0.9-cc-quotes.patch @@ -0,0 +1,8 @@ +Does not expect CC may have arguments rather than being in CFLAGS, e.g. -m32 +--- a/Makefile ++++ b/Makefile +@@ -355,3 +355,3 @@ + @echo '===> PSR $@' +- $(Q)./$(PSR) $(CFGDEFS) -gcc $(CC_TARGET) -compile -flags '$(CFLAGS)' -cheader $@ -fname $(*F) $(@:.h=.o) $< ++ $(Q)./$(PSR) $(CFGDEFS) -gcc '$(CC_TARGET)' -compile -flags '$(CFLAGS)' -cheader $@ -fname $(*F) $(@:.h=.o) $< + diff --git a/games-emulation/zsnes/files/zsnes-2.0.9-gentoo-zlib.patch b/games-emulation/zsnes/files/zsnes-2.0.9-gentoo-zlib.patch new file mode 100644 index 000000000000..a5b5f584e177 --- /dev/null +++ b/games-emulation/zsnes/files/zsnes-2.0.9-gentoo-zlib.patch @@ -0,0 +1,12 @@ +Gentoo-specific workaround due to https://bugs.gentoo.org/383179 +--- a/zip/zunzip.h ++++ b/zip/zunzip.h +@@ -48,4 +48,8 @@ + #include + ++#ifndef OF ++#define OF _Z_OF ++#endif ++ + #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) + /* like the STRICT of WIN32, we define a pointer that cannot be converted diff --git a/games-emulation/zsnes/metadata.xml b/games-emulation/zsnes/metadata.xml index 53d1e8035695..a775a3d1ea84 100644 --- a/games-emulation/zsnes/metadata.xml +++ b/games-emulation/zsnes/metadata.xml @@ -1,14 +1,12 @@ - - games@gentoo.org - Gentoo Games Project - - - Enable the builtin debugger - - - zsnes - + + games@gentoo.org + Gentoo Games Project + + + xyproto/zsnes + zsnes + diff --git a/games-emulation/zsnes/zsnes-1.51-r11.ebuild b/games-emulation/zsnes/zsnes-1.51-r11.ebuild deleted file mode 100644 index 204a33f3892c..000000000000 --- a/games-emulation/zsnes/zsnes-1.51-r11.ebuild +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools desktop flag-o-matic multilib toolchain-funcs pax-utils - -DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly" -HOMEPAGE="https://www.zsnes.com/ http://ipherswipsite.com/zsnes/" -SRC_URI="mirror://sourceforge/zsnes/${PN}${PV//./}src.tar.bz2 -> ${P}-20071031.tar.bz2" -S="${WORKDIR}/${PN}_${PV//./_}/src" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="ao custom-cflags +debug opengl png" - -RDEPEND=" - media-libs/libsdl[sound,video,abi_x86_32(-)] - >=sys-libs/zlib-1.2.3-r1[abi_x86_32(-)] - ao? ( media-libs/libao[abi_x86_32(-)] ) - debug? ( sys-libs/ncurses:0=[abi_x86_32(-)] ) - opengl? ( virtual/opengl[abi_x86_32(-)] ) - png? ( media-libs/libpng:0=[abi_x86_32(-)] ) -" -DEPEND="${RDEPEND}" -BDEPEND=" - dev-lang/nasm - debug? ( virtual/pkgconfig ) -" - -PATCHES=( - # Fixing compilation without libpng installed - "${FILESDIR}"/${P}-libpng.patch - - # Fix bug #186111 - # Fix bug #214697 - # Fix bug #170108 - # Fix bug #260247 - "${FILESDIR}"/${P}-gcc43-20071031.patch - "${FILESDIR}"/${P}-libao-thread.patch - "${FILESDIR}"/${P}-depbuild.patch - "${FILESDIR}"/${P}-CC-quotes.patch - - # Fix compability with libpng15 wrt #378735 - "${FILESDIR}"/${P}-libpng15.patch - - # Fix buffer overwrite #257963 - "${FILESDIR}"/${P}-buffer.patch - # Fix gcc47 compile #419635 - "${FILESDIR}"/${P}-gcc47.patch - # Fix stack alignment issue #503138 - "${FILESDIR}"/${P}-stack-align-v2.patch - - "${FILESDIR}"/${P}-cross-compile.patch - "${FILESDIR}"/${P}-arch.patch - - "${FILESDIR}"/${P}-gcc-10.patch - "${FILESDIR}"/${P}-c++17.patch - "${FILESDIR}"/${P}-ao-crash.patch - "${FILESDIR}"/${P}-stack-align-v3.patch - "${FILESDIR}"/${P}-stack-align-v4.patch -) - -src_prepare() { - default - - # The sdl detection logic uses AC_PROG_PATH instead of - # AC_PROG_TOOL, so force the var to get set the way we - # need for things to work correctly. - tc-is-cross-compiler && export ac_cv_path_SDL_CONFIG=${CHOST}-sdl-config - - sed -i -e '67i#define OF(x) x' zip/zunzip.h || die - - # Remove hardcoded CFLAGS and LDFLAGS - sed -i \ - -e '/^CFLAGS=.*local/s:-pipe.*:-Wall -I.":' \ - -e '/^LDFLAGS=.*local/d' \ - -e '/\w*CFLAGS=.*fomit/s:-O3.*$STRIP::' \ - -e '/lncurses/s:-lncurses:`pkg-config ncurses --libs`:' \ - -e '/lcurses/s:-lcurses:`pkg-config ncurses --libs`:' \ - configure.in || die - sed -i \ - -e 's/configure.in/configure.ac/' \ - Makefile.in || die - mv configure.in configure.ac || die - eautoreconf -} - -src_configure() { - tc-export CC - export BUILD_CXX=$(tc-getBUILD_CXX) - export NFLAGS=-O1 - use amd64 && multilib_toolchain_setup x86 - use custom-cflags || strip-flags - - append-cppflags -U_FORTIFY_SOURCE #257963 - - econf \ - $(use_enable ao libao) \ - $(use_enable debug debugger) \ - $(use_enable png libpng) \ - $(use_enable opengl) \ - --disable-debug \ - --disable-cpucheck -} - -src_compile() { - emake makefile.dep - emake -} - -src_install() { - # Uses pic-unfriendly assembly code, bug #427104 - QA_TEXTRELS="usr/bin/zsnes" - - dobin zsnes - pax-mark m "${ED}"/usr/bin/zsnes - - newman linux/zsnes.1 zsnes.6 - - dodoc \ - ../docs/{readme.1st,authors.txt,srcinfo.txt,stdards.txt,support.txt,thanks.txt,todo.txt,README.LINUX} \ - ../docs/readme.txt/* - HTML_DOCS="../docs/readme.htm/*" einstalldocs - - make_desktop_entry zsnes ZSNES - newicon icons/48x48x32.png ${PN}.png -} diff --git a/games-emulation/zsnes/zsnes-2.0.9.ebuild b/games-emulation/zsnes/zsnes-2.0.9.ebuild new file mode 100644 index 000000000000..02f1b45b2615 --- /dev/null +++ b/games-emulation/zsnes/zsnes-2.0.9.ebuild @@ -0,0 +1,63 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop flag-o-matic multilib toolchain-funcs + +DESCRIPTION="Fork of the classic Super Nintendo emulator" +HOMEPAGE="https://github.com/xyproto/zsnes/ https://www.zsnes.com/" +SRC_URI="https://github.com/xyproto/zsnes/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="custom-cflags" + +RDEPEND=" + media-libs/libpng:=[abi_x86_32(-)] + media-libs/libsdl[abi_x86_32(-),joystick,opengl,sound,video] + sys-libs/zlib:=[abi_x86_32(-)] + virtual/opengl[abi_x86_32(-)] + x11-libs/libX11[abi_x86_32(-)]" +DEPEND=" + ${RDEPEND} + x11-base/xorg-proto" +BDEPEND=" + dev-lang/nasm + sys-libs/zlib + virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-2.0.9-cc-quotes.patch + "${FILESDIR}"/${PN}-2.0.9-gentoo-zlib.patch +) + +src_compile() { + # config.linux forces many CFLAGS that are questionable, but zsnes' + # ancient x86 asm is very fragile, not pic safe (bug #427104), broken + # by FORTIFY_SOURCE (bug #257963), and can be affected by -march=* and + # similar. Stick to upstream's choices, this is non-portable either way. + use custom-cflags || strip-flags + append-cppflags -U_FORTIFY_SOURCE + + # used to build and run parsegen at build time (uses zlib wrt BDEPEND) + tc-export_build_env BUILD_CXX + local buildcxx="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS}" + + use amd64 && multilib_toolchain_setup x86 + tc-export CC CXX + append-cflags "${CPPFLAGS}" + append-cxxflags "${CPPFLAGS}" + + emake CXX_HOST="${buildcxx}" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install + + dodoc README.md TODO.md + + newicon icons/64x64x32.png ${PN}.png + make_desktop_entry ${PN} ${PN^^} +} -- cgit v1.2.3