From 5648a18cbdf9607f499f2e579655d1f390c61a20 Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Sat, 28 Jul 2007 22:19:40 +0000 Subject: Fix build with gcc-4.1.2 Bug #170568 (Portage version: 2.1.2.9) --- games-emulation/snes9x/ChangeLog | 10 +- games-emulation/snes9x/files/digest-snes9x-1.43-r2 | 3 + .../snes9x/files/snes9x-1.43-gcc412.patch | 36 +++++++ games-emulation/snes9x/snes9x-1.43-r2.ebuild | 110 +++++++++++++++++++++ 4 files changed, 157 insertions(+), 2 deletions(-) create mode 100644 games-emulation/snes9x/files/digest-snes9x-1.43-r2 create mode 100644 games-emulation/snes9x/files/snes9x-1.43-gcc412.patch create mode 100644 games-emulation/snes9x/snes9x-1.43-r2.ebuild (limited to 'games-emulation/snes9x') diff --git a/games-emulation/snes9x/ChangeLog b/games-emulation/snes9x/ChangeLog index 0b370c02229a..15f525c85dee 100644 --- a/games-emulation/snes9x/ChangeLog +++ b/games-emulation/snes9x/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-emulation/snes9x -# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/snes9x/ChangeLog,v 1.25 2006/11/01 22:50:44 nyhm Exp $ +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-emulation/snes9x/ChangeLog,v 1.26 2007/07/28 22:19:40 tupone Exp $ + +*snes9x-1.43-r2 (28 Jul 2007) + + 28 Jul 2007; Tupone Alfredo + +files/snes9x-1.43-gcc412.patch, +snes9x-1.43-r2.ebuild: + Fix build with gcc-4.1.2 Bug #170568 by Stefan Vunckx 01 Nov 2006; Tristan Heaven snes9x-1.43-r1.ebuild: Use autotools eclass diff --git a/games-emulation/snes9x/files/digest-snes9x-1.43-r2 b/games-emulation/snes9x/files/digest-snes9x-1.43-r2 new file mode 100644 index 000000000000..ba95f02c5719 --- /dev/null +++ b/games-emulation/snes9x/files/digest-snes9x-1.43-r2 @@ -0,0 +1,3 @@ +MD5 2b86716203b6ce1dbfe0395c66bb46b5 snes9x-1.43-src.tar.gz 1016251 +RMD160 d2003f7afb208109405b41f4eec586b93518f9b2 snes9x-1.43-src.tar.gz 1016251 +SHA256 cb60baaeabc28b68f7dfc8fd54453f6268b66aae33ea64eb1788c19df09be6f1 snes9x-1.43-src.tar.gz 1016251 diff --git a/games-emulation/snes9x/files/snes9x-1.43-gcc412.patch b/games-emulation/snes9x/files/snes9x-1.43-gcc412.patch new file mode 100644 index 000000000000..1879ac8bebbb --- /dev/null +++ b/games-emulation/snes9x/files/snes9x-1.43-gcc412.patch @@ -0,0 +1,36 @@ +--- snes9x/globals.cpp.old 2007-07-28 23:55:09.000000000 +0200 ++++ snes9x/globals.cpp 2007-07-28 23:56:34.000000000 +0200 +@@ -123,19 +123,12 @@ + + struct SSettings Settings; + +-struct SDSP1 DSP1; +- + struct SSA1Registers SA1Registers; + + struct SSA1 SA1; + + SSoundData SoundData; + +-SnesModel M1SNES={1,3,2}; +-SnesModel M2SNES={2,4,3}; +-SnesModel* Model=&M1SNES; +- +- + uint8 *SRAM = NULL; + uint8 *ROM = NULL; + uint8 *RegRAM = NULL; +@@ -162,6 +155,13 @@ + + END_EXTERN_C + ++struct SDSP1 DSP1; ++ ++SnesModel M1SNES={1,3,2}; ++SnesModel M2SNES={2,4,3}; ++SnesModel* Model=&M1SNES; ++ ++ + #ifndef ZSNES_FX + struct FxInit_s SuperFX; + #else diff --git a/games-emulation/snes9x/snes9x-1.43-r2.ebuild b/games-emulation/snes9x/snes9x-1.43-r2.ebuild new file mode 100644 index 000000000000..c8b495c04a92 --- /dev/null +++ b/games-emulation/snes9x/snes9x-1.43-r2.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-emulation/snes9x/snes9x-1.43-r2.ebuild,v 1.1 2007/07/28 22:19:40 tupone Exp $ + +# 3dfx support (glide) is disabled because it requires +# glide-v2 while we only provide glide-v3 in portage +# http://bugs.gentoo.org/show_bug.cgi?id=93097 + +WANT_AUTOCONF=latest +inherit autotools eutils flag-o-matic multilib games + +DESCRIPTION="Super Nintendo Entertainment System (SNES) emulator" +HOMEPAGE="http://www.snes9x.com/" +SRC_URI="http://www.lysator.liu.se/snes9x/${PV}/snes9x-${PV}-src.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="debug dga joystick opengl zlib" + +RDEPEND="x11-libs/libXext + dga? ( x11-libs/libXxf86dga + x11-libs/libXxf86vm ) + media-libs/libpng + amd64? ( app-emulation/emul-linux-x86-xlibs ) + opengl? ( virtual/opengl + virtual/glu )" +DEPEND="${RDEPEND} + x86? ( dev-lang/nasm ) + x11-proto/xextproto + x11-proto/xproto + dga? ( x11-proto/xf86dgaproto + x11-proto/xf86vidmodeproto )" + +S=${WORKDIR}/${P}-src + +src_unpack() { + unpack ${A} + cd "${S}"/snes9x + rm offsets # stupid prebuilt file + sed -i \ + -e 's:-lXext -lX11::' Makefile.in \ + || die "sed failed" + epatch \ + "${FILESDIR}"/nojoy.patch \ + "${FILESDIR}"/${P}-porting.patch \ + "${FILESDIR}"/${P}-key-bindings-fix.patch \ + "${FILESDIR}"/${P}-build.patch \ + "${FILESDIR}"/${P}-gcc412.patch \ + "${FILESDIR}"/${P}-config.patch + + sed -i \ + -e 's:png_jmpbuf:png_write_info:g' \ + -e '/X_LDFLAGS=/d' \ + configure.in || die "sed failed" + + eautoconf +} + +src_compile() { + [[ -z ${NATIVE_AMD64_BUILD_PLZ} ]] && use amd64 && multilib_toolchain_setup x86 + + local vidconf= + local target= + local vid= + + append-ldflags -Wl,-z,noexecstack + + mkdir mybins + for vid in opengl fallback ; do + if [[ ${vid} != "fallback" ]] ; then + use ${vid} || continue + fi + cd "${S}"/snes9x + case ${vid} in +# 3dfx) +# vidconf="--with-glide --without-opengl --without-x" +# target=gsnes9x;; + opengl) + vidconf="--with-opengl --without-glide --without-x" + target=osnes9x;; + fallback) + vidconf="--with-x --without-glide --without-opengl" + target=snes9x;; + esac + # this stuff is ugly but hey the build process sucks ;) + egamesconf \ + ${vidconf} \ + $(use_with x86 assembler) \ + $(use_with joystick) \ + $(use_with debug debugger) \ + $(use_with zlib) \ + --with-screenshot \ + $(use_with dga extensions) \ + || die + # Makefile doesnt quite support parallel builds + emake -j1 offsets || die "making offsets" + emake ${target} || die "making ${target}" + mv ${target} "${S}"/mybins/ + cd "${WORKDIR}" + rm -r "${S}"/snes9x + src_unpack + done +} + +src_install() { + dogamesbin mybins/* || die "dogamesbin failed" + dodoc faqs.txt readme.txt readme.unix snes9x/*.txt + prepgamesdirs +} -- cgit v1.2.3-65-gdbad