Merge pull request #305652 from paperdigits/darktable-darwin-fix

darktable: bump minimum SDK version for darwin x86.
This commit is contained in:
tomberek 2024-04-25 02:18:12 -04:00 committed by GitHub
commit 077198d16f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 28 additions and 0 deletions

View File

@ -64,6 +64,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Fu3AoHApPi082k6hDkm9qb3pMuI/nmLi+i56x0rPev0=";
};
patches = [
./fix_darwin_x86_compile.patch
];
nativeBuildInputs = [ cmake ninja llvmPackages.llvm pkg-config intltool perl desktop-file-utils wrapGAppsHook ];
buildInputs = [

View File

@ -0,0 +1,22 @@
From 1620befa933fbe525d8851a8f465db9926b7a588 Mon Sep 17 00:00:00 2001
From: Mario Zimmermann <mail@zisoft.de>
Date: Wed, 14 Feb 2024 22:18:42 +0100
Subject: [PATCH] fix xcode compiler segfault
---
src/common/darktable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/darktable.h b/src/common/darktable.h
index e5bd1a28902c..2c43b4878bcf 100644
--- a/src/common/darktable.h
+++ b/src/common/darktable.h
@@ -140,7 +140,7 @@ extern "C" {
/* Create cloned functions for various CPU SSE generations */
/* See for instructions https://hannes.hauswedell.net/post/2017/12/09/fmv/ */
/* TL;DR : use only on SIMD functions containing low-level paralellized/vectorized loops */
-#if __has_attribute(target_clones) && !defined(_WIN32) && !defined(NATIVE_ARCH)
+#if __has_attribute(target_clones) && !defined(_WIN32) && !defined(NATIVE_ARCH) && !defined(__APPLE__)
# 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__)

View File

@ -30414,6 +30414,7 @@ with pkgs;
darktable = callPackage ../applications/graphics/darktable {
lua = lua5_4;
pugixml = pugixml.override { shared = true; };
stdenv = if stdenv.isDarwin && stdenv.isx86_64 then overrideSDK llvmPackages_18.stdenv { darwinMinVersion = "10.14"; darwinSdkVersion = "11.0"; } else stdenv;
};
das_watchdog = callPackage ../tools/system/das_watchdog { };