aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2023-06-21 10:19:19 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2023-06-21 11:33:46 +0000
commit3fc69f53ece7bcd9cb7083fbbce75897f2fdfba7 (patch)
tree5b5e8295058df5864b16d5306f178e95eb764abb
parent335e4a6404e8c890e7819978c762f6dcc604f5b6 (diff)
graphics/opencv: when on POWER9 on powerpc64le, allow setting VSX3 as baseline
Also GCC is necessary because base LLVM 15 fails with: UNREACHABLE executed at /usr/src/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp:11135! LLVM 16 also crashes and it seems 17 has already fixed this issue.
-rw-r--r--graphics/opencv/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/graphics/opencv/Makefile b/graphics/opencv/Makefile
index 889d8c8ff414..e00fa76edfc2 100644
--- a/graphics/opencv/Makefile
+++ b/graphics/opencv/Makefile
@@ -19,7 +19,7 @@ LIB_DEPENDS= libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz \
libhdf5.so:science/hdf5
-USES= cmake compiler:c++14-lang cpe localbase:ldflags pkgconfig
+USES= cmake cpe localbase:ldflags pkgconfig
USE_GITHUB= yes
GH_ACCOUNT= WeChatCV:wechat
GH_PROJECT= opencv_contrib:contrib \
@@ -214,6 +214,15 @@ OPENJPEG_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg
_IPPICV_i386= ippicv/ippicv_2020_lnx_ia32_20191018_general.tgz
_IPPICV_amd64= ippicv/ippicv_2020_lnx_intel64_20191018_general.tgz
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == powerpc64le && defined(MACHINE_CPU) && ${MACHINE_CPU:Mvsx3}
+CMAKE_ARGS+= -DCPU_BASELINE:STRING="VSX;VSX3;"
+USES+= compiler:gcc-c++11-lib
+.else
+USES+= compiler:c++14-lang
+.endif
+
post-extract:
# Handle contrib
${MV} ${WRKSRC_contrib} ${WRKSRC}/contrib