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 --- .../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 +++ 18 files changed, 20 insertions(+), 622 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 (limited to 'games-emulation/zsnes/files') 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 -- cgit v1.2.3