aboutsummaryrefslogtreecommitdiff
path: root/games/linwarrior
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-06-09 00:36:56 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-06-09 00:36:56 +0000
commit6ea9720cd456353d7b78bf8db897ef3fe63c7213 (patch)
tree321d83b99957d85495a43fcf5728d0cafe2134c4 /games/linwarrior
parenta5e7bdfe237e5d9c6908f1ee475f0e48fa8f5d15 (diff)
downloadports-6ea9720cd456353d7b78bf8db897ef3fe63c7213.tar.gz
ports-6ea9720cd456353d7b78bf8db897ef3fe63c7213.zip
Notes
Diffstat (limited to 'games/linwarrior')
-rw-r--r--games/linwarrior/Makefile13
-rw-r--r--games/linwarrior/distinfo6
-rw-r--r--games/linwarrior/files/extra-patch-source-cMech.cpp20
3 files changed, 33 insertions, 6 deletions
diff --git a/games/linwarrior/Makefile b/games/linwarrior/Makefile
index baa8a5bb14e9..4e5cbf2a0697 100644
--- a/games/linwarrior/Makefile
+++ b/games/linwarrior/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= linwarrior
-PORTVERSION= 20090208
-PORTREVISION= 1
+PORTVERSION= 20090529
CATEGORIES= games
MASTER_SITES= http://www.hackcraft.de/games/linwarrior_3d/downloads/ \
http://mirror.amdmi3.ru/
@@ -22,9 +21,17 @@ LIB_DEPENDS= openal.0:${PORTSDIR}/audio/openal \
USE_GMAKE= yes
USE_GL= gl glu
USE_SDL= sdl
+MAKE_JOBS_SAFE= yes
+USE_GCC= 4.2+
WRKSRC= ${WRKDIR}/${PORTNAME}
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 800007
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-source-cMech.cpp
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|data/|${DATADIR}/|' ${WRKSRC}/source/cMech.cpp \
${WRKSRC}/source/cWeapon.cpp ${WRKSRC}/source/main.cpp
@@ -34,4 +41,4 @@ do-install:
${MKDIR} ${DATADIR}/sound
${INSTALL_DATA} ${WRKSRC}/data/sound/*.wav ${DATADIR}/sound
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/linwarrior/distinfo b/games/linwarrior/distinfo
index aa3c8408b525..2ed48837b4d9 100644
--- a/games/linwarrior/distinfo
+++ b/games/linwarrior/distinfo
@@ -1,3 +1,3 @@
-MD5 (linwarrior_20090208.tar.gz) = 9400e542a2c580b19a018c43758aa239
-SHA256 (linwarrior_20090208.tar.gz) = 43df914a961c5708c414cda0a59ca2b7224478f002b2303741297bf0bac8e852
-SIZE (linwarrior_20090208.tar.gz) = 3650361
+MD5 (linwarrior_20090529.tar.gz) = aeb074ecec5f0c90448efd583b6f6909
+SHA256 (linwarrior_20090529.tar.gz) = dcf6243444bb7e3bc13240680ea279ee88977512ac6326f0376190f00ceaf280
+SIZE (linwarrior_20090529.tar.gz) = 3910310
diff --git a/games/linwarrior/files/extra-patch-source-cMech.cpp b/games/linwarrior/files/extra-patch-source-cMech.cpp
new file mode 100644
index 000000000000..6ec323b06a25
--- /dev/null
+++ b/games/linwarrior/files/extra-patch-source-cMech.cpp
@@ -0,0 +1,20 @@
+--- source/cMech.cpp.orig 2009-05-23 21:01:21.000000000 +0400
++++ source/cMech.cpp 2009-06-08 18:39:11.000000000 +0400
+@@ -1756,9 +1756,14 @@
+ // Set XYZ to Not-A-Number (NaN) for no location.
+ // Note that NaN-ity can only be tested either by
+ // isnanf(x), !finite(x) or by x!=x as NaN always != NaN.
+- mDestination[0] = nanf("");
+- mDestination[1] = nanf("");
+- mDestination[2] = nanf("");
++ union { /* from src/lib/msun/src/s_nan.c of FreeBSD HEAD */
++ float f;
++ uint32_t bits[1];
++ } u;
++ u.bits[0] = 0x7fc00000;
++ mDestination[0] = u.f;
++ mDestination[1] = u.f;
++ mDestination[2] = u.f;
+ //printf("Destination is %s\n", (finitef(mDestination[0])) ? "finite" : "infinite" );
+ }
+ }