summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2012-02-20 17:57:59 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2012-02-20 17:57:59 +0000
commit918c31b04f7cc363ea9c01232dae0ab23dfcac92 (patch)
treefbea1b6e53f7b9c95ba55a2af92e21d2cf68988e /games-sports
parenteapi=4; stable x86 amd64, #bug 404797 (diff)
downloadgentoo-2-918c31b04f7cc363ea9c01232dae0ab23dfcac92.tar.gz
gentoo-2-918c31b04f7cc363ea9c01232dae0ab23dfcac92.tar.bz2
gentoo-2-918c31b04f7cc363ea9c01232dae0ab23dfcac92.zip
use patch instead of lots of sed
(Portage version: 2.1.10.44/cvs/Linux i686)
Diffstat (limited to 'games-sports')
-rw-r--r--games-sports/stormbaancoureur/ChangeLog8
-rw-r--r--games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-gentoo.patch109
-rw-r--r--games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild22
3 files changed, 121 insertions, 18 deletions
diff --git a/games-sports/stormbaancoureur/ChangeLog b/games-sports/stormbaancoureur/ChangeLog
index f533bccda9e0..fd825111ed31 100644
--- a/games-sports/stormbaancoureur/ChangeLog
+++ b/games-sports/stormbaancoureur/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-sports/stormbaancoureur
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-sports/stormbaancoureur/ChangeLog,v 1.18 2010/09/16 17:52:37 scarabeus Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-sports/stormbaancoureur/ChangeLog,v 1.19 2012/02/20 17:57:59 mr_bones_ Exp $
+
+ 20 Feb 2012; Michael Sterrett <mr_bones_@gentoo.org>
+ stormbaancoureur-2.1.6.ebuild, +files/stormbaancoureur-2.1.6-gentoo.patch:
+ use patch instead of lots of sed
16 Sep 2010; Tomáš Chvátal <scarabeus@gentoo.org>
stormbaancoureur-2.1.6.ebuild:
diff --git a/games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-gentoo.patch b/games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-gentoo.patch
new file mode 100644
index 000000000000..de77f6e846d5
--- /dev/null
+++ b/games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-gentoo.patch
@@ -0,0 +1,109 @@
+--- stormbaancoureur-2.1.6.orig/src-stormbaancoureur/Makefile
++++ stormbaancoureur-2.1.6/src-stormbaancoureur/Makefile
+@@ -5,21 +5,20 @@
+ GLPREFIX=/usr
+ PLIBPREFIX=/usr
+ ODEPREFIX=/usr
+-CXX=g++
+ LIBDIRNAME=lib
+
+ # END OF CUSTOM SETTINGS
+
+-CXXFLAGS=\
++LCXXFLAGS:=\
+ -I$(GLPREFIX)/include \
+ -I$(ODEPREFIX)/include \
+ -I$(PLIBPREFIX)/include \
+ -I../src-common \
+ -I. \
+ -DGAMEVERSION=$(VERSION) \
+- -O2 -g -Wall
++ $(CXXFLAGS)
+
+-LFLAGS=\
++LFLAGS= $(LDFLAGS) \
+ -L$(PLIBPREFIX)/$(LIBDIRNAME) \
+ -L/usr/X11R6/$(LIBDIRNAME)
+
+@@ -39,7 +38,7 @@
+
+
+ LIBS=\
+- $(ODEPREFIX)/$(LIBDIRNAME)/libode.a \
++ -lode \
+ -lplibssgaux -lplibssg -lplibsg -lplibpu -lplibfnt -lplibul \
+ -lglut -lGLU -lGL -lasound
+
+@@ -47,41 +46,41 @@
+ all: stormbaancoureur
+
+
+-stormbaancoureur: $(OBJS) $(ODEPREFIX)/$(LIBDIRNAME)/libode.a
++stormbaancoureur: $(OBJS)
+ $(CXX) -o stormbaancoureur $(OBJS) $(LFLAGS) $(LIBS)
+
+ staticworldobject.o: ../src-common/staticworldobject.cxx ../src-common/staticworldobject.h ../src-common/worldobject.h
+- $(CXX) -c $(CXXFLAGS) ../src-common/staticworldobject.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/staticworldobject.cxx
+
+ dynamicobject.o: ../src-common/dynamicobject.cxx ../src-common/dynamicobject.h ../src-common/worldobject.h
+- $(CXX) -c $(CXXFLAGS) ../src-common/dynamicobject.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/dynamicobject.cxx
+
+ carobject.o: carobject.cxx carobject.h
+- $(CXX) -c $(CXXFLAGS) carobject.cxx
++ $(CXX) -c $(LCXXFLAGS) carobject.cxx
+
+ controllerpad.o: controllerpad.cxx controller.h ../src-common/joydb.h
+- $(CXX) -c $(CXXFLAGS) controllerpad.cxx
++ $(CXX) -c $(LCXXFLAGS) controllerpad.cxx
+
+ controllerkey.o: controllerkey.cxx
+- $(CXX) -c $(CXXFLAGS) controllerkey.cxx
++ $(CXX) -c $(LCXXFLAGS) controllerkey.cxx
+
+ intro.o: intro.cxx intro.h
+- $(CXX) -c $(CXXFLAGS) intro.cxx
++ $(CXX) -c $(LCXXFLAGS) intro.cxx
+
+ vectortext.o: ../src-common/vectortext.cxx ../src-common/vectortext.h
+- $(CXX) -c $(CXXFLAGS) ../src-common/vectortext.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/vectortext.cxx
+
+ postscore.o: postscore.cxx postscore.h
+- $(CXX) -c $(CXXFLAGS) postscore.cxx
++ $(CXX) -c $(LCXXFLAGS) postscore.cxx
+
+ soundenginealsa.o: ../src-common/soundenginealsa.cxx ../src-common/soundenginealsa.h ../src-common/soundfeed.h ../src-common/soundclip.h
+- $(CXX) -c $(CXXFLAGS) ../src-common/soundenginealsa.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/soundenginealsa.cxx
+
+ ogl.o: ../src-common/ogl.cxx
+- $(CXX) -c $(CXXFLAGS) ../src-common/ogl.cxx
++ $(CXX) -c $(LCXXFLAGS) ../src-common/ogl.cxx
+
+ main.o: main.cxx ../src-common/usercam.h ../src-common/trackingcam.h ../src-common/soundenginealsa.h cratewall.h controller.h intro.h plodegui.h doorstand.h carpettrack.h spikejump.h ferriswheel.h turntable.h sturmbahn.h ../src-common/modelmap.h starsky.h carobject.h respawnpoint.h
+- $(CXX) -c $(CXXFLAGS) main.cxx
++ $(CXX) -c $(LCXXFLAGS) main.cxx
+
+ debugrun: stormbaancoureur
+ PLODE_DATADIR=`pwd` gdb ./stormbaancoureur
+--- stormbaancoureur-2.1.6.orig/src-stormbaancoureur/main.cxx
++++ stormbaancoureur-2.1.6/src-stormbaancoureur/main.cxx
+@@ -836,15 +836,7 @@
+ fprintf(stderr,"plib is (c) by Steve Baker\n");
+ fprintf(stderr,"OpenDE is (c) by Russel L. Smith\n");
+
+- char *bindirname = dirname(argv[0]);
+- if (!strcmp(bindirname,"."))
+- dirprefix="/usr/share/games/stormbaancoureur";
+- else
+- {
+- dirprefix = dirname(bindirname) + std::string("/share/games/stormbaancoureur");
+- }
+- if (getenv("PLODE_DATADIR"))
+- dirprefix = getenv("PLODE_DATADIR");
++ dirprefix="GENTOODIR";
+ if (getenv("PLODE_DISPLAYMODE"))
+ displaymode = getenv("PLODE_DISPLAYMODE");
+ assert(displaymode == "monoscopic" || displaymode == "quadbufferstereoscopic" || displaymode == "passivestereoscopic");
diff --git a/games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild b/games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild
index 7723ee6ad50a..e072ae073c80 100644
--- a/games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild
+++ b/games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild,v 1.3 2010/09/16 17:52:37 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-sports/stormbaancoureur/stormbaancoureur-2.1.6.ebuild,v 1.4 2012/02/20 17:57:59 mr_bones_ Exp $
EAPI=2
inherit eutils games
@@ -24,24 +24,14 @@ DEPEND="virtual/opengl
S=${WORKDIR}/${P}/src-${PN}
src_prepare() {
- sed -i \
- -e "/dirprefix \?=\"/s:=.*: = \"${GAMES_DATADIR}/${PN}\";:" main.cxx \
- || die "sed failed"
-
- sed -i \
- -e "/^CXX=/d" \
- -e '/Wall/d' \
- -e "/^CXXFLAGS/ s%=%= ${CXXFLAGS} %" \
- -e '/DGAMEVERSION/s:\\::' \
- -e '/^LFLAGS=/s:=:= $(LDFLAGS) :' \
- -e 's:$(ODEPREFIX)/$(LIBDIRNAME)/libode.a:-lode:' \
- Makefile || die "sed failed"
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ sed -ie "s:GENTOODIR:${GAMES_DATADIR}/${PN}:" main.cxx || die
}
src_install() {
- dogamesbin ${PN} || die "dogamesbin failed"
+ dogamesbin ${PN} || die
insinto "${GAMES_DATADIR}"/${PN}
- doins -r images/ models/ sounds/ shaders/ || die "doins failed"
+ doins -r images/ models/ sounds/ shaders/ || die
dodoc JOYSTICKS README TODO
make_desktop_entry ${PN} "Stormbaan Coureur"
prepgamesdirs