aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkubaj <pkubaj@FreeBSD.org>2019-06-17 15:17:10 +0800
committerpkubaj <pkubaj@FreeBSD.org>2019-06-17 15:17:10 +0800
commite03befc2fad89e007a85fd67ed9e88418ba6bb18 (patch)
tree40381eee99aa111747c24255010afa0506e15f53
parent384e58c4b47badfe18e7db7d26566398343882d1 (diff)
downloadfreebsd-ports-gnome-e03befc2fad89e007a85fd67ed9e88418ba6bb18.tar.gz
freebsd-ports-gnome-e03befc2fad89e007a85fd67ed9e88418ba6bb18.tar.zst
freebsd-ports-gnome-e03befc2fad89e007a85fd67ed9e88418ba6bb18.zip
math/openlibm: fix build with GCC-based architectures
The port needs to respect CC and use a new compiler. PR: 238613 Approved by: iblis@hs.ntnu.edu.tw (maintainer), mat (mentor) Differential Revision: https://reviews.freebsd.org/D20670
-rw-r--r--math/openlibm/Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/math/openlibm/Makefile b/math/openlibm/Makefile
index 25cc98b3c31b..6408b90d9a1c 100644
--- a/math/openlibm/Makefile
+++ b/math/openlibm/Makefile
@@ -17,9 +17,8 @@ BROKEN_armv6= fails to compile: a parameter list without types is only allowed
BROKEN_armv7= fails to compile: a parameter list without types is only allowed in a function definition
BROKEN_mips= fails to compile: No rule to make target mips/Make.files
BROKEN_mips64= fails to compile: No rule to make target mips64/Make.files
-BROKEN_powerpc64= fails to build: gmake: clang: Command not found
-USES= gmake
+USES= compiler:c11 gmake
USE_GITHUB= yes
GH_ACCOUNT= JuliaMath
GH_PROJECT= openlibm
@@ -28,8 +27,16 @@ USE_LDCONFIG= yes
.include <bsd.port.pre.mk>
-MAKE_ENV+= prefix=${PREFIX}
+MAKE_ENV+= prefix=${PREFIX} ${MAKE_ENV_${CHOSEN_COMPILER_TYPE}}
+MAKE_ENV_gcc= USEGCC=1 USECLANG=0
+MAKE_ENV_clang= USEGCC=0 USECLANG=1
TEST_TARGET= check
+post-patch:
+ ${REINPLACE_CMD} -e 's/USEGCC =/USEGCC ?=/g' \
+ -e 's/USECLANG =/USECLANG ?=/g' \
+ -e '/TOOLPREFIX)gcc/s/$$/${GCC_DEFAULT}/g' \
+ ${WRKSRC}/Make.inc
+
.include <bsd.port.post.mk>