diff options
author | rakuco <rakuco@FreeBSD.org> | 2015-09-01 23:40:32 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2015-09-01 23:40:32 +0800 |
commit | eafb06efa631efbe722cbe15b6a54618bf9889c9 (patch) | |
tree | c3e28db67ff7bea6ae1c2404282225ac7c1ece59 | |
parent | bd3f44ed051a8e4d694959ca2dc7bebd5ac14151 (diff) | |
download | freebsd-ports-gnome-eafb06efa631efbe722cbe15b6a54618bf9889c9.tar.gz freebsd-ports-gnome-eafb06efa631efbe722cbe15b6a54618bf9889c9.tar.zst freebsd-ports-gnome-eafb06efa631efbe722cbe15b6a54618bf9889c9.zip |
Require a C++11-compliant standard library and make it work with GCC < 4.9.
Despite ports r340913, the port still fails to build on FreeBSD 9.3 with
lang/gcc (GCC 4.8):
libreify/src/parser.cc: In member function 'void Reify::Parser::parseProgram()':
libreify/src/parser.cc:130:51: error: 'to_string' is not a member of 'std'
Apply a workaround for bug 193528 found in other ports to make that function
visible to GCC 4.8 (GCC 4.9 and later are fine).
Additionally, the port actually requires a C++11 standard library in
addition to a C++11-compliant compiler, so adjust the USES line and later
simplify the process of choosing which compiler to use.
Approved by: vsevolod (maintainer)
Differential Revision: https://reviews.freebsd.org/D3545
-rw-r--r-- | math/gringo/Makefile | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/math/gringo/Makefile b/math/gringo/Makefile index f6d8fa3d1ae6..576e13c9103d 100644 --- a/math/gringo/Makefile +++ b/math/gringo/Makefile @@ -14,22 +14,19 @@ LICENSE= GPLv3 BUILD_DEPENDS= re2c:${PORTSDIR}/devel/re2c -USES= scons bison compiler:c++11-lang +USES= bison compiler:c++11-lib scons MAKE_ARGS+= ${MAKE_ENV} CXXFLAGS+= -std=c++11 MAKE_ENV+= WITH_LUA=no -PLIST_FILES= bin/${PORTNAME} bin/clingo - -.include <bsd.port.pre.mk> +# Unhide std::to_string() with GCC < 4.9 (ports/193528) +CXXFLAGS+= -D_GLIBCXX_USE_C99 -.if ${OSVERSION} < 1000000 -USE_GCC= yes -.endif +PLIST_FILES= bin/${PORTNAME} bin/clingo do-install: ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/build/debug/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/build/debug/clingo ${STAGEDIR}${PREFIX}/bin/clingo -.include <bsd.port.post.mk> +.include <bsd.port.mk> |