svn commit: r328422 - in head/games/0ad: . files
Guido Falsi
madpilot at FreeBSD.org
Thu Sep 26 22:21:21 UTC 2013
Author: madpilot
Date: Thu Sep 26 22:21:20 2013
New Revision: 328422
URL: http://svnweb.freebsd.org/changeset/ports/328422
Log:
- Fix build with clang/libc++ and without gcc on head
Thanks to gahr for providing patch-source-simulation2-system_ParamNode.cpp
Added:
head/games/0ad/files/patch-source-lib-lib.h (contents, props changed)
head/games/0ad/files/patch-source-simulation2-system_ParamNode.cpp (contents, props changed)
Modified:
head/games/0ad/Makefile
head/games/0ad/files/patch-build-premake-premake4.lua
Modified: head/games/0ad/Makefile
==============================================================================
--- head/games/0ad/Makefile Thu Sep 26 22:05:44 2013 (r328421)
+++ head/games/0ad/Makefile Thu Sep 26 22:21:20 2013 (r328422)
@@ -13,13 +13,13 @@ COMMENT= Real-time strategy (RTS) game o
BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \
zip:${PORTSDIR}/archivers/zip \
cmake:${PORTSDIR}/devel/cmake
-LIB_DEPENDS= boost_thread:${PORTSDIR}/devel/boost-libs \
- execinfo:${PORTSDIR}/devel/libexecinfo \
- png15:${PORTSDIR}/graphics/png \
- ogg:${PORTSDIR}/audio/libogg \
- vorbis:${PORTSDIR}/audio/libvorbis \
- curl:${PORTSDIR}/ftp/curl \
- gamin-1:${PORTSDIR}/devel/gamin
+LIB_DEPENDS= libboost_thread.so:${PORTSDIR}/devel/boost-libs \
+ libexecinfo.so:${PORTSDIR}/devel/libexecinfo \
+ libpng15.so:${PORTSDIR}/graphics/png \
+ libogg.so:${PORTSDIR}/audio/libogg \
+ libvorbis.so:${PORTSDIR}/audio/libvorbis \
+ libcurl.so:${PORTSDIR}/ftp/curl \
+ libgamin-1.so:${PORTSDIR}/devel/gamin
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha
BUILD_WRKSRC= ${WRKSRC}/build/workspaces/gcc
@@ -67,7 +67,8 @@ CXX= /usr/bin/clang++
.endif
post-patch:
- @${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' \
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+ -e 's|%%CC%%|${CC}|' \
${WRKSRC}/build/premake/premake4.lua
@${REINPLACE_CMD} 's,^\(Exec=\)/usr/local,\1${PREFIX},' \
${WRKSRC}/build/resources/0ad.desktop
Modified: head/games/0ad/files/patch-build-premake-premake4.lua
==============================================================================
--- head/games/0ad/files/patch-build-premake-premake4.lua Thu Sep 26 22:05:44 2013 (r328421)
+++ head/games/0ad/files/patch-build-premake-premake4.lua Thu Sep 26 22:21:20 2013 (r328422)
@@ -1,5 +1,23 @@
--- build/premake/premake4.lua.orig 2013-08-27 04:42:56.000000000 +0200
-+++ build/premake/premake4.lua 2013-09-03 15:32:07.321963983 +0200
++++ build/premake/premake4.lua 2013-09-17 18:31:17.300814455 +0200
+@@ -39,7 +39,7 @@
+ if arch == "x86_64" or arch == "amd64" then
+ arch = "amd64"
+ else
+- os.execute("gcc -dumpmachine > .gccmachine.tmp")
++ os.execute("%%CC%% -dumpmachine > .gccmachine.tmp")
+ local f = io.open(".gccmachine.tmp", "r")
+ local machine = f:read("*line")
+ f:close()
+@@ -91,7 +91,7 @@
+ -- do the test in this build script instead (which is kind of ugly - please fix if
+ -- you have a better idea)
+ if not _OPTIONS["icc"] then
+- os.execute("gcc -dumpversion > .gccver.tmp")
++ os.execute("%%CC%% -dumpversion > .gccver.tmp")
+ local f = io.open(".gccver.tmp", "r")
+ major, dot, minor = f:read(1, 1, 1)
+ f:close()
@@ -138,7 +138,7 @@
function project_set_build_flags()
Added: head/games/0ad/files/patch-source-lib-lib.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/0ad/files/patch-source-lib-lib.h Thu Sep 26 22:21:20 2013 (r328422)
@@ -0,0 +1,10 @@
+--- source/lib/lib.h.orig 2013-09-17 20:41:12.887277235 +0200
++++ source/lib/lib.h 2013-09-17 20:44:34.202282356 +0200
+@@ -63,6 +63,7 @@
+ #include <cmath> // fabsf
+ #include <limits> // numeric_limits
+ #include <stdexcept> // out_of_range
++#include <algorithm> // std::min, std::max
+
+ template<typename T>
+ T Clamp(T val, T min, T max)
Added: head/games/0ad/files/patch-source-simulation2-system_ParamNode.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/0ad/files/patch-source-simulation2-system_ParamNode.cpp Thu Sep 26 22:21:20 2013 (r328422)
@@ -0,0 +1,13 @@
+--- source/simulation2/system/ParamNode.cpp.orig 2013-09-26 18:21:33.000000000 +0200
++++ source/simulation2/system/ParamNode.cpp 2013-09-26 18:22:57.000000000 +0200
+@@ -37,6 +37,10 @@
+ #include <boost/algorithm/string.hpp>
+ #include <boost/algorithm/string/join.hpp> // this isn't in string.hpp in old Boosts
+
++/* we need to force the instantiation of the wchar_t specialization of std::basic_string's empty()
++ * method in order to get a reference to it through std::mem_fun_ref on lines 122 and 123 */
++template bool std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::empty() const;
++
+ static CParamNode g_NullNode(false);
+
+ CParamNode::CParamNode(bool isOk) :
More information about the svn-ports-all
mailing list