[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/, games-emulation/zsnes/files/

2021-12-22 Thread Ionen Wolkens
commit: 484cf796cfa38577842783be53a79346b65a8dcf
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Wed Dec 22 10:53:17 2021 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Wed Dec 22 18:12:26 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=484cf796

games-emulation/zsnes: add 2.0.9 (fork) with new dumbed down ebuild

zsnes is very fragile, and supporting many configurations/flags
doesn't seem worth it anymore. So this uses current upstream
defaults for safety (no libao+debugger, and enable sdl+png+opengl).

May possibly have some new issues / regressions to iron out, notably
given doesn't use autoconf anymore which shifted many things around.

Unsure if this fork will be maintained on the long term, if not
then this package may be better off last-rited.

bug 817395: fork uses FORTIFY_SOURCE=0 which combined with -U should
ensure it's unused even if our gcc enables it by default
(issue does exist still, was able to reproduce if letting it use it)
bug 829785: cause is unknown but can't reproduce when using the fork

Closes: https://bugs.gentoo.org/817395
Closes: https://bugs.gentoo.org/829785
Signed-off-by: Ionen Wolkens  gentoo.org>

 games-emulation/zsnes/Manifest |  1 +
 .../zsnes/files/zsnes-2.0.9-cc-quotes.patch|  8 +++
 .../zsnes/files/zsnes-2.0.9-gentoo-zlib.patch  | 12 +
 games-emulation/zsnes/zsnes-2.0.9.ebuild   | 62 ++
 4 files changed, 83 insertions(+)

diff --git a/games-emulation/zsnes/Manifest b/games-emulation/zsnes/Manifest
index 23bb4c0f0963..84c9a0519a79 100644
--- a/games-emulation/zsnes/Manifest
+++ b/games-emulation/zsnes/Manifest
@@ -1 +1,2 @@
 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-2.0.9-cc-quotes.patch 
b/games-emulation/zsnes/files/zsnes-2.0.9-cc-quotes.patch
new file mode 100644
index ..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 ..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/zsnes-2.0.9.ebuild 
b/games-emulation/zsnes/zsnes-2.0.9.ebuild
new file mode 100644
index ..a948fb8c0346
--- /dev/null
+++ b/games-emulation/zsnes/zsnes-2.0.9.ebuild
@@ -0,0 +1,62 @@
+# 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
+  

[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/, games-emulation/zsnes/files/

2021-12-22 Thread Ionen Wolkens
commit: aca2d57a854ca7ef3c2a1b8f12342c9929262493
Author: Ionen Wolkens  gentoo  org>
AuthorDate: Wed Dec 22 15:26:24 2021 +
Commit: Ionen Wolkens  gentoo  org>
CommitDate: Wed Dec 22 18:12:27 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aca2d57a

games-emulation/zsnes: drop 1.51-r11

This seemed unusable either way, should be no reason to keep.
Some of these patches may still be interesting, but they'll
be available in history.

Signed-off-by: Ionen Wolkens  gentoo.org>

 games-emulation/zsnes/Manifest |   1 -
 .../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 ---
 games-emulation/zsnes/metadata.xml |   3 -
 games-emulation/zsnes/zsnes-1.51-r11.ebuild| 129 -
 19 files changed, 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..
--- 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.orig2009-02-25 
18:02:07.0 +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..
--- 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=0xc638, 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=0xc638, 
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 

[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/, games-emulation/zsnes/files/

2021-05-11 Thread Sergei Trofimovich
commit: 8b2eebf5117453efbe1e62e6314ad58614c0d587
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Tue May 11 22:54:44 2021 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Tue May 11 22:57:23 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b2eebf5

games-emulation/zsnes: fix more ao and stack alignment crashes

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../zsnes/files/zsnes-1.51-ao-crash.patch  |  30 +
 .../zsnes/files/zsnes-1.51-stack-align-v3.patch|  40 +++
 games-emulation/zsnes/zsnes-1.51-r10.ebuild| 128 +
 3 files changed, 198 insertions(+)

diff --git a/games-emulation/zsnes/files/zsnes-1.51-ao-crash.patch 
b/games-emulation/zsnes/files/zsnes-1.51-ao-crash.patch
new file mode 100644
index 000..6ce142d9c27
--- /dev/null
+++ b/games-emulation/zsnes/files/zsnes-1.51-ao-crash.patch
@@ -0,0 +1,30 @@
+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=0xc638, 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=0xc638, 
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 0xc808 in ?? ()
+#11 0xf78619b5 in __libc_start_main (main=0x1, argc=1450015920, argv=0x0, 
init=0x566d7ce1 <_start+49>, fini=0x566d7c00 , rtld_fini=0x1, 
stack_end=0xc8c4) 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(_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-stack-align-v3.patch 
b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch
new file mode 100644
index 000..914c9afc449
--- /dev/null
+++ b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v3.patch
@@ -0,0 +1,40 @@
+--- 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/zsnes-1.51-r10.ebuild 
b/games-emulation/zsnes/zsnes-1.51-r10.ebuild
new file mode 100644
index 000..ffa490ba20b
--- /dev/null
+++ b/games-emulation/zsnes/zsnes-1.51-r10.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools desktop flag-o-matic 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? ( 

[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/, games-emulation/zsnes/files/

2020-07-30 Thread Sergei Trofimovich
commit: 935f42dd7dff88e750666e37d2bbe98761cc0a77
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Jul 30 07:36:37 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Jul 30 07:37:07 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=935f42dd

games-emulation/zsnes: tweak for gcc-11 (c++17 throw)

Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Sergei Trofimovich  gentoo.org>

 games-emulation/zsnes/files/zsnes-1.51-c++17.patch |  76 +
 games-emulation/zsnes/zsnes-1.51-r9.ebuild | 125 +
 2 files changed, 201 insertions(+)

diff --git a/games-emulation/zsnes/files/zsnes-1.51-c++17.patch 
b/games-emulation/zsnes/files/zsnes-1.51-c++17.patch
new file mode 100644
index 000..537f32540c5
--- /dev/null
+++ b/games-emulation/zsnes/files/zsnes-1.51-c++17.patch
@@ -0,0 +1,76 @@
+--- 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/zsnes-1.51-r9.ebuild 
b/games-emulation/zsnes/zsnes-1.51-r9.ebuild
new file mode 100644
index 000..a56e1e85d8d
--- /dev/null
+++ b/games-emulation/zsnes/zsnes-1.51-r9.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools desktop flag-o-matic 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"
+
+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}
+   dev-lang/nasm
+   debug? ( virtual/pkgconfig )
+"
+
+S="${WORKDIR}/${PN}_${PV//./_}/src"
+
+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
+   

[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/, games-emulation/zsnes/files/

2020-02-04 Thread Sergei Trofimovich
commit: 965d6c11b191c4729da99cdbb87ef07a67a9250a
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Tue Feb  4 21:35:54 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Tue Feb  4 21:37:56 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=965d6c11

games-emulation/zsnes: refetch upstream tarball

Original tarball was repackaged and includes
archopt-july-23-update.patch patch.

Reported-by: Plüss Roland
Closes: https://bugs.gentoo.org/675926
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich  gentoo.org>

 games-emulation/zsnes/Manifest |   1 +
 .../zsnes/files/zsnes-1.51-gcc43-20071031.patch|  39 +++
 games-emulation/zsnes/zsnes-1.51-r8.ebuild | 124 +
 3 files changed, 164 insertions(+)

diff --git a/games-emulation/zsnes/Manifest b/games-emulation/zsnes/Manifest
index 07968a9f42d..6846bebb8ae 100644
--- a/games-emulation/zsnes/Manifest
+++ b/games-emulation/zsnes/Manifest
@@ -1 +1,2 @@
+DIST zsnes-1.51-20071031.tar.bz2 1072340 BLAKE2B 
d67c92e382ca130d4138d21fbb2effc06539d1c7e3aabf0339c9b7e773521daf2d3cb0bcef75991e1a4453fcc86903d3dead48d90806489c8b4bf7677f8ebf3b
 SHA512 
b10373cf81b201a33dc60c728431d4f69d36de31fcf6f137b623ea206a2998f722dcd6132daec1d0bf14a05ae52f3ee9ecee4334517039be554db85c9f7b8274
 DIST zsnes151src.tar.bz2 1071712 BLAKE2B 
e942c699bd227942563deb23b105339aa9ffd8a5623200ca142a777508b4ebaf47859170016490f53a3af2bfb15293c17a99a7658e1f3f0afd7df8cd63200b9a
 SHA512 
2cec9ad7762fc7a257c6b1d3e190b0ed53565dbafe42e1dee9eb182644392b7dd2c57faa846f63cd30ac079e5c05354d26ce0612d20481a1f54d760d62d95353

diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch 
b/games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch
new file mode 100644
index 000..59fbb8fdbf1
--- /dev/null
+++ b/games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch
@@ -0,0 +1,39 @@
+--- src/parsegen.cpp
 src/parsegen.cpp
+@@ -31,6 +31,7 @@
+ #include 
+ #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/zsnes-1.51-r8.ebuild 
b/games-emulation/zsnes/zsnes-1.51-r8.ebuild
new file mode 100644
index 000..1139717f6e2
--- /dev/null
+++ b/games-emulation/zsnes/zsnes-1.51-r8.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools desktop flag-o-matic toolchain-funcs pax-utils
+
+DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly"
+HOMEPAGE="http://www.zsnes.com/ http://ipherswipsite.com/zsnes/;
+SRC_URI="mirror://sourceforge/zsnes/${PN}${PV//./}src.tar.bz2 -> 
${P}-20071031.tar.bz2"
+
+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}
+   dev-lang/nasm
+   debug? ( virtual/pkgconfig )
+"
+
+S="${WORKDIR}/${PN}_${PV//./_}/src"
+
+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
+)
+
+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
+
+