From 0ae0d8b4ce006797967b602ab2b2e61c24594f2f Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 2 Aug 2021 16:50:54 -0400 Subject: gnu: RawTherapee: Use HTTPS URLs. * gnu/packages/photo.scm (rawtherapee)[source, home-page]: Use HTTPS URLs. --- gnu/packages/photo.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/photo.scm') diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 673989e06b..3ef0fbf7f5 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -769,7 +769,7 @@ a complete panorama and stitch any series of overlapping pictures.") (version "5.8") (source (origin (method url-fetch) - (uri (string-append "http://rawtherapee.com/shared/source/" + (uri (string-append "https://rawtherapee.com/shared/source/" "rawtherapee-" version ".tar.xz")) (sha256 (base32 @@ -809,7 +809,7 @@ a complete panorama and stitch any series of overlapping pictures.") ("libsigc++" ,libsigc++) ("libtiff" ,libtiff) ("zlib" ,zlib))) - (home-page "http://rawtherapee.com") + (home-page "https://rawtherapee.com") (synopsis "Raw image developing and processing") (description "RawTherapee is a raw image processing suite. It comprises a subset of image editing operations specifically aimed at non-destructive raw -- cgit v1.2.3 From e81cf4e79a6e297db0ae2a9c39eab495e7e204f0 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 6 Aug 2021 08:30:13 +0200 Subject: gnu: darktable: Add compatibility for ROCm. darktable has a few tools, which can use OpenCL, not just the main binary. Instead of wrapping it, patch the search path. ROCm also fails to build OpenCL kernels with just the inline keyword. Apply upstream fix. * gnu/packages/photo.scm (darktable) [#:phases]: Add new phases, remove LD_LIBRARY_PATH from wrap-binary. --- gnu/packages/photo.scm | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'gnu/packages/photo.scm') diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 3ef0fbf7f5..bf51e6885f 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -486,6 +486,24 @@ photographic equipment.") "-DBUILD_TESTING=On") #:phases (modify-phases %standard-phases + (add-after 'unpack 'libOpenCL-path + (lambda* (#:key inputs #:allow-other-keys) + ;; Statically link to libOpenCL. + (substitute* "./src/common/dlopencl.c" + (("\"libOpenCL\"") + (string-append "\"" (assoc-ref inputs "ocl-icd") "/lib/libOpenCL.so\""))) + #t)) + ;; The use of inline is wrong and darktable cannot compile its kernels + ;; with ROCm. See upstream commit + ;; https://github.com/darktable-org/darktable/commit/f0d8710f5ef34eb7e33b4064e022ebf3057b9e53 + (add-after 'unpack 'opencl-inline + (lambda* (#:key inputs #:allow-other-keys) + ;; This is a feature of OpenCL 1.2 and later. + (substitute* "data/kernels/CMakeLists.txt" + (("CL1\\.1") "CL1.2")) + (substitute* (find-files "data/kernels" "\\.(cl|h)$") + (("inline") "static inline")) + #t)) (add-before 'configure 'prepare-build-environment (lambda* (#:key inputs #:allow-other-keys) ;; Rawspeed fails to build with GCC due to OpenMP error: @@ -516,11 +534,7 @@ photographic equipment.") ;; For GtkFileChooserDialog. `("GSETTINGS_SCHEMA_DIR" = (,(string-append (assoc-ref inputs "gtk+") - "/share/glib-2.0/schemas"))) - ;; For libOpenCL.so. - `("LD_LIBRARY_PATH" = - (,(string-append (assoc-ref inputs "ocl-icd") - "/lib")))) + "/share/glib-2.0/schemas")))) #t))))) (native-inputs `(("clang" ,clang-11) -- cgit v1.2.3