aboutsummaryrefslogtreecommitdiff
path: root/games/drcreep
diff options
context:
space:
mode:
authorAlex Kozlov <ak@FreeBSD.org>2012-04-06 16:06:32 +0000
committerAlex Kozlov <ak@FreeBSD.org>2012-04-06 16:06:32 +0000
commitc27f8ed8edf680cded462d2a596f54b179643c6c (patch)
treead3b265b67ee26c8a771419fada496b902144269 /games/drcreep
parent3d39c8e184e7d5d4ca4e3cd47fa2dcbe73bb2bf8 (diff)
downloadports-c27f8ed8edf680cded462d2a596f54b179643c6c.tar.gz
ports-c27f8ed8edf680cded462d2a596f54b179643c6c.zip
Fix build on FreeBSD 7 (work with old scandir prototype)
Submitted by: pointyhat via pavmail Approved by: eadler (mentor), maintainer (implicit) Feature safe: yes
Notes
Notes: svn path=/head/; revision=294294
Diffstat (limited to 'games/drcreep')
-rw-r--r--games/drcreep/Makefile9
-rw-r--r--games/drcreep/files/extra-patch-src_stdafx.cpp10
2 files changed, 18 insertions, 1 deletions
diff --git a/games/drcreep/Makefile b/games/drcreep/Makefile
index 1778980105c4..26b4c1c0b5b2 100644
--- a/games/drcreep/Makefile
+++ b/games/drcreep/Makefile
@@ -7,6 +7,7 @@
PORTNAME= drcreep
PORTVERSION= 394
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= SF/creep/
@@ -19,6 +20,12 @@ USE_SDL= sdl
WRKSRC= ${WRKDIR}/head
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 801000
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-src_stdafx.cpp
+.endif
+
do-build:
cd ${WRKSRC} && ${CXX} -DFREEBSD -o ${PORTNAME} ${CXXFLAGS} \
`${SDL_CONFIG} --cflags --libs` -I./src src/*.cpp src/graphics/*.cpp \
@@ -40,4 +47,4 @@ do-install:
@echo ''
@echo ''
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/drcreep/files/extra-patch-src_stdafx.cpp b/games/drcreep/files/extra-patch-src_stdafx.cpp
new file mode 100644
index 000000000000..fc219f4f212a
--- /dev/null
+++ b/games/drcreep/files/extra-patch-src_stdafx.cpp
@@ -0,0 +1,10 @@
+Index: src/stdafx.cpp
+@@ -364,7 +364,7 @@
+
+ string findType;
+
+-int file_select(const struct dirent *entry) {
++int file_select(struct dirent *entry) {
+ string name = entry->d_name;
+
+ transform( name.begin(), name.end(), name.begin(), ::toupper );