aboutsummaryrefslogtreecommitdiff
path: root/games/openclonk
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2014-11-27 18:01:36 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2014-11-27 18:01:36 +0000
commitf9c97672ae3b9cfc2065e9c810ca5c43b303d771 (patch)
tree8b4722bdf60824804989e248e53f836ebade8116 /games/openclonk
parentc4405cef734d43de54d1c7e76c293edaf5f15493 (diff)
downloadports-f9c97672ae3b9cfc2065e9c810ca5c43b303d771.tar.gz
ports-f9c97672ae3b9cfc2065e9c810ca5c43b303d771.zip
Notes
Diffstat (limited to 'games/openclonk')
-rw-r--r--games/openclonk/Makefile10
-rw-r--r--games/openclonk/files/patch-src__platform__StdSync.h11
2 files changed, 19 insertions, 2 deletions
diff --git a/games/openclonk/Makefile b/games/openclonk/Makefile
index caeaa36af322..472a93dbe398 100644
--- a/games/openclonk/Makefile
+++ b/games/openclonk/Makefile
@@ -21,7 +21,7 @@ LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs \
libpng.so:${PORTSDIR}/graphics/png \
libvorbis.so:${PORTSDIR}/audio/libvorbis
-USES= cmake iconv pkgconfig tar:bzip2
+USES= compiler:c++11-lib cmake iconv pkgconfig tar:bzip2
USE_GL= glew
USE_GNOME= gtk20
USE_SDL= sdl mixer
@@ -29,8 +29,14 @@ USE_XORG= x11 xpm
WRKSRC= ${WRKDIR}/openclonk-release-${DISTVERSIONPREFIX}${DISTVERSION}-src
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 1000024
+BROKEN= does not build (lack of proper c++11 support)
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|DESTINATION games|DESTINATION bin|' \
${WRKSRC}/CMakeLists.txt
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/games/openclonk/files/patch-src__platform__StdSync.h b/games/openclonk/files/patch-src__platform__StdSync.h
new file mode 100644
index 000000000000..78ae3248d323
--- /dev/null
+++ b/games/openclonk/files/patch-src__platform__StdSync.h
@@ -0,0 +1,11 @@
+--- src/platform/StdSync.h.orig 2014-10-05 17:22:07.000000000 +0400
++++ src/platform/StdSync.h 2014-11-27 18:14:51.000000000 +0300
+@@ -135,7 +135,7 @@
+ {
+ // Use pthread_cond_wait or pthread_cond_timedwait depending on wait length. Check return value.
+ // Note this will temporarily unlock the mutex, so no deadlock should occur.
+- timespec ts = { iMillis / 1000, (iMillis % 1000) * 1000000 };
++ timespec ts = { static_cast<time_t>(iMillis / 1000), static_cast<long>(iMillis % 1000) * 1000000 };
+ if (0 != (iMillis != INFINITE ? pthread_cond_timedwait(&cond, &mutex, &ts) : pthread_cond_wait(&cond, &mutex)))
+ {
+ pthread_mutex_unlock(&mutex);