summaryrefslogtreecommitdiff
path: root/games-simulation/crashtest
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
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-simulation/crashtest')
-rw-r--r--games-simulation/crashtest/Manifest4
-rw-r--r--games-simulation/crashtest/crashtest-1.1-r1.ebuild45
-rw-r--r--games-simulation/crashtest/files/crashtest-1.1-gentoo.patch94
-rw-r--r--games-simulation/crashtest/metadata.xml14
4 files changed, 157 insertions, 0 deletions
diff --git a/games-simulation/crashtest/Manifest b/games-simulation/crashtest/Manifest
new file mode 100644
index 000000000000..f688984c9769
--- /dev/null
+++ b/games-simulation/crashtest/Manifest
@@ -0,0 +1,4 @@
+AUX crashtest-1.1-gentoo.patch 2907 BLAKE2B 5d99f7943f568877d31a1d3cadcbb670487db8923275d44384d9e4a2897320b7c963c59163cb7076ff995617f11d8b1c3482a0cca4b02cc28a5ff5b4ce7e7f9f SHA512 6b657329db9eba28de9dcbf33bfd46002e89e0a5a348a9109742cfa6b0ab6a431a8c5edd880201b40ab0dcc4cc5b27be16dc5e38e16621596ec62ea07676c716
+DIST crashtest-1.1.tar.gz 134769 BLAKE2B 16c7be2723d705bbcfc4457a0d7bb545ddaacfb9009cc184c849c59a1c356c67d0151bd7bbb0d1909efb89d24e18657038fe0dd66e218e0c7ed24c67ba82089b SHA512 f361b5f202cdcdca871357eb2a2158af2958f4058b6754c63dc5a20c3e08e2ef532e984596d0daac073f2321b2db02e3f8c2a0a4998450fc953c1661d712d59c
+EBUILD crashtest-1.1-r1.ebuild 831 BLAKE2B b57fac9716e9a510d5971ad00a16493c3594ceb018e180fbcc62090cb75ca4187587ce7863ecbbe06a17ce91354b26656f62d0c0c08e7eec9a9de5861f9eb6f6 SHA512 312efd5ef21b25f35c8f78e1088d909afdf8ec56beb7dc2c3c043c5db18c3d68b726ca9590fd4e484299fe508c7b9e6f0eb6c898becd8c49cc2f7be607346112
+MISC metadata.xml 562 BLAKE2B ae31c43ea940ab17bf1295a254c715d4c3a9460a38617deeb7e41e075b04cc20ad2c7710fa66ffc124c9441d00787902ca423537a494c4eaed57c933abf23cb2 SHA512 94005d1dd7a8f13dc37e0c81290486eb34dfda05a2808eb9b4908b5ba7ba722e0435acdde3d2da082e61a70e60eb2e6df70cd0d59589ccb913a6e6e87b81bc55
diff --git a/games-simulation/crashtest/crashtest-1.1-r1.ebuild b/games-simulation/crashtest/crashtest-1.1-r1.ebuild
new file mode 100644
index 000000000000..1faed8379238
--- /dev/null
+++ b/games-simulation/crashtest/crashtest-1.1-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils flag-o-matic
+
+DESCRIPTION="Educational car crash simulator"
+HOMEPAGE="http://www.stolk.org/crashtest/"
+SRC_URI="http://www.stolk.org/crashtest/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-games/ode
+ media-libs/alsa-lib
+ media-libs/freeglut
+ x11-libs/fltk:1[opengl]
+ virtual/opengl
+ virtual/glu"
+DEPEND="${RDEPEND}
+ >=media-libs/plib-1.8.4"
+
+S=${WORKDIR}/${P}/src-${PN}
+
+PATCHES=(
+ "${FILESDIR}/${P}"-gentoo.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s:@GENTOO_DATADIR@:/usr/share/${PN}:" \
+ -e "s:@GENTOO_BINDIR@:/usr/bin:" \
+ Makefile ${PN}.cxx || die
+ append-cppflags -DHAVE_ISNANF
+}
+
+src_install() {
+ default
+ make_desktop_entry ${PN} Crashtest
+}
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();
+ }
+-
diff --git a/games-simulation/crashtest/metadata.xml b/games-simulation/crashtest/metadata.xml
new file mode 100644
index 000000000000..3dc7fa0644b5
--- /dev/null
+++ b/games-simulation/crashtest/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+</maintainer>
+<longdescription lang="en">
+Crashtest simulates car crashes. This is an educational tool that can be used to
+acquire much insight into this complex process. The user can learn about the
+relation between speed, reaction-time and stopping distance. Also, many physical
+properties can be studied.
+</longdescription>
+</pkgmetadata>