Tweak cmake files to avoid build errors on archs without SIMD support

This is nicer than hardcoding in the port a list of archs with/without
SIMD.  Add an url to this 3.1.x-specific fix, master has more changes
in this area.

Prompted by a diff from matthieu@, ok tb@
This commit is contained in:
jca
2026-04-14 11:58:52 +00:00
parent 1a533427d2
commit aa7cc6f011
2 changed files with 14 additions and 3 deletions
-3
View File
@@ -26,9 +26,6 @@ MODULES= devel/cmake
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
BUILD_DEPENDS= devel/nasm
.endif
.if ${MACHINE_ARCH} == "sparc64"
CONFIGURE_ARGS+= -DWITH_SIMD=OFF
.endif
CONFIGURE_ARGS+= -DCMAKE_INSTALL_PREFIX="${PREFIX}"
DEBUG_PACKAGES= ${BUILD_PACKAGES}
@@ -0,0 +1,14 @@
Don't error out if SIMD isn't available
https://github.com/libjpeg-turbo/libjpeg-turbo/commit/7cdbf9144d40d68d97c498f54dd88a68aee4e36d
Index: simd/CMakeLists.txt
--- simd/CMakeLists.txt.orig
+++ simd/CMakeLists.txt
@@ -3,6 +3,7 @@ macro(simd_fail message)
message(FATAL_ERROR "${message}.")
else()
message(WARNING "${message}. Performance will suffer.")
+ set(WITH_SIMD 0)
set(WITH_SIMD 0 PARENT_SCOPE)
endif()
endmacro()