summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Heaven <nyhm@gentoo.org>2008-05-02 13:52:31 +0000
committerTristan Heaven <nyhm@gentoo.org>2008-05-02 13:52:31 +0000
commit011d5fddb37ef882a7e48dceb497fb7bcb302847 (patch)
tree73b0e9d535ce7c713f772fff8a7f072c2de1383e /games-emulation/zsnes
parentamd64 stable, bug #212480 (diff)
downloadgentoo-2-011d5fddb37ef882a7e48dceb497fb7bcb302847.tar.gz
gentoo-2-011d5fddb37ef882a7e48dceb497fb7bcb302847.tar.bz2
gentoo-2-011d5fddb37ef882a7e48dceb497fb7bcb302847.zip
Fix building with gcc-4.3
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'games-emulation/zsnes')
-rw-r--r--games-emulation/zsnes/ChangeLog6
-rw-r--r--games-emulation/zsnes/files/zsnes-1.51-gcc43.patch48
-rw-r--r--games-emulation/zsnes/zsnes-1.51-r1.ebuild34
3 files changed, 66 insertions, 22 deletions
diff --git a/games-emulation/zsnes/ChangeLog b/games-emulation/zsnes/ChangeLog
index 9c95b682fa5a..1d1105c06101 100644
--- a/games-emulation/zsnes/ChangeLog
+++ b/games-emulation/zsnes/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-emulation/zsnes
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/ChangeLog,v 1.36 2008/02/29 19:08:22 carlo Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/ChangeLog,v 1.37 2008/05/02 13:52:31 nyhm Exp $
+
+ 02 May 2008; Tristan Heaven <nyhm@gentoo.org>
+ +files/zsnes-1.51-gcc43.patch, zsnes-1.51-r1.ebuild:
+ Fix building with gcc-4.3
29 Feb 2008; Carsten Lohrke <carlo@gentoo.org> zsnes-1.51-r1.ebuild:
Remove icon extension from desktop entry to match Icon Theme Specification.
diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc43.patch b/games-emulation/zsnes/files/zsnes-1.51-gcc43.patch
new file mode 100644
index 000000000000..4650bc12a7d1
--- /dev/null
+++ b/games-emulation/zsnes/files/zsnes-1.51-gcc43.patch
@@ -0,0 +1,48 @@
+--- src/parsegen.cpp
++++ src/parsegen.cpp
+@@ -31,6 +31,7 @@
+ #include <sstream>
+ #include <set>
+ #include <stack>
++#include <cstring>
+ using namespace std;
+
+ #include <errno.h>
+@@ -1828,7 +1829,7 @@
+ }
+ }
+
+-int main(size_t argc, const char **argv)
++int main(int argc, const char **argv)
+ {
+ const char *cheader_file = 0;
+ bool compile = false;
+--- 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/zsnes-1.51-r1.ebuild b/games-emulation/zsnes/zsnes-1.51-r1.ebuild
index 2fa10a16ae65..3b8d1c3606e6 100644
--- a/games-emulation/zsnes/zsnes-1.51-r1.ebuild
+++ b/games-emulation/zsnes/zsnes-1.51-r1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.51-r1.ebuild,v 1.6 2008/02/29 19:08:22 carlo Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/zsnes/zsnes-1.51-r1.ebuild,v 1.7 2008/05/02 13:52:31 nyhm Exp $
-inherit eutils autotools flag-o-matic toolchain-funcs games
+inherit eutils autotools flag-o-matic toolchain-funcs multilib games
DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly"
HOMEPAGE="http://www.zsnes.com/ http://ipherswipsite.com/zsnes/"
@@ -33,41 +33,33 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-libpng.patch
# Fix bug #186111
epatch "${FILESDIR}"/${P}-archopt-july-23-update.patch
+ epatch "${FILESDIR}"/${P}-gcc43.patch
# Remove hardcoded CFLAGS and LDFLAGS
- if use custom-cflags; then
- sed -i -e '/^\s*CFLAGS=.* -fomit-frame-pointer /d' \
- configure.in || die
- append-flags -fomit-frame-pointer -D__RELEASE__
- else
- strip-flags
- fi
sed -i \
- -e 's:^\s*STRIP="-s":STRIP="":' \
- -e 's:^\s*CFLAGS=.* -I\/usr\/local\/include .*$:CFLAGS="${CFLAGS} -I.":' \
- -e '/^\s*LDFLAGS=.* -L\/usr\/local\/lib /d' \
- configure.in || die
-
+ -e '/^CFLAGS=.*local/s:-pipe.*:-Wall -I.":' \
+ -e '/^LDFLAGS=.*local/d' \
+ -e '/\w*CFLAGS=.*fomit/s:-O3.*$STRIP::' \
+ configure.in \
+ || die "sed failed"
eautoreconf
}
src_compile() {
tc-export CC
-
use amd64 && multilib_toolchain_setup x86
-
- local myconf=""
- use custom-cflags && myconf="--disable-cpucheck force_arch=no"
+ use custom-cflags || strip-flags
egamesconf \
$(use_enable ao libao) \
$(use_enable png libpng) \
$(use_enable opengl) \
--disable-debug \
+ --disable-cpucheck \
--enable-release \
- ${myconf} \
+ force_arch=no \
|| die
- emake makefile.dep || die "emake failed"
+ emake makefile.dep || die "emake makefile.dep failed"
emake || die "emake failed"
}
@@ -77,7 +69,7 @@ src_install() {
dodoc ../docs/{readme.1st,*.txt,README.LINUX}
dodoc ../docs/readme.txt/*
dohtml -r ../docs/readme.htm/*
- make_desktop_entry zsnes ZSNES zsnes
+ make_desktop_entry zsnes ZSNES
newicon icons/48x48x32.png ${PN}.png
prepgamesdirs
}