Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Sep 2015 15:40:33 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r395768 - head/math/gringo
Message-ID:  <201509011540.t81FeX5d064774@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Tue Sep  1 15:40:32 2015
New Revision: 395768
URL: https://svnweb.freebsd.org/changeset/ports/395768

Log:
  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

Modified:
  head/math/gringo/Makefile

Modified: head/math/gringo/Makefile
==============================================================================
--- head/math/gringo/Makefile	Tue Sep  1 15:28:21 2015	(r395767)
+++ head/math/gringo/Makefile	Tue Sep  1 15:40:32 2015	(r395768)
@@ -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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509011540.t81FeX5d064774>