diff options
author | madpilot <madpilot@FreeBSD.org> | 2013-09-27 06:21:20 +0800 |
---|---|---|
committer | madpilot <madpilot@FreeBSD.org> | 2013-09-27 06:21:20 +0800 |
commit | 80d99c9682493fdeb8fc86fa977b1389b2a9520a (patch) | |
tree | a9bc17de9b38bca87f44e1d066f0b26c95bc4760 /games/0ad | |
parent | 94314f4c51a6d15faea63f3f124a3f00f6cda3c4 (diff) | |
download | freebsd-ports-gnome-80d99c9682493fdeb8fc86fa977b1389b2a9520a.tar.gz freebsd-ports-gnome-80d99c9682493fdeb8fc86fa977b1389b2a9520a.tar.zst freebsd-ports-gnome-80d99c9682493fdeb8fc86fa977b1389b2a9520a.zip |
- Fix build with clang/libc++ and without gcc on head
Thanks to gahr for providing patch-source-simulation2-system_ParamNode.cpp
Diffstat (limited to 'games/0ad')
-rw-r--r-- | games/0ad/Makefile | 17 | ||||
-rw-r--r-- | games/0ad/files/patch-build-premake-premake4.lua | 20 | ||||
-rw-r--r-- | games/0ad/files/patch-source-lib-lib.h | 10 | ||||
-rw-r--r-- | games/0ad/files/patch-source-simulation2-system_ParamNode.cpp | 13 |
4 files changed, 51 insertions, 9 deletions
diff --git a/games/0ad/Makefile b/games/0ad/Makefile index 37b343687ddb..22679cb4314b 100644 --- a/games/0ad/Makefile +++ b/games/0ad/Makefile @@ -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 diff --git a/games/0ad/files/patch-build-premake-premake4.lua b/games/0ad/files/patch-build-premake-premake4.lua index 85d0045ea4e6..5bd59b07522c 100644 --- a/games/0ad/files/patch-build-premake-premake4.lua +++ b/games/0ad/files/patch-build-premake-premake4.lua @@ -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() diff --git a/games/0ad/files/patch-source-lib-lib.h b/games/0ad/files/patch-source-lib-lib.h new file mode 100644 index 000000000000..f68e772a150d --- /dev/null +++ b/games/0ad/files/patch-source-lib-lib.h @@ -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) diff --git a/games/0ad/files/patch-source-simulation2-system_ParamNode.cpp b/games/0ad/files/patch-source-simulation2-system_ParamNode.cpp new file mode 100644 index 000000000000..aafbb94c4d30 --- /dev/null +++ b/games/0ad/files/patch-source-simulation2-system_ParamNode.cpp @@ -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) : |