svn commit: r504088 - head/devel/gn

Mark Linimon linimon at FreeBSD.org
Thu Jun 13 12:53:21 UTC 2019


Author: linimon
Date: Thu Jun 13 12:53:20 2019
New Revision: 504088
URL: https://svnweb.freebsd.org/changeset/ports/504088

Log:
  Fix hardwired assumption that FreeBSD implies clang to fix build on
  GCC-based systems.
  
  It wasn't clear to me how to pass environment variables to build/gen.py,
  so this change seemed more straightforward.
  
  Approved by:	portmgr (tier-2 blanket)

Modified:
  head/devel/gn/Makefile

Modified: head/devel/gn/Makefile
==============================================================================
--- head/devel/gn/Makefile	Thu Jun 13 12:50:04 2019	(r504087)
+++ head/devel/gn/Makefile	Thu Jun 13 12:53:20 2019	(r504088)
@@ -27,9 +27,16 @@ CONFIGURE_ARGS=	--platform freebsd ${WITH_DEBUG:D--deb
 ALL_TARGET=	# empty
 PLIST_FILES=	bin/${PORTNAME}
 
+.include <bsd.port.pre.mk>
+
 post-patch:
 	@${REINPLACE_CMD} 's/"python"/"${PYTHON_CMD:T}"/' \
 		${WRKSRC}/tools/gn/exec_process_unittest.cc
+# fix hardwired assumption that FreeBSD implies clang
+.if ${CHOSEN_COMPILER_TYPE} == gcc
+	@${REINPLACE_CMD} 's/clang/gcc/' \
+		${WRKSRC}/build/gen.py
+.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
@@ -37,4 +44,4 @@ do-install:
 do-test:
 	${TEST_WRKSRC}/gn_unittests
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>


More information about the svn-ports-all mailing list