summaryrefslogtreecommitdiff
path: root/games-simulation/crashtest/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-simulation/crashtest/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-simulation/crashtest/files')
-rw-r--r--games-simulation/crashtest/files/crashtest-1.1-gentoo.patch94
1 files changed, 94 insertions, 0 deletions
diff --git a/games-simulation/crashtest/files/crashtest-1.1-gentoo.patch b/games-simulation/crashtest/files/crashtest-1.1-gentoo.patch
new file mode 100644
index 000000000000..b384c87278c2
--- /dev/null
+++ b/games-simulation/crashtest/files/crashtest-1.1-gentoo.patch
@@ -0,0 +1,94 @@
+diff -ru a/Makefile b/Makefile
+--- a/Makefile 2009-02-15 17:11:31.000000000 -0500
++++ b/Makefile 2009-10-14 01:00:13.900627555 -0400
+@@ -1,34 +1,12 @@
+-# EDIT THESE SETTINGS
+-
+-PLIBPREFIX=/usr
+-ODEPREFIX=/usr
+-CXX=g++
+-
+-#PLIBPREFIX=$(HOME)
+-#ODEPREFIX=$(HOME)
+-#CXX=g++-4.0
+-
+-# END OF CUSTOM SETTINGS
+-
+-CXXFLAGS=\
+- -I$(ODEPREFIX)/include \
+- -I$(PLIBPREFIX)/include \
+- -I../src-common \
+- -O2 -g -Wall
+-
+-LFLAGS=\
+- -L$(PLIBPREFIX)/lib \
+- -L/usr/X11R6/lib
+-
+ OBJS=staticworldobject.o crashtest.o dynamicobject.o cartobject.o
++CXXFLAGS+=-I `fltk-config --includedir` `ode-config --cflags`
+
+-LIBS= $(ODEPREFIX)/lib/libode.a -lplibssgaux -lplibssg -lplibsg -lplibpu -lplibfnt -lplibul -lGLU -lGL `fltk-config --use-gl --use-images --ldflags`
+-
++LIBS= `ode-config --libs` -lplibssgaux -lplibssg -lplibsg -lplibpu -lplibfnt -lplibul -lGLU -lGL -lasound `fltk-config --use-gl --use-images --ldflags` -lglut
+
+ all: crashtest
+
+ crashtest: $(OBJS)
+- $(CXX) -o crashtest $(OBJS) $(LFLAGS) $(LIBS)
++ $(CXX) -o crashtest $(OBJS) $(LDFLAGS) $(LIBS)
+
+ staticworldobject.o: ../src-common/staticworldobject.cxx ../src-common/staticworldobject.h ../src-common/worldobject.h
+ $(CXX) -c $(CXXFLAGS) ../src-common/staticworldobject.cxx
+@@ -37,10 +14,10 @@
+ $(CXX) -c $(CXXFLAGS) ../src-common/dynamicobject.cxx
+
+ cartobject.o: cartobject.cxx cartobject.h
+- $(CXX) -c $(CXXFLAGS) cartobject.cxx
++ $(CXX) -c $(CXXFLAGS) -I../src-common cartobject.cxx
+
+ crashtest.o: crashtest.cxx crashworld.h ../src-common/modelmap.h cartobject.h bipedobject.h ../src-common/brickwall.h ../src-common/stereocontext.h ../src-common/usercam.h
+- $(CXX) -c $(CXXFLAGS) crashtest.cxx
++ $(CXX) -c $(CXXFLAGS) -I../src-common crashtest.cxx
+
+
+
+@@ -48,13 +25,13 @@
+ PLODE_DATADIR=`pwd` ./crashtest
+
+
+-GAMEDIR=$(DESTDIR)/usr/share/games/crashtest
++GAMEDIR=$(DESTDIR)@GENTOO_DATADIR@
+ install: crashtest
+ # Directories
+- mkdir -p $(DESTDIR)/usr/games/
++ mkdir -p $(DESTDIR)@GENTOO_BINDIR@
+ mkdir -p $(GAMEDIR)/models/
+ # Binary
+- install crashtest $(DESTDIR)/usr/games/crashtest
++ install crashtest $(DESTDIR)@GENTOO_BINDIR@
+ # Models
+ install -m 644 models/testground.3ds $(GAMEDIR)/models/testground.3ds
+ install -m 644 models/biped_torso.3ds $(GAMEDIR)/models/biped_torso.3ds
+diff -ru a/crashtest.cxx b/crashtest.cxx
+--- a/crashtest.cxx 2009-02-15 17:08:24.000000000 -0500
++++ b/crashtest.cxx 2009-10-14 01:01:25.822753522 -0400
+@@ -615,13 +615,7 @@
+
+ int main(int argc, char *argv[])
+ {
+- char *bindirname = dirname(argv[0]);
+- if (!strcmp(bindirname,"."))
+- dirprefix="/usr/share/games/crashtest";
+- else
+- {
+- dirprefix = dirname(bindirname) + std::string("/share/games/crashtest");
+- }
++ dirprefix="@GENTOO_DATADIR@";
+ if (getenv("PLODE_DATADIR"))
+ dirprefix = getenv("PLODE_DATADIR");
+ modelmap = new ModelMap(dirprefix);
+@@ -745,4 +739,3 @@
+ Fl::add_idle(idle, &simwin);
+ Fl::run();
+ }
+-