[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/files/, games-emulation/zsnes/
commit: fe517dd9524963f017c8d7ff504a3a0a54ff574d Author: Sergei Trofimovich gentoo org> AuthorDate: Thu May 13 19:41:12 2021 + Commit: Sergei Trofimovich gentoo org> CommitDate: Thu May 13 19:41:41 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe517dd9 games-emulation/zsnes: add more stack realignment annotations Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich gentoo.org> .../zsnes/files/zsnes-1.51-stack-align-v4.patch| 45 +++ games-emulation/zsnes/zsnes-1.51-r11.ebuild| 129 + 2 files changed, 174 insertions(+) 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 new file mode 100644 index 000..7e015d53ebd --- /dev/null +++ b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v4.patch @@ -0,0 +1,45 @@ +--- 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(, 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/zsnes-1.51-r11.ebuild b/games-emulation/zsnes/zsnes-1.51-r11.ebuild new file mode 100644 index 000..f5956fa938c --- /dev/null +++ b/games-emulation/zsnes/zsnes-1.51-r11.ebuild @@ -0,0 +1,129 @@ +# 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? ( 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
[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/files/, games-emulation/zsnes/
commit: eb59b32637163183ba71a90a1bcf5ce74ff22dc4 Author: Sergei Trofimovich gentoo org> AuthorDate: Tue Feb 4 21:17:17 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Tue Feb 4 21:17:23 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb59b326 games-emulation/zsnes: tweak for gcc-10 Package-Manager: Portage-2.3.87, Repoman-2.3.20 Signed-off-by: Sergei Trofimovich gentoo.org> games-emulation/zsnes/files/zsnes-1.51-gcc-10.patch | 11 +++ games-emulation/zsnes/zsnes-1.51-r7.ebuild | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc-10.patch b/games-emulation/zsnes/files/zsnes-1.51-gcc-10.patch new file mode 100644 index 000..71a1392e6a4 --- /dev/null +++ b/games-emulation/zsnes/files/zsnes-1.51-gcc-10.patch @@ -0,0 +1,11 @@ +--- 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/zsnes-1.51-r7.ebuild b/games-emulation/zsnes/zsnes-1.51-r7.ebuild index 6a452751e0e..1d2c43f55fa 100644 --- a/games-emulation/zsnes/zsnes-1.51-r7.ebuild +++ b/games-emulation/zsnes/zsnes-1.51-r7.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -54,6 +54,8 @@ PATCHES=( "${FILESDIR}"/${P}-cross-compile.patch "${FILESDIR}"/${P}-arch.patch + + "${FILESDIR}"/${P}-gcc-10.patch ) src_prepare() {
[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/files/, games-emulation/zsnes/
commit: b696a4232de0de1fad8e77c642e2b506e2433ff4 Author: James Le Cuirot gentoo org> AuthorDate: Mon Oct 28 21:27:51 2019 + Commit: James Le Cuirot gentoo org> CommitDate: Mon Oct 28 21:38:30 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b696a423 games-emulation/zsnes: Drop old 1.51-r6 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: James Le Cuirot gentoo.org> .../zsnes/files/zsnes-1.51-stack-align.patch | 15 --- games-emulation/zsnes/zsnes-1.51-r6.ebuild | 117 - 2 files changed, 132 deletions(-) diff --git a/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch b/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch deleted file mode 100644 index 5dcbf3ad9eb..000 --- a/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch +++ /dev/null @@ -1,15 +0,0 @@ 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) diff --git a/games-emulation/zsnes/zsnes-1.51-r6.ebuild b/games-emulation/zsnes/zsnes-1.51-r6.ebuild deleted file mode 100644 index 288fa85dff1..000 --- a/games-emulation/zsnes/zsnes-1.51-r6.ebuild +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="ao custom-cflags +debug opengl pax_kernel 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" - -src_prepare() { - default - - # Fixing compilation without libpng installed - # Fix bug #186111 - # Fix bug #214697 - # Fix bug #170108 - # Fix bug #260247 - # Fix compability with libpng15 wrt #378735 - # Fix buffer overwrite #257963 - # Fix gcc47 compile #419635 - # Fix stack alignment issue #503138 - eapply \ - "${FILESDIR}"/${P}-libpng.patch \ - "${FILESDIR}"/${P}-archopt-july-23-update.patch \ - "${FILESDIR}"/${P}-gcc43.patch \ - "${FILESDIR}"/${P}-libao-thread.patch \ - "${FILESDIR}"/${P}-depbuild.patch \ - "${FILESDIR}"/${P}-CC-quotes.patch \ - "${FILESDIR}"/${P}-libpng15.patch \ - "${FILESDIR}"/${P}-buffer.patch \ - "${FILESDIR}"/${P}-gcc47.patch \ - "${FILESDIR}"/${P}-stack-align.patch \ - "${FILESDIR}"/${P}-cross-compile.patch \ - "${FILESDIR}"/${P}-arch.patch - - # 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() { - dobin zsnes - if use pax_kernel; then - pax-mark m
[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/files/, games-emulation/zsnes/
commit: c068f68557e6a0d7d2f5232221900205076429aa Author: Sergei Trofimovich gentoo org> AuthorDate: Fri Jul 6 22:32:25 2018 + Commit: Sergei Trofimovich gentoo org> CommitDate: Fri Jul 6 22:33:09 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c068f685 games-emulation/zsnes: apply stack realignment to more functions Expand existing stack realignment hack to more C functions that get called from early init assembly. Fixes zsnes startup for me. Bug: https://bugs.gentoo.org/503138 Package-Manager: Portage-2.3.41, Repoman-2.3.9 .../zsnes/files/zsnes-1.51-stack-align-v2.patch| 56 ++ games-emulation/zsnes/zsnes-1.51-r7.ebuild | 122 + 2 files changed, 178 insertions(+) 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 new file mode 100644 index 000..35613a95359 --- /dev/null +++ b/games-emulation/zsnes/files/zsnes-1.51-stack-align-v2.patch @@ -0,0 +1,56 @@ +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/zsnes-1.51-r7.ebuild b/games-emulation/zsnes/zsnes-1.51-r7.ebuild new file mode 100644 index 000..9613a4888e8 --- /dev/null +++ b/games-emulation/zsnes/zsnes-1.51-r7.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +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" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" +IUSE="ao custom-cflags +debug opengl pax_kernel 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}-archopt-july-23-update.patch + "${FILESDIR}"/${P}-gcc43.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 +) + +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 + +
[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/files/, games-emulation/zsnes/
commit: 699301515a1645745a66f4eb237677df4354abd6 Author: Pacho Ramos gentoo org> AuthorDate: Sun Apr 29 12:37:02 2018 + Commit: Pacho Ramos gentoo org> CommitDate: Sun Apr 29 13:06:40 2018 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69930151 games-emulation/zsnes: Stop using games.eclass Package-Manager: Portage-2.3.31, Repoman-2.3.9 games-emulation/zsnes/files/zsnes-1.51-arch.patch | 4 +- .../files/zsnes-1.51-archopt-july-23-update.patch | 4 +- .../zsnes/files/zsnes-1.51-buffer.patch| 12 +-- .../zsnes/files/zsnes-1.51-cross-compile.patch | 8 +- games-emulation/zsnes/files/zsnes-1.51-gcc47.patch | 4 +- .../zsnes/files/zsnes-1.51-libao-thread.patch | 4 +- .../zsnes/files/zsnes-1.51-libpng.patch| 4 +- .../zsnes/files/zsnes-1.51-stack-align.patch | 4 +- games-emulation/zsnes/zsnes-1.51-r6.ebuild | 117 + 9 files changed, 139 insertions(+), 22 deletions(-) diff --git a/games-emulation/zsnes/files/zsnes-1.51-arch.patch b/games-emulation/zsnes/files/zsnes-1.51-arch.patch index 2c8b690587b..b39549871b7 100644 --- a/games-emulation/zsnes/files/zsnes-1.51-arch.patch +++ b/games-emulation/zsnes/files/zsnes-1.51-arch.patch @@ -1,5 +1,5 @@ configure.in.orig -+++ configure.in +--- a/configure.in.orig b/configure.in @@ -233,72 +233,8 @@ debug=no) AC_MSG_CHECKING(if you want gdb friendly executable) diff --git a/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch b/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch index ba118878a2b..b3e466036f2 100644 --- a/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch +++ b/games-emulation/zsnes/files/zsnes-1.51-archopt-july-23-update.patch @@ -1,5 +1,5 @@ tools/archopt.c.old -+++ tools/archopt.c +--- a/tools/archopt.c.old b/tools/archopt.c @@ -1,8 +1,30 @@ +/* +Copyright (C) 2005-2007 Nach, grinvader ( http://www.zsnes.com ) diff --git a/games-emulation/zsnes/files/zsnes-1.51-buffer.patch b/games-emulation/zsnes/files/zsnes-1.51-buffer.patch index 5f3049b315e..eb463682196 100644 --- a/games-emulation/zsnes/files/zsnes-1.51-buffer.patch +++ b/games-emulation/zsnes/files/zsnes-1.51-buffer.patch @@ -1,5 +1,5 @@ zsnes_1_51/src/initc.c.fortify -+++ zsnes_1_51/src/initc.c +--- src/initc.c.fortify src/initc.c @@ -1464,8 +1464,8 @@ clearmem2(); } @@ -38,8 +38,8 @@ if (yesoutofmemory) { asm_call(outofmemfix); } asm_call(GUIDoReset); zsnes_1_51/src/zstate.c.fortify -+++ zsnes_1_51/src/zstate.c +--- src/zstate.c.fortify src/zstate.c @@ -99,15 +99,15 @@ copy_func(buffer, , 4); copy_func(buffer, , 4); @@ -68,8 +68,8 @@ } */ } zsnes_1_51/src/gblvars.h.fortify -+++ zsnes_1_51/src/gblvars.h +--- 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; diff --git a/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch b/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch index 5823c6aa6ad..5c412e3e649 100644 --- a/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch +++ b/games-emulation/zsnes/files/zsnes-1.51-cross-compile.patch @@ -1,5 +1,5 @@ a/src/acinclude.m4 -+++ b/src/acinclude.m4 +--- src/acinclude.m4 src/acinclude.m4 @@ -107,7 +107,7 @@ int main (int argc, char *argv[]) with_zlib=yes, with_zlib=no, @@ -18,8 +18,8 @@ ZLIB_CFLAGS="" ZLIB_LIBS="" ZLIB_VERSION="" a/src/Makefile.in -+++ b/src/Makefile.in +--- 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 diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch b/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch index e5810241521..b3250fee679 100644 --- a/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch +++ b/games-emulation/zsnes/files/zsnes-1.51-gcc47.patch @@ -3,8 +3,8 @@ Bug #419635 https://bugs.gentoo.org/show_bug.cgi?id=419635 Submitted by Nikos Chantziaras a/src/tools/depbuild.cpp -+++ b/src/tools/depbuild.cpp +--- src/tools/depbuild.cpp src/tools/depbuild.cpp @@ -25,6 +25,7 @@ #include #include diff --git a/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch b/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch index 880e08c698f..1ae0a1467b3 100644 --- a/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch +++ b/games-emulation/zsnes/files/zsnes-1.51-libao-thread.patch @@ -1,5 +1,5 @@ linux/audio.c.old 2007-01-09 20:19:12.0 -0500 -+++ linux/audio.c 2007-12-30 20:33:07.0 -0500 +--- a/linux/audio.c.old 2007-01-09 20:19:12.0 -0500 b/linux/audio.c 2007-12-30 20:33:07.0 -0500 @@ -177,11 +177,7 @@ } else diff --git
[gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/files/, games-emulation/zsnes/
commit: f2a0fd366bf7ce4e16b92169a64c94cc465247ae Author: Michael Sterrett gentoo org> AuthorDate: Thu Sep 10 18:03:46 2015 + Commit: Michael Sterrett gentoo org> CommitDate: Thu Sep 10 18:03:46 2015 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2a0fd36 don't depend on specific autotools behavior to build (bug #559766) Package-Manager: portage-2.2.20.1 games-emulation/zsnes/files/zsnes-1.51-arch.patch | 77 ++ .../zsnes/files/zsnes-1.51-stack-align.patch | 4 +- games-emulation/zsnes/zsnes-1.51-r4.ebuild | 8 +-- 3 files changed, 83 insertions(+), 6 deletions(-) diff --git a/games-emulation/zsnes/files/zsnes-1.51-arch.patch b/games-emulation/zsnes/files/zsnes-1.51-arch.patch new file mode 100644 index 000..2c8b690 --- /dev/null +++ b/games-emulation/zsnes/files/zsnes-1.51-arch.patch @@ -0,0 +1,77 @@ +--- configure.in.orig 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-releaseBuild 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 -O -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-stack-align.patch b/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch index e509e01..3213664 100644 --- a/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch +++ b/games-emulation/zsnes/files/zsnes-1.51-stack-align.patch @@ -1,5 +1,5 @@ zsnes_1_51/src/linux/sdllink.c.old 2014-03-01 04:01:30.351323580 -0500 -+++ zsnes_1_51/src/linux/sdllink.c 2014-03-01 04:02:12.249702898 -0500 +--- zsnes_1_51/src/linux/sdllink.c.old zsnes_1_51/src/linux/sdllink.c @@ -773,11 +773,11 @@ BOOL InitInput() { InitJoystickInput(); diff --git a/games-emulation/zsnes/zsnes-1.51-r4.ebuild b/games-emulation/zsnes/zsnes-1.51-r4.ebuild index 0fedbe9..1daadac 100644 --- a/games-emulation/zsnes/zsnes-1.51-r4.ebuild +++ b/games-emulation/zsnes/zsnes-1.51-r4.ebuild @@ -49,7 +49,8 @@ src_prepare() { "${FILESDIR}"/${P}-buffer.patch \ "${FILESDIR}"/${P}-gcc47.patch \ "${FILESDIR}"/${P}-stack-align.patch \ - "${FILESDIR}"/${P}-cross-compile.patch + "${FILESDIR}"/${P}-cross-compile.patch \ + "${FILESDIR}"/${P}-arch.patch # The sdl detection logic uses AC_PROG_PATH instead of # AC_PROG_TOOL, so force the var to get set the way we @@ -76,6 +77,7 @@ src_prepare() { src_configure() { tc-export CC export BUILD_CXX=$(tc-getBUILD_CXX) + export NFLAGS=-O1 use amd64 && multilib_toolchain_setup x86 use custom-cflags ||