git: ec284b1d5793 - main - graphics/darktable: Fix build on aarch64.

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Sun, 14 Nov 2021 08:40:25 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ec284b1d57935ec9fa44d11653a7607a549c129c

commit ec284b1d57935ec9fa44d11653a7607a549c129c
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2021-11-14 08:39:52 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-11-14 08:39:52 +0000

    graphics/darktable: Fix build on aarch64.
    
    Approved by: portmgr (build fix blanket)
---
 graphics/darktable/Makefile                                  |  2 +-
 graphics/darktable/files/patch-src_is__supported__platform.h | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/graphics/darktable/Makefile b/graphics/darktable/Makefile
index 7461dd2577d5..0bc2534ee8e5 100644
--- a/graphics/darktable/Makefile
+++ b/graphics/darktable/Makefile
@@ -117,7 +117,7 @@ WEBP_CMAKE_OFF=		-DUSE_WEBP:BOOL=OFF
 
 .include <bsd.port.options.mk>
 
-.if ${ARCH} == powerpc64le
+.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_is__supported__platform.h b/graphics/darktable/files/patch-src_is__supported__platform.h
new file mode 100644
index 000000000000..25c546371dea
--- /dev/null
+++ b/graphics/darktable/files/patch-src_is__supported__platform.h
@@ -0,0 +1,11 @@
+--- src/is_supported_platform.h.orig	2021-11-14 08:33:27 UTC
++++ src/is_supported_platform.h
+@@ -30,7 +30,7 @@
+ #define DT_SUPPORTED_X86 0
+ #endif
+ 
+-#if defined(__aarch64__) && (defined(__ARM_64BIT_STATE) && defined(__ARM_ARCH) && defined(__ARM_ARCH_8A) || defined(__APPLE__))
++#if defined(__aarch64__) && (defined(__ARM_64BIT_STATE) && defined(__ARM_ARCH) && defined(__ARM_ARCH_8A) || defined(__APPLE__) || defined(__FreeBSD__))
+ #define DT_SUPPORTED_ARMv8A 1
+ #else
+ #define DT_SUPPORTED_ARMv8A 0