On Tue, Apr 14, 2026 at 07:02:27AM +0200, Matthieu Herrb wrote:
> jpeg 3.1.4.1 needs to disable SIMD support on riscv64, otherwise it
> gets lots of simd related undefined symbols at link time.
> 
> With that it builds and pases tests :
> 100% tests passed, 0 tests failed out of 648
> 
> no revision bump since it didn't build on that architecure before.
> 
> ok ?

As discussed privately, I've backported this instead.  No more build
errors on archs without SIMD support, and no need for hardcoding a
list in the port's Makefile.  Thanks for the report!

Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/jpeg/Makefile,v
diff -u -p -r1.90 Makefile
--- Makefile    7 Apr 2026 08:01:03 -0000       1.90
+++ Makefile    14 Apr 2026 11:55:34 -0000
@@ -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}
Index: patches/patch-simd_CMakeLists_txt
===================================================================
RCS file: patches/patch-simd_CMakeLists_txt
diff -N patches/patch-simd_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-simd_CMakeLists_txt   14 Apr 2026 11:55:34 -0000
@@ -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()


-- 
jca

Reply via email to