aboutsummaryrefslogtreecommitdiffstats
path: root/games/crashtest
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2016-11-14 23:10:20 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2016-11-14 23:10:20 +0800
commite271d43e2bb42c8c70fee2e8d288f5e2fb8e3b6d (patch)
tree593e29166b5f5b31c8248f6ee821de0bddf8e460 /games/crashtest
parent0f46cd2ae83de11827cf31e8429f88625fd42fb2 (diff)
downloadfreebsd-ports-gnome-e271d43e2bb42c8c70fee2e8d288f5e2fb8e3b6d.tar.gz
freebsd-ports-gnome-e271d43e2bb42c8c70fee2e8d288f5e2fb8e3b6d.tar.zst
freebsd-ports-gnome-e271d43e2bb42c8c70fee2e8d288f5e2fb8e3b6d.zip
- Add games/crashtest
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. WWW: http://www.stolk.org/crashtest/
Diffstat (limited to 'games/crashtest')
-rw-r--r--games/crashtest/Makefile47
-rw-r--r--games/crashtest/distinfo3
-rw-r--r--games/crashtest/files/patch-src-crashtest_Makefile32
-rw-r--r--games/crashtest/files/patch-src-crashtest_crashtest.cxx16
-rw-r--r--games/crashtest/pkg-descr6
5 files changed, 104 insertions, 0 deletions
diff --git a/games/crashtest/Makefile b/games/crashtest/Makefile
new file mode 100644
index 000000000000..df1aae3a41bf
--- /dev/null
+++ b/games/crashtest/Makefile
@@ -0,0 +1,47 @@
+# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= crashtest
+PORTVERSION= 1.1
+CATEGORIES= games
+MASTER_SITES= http://www.stolk.org/crashtest/
+
+MAINTAINER= amdmi3@FreeBSD.org
+COMMENT= Educational crash simulator
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libode.a:devel/ode \
+ ${LOCALBASE}/lib/libplibul.a:x11-toolkits/plib
+LIB_DEPENDS= libfltk.so:x11-toolkits/fltk
+
+USE_GL= gl glu
+
+BUILD_WRKSRC= ${WRKSRC}/src-crashtest
+
+PORTDOCS= *
+PORTDATA= *
+PLIST_FILES= bin/${PORTNAME}
+
+DESKTOP_ENTRIES="${PORTNAME}" \
+ "" \
+ "" \
+ "${PORTNAME}" \
+ "Game;Simulation;Physics;" \
+ ""
+
+OPTIONS_DEFINE= DOCS
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/src-crashtest/crashtest.cxx
+
+do-install:
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+ @${MKDIR} ${STAGEDIR}${DATADIR}/models
+ ${INSTALL_DATA} ${WRKSRC}/models-crashtest/*.3ds ${STAGEDIR}${DATADIR}/models
+ ${INSTALL_DATA} ${WRKSRC}/models-crashtest/*.ac ${STAGEDIR}${DATADIR}/models
+ ${INSTALL_DATA} ${WRKSRC}/models-crashtest/*.bmp ${STAGEDIR}${DATADIR}/models
+
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${BUILD_WRKSRC}/README ${STAGEDIR}${DOCSDIR}/
+
+.include <bsd.port.mk>
diff --git a/games/crashtest/distinfo b/games/crashtest/distinfo
new file mode 100644
index 000000000000..7db976d7fc33
--- /dev/null
+++ b/games/crashtest/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1478619450
+SHA256 (crashtest-1.1.tar.gz) = 55c5ce29857263ceebc1c3f42c153f275dfc47711e9248395fd4398d6ef52ab9
+SIZE (crashtest-1.1.tar.gz) = 134769
diff --git a/games/crashtest/files/patch-src-crashtest_Makefile b/games/crashtest/files/patch-src-crashtest_Makefile
new file mode 100644
index 000000000000..cf3ac4ed6e0a
--- /dev/null
+++ b/games/crashtest/files/patch-src-crashtest_Makefile
@@ -0,0 +1,32 @@
+--- src-crashtest/Makefile.orig 2009-02-15 22:11:31 UTC
++++ src-crashtest/Makefile
+@@ -1,8 +1,7 @@
+ # EDIT THESE SETTINGS
+
+-PLIBPREFIX=/usr
+-ODEPREFIX=/usr
+-CXX=g++
++PLIBPREFIX=${LOCALBASE}
++ODEPREFIX=${LOCALBASE}
+
+ #PLIBPREFIX=$(HOME)
+ #ODEPREFIX=$(HOME)
+@@ -10,15 +9,13 @@ CXX=g++
+
+ # END OF CUSTOM SETTINGS
+
+-CXXFLAGS=\
++CXXFLAGS+=\
+ -I$(ODEPREFIX)/include \
+ -I$(PLIBPREFIX)/include \
+- -I../src-common \
+- -O2 -g -Wall
++ -I../src-common
+
+ LFLAGS=\
+- -L$(PLIBPREFIX)/lib \
+- -L/usr/X11R6/lib
++ -L$(PLIBPREFIX)/lib
+
+ OBJS=staticworldobject.o crashtest.o dynamicobject.o cartobject.o
+
diff --git a/games/crashtest/files/patch-src-crashtest_crashtest.cxx b/games/crashtest/files/patch-src-crashtest_crashtest.cxx
new file mode 100644
index 000000000000..a01a5fa9c8f6
--- /dev/null
+++ b/games/crashtest/files/patch-src-crashtest_crashtest.cxx
@@ -0,0 +1,16 @@
+--- src-crashtest/crashtest.cxx.orig 2009-02-15 22:08:24 UTC
++++ src-crashtest/crashtest.cxx
+@@ -616,12 +616,7 @@ void seatbelt_cb(Fl_Widget *o)
+ 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="%%DATADIR%%";
+ if (getenv("PLODE_DATADIR"))
+ dirprefix = getenv("PLODE_DATADIR");
+ modelmap = new ModelMap(dirprefix);
diff --git a/games/crashtest/pkg-descr b/games/crashtest/pkg-descr
new file mode 100644
index 000000000000..96d2adc30ac4
--- /dev/null
+++ b/games/crashtest/pkg-descr
@@ -0,0 +1,6 @@
+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.
+
+WWW: http://www.stolk.org/crashtest/