aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2009-06-09 08:36:56 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2009-06-09 08:36:56 +0800
commit7dd24618798c9686f89becb329bc697de63e523f (patch)
treef874948068aef1517049d98efcb57107380237ef /games
parentd4439e81dedcffe08a6e816e0e08697bfae143d6 (diff)
downloadfreebsd-ports-graphics-7dd24618798c9686f89becb329bc697de63e523f.tar.gz
freebsd-ports-graphics-7dd24618798c9686f89becb329bc697de63e523f.tar.zst
freebsd-ports-graphics-7dd24618798c9686f89becb329bc697de63e523f.zip
- Update to 20090529
Diffstat (limited to 'games')
-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 baa8a5bb14e..4e5cbf2a069 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 aa3c8408b52..2ed48837b4d 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 00000000000..6ec323b06a2
--- /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" );
+ }
+ }