aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2022-04-21 17:11:05 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2022-04-21 17:11:05 +0000
commitf391042d9e30603094bcfdd216d2559fabfcd8db (patch)
tree3c5b30065185a2421853312a9951ccf249f92271
parent2e91d772ca27a4a9008becb8bc40b3b391b49ebb (diff)
downloadports-f391042d9e30603094bcfdd216d2559fabfcd8db.tar.gz
ports-f391042d9e30603094bcfdd216d2559fabfcd8db.zip
graphics/s2: improve experience for people on POWER newer than POWER7
Don't hardcode -mcpu.
-rw-r--r--graphics/s2/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/graphics/s2/Makefile b/graphics/s2/Makefile
index 9cfd51ccf0bc..6f00c3c4821c 100644
--- a/graphics/s2/Makefile
+++ b/graphics/s2/Makefile
@@ -20,7 +20,6 @@ LIB_DEPENDS= libgtest.so:devel/googletest
USES= cmake compiler:c++11-lang localbase ssl
CMAKE_ON= BUILD_SHARED_LIBS
-CXXFLAGS_powerpc64= -mcpu=power7
USE_LDCONFIG= yes
GH_ACCOUNT= google
@@ -38,6 +37,12 @@ GFLAGS_LIB_DEPENDS= libgflags.so:devel/gflags
GLOG_CMAKE_BOOL= WITH_GLOG
GLOG_LIB_DEPENDS= libglog.so:devel/glog
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == powerpc64 && !defined(CPUTYPE)
+CXXFLAGS+= -mcpu=power7
+.endif
+
post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/examples/point_index ${INSTALL_WRKSRC}/examples/term_index ${STAGEDIR}${EXAMPLESDIR}