aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorak <ak@FreeBSD.org>2012-04-07 00:06:32 +0800
committerak <ak@FreeBSD.org>2012-04-07 00:06:32 +0800
commit2c590673d089d35b7ea5b0d8182a1974a970f127 (patch)
tree1b2529094428054682ccfd1195a16f03dee65b7f /games
parentbaa8741ee8e47773b3387fcc087dc0fda2958473 (diff)
downloadfreebsd-ports-gnome-2c590673d089d35b7ea5b0d8182a1974a970f127.tar.gz
freebsd-ports-gnome-2c590673d089d35b7ea5b0d8182a1974a970f127.tar.zst
freebsd-ports-gnome-2c590673d089d35b7ea5b0d8182a1974a970f127.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
Diffstat (limited to 'games')
-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 );