On 2023/05/13 09:18, Peter Hessler wrote:
> darktable fails to build on arm64, and it seems it is because of badly
> balanced parenthesis.  With the patch in-tree, it always sets
> DT_SUPPORTED_X86 1, and then arm also sets DT_SUPPORTED_ARMv8A 1 which
> blows up later in the check.
> 
> Thankfully we don't even need this patch, so simply remove it.
> 
> builds fine on amd64 and arm64.
> 
> OK?
> 
> 
> Index: graphics/darktable/Makefile
> ===================================================================
> RCS file: /cvs/openbsd/ports/graphics/darktable/Makefile,v
> retrieving revision 1.117
> diff -u -p -u -p -r1.117 Makefile
> --- graphics/darktable/Makefile       8 May 2023 20:55:21 -0000       1.117
> +++ graphics/darktable/Makefile       13 May 2023 07:14:36 -0000
> @@ -6,6 +6,7 @@ V=            4.2.1
>  DISTNAME=    darktable-$V
>  PORTROACH=   limitw:1,even skipv:release-$V
>  EXTRACT_SUFX=        .tar.xz
> +REVISION=    0

Bump doesn't hurt but not really needed, it's either a noop or a build
fix depending on arch.

>  CATEGORIES=  graphics x11
>  
> Index: graphics/darktable/patches/patch-src_is_supported_platform_h
> ===================================================================
> RCS file: graphics/darktable/patches/patch-src_is_supported_platform_h
> diff -N graphics/darktable/patches/patch-src_is_supported_platform_h
> --- graphics/darktable/patches/patch-src_is_supported_platform_h      8 May 
> 2023 20:55:21 -0000       1.6
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,19 +0,0 @@
> -Index: src/is_supported_platform.h
> ---- src/is_supported_platform.h.orig
> -+++ src/is_supported_platform.h
> -@@ -24,13 +24,13 @@
> - #error "Unfortunately we only work on litte-endian systems."
> - #endif
> - 
> --#if (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || 
> defined(__x86_64))
> -+#if (defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || 
> defined(__x86_64) || defined(__OpenBSD__))

definitely ok, that was clearly wrong

> - #define DT_SUPPORTED_X86 1
> - #else
> - #define DT_SUPPORTED_X86 0
> - #endif
> - 
> --#if defined(__aarch64__) && (defined(__ARM_64BIT_STATE) && 
> defined(__ARM_ARCH) && (defined(__ARM_ARCH_8A) || __ARM_ARCH_PROFILE == 'A') 
> || defined(__APPLE__) || defined(__MINGW64__))
> -+#if defined(__aarch64__) && (defined(__ARM_64BIT_STATE) && 
> defined(__ARM_ARCH) && (defined(__ARM_ARCH_8A) || __ARM_ARCH_PROFILE == 'A') 
> || defined(__APPLE__) || defined(__OpenBSD__) || defined(__MINGW64__))
> - #define DT_SUPPORTED_ARMv8A 1
> - #else
> - #define DT_SUPPORTED_ARMv8A 0

I haven't gone to boot the arm64 to check but I guess we define
__ARM_ARCH_PROFILE (which was newly added to the ifdef upstream
somewhere between the older and recently committed port update).
Anyway if it builds it's right.

Reply via email to