Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Aug 2014 16:26:35 +0000 (UTC)
From:      William Grzybowski <wg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r364719 - in head/games/dangerdeep: . files
Message-ID:  <53ea403b.66ed.30ee3ff0@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wg
Date: Tue Aug 12 16:26:34 2014
New Revision: 364719
URL: http://svnweb.freebsd.org/changeset/ports/364719
QAT: https://qat.redports.org/buildarchive/r364719/

Log:
  games/dangerdeep: support stage
  
  - Fix build on 10
  
  PR:		192585
  Submitted by:	christian.mangin gmail com

Added:
  head/games/dangerdeep/files/patch-src__condvar.h   (contents, props changed)
  head/games/dangerdeep/files/patch-src__faulthandler.h   (contents, props changed)
  head/games/dangerdeep/files/patch-src__mutex.h   (contents, props changed)
  head/games/dangerdeep/files/patch-src__subsim.cpp   (contents, props changed)
  head/games/dangerdeep/files/patch-src__thread.h   (contents, props changed)
Modified:
  head/games/dangerdeep/Makefile
  head/games/dangerdeep/files/patch-SConstruct

Modified: head/games/dangerdeep/Makefile
==============================================================================
--- head/games/dangerdeep/Makefile	Tue Aug 12 16:24:27 2014	(r364718)
+++ head/games/dangerdeep/Makefile	Tue Aug 12 16:26:34 2014	(r364719)
@@ -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>

Modified: head/games/dangerdeep/files/patch-SConstruct
==============================================================================
--- head/games/dangerdeep/files/patch-SConstruct	Tue Aug 12 16:24:27 2014	(r364718)
+++ head/games/dangerdeep/files/patch-SConstruct	Tue Aug 12 16:26:34 2014	(r364719)
@@ -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']

Added: head/games/dangerdeep/files/patch-src__condvar.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/dangerdeep/files/patch-src__condvar.h	Tue Aug 12 16:26:34 2014	(r364719)
@@ -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

Added: head/games/dangerdeep/files/patch-src__faulthandler.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/dangerdeep/files/patch-src__faulthandler.h	Tue Aug 12 16:26:34 2014	(r364719)
@@ -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>

Added: head/games/dangerdeep/files/patch-src__mutex.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/dangerdeep/files/patch-src__mutex.h	Tue Aug 12 16:26:34 2014	(r364719)
@@ -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

Added: head/games/dangerdeep/files/patch-src__subsim.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/dangerdeep/files/patch-src__subsim.cpp	Tue Aug 12 16:26:34 2014	(r364719)
@@ -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>

Added: head/games/dangerdeep/files/patch-src__thread.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/dangerdeep/files/patch-src__thread.h	Tue Aug 12 16:26:34 2014	(r364719)
@@ -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
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53ea403b.66ed.30ee3ff0>