diff options
19 files changed, 0 insertions, 755 deletions
diff --git a/games-emulation/zsnes/Manifest b/games-emulation/zsnes/Manifest index 84c9a0519a79..eeb8097cf656 100644 --- a/games-emulation/zsnes/Manifest +++ b/games-emulation/zsnes/Manifest @@ -1,2 +1 @@ -DIST zsnes-1.51-20071031.tar.bz2 1072340 BLAKE2B d67c92e382ca130d4138d21fbb2effc06539d1c7e3aabf0339c9b7e773521daf2d3cb0bcef75991e1a4453fcc86903d3dead48d90806489c8b4bf7677f8ebf3b SHA512 b10373cf81b201a33dc60c728431d4f69d36de31fcf6f137b623ea206a2998f722dcd6132daec1d0bf14a05ae52f3ee9ecee4334517039be554db85c9f7b8274 DIST zsnes-2.0.9.tar.gz 935183 BLAKE2B a9b72ed15b2ed6d9e4631b4f12b2291ddca76a7236da008eba0f8b3ee27c94b98f00ff16a4929929adf484bc16554474b942b9f8306f46ab713e8a40e1f64624 SHA512 ea9244e98a175db9bceddf14e8212b3474ddaba1f508d698d8cfc43270fa3dabf51dca43dd30255272aba3cd061bf450bef04e005ce8087d550400e66faea565 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 <error: Cannot access memory at address 0x1c00200>, device=device@entry=0x57057100) - at ../../libao-1.2.2/src/audio_out.c:634 -#2 0xf7e3e9bc in _open_device (driver_id=<optimized out>, 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=<optimized out>, 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 <main>, 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<unsigned char *> jma_open::get_all_files(unsigned char *buffer) throw(jma_errors) -+ vector<unsigned char *> 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<jma_public_file_info> get_files_info(); -- std::vector<unsigned char *> get_all_files(unsigned char *) throw(jma_errors); -- void extract_file(std::string& name, unsigned char *) throw(jma_errors); -+ std::vector<unsigned char *> 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=$(<conf.zlibtest) - ifelse([$2], , :, [$2]) --else -+elif test x$with_zlib != xcross; then - ZLIB_CFLAGS="" - ZLIB_LIBS="" - ZLIB_VERSION="" ---- src/Makefile.in -+++ src/Makefile.in -@@ -103,8 +103,10 @@ main: makefile.dep $(Z_OBJS) - @ZC@ -o @ZSNESEXE@ $(Z_OBJS) @ZCFLAGS@ @LDFLAGS@ - rm -f version.o - -+BUILD_CXX ?= g++ -+BUILD_CXXFLAGS ?= -O2 -pipe - $(PSR): parsegen.cpp -- @CXX@ @CXXFLAGS@ -o $@ $< -lz -+ $(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $< -lz - - TOOLSEXE=$(TOOL_D)/archopt $(TOOL_D)/cutrtype $(TOOL_D)/extraext\ - $(TOOL_D)/macroll $(TOOL_D)/minwhite $(TOOL_D)/nreplace\ diff --git a/games-emulation/zsnes/files/zsnes-1.51-depbuild.patch b/games-emulation/zsnes/files/zsnes-1.51-depbuild.patch deleted file mode 100644 index 2dbb5f558a46..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-depbuild.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- src/tools/depbuild.cpp.orig -+++ src/tools/depbuild.cpp -@@ -130,7 +130,20 @@ - void dependency_calculate_asm(const char *filename) - { - string command = nasm + " " + nflags + " -M " + filename; -- system(command.c_str()); -+ FILE *fp = popen(command.c_str(), "r"); -+ if (fp) -+ { -+ char line[256]; -+ while (fgets(line, sizeof(line), fp)) //Process all lines of output -+ { -+ cout << line; -+ } -+ pclose(fp); -+ } -+ else -+ { -+ cerr << "Failed on: " << filename << "\n"; -+ } - } - - void dependency_calculate_psr(const char *filename) diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc-10.patch b/games-emulation/zsnes/files/zsnes-1.51-gcc-10.patch deleted file mode 100644 index 71a1392e6a4e..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-gcc-10.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/initc.c -+++ b/initc.c -@@ -1495,7 +1495,7 @@ Would be nice to trash this section in the future - extern unsigned char ENVDisable, cycpb268, cycpb358, cycpbl2, cycpblt2, cycpbl; - extern unsigned char cycpblt, opexec268, opexec358, opexec268b, opexec358b; - extern unsigned char opexec268cph, opexec358cph, opexec268cphb, opexec358cphb; --bool HacksDisable; -+extern bool HacksDisable; - - void headerhack() - { diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch b/games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch deleted file mode 100644 index 59fbb8fdbf19..000000000000 --- a/games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- src/parsegen.cpp -+++ src/parsegen.cpp -@@ -31,6 +31,7 @@ - #include <sstream> - #include <set> - #include <stack> -+#include <cstring> - using namespace std; - - #include <errno.h> ---- src/tools/depbuild.cpp -+++ src/tools/depbuild.cpp -@@ -24,6 +24,7 @@ - #include <iostream> - #include <string> - #include <cstdio> -+#include <cstdlib> - 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 <string> - #include <vector> - #include <cctype> -+#include <cstring> - - struct ci_char_traits : public std::char_traits<char> - { 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 <string> - #include <cstdio> - #include <cstdlib> -+#include <unistd.h> - 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 <png.h> 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/metadata.xml b/games-emulation/zsnes/metadata.xml index b9c0479894ce..a775a3d1ea84 100644 --- a/games-emulation/zsnes/metadata.xml +++ b/games-emulation/zsnes/metadata.xml @@ -5,9 +5,6 @@ <email>games@gentoo.org</email> <name>Gentoo Games Project</name> </maintainer> - <use> - <flag name="debug">Enable the builtin debugger</flag> - </use> <upstream> <remote-id type="github">xyproto/zsnes</remote-id> <remote-id type="sourceforge">zsnes</remote-id> 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 -} |