[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
170/244: gnu: darktable: Improve package style.
From: |
guix-commits |
Subject: |
170/244: gnu: darktable: Improve package style. |
Date: |
Wed, 12 Apr 2023 08:49:18 -0400 (EDT) |
apteryx pushed a commit to branch staging
in repository guix.
commit 6b835914c120c2d89c38a70573130415e28686e6
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Sat Apr 8 13:33:34 2023 +0200
gnu: darktable: Improve package style.
* gnu/packages/photo.scm (darktable)[arguments]: Use G-expressions.
[native-inputs]: Remove labels.
---
gnu/packages/photo.scm | 143 +++++++++++++++++++++++++------------------------
1 file changed, 72 insertions(+), 71 deletions(-)
diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 75c1d4ca7a..c498703205 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -470,98 +470,99 @@ photographic equipment.")
(base32 "1b3vr6njwqfvnrx3qpbg5aqcbl1z8nxnxcgyyw0sd4a20z33jfk0"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags '("-DBINARY_PACKAGE_BUILD=On"
- "-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 "opencl-icd-loader")
- "/lib/libOpenCL.so\"")))))
- (add-after 'unpack 'fix-missing-include
- (lambda _
- ;; Fix missing include needed to build tests. See upstream
- ;; issue: https://github.com/darktable-org/darktable/issues/12604
- (substitute* "./src/common/variables.h"
- (("once")
- "once\n#include \"common/image.h\""))))
- (add-before 'configure 'prepare-build-environment
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Rawspeed fails to build with GCC due to OpenMP error:
- ;; "undefined reference to `GOMP_loop_nonmonotonic_dynamic_next'"
- (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
- (lambda* (#:key outputs #:allow-other-keys)
- (setenv "LDFLAGS"
- (string-append
- "-Wl,-rpath="
- (assoc-ref outputs "out") "/lib/darktable"))))
- (add-after 'install 'wrap-program
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (wrap-program (string-append (assoc-ref outputs "out")
- "/bin/darktable")
- ;; For GtkFileChooserDialog.
- `("GSETTINGS_SCHEMA_DIR" =
- (,(string-append (assoc-ref inputs "gtk+")
- "/share/glib-2.0/schemas")))))))))
+ (list
+ #:configure-flags
+ #~(list "-DBINARY_PACKAGE_BUILD=On"
+ "-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 "\""
+ (search-input-file inputs "/lib/libOpenCL.so")
+ "\"")))))
+ (add-after 'unpack 'fix-missing-include
+ (lambda _
+ ;; Fix missing include needed to build tests. See upstream
+ ;; issue: https://github.com/darktable-org/darktable/issues/12604
+ (substitute* "./src/common/variables.h"
+ (("once")
+ "once\n#include \"common/image.h\""))))
+ (add-before 'configure 'prepare-build-environment
+ (lambda _
+ ;; Rawspeed fails to build with GCC due to OpenMP error:
+ ;; "undefined reference to `GOMP_loop_nonmonotonic_dynamic_next'"
+ (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\\}")
+ #$(this-package-native-input "clang")))))
+ (add-before 'configure 'set-LDFLAGS
+ (lambda _
+ (setenv "LDFLAGS"
+ (string-append "-Wl,-rpath=" #$output
"/lib/darktable"))))
+ (add-after 'install 'wrap-program
+ (lambda _
+ (wrap-program (string-append #$output "/bin/darktable")
+ ;; For GtkFileChooserDialog.
+ `("GSETTINGS_SCHEMA_DIR" =
+ (,(string-append #$(this-package-input "gtk+")
+ "/share/glib-2.0/schemas")))))))))
(native-inputs
- `(("clang" ,clang-11)
- ("cmocka" ,cmocka)
- ("desktop-file-utils" ,desktop-file-utils)
- ("glib:bin" ,glib "bin")
- ("gobject-introspection" ,gobject-introspection)
- ("intltool" ,intltool)
- ("llvm" ,llvm-11) ;should match the Clang version
- ("opencl-headers" ,opencl-headers)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
- ("po4a" ,po4a)
- ("python-wrapper" ,python-wrapper)
- ("ruby" ,ruby)))
+ (list clang-11
+ cmocka
+ desktop-file-utils
+ `(,glib "bin")
+ gobject-introspection
+ intltool
+ llvm-11 ;should match the Clang version
+ opencl-headers
+ perl
+ pkg-config
+ po4a
+ python-wrapper
+ ruby))
(inputs
(list bash-minimal
cairo
- colord-gtk ;optional, for color profile support
- cups ;optional, for printing support
+ colord-gtk ;optional, for color profile support
+ cups ;optional, for printing support
curl
dbus-glib
exiv2
freeimage
- gmic ;optional, for HaldcLUT support
+ gmic ;optional, for HaldcLUT support
graphicsmagick
gsettings-desktop-schemas
gtk+
imath
- iso-codes ;optional, for language names in the preferences
+ iso-codes ;optional, for language names in the preferences
json-glib
lcms
- lensfun ;optional, for the lens distortion plugin
- libgphoto2 ;optional, for camera tethering
- libavif ;optional, for AVIF support
+ lensfun ;optional, for the lens distortion plugin
+ libgphoto2 ;optional, for camera tethering
+ libavif ;optional, for AVIF support
libjpeg-turbo
libomp
libpng
librsvg
- libsecret ;optional, for storing passwords
+ libsecret ;optional, for storing passwords
libsoup-minimal-2
libtiff
- libwebp ;optional, for WebP support
+ libwebp ;optional, for WebP support
libxml2
libxslt
libheif
- lua-5.4 ;optional, for plugins
- opencl-icd-loader ;optional, for OpenCL support
- openexr ;optional, for EXR import/export
- openjpeg ;optional, for JPEG2000 export
- osm-gps-map ;optional, for geotagging view
+ lua-5.4 ;optional, for plugins
+ opencl-icd-loader ;optional, for OpenCL support
+ openexr ;optional, for EXR import/export
+ openjpeg ;optional, for JPEG2000 export
+ osm-gps-map ;optional, for geotagging view
pugixml
python-jsonschema
sdl2
@@ -576,8 +577,8 @@ and enhance them.")
(supported-systems '("x86_64-linux" "aarch64-linux" "powerpc64le-linux"))
(properties
'((release-monitoring-url .
"https://github.com/darktable-org/darktable/releases")))
- (license (list license:gpl3+ ;; Darktable itself.
- license:lgpl2.1+)))) ;; Rawspeed library.
+ (license (list license:gpl3+ ;Darktable itself
+ license:lgpl2.1+)))) ;Rawspeed library
(define-public photoflare
(package
- 178/244: nls: Make sure gnu/home/services/*.scm files are translatable., (continued)
- 178/244: nls: Make sure gnu/home/services/*.scm files are translatable., guix-commits, 2023/04/12
- 189/244: gnu: fcitx5-qt: Update to 5.0.17., guix-commits, 2023/04/12
- 190/244: gnu: fcitx5-anthy: Update to 5.0.14., guix-commits, 2023/04/12
- 225/244: doc: Regarding SSL certs, clarify when we write about Guix System., guix-commits, 2023/04/12
- 174/244: gnu: emacs-ement: Update to 0.8.2., guix-commits, 2023/04/12
- 175/244: gnu: emacs-js2-mode: Update to 20230408., guix-commits, 2023/04/12
- 231/244: gnu: Syncthing: Update to 1.23.4., guix-commits, 2023/04/12
- 198/244: gnu: xfce4-pulseaudio-plugin: Update to 0.4.6., guix-commits, 2023/04/12
- 211/244: gnu: emacs-citar-org-roam: Fix license., guix-commits, 2023/04/12
- 163/244: gnu: Add texlive-soulutf8., guix-commits, 2023/04/12
- 170/244: gnu: darktable: Improve package style.,
guix-commits <=
- 160/244: gnu: Add python-sentencepiece., guix-commits, 2023/04/12
- 220/244: gnu: s6-networking: Update to 2.5.1.3., guix-commits, 2023/04/12
- 155/244: gnu: Add carla-2.6., guix-commits, 2023/04/12
- 167/244: gnu: Add emacs-denote-menu., guix-commits, 2023/04/12
- 142/244: gnu: curl-minimal: Remove variable., guix-commits, 2023/04/12
- 166/244: gnu: tuxedo-keyboard: Update to 3.2.1., guix-commits, 2023/04/12
- 199/244: gnu: xfce4-session: Update to 4.18.2., guix-commits, 2023/04/12
- 179/244: svn-download: Default to non-recursive checkouts., guix-commits, 2023/04/12
- 229/244: gnu: ldc: Use default test check., guix-commits, 2023/04/12
- 218/244: gnu: s6: Update to 2.11.3.2., guix-commits, 2023/04/12