From aa7cc6f011abc9cc1903ff603ddcff16336fee96 Mon Sep 17 00:00:00 2001 From: jca Date: Tue, 14 Apr 2026 11:58:52 +0000 Subject: [PATCH] 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@ --- graphics/jpeg/Makefile | 3 --- graphics/jpeg/patches/patch-simd_CMakeLists_txt | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 graphics/jpeg/patches/patch-simd_CMakeLists_txt diff --git a/graphics/jpeg/Makefile b/graphics/jpeg/Makefile index a5c5c777ebe..ff6ad92d9f3 100644 --- a/graphics/jpeg/Makefile +++ b/graphics/jpeg/Makefile @@ -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} diff --git a/graphics/jpeg/patches/patch-simd_CMakeLists_txt b/graphics/jpeg/patches/patch-simd_CMakeLists_txt new file mode 100644 index 00000000000..00c0fea8817 --- /dev/null +++ b/graphics/jpeg/patches/patch-simd_CMakeLists_txt @@ -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()