summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-simulation/crashtest')
-rw-r--r--games-simulation/crashtest/ChangeLog8
-rw-r--r--games-simulation/crashtest/crashtest-1.1.ebuild43
-rw-r--r--games-simulation/crashtest/files/crashtest-1.1-gentoo.patch116
3 files changed, 166 insertions, 1 deletions
diff --git a/games-simulation/crashtest/ChangeLog b/games-simulation/crashtest/ChangeLog
index 4464aa652d44..f84398ea18fb 100644
--- a/games-simulation/crashtest/ChangeLog
+++ b/games-simulation/crashtest/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-simulation/crashtest
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-simulation/crashtest/ChangeLog,v 1.5 2009/01/22 20:21:06 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-simulation/crashtest/ChangeLog,v 1.6 2009/10/14 05:48:31 mr_bones_ Exp $
+
+*crashtest-1.1 (14 Oct 2009)
+
+ 14 Oct 2009; Michael Sterrett <mr_bones_@gentoo.org>
+ +crashtest-1.1.ebuild, +files/crashtest-1.1-gentoo.patch:
+ version bump
22 Jan 2009; Michael Sterrett <mr_bones_@gentoo.org>
files/crashtest-1.0-gentoo.patch, crashtest-1.0.ebuild:
diff --git a/games-simulation/crashtest/crashtest-1.1.ebuild b/games-simulation/crashtest/crashtest-1.1.ebuild
new file mode 100644
index 000000000000..2abc46433b42
--- /dev/null
+++ b/games-simulation/crashtest/crashtest-1.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-simulation/crashtest/crashtest-1.1.ebuild,v 1.1 2009/10/14 05:48:31 mr_bones_ Exp $
+
+EAPI=2
+inherit eutils flag-o-matic games
+
+DESCRIPTION="Educational car crash simulator"
+HOMEPAGE="http://bram.creative4vision.nl/crashtest/"
+SRC_URI="http://bram.creative4vision.nl/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/fltk:1.1[opengl]
+ dev-games/ode
+ media-libs/alsa-lib
+ virtual/opengl
+ virtual/glu
+ virtual/glut"
+DEPEND="${RDEPEND}
+ >=media-libs/plib-1.8.4"
+
+S=${WORKDIR}/${P}/src-${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}"-gentoo.patch
+ sed -i \
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
+ -e "s:@GENTOO_BINDIR@:${GAMES_BINDIR}:" \
+ Makefile ${PN}.cxx \
+ || die "sed failed"
+ append-flags -DHAVE_ISNANF
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc README
+ make_desktop_entry ${PN} Crashtest
+ prepgamesdirs
+}
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..2a0bf629c35f
--- /dev/null
+++ b/games-simulation/crashtest/files/crashtest-1.1-gentoo.patch
@@ -0,0 +1,116 @@
+diff -ru crashtest-1.1.orig/src-crashtest/Makefile crashtest-1.1/src-crashtest/Makefile
+--- crashtest-1.1.orig/src-crashtest/Makefile 2009-02-15 17:11:31.000000000 -0500
++++ crashtest-1.1/src-crashtest/Makefile 2009-10-14 01:00:13.900627555 -0400
+@@ -1,34 +1,11 @@
+-# 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
+
+-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 crashtest-1.1.orig/src-crashtest/crashtest.cxx crashtest-1.1/src-crashtest/crashtest.cxx
+--- crashtest-1.1.orig/src-crashtest/crashtest.cxx 2009-02-15 17:08:24.000000000 -0500
++++ crashtest-1.1/src-crashtest/crashtest.cxx 2009-10-14 01:01:25.822753522 -0400
+@@ -15,14 +15,14 @@
+ #include <GL/glu.h>
+ #endif
+
+-#include <FL/Fl.H>
+-#include <FL/Fl_Box.H>
+-#include <FL/Fl_Button.H>
+-#include <FL/Fl_Check_Button.H>
+-#include <FL/Fl_Chart.H>
+-#include <FL/Fl_Value_Slider.H>
+-#include <FL/Fl_Gl_Window.H>
+-#include <FL/fl_draw.H>
++#include <fltk-1.1/FL/Fl.H>
++#include <fltk-1.1/FL/Fl_Box.H>
++#include <fltk-1.1/FL/Fl_Button.H>
++#include <fltk-1.1/FL/Fl_Check_Button.H>
++#include <fltk-1.1/FL/Fl_Chart.H>
++#include <fltk-1.1/FL/Fl_Value_Slider.H>
++#include <fltk-1.1/FL/Fl_Gl_Window.H>
++#include <fltk-1.1/FL/fl_draw.H>
+
+ #include <plib/ssg.h>
+ #include <plib/ul.h>
+@@ -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();
+ }
+-