unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 42067@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#42067] [PATCH] gnu: darktable: Add optional dependencies.
Date: Fri, 26 Jun 2020 17:39:04 -0300	[thread overview]
Message-ID: <20200626203904.16748-1-monego@posteo.net> (raw)

[arguments]: Fix opencl-c.h path.
[native-inputs]: Add opencl-headers, make LLVM version specific.
[inputs]: Add gmic.
---
 gnu/packages/photo.scm | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 75bbc45380..5b5e057b65 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -55,6 +55,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages iso-codes)
   #:use-module (gnu packages libcanberra)
@@ -63,6 +64,7 @@
   #:use-module (gnu packages lua)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages opencl)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
@@ -480,7 +482,12 @@ photographic equipment.")
        (modify-phases %standard-phases
          (add-before 'configure 'prepare-build-environment
            (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "CC" "clang") (setenv "CXX" "clang++")))
+             (setenv "CC" "clang") (setenv "CXX" "clang++")
+             ;; Darktable looks for opencl-c.h in the LLVM dir. Guix installs
+             ;; it to the Clang dir. We fix this by patching CMakeLists.txt.
+             (substitute* "CMakeLists.txt"
+                          (("\\$\\{LLVM_INSTALL_PREFIX\\}")
+                           (assoc-ref %build-inputs "clang")))))
          (add-before 'configure 'set-LDFLAGS-and-CPATH
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (setenv "LDFLAGS"
@@ -508,7 +515,8 @@ photographic equipment.")
        ("glib:bin" ,glib "bin")
        ("gobject-introspection" ,gobject-introspection)
        ("intltool" ,intltool)
-       ("llvm" ,llvm)
+       ("llvm" ,llvm-9) ;should match the Clang version
+       ("opencl-headers" ,opencl-headers)
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)
        ("po4a" ,po4a)))
@@ -520,6 +528,7 @@ photographic equipment.")
        ("dbus-glib" ,dbus-glib)
        ("exiv2" ,exiv2)
        ("freeimage" ,freeimage)
+       ("gmic" ,gmic)
        ("graphicsmagick" ,graphicsmagick)
        ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
        ("gtk+" ,gtk+)
@@ -539,7 +548,7 @@ photographic equipment.")
        ("libwebp" ,libwebp)
        ("libxml2" ,libxml2)
        ("libxslt" ,libxslt)
-       ("lua" ,lua)
+       ("lua" ,lua) ;for plugins
        ("openexr" ,openexr)
        ("openjpeg" ,openjpeg)
        ("osm-gps-map" ,osm-gps-map)
-- 
2.20.1





             reply	other threads:[~2020-06-26 20:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 20:39 Vinicius Monego [this message]
2020-06-29 21:59 ` bug#42067: [PATCH] gnu: darktable: Add optional dependencies Ludovic Courtès
2020-06-30  2:42   ` [bug#42067] " Vinicius Monego
2020-06-30 10:05     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200626203904.16748-1-monego@posteo.net \
    --to=monego@posteo.net \
    --cc=42067@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).