summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-gfx/darktable/darktable-4.2.1.ebuild2
-rw-r--r--media-gfx/darktable/files/darktable-4.2.1_cmake-musl.patch22
2 files changed, 24 insertions, 0 deletions
diff --git a/media-gfx/darktable/darktable-4.2.1.ebuild b/media-gfx/darktable/darktable-4.2.1.ebuild
index c9c57caa2f1f..aba89cc810c2 100644
--- a/media-gfx/darktable/darktable-4.2.1.ebuild
+++ b/media-gfx/darktable/darktable-4.2.1.ebuild
@@ -98,6 +98,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.0.2_cmake-march-autodetection.patch
"${FILESDIR}"/${PN}-3.4.0_jsonschema-automagic.patch
"${FILESDIR}"/${PN}-3.4.1_libxcf-cmake.patch
+ "${FILESDIR}"/${PN}-4.2.1_cmake-musl.patch
)
S="${WORKDIR}/${P/_/~}"
@@ -140,6 +141,7 @@ src_configure() {
-DDONT_USE_INTERNAL_LUA=ON
-DRAWSPEED_ENABLE_LTO=$(usex lto)
-DRAWSPEED_ENABLE_WERROR=OFF
+ -DRAWSPEED_MUSL_SYSTEM=$(usex elibc_musl)
-DTESTBUILD_OPENCL_PROGRAMS=OFF
-DUSE_AVIF=$(usex avif)
-DUSE_CAMERA_SUPPORT=$(usex gphoto2)
diff --git a/media-gfx/darktable/files/darktable-4.2.1_cmake-musl.patch b/media-gfx/darktable/files/darktable-4.2.1_cmake-musl.patch
new file mode 100644
index 000000000000..33ad7f647752
--- /dev/null
+++ b/media-gfx/darktable/files/darktable-4.2.1_cmake-musl.patch
@@ -0,0 +1,22 @@
+--- a/src/external/rawspeed/cmake/Modules/cpu-cache-line-size.cmake
++++ b/src/external/rawspeed/cmake/Modules/cpu-cache-line-size.cmake
+@@ -2,7 +2,7 @@
+
+ unset(RAWSPEED_CACHELINESIZE)
+
+-if(BINARY_PACKAGE_BUILD)
++if(BINARY_PACKAGE_BUILD OR RAWSPEED_MUSL_SYSTEM)
+ message(STATUS "Performing binary package build, using hardcoded value.")
+ else()
+ try_run(RAWSPEED_CACHELINESIZE_EXITCODE RAWSPEED_CACHELINESIZE_COMPILED
+--- a/src/external/rawspeed/cmake/Modules/cpu-page-size.cpp
++++ b/src/external/rawspeed/cmake/Modules/cpu-page-size.cpp
+@@ -4,7 +4,7 @@
+ #include <unistd.h> // for _POSIX_C_SOURCE, sysconf, _SC_PAGESIZE
+ #endif
+
+-#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 1) || defined(__APPLE__)
++#if defined(_SC_PAGESIZE)
+
+ int main() {
+ long val = ::sysconf(_SC_PAGESIZE);