aboutsummaryrefslogtreecommitdiff
path: root/games/linwarrior
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-02-17 21:55:49 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-02-17 21:55:49 +0000
commitc64f0d98db656c076af8da8d7a57991af8841937 (patch)
tree58faa16d0cce6f63abf03b4f03dee4341029b298 /games/linwarrior
parentaae2119c20bc12066a97213c92852a9848604ece (diff)
downloadports-c64f0d98db656c076af8da8d7a57991af8841937.tar.gz
ports-c64f0d98db656c076af8da8d7a57991af8841937.zip
Notes
Diffstat (limited to 'games/linwarrior')
-rw-r--r--games/linwarrior/Makefile27
-rw-r--r--games/linwarrior/distinfo6
-rw-r--r--games/linwarrior/files/patch-Makefile25
3 files changed, 40 insertions, 18 deletions
diff --git a/games/linwarrior/Makefile b/games/linwarrior/Makefile
index b45bbc40b31c..71f0a407adf2 100644
--- a/games/linwarrior/Makefile
+++ b/games/linwarrior/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= linwarrior
-PORTVERSION= 20081224
+PORTVERSION= 20090208
CATEGORIES= games
MASTER_SITES= http://www.hackcraft.de/games/linwarrior_3d/downloads/ \
http://mirror.amdmi3.ru/
@@ -15,25 +15,22 @@ DISTNAME= ${PORTNAME}_${PORTVERSION}
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Navigate a mech through a 3D world and fire at enemies
-USE_SDL= sdl mixer
+LIB_DEPENDS= openal.0:${PORTSDIR}/audio/openal \
+ alut.1:${PORTSDIR}/audio/freealut
+
+USE_GMAKE= yes
USE_GL= gl glu
+USE_SDL= sdl
WRKSRC= ${WRKDIR}/${PORTNAME}
-PLIST_FILES= bin/linwarrior
-
-SRCS= cBackground cBuilding cController cMech cMission cObject \
- cTree cWeapon cWorld main
-
-do-build:
-.for s in ${SRCS}
- cd ${WRKSRC}/source && ${CXX} ${CXXFLAGS} `${SDL_CONFIG} --cflags` \
- -I.. -I../psi3d -c ${s}.cpp -o ${s}.o
-.endfor
- cd ${WRKSRC}/source && ${CXX} `${SDL_CONFIG} --libs` -lGL -lGLU \
- ${SRCS:C/$/.o/} -o ${PORTNAME}
+post-patch:
+ @${REINPLACE_CMD} -e 's|data/|${DATADIR}/|' ${WRKSRC}/source/cMech.cpp \
+ ${WRKSRC}/source/cWeapon.cpp ${WRKSRC}/source/main.cpp
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/source/${PORTNAME} ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/dist/${PORTNAME} ${PREFIX}/bin
+ ${MKDIR} ${DATADIR}/sound
+ ${INSTALL_DATA} ${WRKSRC}/data/sound/*.wav ${DATADIR}/sound
.include <bsd.port.mk>
diff --git a/games/linwarrior/distinfo b/games/linwarrior/distinfo
index 487a3406e215..aa3c8408b525 100644
--- a/games/linwarrior/distinfo
+++ b/games/linwarrior/distinfo
@@ -1,3 +1,3 @@
-MD5 (linwarrior_20081224.tar.gz) = 47339871af73ecc550961e80dc890156
-SHA256 (linwarrior_20081224.tar.gz) = 17c1bbdac6fa1a2f3f0956f35f9f5680e641e9e0f6fbfdce8973889c09258746
-SIZE (linwarrior_20081224.tar.gz) = 2064876
+MD5 (linwarrior_20090208.tar.gz) = 9400e542a2c580b19a018c43758aa239
+SHA256 (linwarrior_20090208.tar.gz) = 43df914a961c5708c414cda0a59ca2b7224478f002b2303741297bf0bac8e852
+SIZE (linwarrior_20090208.tar.gz) = 3650361
diff --git a/games/linwarrior/files/patch-Makefile b/games/linwarrior/files/patch-Makefile
new file mode 100644
index 000000000000..ec84363b0c9c
--- /dev/null
+++ b/games/linwarrior/files/patch-Makefile
@@ -0,0 +1,25 @@
+--- Makefile.orig 2009-02-02 19:09:59.000000000 +0300
++++ Makefile 2009-02-17 02:45:45.000000000 +0300
+@@ -4,19 +4,18 @@
+ MKDIR=mkdir
+ CP=cp
+ RM=rm -f
+-CPP=c++
++CPP=${CXX}
+
+-INCLUDES = -I psi3d -I source -I .
++INCLUDES = -I psi3d -I source -I . `${SDL_CONFIG} --cflags`
+
+ ifneq (,$(findstring Win,$(OS)))
+ LIBRARIES= -lmingw32 -lSDLmain -lSDL -lOpenGL32 -lGLU32 -lopenal32 -lalut
+ TARGET=dist/linwarrior.exe
+ else
+- LIBRARIES= -lGL -lGLU -lSDL -lopenal -lalut
++ LIBRARIES= -lGL -lGLU `${SDL_CONFIG} --libs` -lopenal -lalut
+ TARGET=dist/linwarrior
+ endif
+
+-CFLAGS =-Wp,-M,-MP,-MT,$@,-MF,dep/$(subst /,-,$@).d
+ #CFLAGS =-Wp,-M,-MP,-MT,$@,-MF,dep/$(@F).d
+ CFLAGS += $(INCLUDES)
+