mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
- Fix build with clang/libc++ and without gcc on head
Thanks to gahr for providing patch-source-simulation2-system_ParamNode.cpp
This commit is contained in:
parent
4f046358f1
commit
ce0e18272a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=328422
@ -13,13 +13,13 @@ COMMENT= Real-time strategy (RTS) game of ancient warfare
|
||||
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
|
||||
|
@ -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()
|
||||
|
10
games/0ad/files/patch-source-lib-lib.h
Normal file
10
games/0ad/files/patch-source-lib-lib.h
Normal file
@ -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)
|
@ -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) :
|
Loading…
Reference in New Issue
Block a user