diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-08-23 22:24:16 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-08-23 22:24:16 +0000 |
commit | c9e6c6117f6f432c1ef4077c99be29f0076aca17 (patch) | |
tree | a02170fa10dba074a8b58abaf3f6aa3657a597b2 | |
parent | 941ae7d3816e36dbd504bb180bcf134148e83e93 (diff) | |
download | ports-c9e6c6117f6f432c1ef4077c99be29f0076aca17.tar.gz ports-c9e6c6117f6f432c1ef4077c99be29f0076aca17.zip |
graphics/darktable: fix build on powerpc64le
/wrkdirs/usr/ports/graphics/darktable/work/darktable-4.4.2/src/common/iop_profile.c:1273:6: error: 'target_clones' attribute needs GLIBC (2.23 and newer) that exports hardware capability bits
-rw-r--r-- | graphics/darktable/Makefile | 2 | ||||
-rw-r--r-- | graphics/darktable/files/patch-src_common_darktable.h | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/graphics/darktable/Makefile b/graphics/darktable/Makefile index 73b450fd5eec..28dc9292ce1b 100644 --- a/graphics/darktable/Makefile +++ b/graphics/darktable/Makefile @@ -98,7 +98,7 @@ TOOLS_RUN_DEPENDS= exiftool:graphics/p5-Image-ExifTool .include <bsd.port.options.mk> -.if ${ARCH} == aarch64 +.if ${ARCH} == aarch64 || ${ARCH} == powerpc64le CMAKE_ARGS+= -DUSE_OPENCL:BOOL=OFF CXXFLAGS+= -DGDK_DISABLE_DEPRECATED PLIST_SUB+= NO_OPENCL="@comment " diff --git a/graphics/darktable/files/patch-src_common_darktable.h b/graphics/darktable/files/patch-src_common_darktable.h new file mode 100644 index 000000000000..f53e478d8234 --- /dev/null +++ b/graphics/darktable/files/patch-src_common_darktable.h @@ -0,0 +1,11 @@ +--- src/common/darktable.h.orig 2023-08-23 11:50:51 UTC ++++ src/common/darktable.h +@@ -143,7 +143,7 @@ extern "C" { + #if __has_attribute(target_clones) && !defined(_WIN32) && !defined(NATIVE_ARCH) + # if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) + #define __DT_CLONE_TARGETS__ __attribute__((target_clones("default", "sse2", "sse3", "sse4.1", "sse4.2", "popcnt", "avx", "avx2", "avx512f", "fma4"))) +-# elif defined(__PPC64__) ++# elif defined(__PPC64__) && defined(__GLIBC__) + /* __PPC64__ is the only macro tested for in is_supported_platform.h, other macros would fail there anyway. */ + #define __DT_CLONE_TARGETS__ __attribute__((target_clones("default","cpu=power9"))) + # else |