summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-05-06 10:55:02 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-05-06 10:55:02 +0000
commit0a514d38b402e7e68b7440141a2d72c5573698e6 (patch)
tree06fae54a99c7a3a0c07433d858e883f1d9afb26c /games-arcade/njam
parentFix building with GCC 4.5+ and -Wl,--as-needed wrt #318583 by Kacper Kowalik. (diff)
downloadgentoo-2-0a514d38b402e7e68b7440141a2d72c5573698e6.tar.gz
gentoo-2-0a514d38b402e7e68b7440141a2d72c5573698e6.tar.bz2
gentoo-2-0a514d38b402e7e68b7440141a2d72c5573698e6.zip
Fix building with GCC 4.5+ wrt #318411 by Kacper Kowalik.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'games-arcade/njam')
-rw-r--r--games-arcade/njam/ChangeLog8
-rw-r--r--games-arcade/njam/files/njam-1.25-gcc45.patch24
-rw-r--r--games-arcade/njam/njam-1.25.ebuild14
3 files changed, 37 insertions, 9 deletions
diff --git a/games-arcade/njam/ChangeLog b/games-arcade/njam/ChangeLog
index aae16782d680..9a7a5a50fe1c 100644
--- a/games-arcade/njam/ChangeLog
+++ b/games-arcade/njam/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-arcade/njam
-# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-arcade/njam/ChangeLog,v 1.10 2007/04/20 05:54:12 opfer Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/njam/ChangeLog,v 1.11 2010/05/06 10:55:02 ssuominen Exp $
+
+ 06 May 2010; Samuli Suominen <ssuominen@gentoo.org> njam-1.25.ebuild,
+ +files/njam-1.25-gcc45.patch:
+ Fix building with GCC 4.5+ wrt #318411 by Kacper Kowalik.
20 Apr 2007; Christian Faulhammer <opfer@gentoo.org> njam-1.25.ebuild:
stable amd64, bug 174569
diff --git a/games-arcade/njam/files/njam-1.25-gcc45.patch b/games-arcade/njam/files/njam-1.25-gcc45.patch
new file mode 100644
index 000000000000..b74bc3dac105
--- /dev/null
+++ b/games-arcade/njam/files/njam-1.25-gcc45.patch
@@ -0,0 +1,24 @@
+Fix buiding with gcc 4.5
+
+http://bugs.gentoo.org/show_bug.cgi?id=318411
+
+--- src/njamedit.cpp
++++ src/njamedit.cpp
+@@ -114,7 +114,7 @@
+ key = SDLK_a;
+ else if (CheckForSave())
+ {
+- LogFile::LogFile("Saving maps");
++ LogFile("Saving maps");
+ m_Maps.Save(filename);
+ level_type_was = level_type;
+ changed = false;
+@@ -131,7 +131,7 @@
+ char types[2][5] = { "COOP", "DUEL" };
+ sprintf(buf, "levels/%s.%s\0", filename, types[level_type]);
+ sprintf(filename, "%s\0", buf);
+- LogFile::LogFile("Saving maps");
++ LogFile("Saving maps");
+ m_Maps.Save(filename);
+ level_type_was = level_type;
+ changed = false;
diff --git a/games-arcade/njam/njam-1.25.ebuild b/games-arcade/njam/njam-1.25.ebuild
index 248156abc41a..52e8b0f77605 100644
--- a/games-arcade/njam/njam-1.25.ebuild
+++ b/games-arcade/njam/njam-1.25.ebuild
@@ -1,10 +1,11 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-arcade/njam/njam-1.25.ebuild,v 1.3 2007/04/20 05:54:12 opfer Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/njam/njam-1.25.ebuild,v 1.4 2010/05/06 10:55:02 ssuominen Exp $
+EAPI=2
inherit eutils flag-o-matic games
-MY_P="${P}-src"
+MY_P=${P}-src
DESCRIPTION="Multi or single-player network Pacman-like game in SDL"
HOMEPAGE="http://njam.sourceforge.net/"
SRC_URI="mirror://sourceforge/njam/${MY_P}.tar.gz"
@@ -21,9 +22,7 @@ DEPEND="media-libs/sdl-mixer
S=${WORKDIR}/${MY_P}
-src_unpack() {
- unpack ${A}
- cd "${S}"
+src_prepare() {
sed -i \
-e "s:hiscore.dat:${GAMES_STATEDIR}/${PN}/\0:" \
src/njam.cpp \
@@ -32,13 +31,14 @@ src_unpack() {
-e "/hiscore.dat/ s:\$(DEFAULT_LIBDIR):${GAMES_STATEDIR}:" \
Makefile.in \
|| die "sed failed"
+ epatch "${FILESDIR}"/${P}-gcc45.patch
# njam segfaults on startup with -Os
replace-flags "-Os" "-O2"
}
src_install() {
dodir "${GAMES_STATEDIR}/${PN}"
- make DESTDIR="${D}" install || die "make install failed"
+ emake DESTDIR="${D}" install || die
dohtml -r "${D}${GAMES_DATADIR}/njam/html/"*
rm -rf "${D}${GAMES_DATADIR}/njam/html/"
newicon data/njamicon.bmp njam.bmp