From 5090122b04568cb9fdd72d29ad2422dd98682fdd Mon Sep 17 00:00:00 2001 From: al20ov Date: Sat, 11 Oct 2025 13:40:35 +0200 Subject: [PATCH] darktable: update to 5.2.1 Close: #57500 --- .../patches/cmake-build-type-none.patch | 6 +- ...2d2194963f5f17df136b490b6d21c34cc503.patch | 30 ---- srcpkgs/darktable/patches/no-intltool.patch | 129 ++++++++++++++++++ srcpkgs/darktable/template | 19 ++- 4 files changed, 144 insertions(+), 40 deletions(-) delete mode 100644 srcpkgs/darktable/patches/ec6b2d2194963f5f17df136b490b6d21c34cc503.patch create mode 100644 srcpkgs/darktable/patches/no-intltool.patch diff --git a/srcpkgs/darktable/patches/cmake-build-type-none.patch b/srcpkgs/darktable/patches/cmake-build-type-none.patch index 6c467467dac..3676a67cbfc 100644 --- a/srcpkgs/darktable/patches/cmake-build-type-none.patch +++ b/srcpkgs/darktable/patches/cmake-build-type-none.patch @@ -2,13 +2,13 @@ Index: src/external/rawspeed/cmake/build-type.cmake =================================================================== --- a/src/external/rawspeed/cmake/build-type.cmake +++ b/src/external/rawspeed/cmake/build-type.cmake -@@ -27,9 +27,6 @@ string(TOUPPER "${RAWSPEED_SPECIAL_BUILD - +@@ -19,9 +19,6 @@ + # is this one of the known build types? list (FIND CMAKE_CONFIGURATION_TYPES_UPPERCASE ${CMAKE_BUILD_TYPE_UPPERCASE} BUILD_TYPE_IS_KNOWN) -if (${BUILD_TYPE_IS_KNOWN} EQUAL -1) - message(SEND_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE_UPPERCASE}. Please specify one of: ${CMAKE_CONFIGURATION_TYPES}") -endif() - + # is this a special build? list (FIND RAWSPEED_SPECIAL_BUILD_TYPES_UPPERCASE ${CMAKE_BUILD_TYPE_UPPERCASE} IS_SPECIAL_BUILD) diff --git a/srcpkgs/darktable/patches/ec6b2d2194963f5f17df136b490b6d21c34cc503.patch b/srcpkgs/darktable/patches/ec6b2d2194963f5f17df136b490b6d21c34cc503.patch deleted file mode 100644 index 235b0deeb7f..00000000000 --- a/srcpkgs/darktable/patches/ec6b2d2194963f5f17df136b490b6d21c34cc503.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ec6b2d2194963f5f17df136b490b6d21c34cc503 Mon Sep 17 00:00:00 2001 -From: Pascal Obry -Date: Fri, 27 Jun 2025 08:14:30 +0200 -Subject: [PATCH] Fix compilation when OpenMP is disabled. - -Fixes #19006. ---- - src/common/darktable.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/common/darktable.c b/src/common/darktable.c -index 11f86b0330a8..e5feaf63eddd 100644 ---- a/src/common/darktable.c -+++ b/src/common/darktable.c -@@ -1193,10 +1193,13 @@ int dt_init(int argc, char *argv[], const gboolean init_gui, const gboolean load - if(desired > possible) - dt_print(DT_DEBUG_ALWAYS, - "[dt_init --threads] requested %d ompthreads restricted to %d", -- desired, possible); -+ desired, possible); -+#ifdef _OPENMP - dt_print(DT_DEBUG_ALWAYS, - "[dt_init --threads] using %d threads of %d for openmp parallel sections %s", -- darktable.num_openmp_threads, (int)dt_get_num_procs(), omp_get_dynamic() ? "(dynamic)" : "(static)"); -+ darktable.num_openmp_threads, (int)dt_get_num_procs(), -+ omp_get_dynamic() ? "(dynamic)" : "(static)"); -+#endif - k++; - argv[k-1] = NULL; - argv[k] = NULL; diff --git a/srcpkgs/darktable/patches/no-intltool.patch b/srcpkgs/darktable/patches/no-intltool.patch new file mode 100644 index 00000000000..c06147c9d38 --- /dev/null +++ b/srcpkgs/darktable/patches/no-intltool.patch @@ -0,0 +1,129 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -281,10 +281,6 @@ message(STATUS "Looking for external pro + find_program(perl_BIN perl REQUIRED) + message(STATUS "Found perl") + +-# we need intltool-merge for org.darktable.darktable.desktop +-find_program(intltool_merge_BIN intltool-merge REQUIRED) +-message(STATUS "Found intltool-merge") +- + # we need desktop-file-validate to check org.darktable.darktable.desktop + find_program(desktop_file_validate_BIN desktop-file-validate) + if(${desktop_file_validate_BIN} STREQUAL "desktop_file_validate_BIN-NOTFOUND") +--- a/data/CMakeLists.txt ++++ b/data/CMakeLists.txt +@@ -73,7 +73,10 @@ if(NOT WIN32) + file(GLOB PO_FILES "${CMAKE_CURRENT_SOURCE_DIR}/../po/*.po") + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/org.darktable.darktable.desktop +- COMMAND sh -c "${intltool_merge_BIN} --desktop-style ${CMAKE_CURRENT_SOURCE_DIR}/../po ${CMAKE_CURRENT_BINARY_DIR}/org.darktable.darktable.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/org.darktable.darktable.desktop" ++ COMMAND msgfmt --desktop ++ -d ${CMAKE_CURRENT_SOURCE_DIR}/../po ++ --template ${CMAKE_CURRENT_BINARY_DIR}/org.darktable.darktable.desktop.in ++ --output ${CMAKE_CURRENT_BINARY_DIR}/org.darktable.darktable.desktop + MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/org.darktable.darktable.desktop.in + DEPENDS ${PO_FILES} + ) +@@ -95,7 +98,10 @@ if(NOT WIN32) + OUTPUT ${DARKTABLE_SHAREDIR}/metainfo/org.darktable.darktable.appdata.xml + SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/org.darktable.darktable.appdata.xml.in + COMMAND ${CMAKE_COMMAND} -E make_directory ${DARKTABLE_SHAREDIR}/metainfo +- COMMAND sh -c "${intltool_merge_BIN} --xml-style ${CMAKE_CURRENT_SOURCE_DIR}/../po ${CMAKE_CURRENT_SOURCE_DIR}/org.darktable.darktable.appdata.xml.in ${DARKTABLE_SHAREDIR}/metainfo/org.darktable.darktable.appdata.xml" ++ COMMAND msgfmt --xml ++ -d ${CMAKE_CURRENT_SOURCE_DIR}/../po ++ --template ${CMAKE_CURRENT_SOURCE_DIR}/org.darktable.darktable.appdata.xml.in ++ --output ${DARKTABLE_SHAREDIR}/metainfo/org.darktable.darktable.appdata.xml + COMMAND ${appstream_util_BIN} validate --nonet ${DARKTABLE_SHAREDIR}/metainfo/org.darktable.darktable.appdata.xml + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/org.darktable.darktable.appdata.xml.in + DEPENDS ${PO_FILES} +@@ -104,7 +110,10 @@ if(NOT WIN32) + add_custom_command( + OUTPUT ${DARKTABLE_SHAREDIR}/metainfo/org.darktable.darktable.appdata.xml + COMMAND ${CMAKE_COMMAND} -E make_directory ${DARKTABLE_SHAREDIR}/metainfo +- COMMAND sh -c "${intltool_merge_BIN} --xml-style ${CMAKE_CURRENT_SOURCE_DIR}/../po ${CMAKE_CURRENT_SOURCE_DIR}/org.darktable.darktable.appdata.xml.in ${DARKTABLE_SHAREDIR}/metainfo/org.darktable.darktable.appdata.xml" ++ COMMAND msgfmt --xml ++ -d ${CMAKE_CURRENT_SOURCE_DIR}/../po ++ --template ${CMAKE_CURRENT_SOURCE_DIR}/org.darktable.darktable.appdata.xml.in ++ --output ${DARKTABLE_SHAREDIR}/metainfo/org.darktable.darktable.appdata.xml + MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/org.darktable.darktable.appdata.xml.in + DEPENDS ${PO_FILES} + ) +--- a/data/org.darktable.darktable.appdata.xml.in ++++ b/data/org.darktable.darktable.appdata.xml.in +@@ -7,42 +7,42 @@ + org.darktable.darktable.desktop + CC0-1.0 + GPL-3.0+ +- <_summary>Organize and develop images from digital cameras ++ Organize and develop images from digital cameras + darktable + +- <_p> ++

+ darktable manages your camera raw files and images in a database, lets you + view them through lighttable mode and develop/enhance them in darkroom mode. +- +- <_p> ++

++

+ Other modes besides lighttable and darkroom are a map for geotagging, + tethering, print and a slideshow. +- +- <_p> ++

++

+ darktable supports most modern cameras' raw formats, and does all + of its processing at very high precision. +- ++

+
+ + + https://www.darktable.org/images/darktable-appdata-lighttable.jpg +- <_caption>Virtual light table, showing a collection ++ Virtual light table, showing a collection + + + https://www.darktable.org/images/darktable-appdata-darkroom1.jpg +- <_caption>Virtual dark room with an opened image ++ Virtual dark room with an opened image + + + https://www.darktable.org/images/darktable-appdata-darkroom2.jpg +- <_caption>Virtual dark room, sharpening an image ++ Virtual dark room, sharpening an image + + + https://www.darktable.org/images/darktable-appdata-map.jpg +- <_caption>Show images on a map ++ Show images on a map + + + https://www.darktable.org/images/darktable-appdata-print.jpg +- <_caption>Print your images ++ Print your images + + + +--- a/data/org.darktable.darktable.desktop.in ++++ b/data/org.darktable.darktable.desktop.in +@@ -1,7 +1,7 @@ + [Desktop Entry] + Name=Darktable +-_GenericName=Virtual Lighttable and Darkroom +-_Comment=Organize and develop images from digital cameras ++GenericName=Virtual Lighttable and Darkroom ++Comment=Organize and develop images from digital cameras + + X-GNOME-FullName=Darktable Photo Workflow Software + +@@ -10,7 +10,7 @@ Version=1.0 + Type=Application + Categories=Graphics;Photography;GTK; + # TRANSLATORS: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon! +-_Keywords=graphics;photography;raw; ++Keywords=graphics;photography;raw; + + Exec=${CMAKE_INSTALL_PREFIX}/bin/darktable %U + TryExec=${CMAKE_INSTALL_PREFIX}/bin/darktable diff --git a/srcpkgs/darktable/template b/srcpkgs/darktable/template index 9d99719ea2a..26094a8b303 100644 --- a/srcpkgs/darktable/template +++ b/srcpkgs/darktable/template @@ -1,14 +1,14 @@ # Template file for 'darktable' pkgname=darktable -version=5.2.0 -revision=2 +version=5.2.1 +revision=1 # upstream only supports these archs: archs="x86_64* aarch64* ppc64le*" build_style=cmake # this makes sure to use -march=generic and -msse3 configure_args="-DBINARY_PACKAGE_BUILD=ON -DBUILD_NOISE_TOOLS=ON -DRAWSPEED_ENABLE_LTO=ON" -hostmakedepends="pkg-config intltool libxslt-devel desktop-file-utils" +hostmakedepends="pkg-config gettext libxslt-devel desktop-file-utils perl" makedepends="gtk+3-devel glib-devel exiv2-devel libxslt-devel dbus-glib-devel libcurl-devel libgphoto2-devel libwebp-devel lensfun-devel sqlite-devel librsvg-devel lua54-devel json-glib-devel @@ -23,7 +23,7 @@ license="GPL-3.0-or-later" homepage="https://www.darktable.org/" changelog="https://github.com/darktable-org/darktable/releases" distfiles="https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz" -checksum=53a46cd46ef7118485c4abf4ab407c181639bb8634243ec0ed1f7c1e8299bec6 +checksum=02f1aa9ae93949e7bc54c34eeb5ff92c2b87f95d2547865df55c60467564ee11 build_options="avif gmic sdl2" build_options_default="avif sdl2" @@ -33,6 +33,11 @@ case "${XBPS_TARGET_MACHINE}" in *) build_options_default+=" gmic" ;; esac -case "${XBPS_TARGET_MACHINE}" in - *-musl) configure_args+=" -DUSE_OPENMP=OFF";; -esac +if [ "$XBPS_TARGET_LIBC" = musl ]; then + configure_args+=" -DUSE_OPENMP=OFF" +fi + +post_patch() { + cd po + printf '%s\n' *.po | sed 's/[.]po$//' >LINGUAS +}