aboutsummaryrefslogtreecommitdiff
path: root/games/dangerdeep
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2014-08-12 16:26:34 +0000
committerWilliam Grzybowski <wg@FreeBSD.org>2014-08-12 16:26:34 +0000
commit5f7eb4f449afbd395a27626f17221b29cd27e627 (patch)
tree0378c9ce70cbcd7ffb49039235437d5fb0977c88 /games/dangerdeep
parent4d74d14e32f6e2b37191e9121f5ea9fa63e5afbe (diff)
downloadports-5f7eb4f449afbd395a27626f17221b29cd27e627.tar.gz
ports-5f7eb4f449afbd395a27626f17221b29cd27e627.zip
Notes
Diffstat (limited to 'games/dangerdeep')
-rw-r--r--games/dangerdeep/Makefile24
-rw-r--r--games/dangerdeep/files/patch-SConstruct6
-rw-r--r--games/dangerdeep/files/patch-src__condvar.h18
-rw-r--r--games/dangerdeep/files/patch-src__faulthandler.h10
-rw-r--r--games/dangerdeep/files/patch-src__mutex.h20
-rw-r--r--games/dangerdeep/files/patch-src__subsim.cpp10
-rw-r--r--games/dangerdeep/files/patch-src__thread.h19
7 files changed, 89 insertions, 18 deletions
diff --git a/games/dangerdeep/Makefile b/games/dangerdeep/Makefile
index a803620b00c2..cf25ac899f21 100644
--- a/games/dangerdeep/Makefile
+++ b/games/dangerdeep/Makefile
@@ -23,23 +23,19 @@ USE_SDL= sdl mixer image net
SCONS_ARGS= installbindir=${PREFIX}/bin installdatadir=${DATADIR}
PLIST_FILES= bin/dangerdeep bin/crosssection bin/damagemodel \
- bin/oceantest bin/portal bin/viewmodel
-PLIST_DIRS= %%DATADIR%%
+ bin/oceantest bin/portal bin/viewmodel \
+ man/man6/dangerdeep.6.gz
-MAN6= dangerdeep.6
PORTDOCS= CREDITS README
-NO_STAGE= yes
+OPTIONS_DEFINE= DOCS
+
.include <bsd.port.pre.mk>
.if defined(PACKAGE_BUILDING)
SCONS_ARGS+= usex86sse=-1 # disable MMX/SSE on the build cluster
.endif
-.if ${OSVERSION} >= 1000000
-BROKEN= Does not compile on FreeBSD 10
-.endif
-
post-patch:
@${REINPLACE_CMD} -e 's|/usr/share/games/dangerdeep|${DATADIR}|; \
s|Linux|"Danger from the Deep"|' ${WRKSRC}/doc/man/dangerdeep.6
@@ -52,13 +48,11 @@ do-build:
do-install:
@cd ${WRKSRC}/build/freebsd && \
${INSTALL_PROGRAM} dangerdeep crosssection damagemodel oceantest \
- portal viewmodel ${PREFIX}/bin
+ portal viewmodel ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/doc/man/dangerdeep.6 ${PREFIX}/man/man6
-
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
-.endif
+ ${INSTALL_MAN} ${WRKSRC}/doc/man/dangerdeep.6 ${STAGEDIR}${PREFIX}/man/man6
+ ${GZIP_CMD} ${STAGEDIR}${PREFIX}/man/man6/dangerdeep.6
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.include <bsd.port.post.mk>
diff --git a/games/dangerdeep/files/patch-SConstruct b/games/dangerdeep/files/patch-SConstruct
index 3970bac2c032..42bd9c9c0a6e 100644
--- a/games/dangerdeep/files/patch-SConstruct
+++ b/games/dangerdeep/files/patch-SConstruct
@@ -1,11 +1,11 @@
---- SConstruct.orig 2007-06-11 14:29:13.000000000 -0400
-+++ SConstruct 2007-12-20 20:52:35.000000000 -0500
+--- ./SConstruct.orig 2007-06-11 14:29:13.000000000 -0400
++++ ./SConstruct 2014-08-11 09:56:15.000000000 -0400
@@ -62,7 +62,7 @@
if (debug == 1):
env.Append(CCFLAGS = '-g')
env.Append(CPPDEFINES = ['DEBUG'])
-elif (sys.platform == 'freebsd5') or (sys.platform == 'freebsd6') or (sys.platform == 'freebsd7'):
-+elif (sys.platform == 'freebsd6') or (sys.platform == 'freebsd7') or (sys.platform == 'freebsd8') or (sys.platform == 'freebsd9'):
++elif sys.platform.startswith('freebsd'):
print "Compiling for FreeBSD Environment"
env = Environment(ENV = os.environ)
LOCALBASE = os.environ['LOCALBASE']
diff --git a/games/dangerdeep/files/patch-src__condvar.h b/games/dangerdeep/files/patch-src__condvar.h
new file mode 100644
index 000000000000..06f52b5bea5f
--- /dev/null
+++ b/games/dangerdeep/files/patch-src__condvar.h
@@ -0,0 +1,18 @@
+--- ./src/condvar.h.orig 2007-06-11 11:16:23.000000000 -0400
++++ ./src/condvar.h 2014-08-11 09:56:15.000000000 -0400
+@@ -43,13 +43,13 @@
+
+ /// wait on condition
+ ///@param m - mutex to encapsulate waiting condition
+- void wait(mutex& m);
++ void wait(::mutex& m);
+
+ /// wait on condition with timeout
+ ///@param m - mutex to encapsulate waiting condition
+ ///@param ms - timeout value in milliseconds
+ ///@return true when woken up by signal, false on timeout
+- bool timed_wait(mutex& m, unsigned ms);
++ bool timed_wait(::mutex& m, unsigned ms);
+
+ /// send signal to threads that are waiting on the condition.
+ ///@note Note that before sending the signal you must make the condition false that would
diff --git a/games/dangerdeep/files/patch-src__faulthandler.h b/games/dangerdeep/files/patch-src__faulthandler.h
new file mode 100644
index 000000000000..ee8b4ab008d8
--- /dev/null
+++ b/games/dangerdeep/files/patch-src__faulthandler.h
@@ -0,0 +1,10 @@
+--- ./src/faulthandler.h.orig 2007-06-11 14:29:30.000000000 -0400
++++ ./src/faulthandler.h 2014-08-11 10:17:47.000000000 -0400
+@@ -46,6 +46,7 @@
+ #include <execinfo.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <unistd.h>
+ #include <cxxabi.h> // Needed for __cxa_demangle
+ #include <signal.h>
+ #include <string>
diff --git a/games/dangerdeep/files/patch-src__mutex.h b/games/dangerdeep/files/patch-src__mutex.h
new file mode 100644
index 000000000000..e769fdb33b8d
--- /dev/null
+++ b/games/dangerdeep/files/patch-src__mutex.h
@@ -0,0 +1,20 @@
+--- ./src/mutex.h.orig 2007-06-11 11:16:23.000000000 -0400
++++ ./src/mutex.h 2014-08-11 09:59:15.000000000 -0400
+@@ -58,7 +58,7 @@
+ class mutex_locker
+ {
+ protected:
+- mutex& mymutex;
++ ::mutex& mymutex;
+ private:
+ mutex_locker();
+ mutex_locker(const mutex_locker& );
+@@ -67,7 +67,7 @@
+ /// create mutex locker
+ ///@param mtx - mutex to lock
+ ///@note will instantly lock the mutex that was given as parameter
+- mutex_locker(mutex& mtx) : mymutex(mtx) { mymutex.lock(); }
++ mutex_locker(::mutex& mtx) : mymutex(mtx) { mymutex.lock(); }
+
+ /// destroy mutex locker
+ ///@note will unlock the mutex that was given to the constructor
diff --git a/games/dangerdeep/files/patch-src__subsim.cpp b/games/dangerdeep/files/patch-src__subsim.cpp
new file mode 100644
index 000000000000..e6df17a9ad00
--- /dev/null
+++ b/games/dangerdeep/files/patch-src__subsim.cpp
@@ -0,0 +1,10 @@
+--- ./src/subsim.cpp.orig 2007-06-11 11:16:23.000000000 -0400
++++ ./src/subsim.cpp 2014-08-11 09:56:15.000000000 -0400
+@@ -31,6 +31,7 @@
+ #else
+ #include "oglext/OglExt.h"
+ #endif
++#include <unistd.h>
+ #include <glu.h>
+ #include <SDL.h>
+ #include <SDL_net.h>
diff --git a/games/dangerdeep/files/patch-src__thread.h b/games/dangerdeep/files/patch-src__thread.h
new file mode 100644
index 000000000000..ece066ec7311
--- /dev/null
+++ b/games/dangerdeep/files/patch-src__thread.h
@@ -0,0 +1,19 @@
+--- ./src/thread.h.orig 2007-06-11 11:16:23.000000000 -0400
++++ ./src/thread.h 2014-08-11 10:14:00.000000000 -0400
+@@ -25,6 +25,7 @@
+
+ #include "condvar.h"
+ #include <stdexcept>
++#include <string>
+ #include <stdint.h>
+
+ /// base class for threads.
+@@ -47,7 +48,7 @@
+ struct SDL_Thread* thread_id;
+ bool thread_abort_request;
+ thread_state_t thread_state;
+- mutex thread_state_mutex;
++ ::mutex thread_state_mutex;
+ condvar thread_start_cond;
+ std::string thread_error_message; // to pass exception texts via thread boundaries
+