gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / photo.scm
CommitLineData
9208d0c1 1;;; GNU Guix --- Functional package management for GNU
eafd0390 2;;; Copyright © 2014, 2015, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
d9cef612 3;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
1d093724 4;;; Copyright © 2015, 2017 Andreas Enge <andreas@enge.fr>
5a4e5c26 5;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
c49840f8 6;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
6862ae1a 7;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
13d9794d 8;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
39af91db 9;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
d3673047 10;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
07351f06 11;;; Copyright © 2020. 2021 Vinicius Monego <monego@posteo.net>
9208d0c1
LC
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages photo)
0e6412c1 29 #:use-module (guix build-system cmake)
9208d0c1 30 #:use-module (guix build-system gnu)
0c73eed3 31 #:use-module (guix build-system meson)
b138ec94 32 #:use-module (guix build-system perl)
39af91db 33 #:use-module (guix build-system python)
f0644195 34 #:use-module (guix download)
c53d529f 35 #:use-module (guix git-download)
f0644195
AE
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
8957241d 38 #:use-module (guix utils)
ce16d312 39 #:use-module (gnu packages)
1d093724 40 #:use-module (gnu packages algebra)
9208d0c1 41 #:use-module (gnu packages autotools)
f0644195 42 #:use-module (gnu packages base)
8957241d 43 #:use-module (gnu packages boost)
adaf577c 44 #:use-module (gnu packages check)
0c73eed3 45 #:use-module (gnu packages cmake)
0e6412c1 46 #:use-module (gnu packages compression)
9305dfb9 47 #:use-module (gnu packages cups)
91a9c65c 48 #:use-module (gnu packages curl)
39af91db
SS
49 #:use-module (gnu packages file)
50 #:use-module (gnu packages freedesktop)
9305dfb9 51 #:use-module (gnu packages geo)
1d093724 52 #:use-module (gnu packages gettext)
8957241d
AE
53 #:use-module (gnu packages ghostscript)
54 #:use-module (gnu packages gl)
91a9c65c 55 #:use-module (gnu packages gnome)
c49840f8 56 #:use-module (gnu packages glib)
8957241d 57 #:use-module (gnu packages graphics)
39af91db 58 #:use-module (gnu packages gstreamer)
91a9c65c 59 #:use-module (gnu packages gtk)
0e6412c1 60 #:use-module (gnu packages image)
172ca314 61 #:use-module (gnu packages image-processing)
8957241d 62 #:use-module (gnu packages imagemagick)
9305dfb9 63 #:use-module (gnu packages iso-codes)
13d9794d 64 #:use-module (gnu packages libcanberra)
f0644195 65 #:use-module (gnu packages libusb)
91a9c65c 66 #:use-module (gnu packages llvm)
9305dfb9 67 #:use-module (gnu packages lua)
d16479c5 68 #:use-module (gnu packages man)
8957241d 69 #:use-module (gnu packages maths)
172ca314 70 #:use-module (gnu packages opencl)
b138ec94 71 #:use-module (gnu packages perl)
f0644195
AE
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages popt)
91a9c65c 74 #:use-module (gnu packages python)
44d10b1f 75 #:use-module (gnu packages python-xyz)
39af91db
SS
76 #:use-module (gnu packages python-web)
77 #:use-module (gnu packages qt)
8957241d 78 #:use-module (gnu packages readline)
7f81a0f7 79 #:use-module (gnu packages ruby)
cd0322a3 80 #:use-module (gnu packages sqlite)
8f9ac901 81 #:use-module (gnu packages tex)
39af91db
SS
82 #:use-module (gnu packages time)
83 #:use-module (gnu packages video)
8957241d 84 #:use-module (gnu packages web)
1d093724 85 #:use-module (gnu packages wxwidgets)
8957241d 86 #:use-module (gnu packages xfig)
1d093724 87 #:use-module (gnu packages xorg)
4dbef239 88 #:use-module (gnu packages xml)
4e9dfe39 89 #:use-module ((srfi srfi-1) #:hide (zip))
4dbef239 90 #:use-module (srfi srfi-26))
9208d0c1 91
39af91db
SS
92(define-public rapid-photo-downloader
93 (package
94 (name "rapid-photo-downloader")
95 (version "0.9.18")
96 (source (origin
97 (method url-fetch)
98 (uri (string-append "https://launchpad.net/rapid/pyqt/"
99 version "/+download/" name "-"
100 version ".tar.gz"))
101 (sha256
102 (base32
103 "15p7sssg6vmqbm5xnc4j5dr89d7gl7y5qyq44a240yl5aqkjnybw"))))
104 (build-system python-build-system)
105 (native-inputs
106 `(("file" ,file)
107 ("intltool" ,intltool)
108 ("gobject-introspection" ,gobject-introspection)))
109 (inputs
110 `(("gdk-pixbuf" ,gdk-pixbuf)
111 ("gexiv2" ,gexiv2)
112 ("gst-libav" ,gst-libav)
113 ("gst-plugins-base" ,gst-plugins-base)
114 ("gst-plugins-good" ,gst-plugins-good)
115 ("gstreamer" ,gstreamer)
116 ("libgudev" ,libgudev)
117 ("libnotify" ,libnotify)
118 ("libmediainfo" ,libmediainfo)
119 ("usdisks" ,udisks)
120 ("python-pyqt" ,python-pyqt)
121 ("python-pygobject" ,python-pygobject)
122 ("python-gphoto2" ,python-gphoto2)
123 ("python-pyzmq" ,python-pyzmq)
124 ("python-tornado" ,python-tornado)
125 ("python-psutil" ,python-psutil)
126 ("python-pyxdg" ,python-pyxdg)
127 ("python-arrow" ,python-arrow)
128 ("python-dateutil" ,python-dateutil)
129 ("python-easygui" ,python-easygui)
130 ("python-colour" ,python-colour)
131 ("python-pymediainfo" ,python-pymediainfo)
132 ("python-sortedcontainers" ,python-sortedcontainers)
133 ("python-rawkit" ,python-rawkit)
134 ("python-requests" ,python-requests)
135 ("python-colorlog" ,python-colorlog)
136 ("python-pyprind" ,python-pyprind)
137 ("python-tenacity" ,python-tenacity)
138 ("perl-image-exiftool" ,perl-image-exiftool)))
139 (arguments
140 `(#:phases
141 (modify-phases %standard-phases
142 (add-after 'unpack 'patch-libmediainfo
143 (lambda _
144 (substitute* "raphodo/metadatavideo.py"
145 (("pymedia_library_file = 'libmediainfo.so.0'")
146 (string-append "pymedia_library_file = '"
147 (assoc-ref %build-inputs "libmediainfo")
148 "/lib/libmediainfo.so.0'")))
149 #t))
150 (add-after 'install 'wrap
151 (lambda* (#:key inputs outputs #:allow-other-keys)
152 (let ((out (assoc-ref outputs "out"))
153 (path (string-join
154 (list (string-append
155 (assoc-ref inputs "perl-image-exiftool")
156 "/bin"))
157 ":"))
158 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
159 (python-path (getenv "PYTHONPATH")))
160 (for-each
161 (lambda (program)
162 (wrap-program program
163 `("PATH" ":" prefix (,path))
164 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
165 `("PYTHONPATH" ":" prefix (,python-path))))
166 (map (lambda (name)
167 (string-append out "/bin/" name))
168 '("analyze-pv-structure"
169 "rapid-photo-downloader"))))
170 #t)))))
171 (home-page "https://www.damonlynch.net/rapid/")
172 (synopsis "Import photos and videos from cameras, phones and memory cards")
173 (description "Import photos and videos from cameras, phones and memory
174cards and generate meaningful file and folder names.")
175 (license license:gpl2+)))
176
d9cef612
RW
177(define-public libraw
178 (package
179 (name "libraw")
271f2786 180 (version "0.20.0")
d9cef612
RW
181 (source (origin
182 (method url-fetch)
fe535d81 183 (uri (string-append "https://www.libraw.org/data/LibRaw-"
d9cef612
RW
184 version ".tar.gz"))
185 (sha256
186 (base32
271f2786 187 "18wlsvj6c1rv036ph3695kknpgzc3lk2ikgshy8417yfl8ykh2hz"))))
d9cef612 188 (build-system gnu-build-system)
afb27214
MB
189 (native-inputs
190 `(("pkg-config" ,pkg-config)))
191 (inputs
4bd428a7 192 `(("libjpeg" ,libjpeg-turbo))) ;for lossy DNGs and old Kodak cameras
afb27214
MB
193 (propagated-inputs
194 `(("lcms" ,lcms))) ;for color profiles
fe535d81 195 (home-page "https://www.libraw.org")
d9cef612
RW
196 (synopsis "Raw image decoder")
197 (description
198 "LibRaw is a library for reading RAW files obtained from digital photo
199cameras (CRW/CR2, NEF, RAF, DNG, and others).")
afea8694
MB
200 ;; LibRaw is distributed under both LGPL2.1 and CDDL 1.0. From the README:
201 ;; "You may use one of these licensing modes and switch between them. If
202 ;; you modify LibRaw source and made your changes public, you should accept
203 ;; both two licensing modes for your changes/additions."
204 (license (list license:lgpl2.1 license:cddl1.0))))
d9cef612 205
fd67d793
LF
206(define-public libraw-0.18
207 (package (inherit libraw)
208 (name "libraw")
209 (version "0.18.12")
210 (source (origin
211 (method url-fetch)
212 (uri (string-append "https://www.libraw.org/data/LibRaw-"
213 version ".tar.gz"))
214 (sha256
215 (base32
216 "1m2khr2cij8z6lawgbmdksjn14fpnjsy8ad4qahnpqapm1slsxap"))))))
217
9208d0c1
LC
218(define-public libexif
219 (package
220 (name "libexif")
8bd0b533 221 (version "0.6.22")
9208d0c1
LC
222 (source (origin
223 (method url-fetch)
8bd0b533
MB
224 (uri (string-append
225 "https://github.com/libexif/libexif/releases"
226 "/download/libexif-"
227 (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version)
228 "-release/libexif-" version ".tar.xz"))
9208d0c1
LC
229 (sha256
230 (base32
8bd0b533 231 "0mhcad5zab7fsn120rd585h8ncwkq904nzzrq8vcd72hzk4g2j2h"))))
9208d0c1 232 (build-system gnu-build-system)
f2d2dc70 233 (home-page "https://libexif.github.io/")
9208d0c1
LC
234 (synopsis "Read and manipulate EXIF data in digital photographs")
235 (description
236 "The libexif C library allows applications to read, edit, and save EXIF
237data as produced by digital cameras.")
341f4965 238 (license license:lgpl2.1+)))
9208d0c1
LC
239
240(define-public libgphoto2
241 (package
242 (name "libgphoto2")
a1ed5c27 243 (version "2.5.27")
9208d0c1
LC
244 (source (origin
245 (method url-fetch)
de67e922
LF
246 (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
247 version "/libgphoto2-" version ".tar.bz2"))
9208d0c1
LC
248 (sha256
249 (base32
a1ed5c27 250 "1ms06b3dj1p33aypcb16gg5pn7fylbylsk9cnnqa0j29qiw59f7q"))))
9208d0c1
LC
251 (build-system gnu-build-system)
252 (native-inputs `(("pkg-config" ,pkg-config)))
253 (inputs
7e49a851 254 `(("libjpeg-turbo" ,libjpeg-turbo)
3246cc91 255 ("libltdl" ,libltdl)
d32f4800
TGR
256 ("libusb" ,libusb)
257 ("libxml2" ,libxml2)))
9208d0c1
LC
258 (propagated-inputs
259 `(;; The .pc refers to libexif.
260 ("libexif" ,libexif)))
261 (home-page "http://www.gphoto.org/proj/libgphoto2/")
262 (synopsis "Accessing digital cameras")
263 (description
264 "This is the library backend for gphoto2. It contains the code for PTP,
265MTP, and other vendor specific protocols for controlling and transferring data
266from digital cameras.")
267
268 ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+.
341f4965 269 (license license:lgpl2.1+)))
9208d0c1
LC
270
271(define-public gphoto2
272 (package
273 (name "gphoto2")
4ccd3412 274 (version "2.5.27")
9208d0c1
LC
275 (source (origin
276 (method url-fetch)
de67e922
LF
277 (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version
278 "/gphoto2-" version ".tar.bz2"))
9208d0c1
LC
279 (sha256
280 (base32
4ccd3412 281 "0f4d3q381jnnkcqkb2dj1k709skp65qihl5xm80zandvl69lw19h"))))
9208d0c1
LC
282 (build-system gnu-build-system)
283 (native-inputs
284 `(("pkg-config" ,pkg-config)))
285 (inputs
286 `(("readline" ,readline)
7e49a851 287 ("libjpeg-turbo" ,libjpeg-turbo)
9208d0c1
LC
288 ("popt" ,popt)
289 ("libexif" ,libexif)
290 ("libgphoto2" ,libgphoto2)))
291 (arguments
dc1d3cde
KK
292 '(#:phases
293 (modify-phases %standard-phases
294 (add-before 'check 'pre-check
295 (lambda* (#:key inputs #:allow-other-keys)
296 (substitute* (find-files "tests/data" "\\.param$")
297 (("/usr/bin/env")
298 (which "env")))
299 #t)))
9208d0c1 300
a0bb98c3 301 ;; FIXME: There is 1 test failure, most likely related to the build
9208d0c1
LC
302 ;; environment.
303 #:tests? #f))
304
305 (home-page "http://www.gphoto.org/")
306 (synopsis "Command-line tools to access digital cameras")
307 (description
308 "Gphoto2 is a set of command line utilities for manipulating a large
309number of different digital cameras. Through libgphoto2, it supports PTP,
310MTP, and much more.")
311
312 ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+.
341f4965 313 (license license:gpl2+)))
b138ec94 314
b89bb804
MB
315;; Note: See <https://metacpan.org/pod/Image::ExifTool> for the latest
316;; release. The versions at <https://www.sno.phy.queensu.ca/~phil/exiftool/>
317;; are not meant for production use according to the Changes file.
b138ec94
LC
318(define-public perl-image-exiftool
319 (package
320 (name "perl-image-exiftool")
022d90cd 321 (version "12.00")
0234f4af
TGR
322 (source
323 (origin
324 (method url-fetch)
325 (uri (list
326 (string-append "mirror://cpan/authors/id/E/EX/EXIFTOOL/"
327 "Image-ExifTool-" version ".tar.gz")
328 ;; New releases may take a while to hit CPAN.
329 (string-append "https://www.sno.phy.queensu.ca/~phil/exiftool/"
330 "Image-ExifTool-" version ".tar.gz")))
331 (sha256
cbfa8bb3 332 (base32
022d90cd 333 "0nl5djf6hs6brnp7qnqvj3xwhj1qnjwcv35ih4yqp2mm9b4jqyfh"))))
b138ec94
LC
334 (build-system perl-build-system)
335 (arguments
33717a17
LF
336 '(#:phases
337 (modify-phases %standard-phases
338 (add-after 'install 'post-install
339 (lambda* (#:key outputs #:allow-other-keys)
340 ;; Make sure the 'exiftool' commands finds the library.
341 ;; XXX: Shouldn't it be handled by PERL-BUILD-SYSTEM?
342 (let* ((out (assoc-ref outputs "out"))
343 (pm (find-files out "^ExifTool\\.pm$"))
344 (lib (dirname (dirname (car pm)))))
345 (wrap-program (string-append out "/bin/exiftool")
4851af9e
MW
346 `("PERL5LIB" prefix (,lib)))
347 #t))))))
9aba9b12 348 (home-page "https://metacpan.org/release/Image-ExifTool")
ae6591ef
LF
349 (synopsis "Program and Perl library to manipulate EXIF and other metadata")
350 (description "This package provides the @code{exiftool} command and the
351@code{Image::ExifTool} Perl library to manipulate EXIF tags of digital images
352and a wide variety of other metadata.")
2f3108ad 353 (license license:perl-license)))
0e6412c1
AE
354
355(define-public libpano13
356 (package
357 (name "libpano13")
a7f12433 358 (version "2.9.20_rc3")
0e6412c1
AE
359 (source (origin
360 (method url-fetch)
361 (uri (string-append "mirror://sourceforge/panotools/libpano13/"
a7f12433
LLB
362 "libpano13-" (first
363 (string-split version #\_))
364 "/libpano13-" version ".tar.gz"))
0e6412c1
AE
365 (sha256
366 (base32
a7f12433 367 "12cv4886l1czfjwy7k6ipgf3zjksgwhdjzr2s9fdg33vqcv2hlrv"))))
0e6412c1
AE
368 (build-system cmake-build-system)
369 (inputs
4bd428a7 370 `(("libjpeg" ,libjpeg-turbo)
0e6412c1
AE
371 ("libpng" ,libpng)
372 ("libtiff" ,libtiff)
373 ("zlib" ,zlib)))
374 (home-page "http://panotools.sourceforge.net/")
375 (synopsis "Library for panoramic images")
376 (description
377 "The libpano13 package contains the backend library written by the
378Panorama Tools project for building panoramic images from a set of
379overlapping images, as well as some command line tools.")
380 (license license:gpl2+)))
8957241d
AE
381
382(define-public enblend-enfuse
383 (package
384 (name "enblend-enfuse")
d16479c5 385 (version "4.2")
8957241d
AE
386 (source (origin
387 (method url-fetch)
388 (uri (string-append "mirror://sourceforge/enblend/"
389 name "/"
390 name "-" (version-major+minor version) "/"
391 name "-" version ".tar.gz"))
392 (sha256
393 (base32
d16479c5 394 "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7"))))
8957241d
AE
395 (build-system gnu-build-system)
396 (native-inputs
397 `(("pkg-config" ,pkg-config)
398 ("perl" ,perl)
399 ("perl-timedate" ,perl-timedate)
400 ;; for building the documentation
401 ("gnuplot" ,gnuplot)
d16479c5 402 ("help2man" ,help2man)
8957241d
AE
403 ("imagemagick" ,imagemagick)
404 ("libxml2" ,libxml2)
84de27c8 405 ("texlive-minimal" ,texlive-tiny)
8957241d
AE
406 ("tidy" ,tidy)
407 ("transfig" ,transfig)))
408 (inputs
409 `(("boost" ,boost)
410 ("gsl" ,gsl)
411 ("lcms" ,lcms)
4bd428a7 412 ("libjpeg" ,libjpeg-turbo)
8957241d
AE
413 ("libpng" ,libpng)
414 ("libtiff" ,libtiff)
415 ("openexr" ,openexr)
416 ("vigra" ,vigra)
417 ("zlib" ,zlib)))
418 (arguments
419 `(#:configure-flags `("--enable-openmp")))
420 (home-page "http://enblend.sourceforge.net/")
421 (synopsis "Tools for combining and blending images")
422 (description
423 "Enblend blends away the seams in a panoramic image mosaic using a
424multi-resolution spline. Enfuse merges different exposures of the same
425scene to produce an image that looks much like a tone-mapped image.")
426 (license license:gpl2+)))
c49840f8
RJ
427
428(define-public lensfun
429 (package
430 (name "lensfun")
431 (version "0.3.2")
432 (source (origin
433 (method url-fetch)
434 (uri (string-append
435 "mirror://sourceforge/lensfun/"
436 version "/lensfun-" version ".tar.gz"))
437 (sha256
438 (base32
439 "0cfk8jjhs9nbfjfdy98plrj9ayi59aph0nx6ppslgjhlcvacm2xf"))))
440 (build-system cmake-build-system)
4dbef239
EF
441 (arguments
442 `(,@(if (any (cute string-prefix? <> (or (%current-system)
443 (%current-target-system)))
444 '("x86_64" "i686"))
445 ;; SSE and SSE2 are supported only on Intel processors.
446 '()
447 '(#:configure-flags '("-DBUILD_FOR_SSE=OFF" "-DBUILD_FOR_SSE2=OFF")))
448 #:tests? #f)) ; There are no tests to run.
c49840f8
RJ
449 (native-inputs
450 `(("pkg-config" ,pkg-config)))
451 (inputs
452 `(("glib" ,glib)))
453 (home-page "https://sourceforge.net/projects/lensfun/")
454 (synopsis "Library to correct optical lens defects with a lens database")
455 (description "Digital photographs are not ideal. Of course, the better is
456your camera, the better the results will be, but in any case if you look
457carefully at shots taken even by the most expensive cameras equipped with the
458most expensive lenses you will see various artifacts. It is very hard to make
459ideal cameras, because there are a lot of factors that affect the final image
460quality, and at some point camera and lens designers have to trade one factor
461for another to achieve the optimal image quality, within the given design
462restrictions and budget. But we all want ideal shots, don't we? So that's
463what's Lensfun is all about: rectifying the defects introduced by your
464photographic equipment.")
465 ;; The libraries are licensed under the LGPL3, the programs are
466 ;; licensed GPL3, and the database is license CC-BY-SA 3.0. See the
467 ;; README.md file for this clarification.
468 (license (list license:lgpl3 license:gpl3 license:cc-by-sa3.0))))
91a9c65c
RJ
469
470(define-public darktable
471 (package
472 (name "darktable")
07351f06 473 (version "3.4.1")
4b886fb0
TGR
474 (source
475 (origin
476 (method url-fetch)
477 (uri (string-append
478 "https://github.com/darktable-org/darktable/releases/"
479 "download/release-" version "/darktable-" version ".tar.xz"))
480 (sha256
07351f06 481 (base32 "07llfhhz5dhh43smhv4ax4xi1diym8hrzl7cad87rkcvv98zihvz"))))
91a9c65c
RJ
482 (build-system cmake-build-system)
483 (arguments
adaf577c
VM
484 `(#:configure-flags '("-DBINARY_PACKAGE_BUILD=On"
485 "-DBUILD_TESTING=On")
91a9c65c
RJ
486 #:phases
487 (modify-phases %standard-phases
9305dfb9
VM
488 (add-before 'configure 'prepare-build-environment
489 (lambda* (#:key inputs #:allow-other-keys)
c4902548
VM
490 ;; Rawspeed fails to build with GCC due to OpenMP error:
491 ;; "undefined reference to `GOMP_loop_nonmonotonic_dynamic_next'"
172ca314
VM
492 (setenv "CC" "clang") (setenv "CXX" "clang++")
493 ;; Darktable looks for opencl-c.h in the LLVM dir. Guix installs
494 ;; it to the Clang dir. We fix this by patching CMakeLists.txt.
495 (substitute* "CMakeLists.txt"
496 (("\\$\\{LLVM_INSTALL_PREFIX\\}")
497 (assoc-ref %build-inputs "clang")))
498 #t))
17ac8bb6
MB
499 (add-before 'configure 'set-LDFLAGS-and-CPATH
500 (lambda* (#:key inputs outputs #:allow-other-keys)
91a9c65c
RJ
501 (setenv "LDFLAGS"
502 (string-append
503 "-Wl,-rpath="
504 (assoc-ref outputs "out") "/lib/darktable"))
17ac8bb6
MB
505
506 ;; Ensure the OpenEXR headers are found.
507 (setenv "CPATH"
508 (string-append (assoc-ref inputs "ilmbase")
509 "/include/OpenEXR:" (or (getenv "CPATH") "")))
9305dfb9 510 #t))
9db1b378
VM
511 (add-after 'install 'wrap-program
512 (lambda* (#:key inputs outputs #:allow-other-keys)
513 (wrap-program (string-append (assoc-ref outputs "out")
514 "/bin/darktable")
515 ;; For GtkFileChooserDialog.
516 `("GSETTINGS_SCHEMA_DIR" =
517 (,(string-append (assoc-ref inputs "gtk+")
518 "/share/glib-2.0/schemas")))
519 ;; For libOpenCL.so.
520 `("LD_LIBRARY_PATH" =
521 (,(string-append (assoc-ref inputs "ocl-icd")
522 "/lib"))))
523 #t)))))
d3673047 524 (native-inputs
7f81a0f7 525 `(("clang" ,clang-11)
adaf577c 526 ("cmocka" ,cmocka)
9305dfb9
VM
527 ("desktop-file-utils" ,desktop-file-utils)
528 ("glib:bin" ,glib "bin")
529 ("gobject-introspection" ,gobject-introspection)
530 ("intltool" ,intltool)
7f81a0f7 531 ("llvm" ,llvm-11) ;should match the Clang version
172ca314 532 ("opencl-headers" ,opencl-headers)
d3673047 533 ("perl" ,perl)
9305dfb9 534 ("pkg-config" ,pkg-config)
7f81a0f7
VM
535 ("po4a" ,po4a)
536 ("python" ,python-wrapper)
537 ("ruby" ,ruby)))
91a9c65c 538 (inputs
9305dfb9 539 `(("cairo" ,cairo)
c4902548
VM
540 ("colord-gtk" ,colord-gtk) ;optional, for color profile support
541 ("cups" ,cups) ;optional, for printing support
9305dfb9
VM
542 ("curl" ,curl)
543 ("dbus-glib" ,dbus-glib)
544 ("exiv2" ,exiv2)
545 ("freeimage" ,freeimage)
c4902548 546 ("gmic" ,gmic) ;optional, for HaldcLUT support
9305dfb9
VM
547 ("graphicsmagick" ,graphicsmagick)
548 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
91a9c65c 549 ("gtk+" ,gtk+)
9305dfb9 550 ("ilmbase" ,ilmbase)
c4902548 551 ("iso-codes" ,iso-codes) ;optional, for language names in the preferences
9305dfb9
VM
552 ("json-glib" ,json-glib)
553 ("lcms" ,lcms)
c4902548
VM
554 ("lensfun" ,lensfun) ;optional, for the lens distortion plugin
555 ("libgphoto2" ,libgphoto2) ;optional, for camera tethering
9db1b378 556 ("libavif" ,libavif) ;optional, for AVIF support
4bd428a7 557 ("libjpeg" ,libjpeg-turbo)
9305dfb9 558 ("libomp" ,libomp)
91a9c65c 559 ("libpng" ,libpng)
9305dfb9 560 ("librsvg" ,librsvg)
c4902548 561 ("libsecret" ,libsecret) ;optional, for storing passwords
9305dfb9 562 ("libsoup" ,libsoup)
91a9c65c 563 ("libtiff" ,libtiff)
c4902548 564 ("libwebp" ,libwebp) ;optional, for WebP support
9305dfb9
VM
565 ("libxml2" ,libxml2)
566 ("libxslt" ,libxslt)
c4902548 567 ("lua" ,lua) ;optional, for plugins
9db1b378 568 ("ocl-icd" ,ocl-icd) ;optional, for OpenCL support
c4902548
VM
569 ("openexr" ,openexr) ;optional, for EXR import/export
570 ("openjpeg" ,openjpeg) ;optional, for JPEG2000 export
571 ("osm-gps-map" ,osm-gps-map) ;optional, for geotagging view
9305dfb9 572 ("pugixml" ,pugixml)
91a9c65c 573 ("python-jsonschema" ,python-jsonschema)
9305dfb9 574 ("sqlite" ,sqlite)))
91a9c65c
RJ
575 (home-page "https://www.darktable.org")
576 (synopsis "Virtual lighttable and darkroom for photographers")
577 (description "Darktable is a photography workflow application and RAW
578developer. It manages your digital negatives in a database, lets you view
579them through a zoomable lighttable and enables you to develop raw images
580and enhance them.")
4b886fb0 581 ;; See src/is_supported_platform.h for supported platforms.
9db1b378 582 (supported-systems '("x86_64-linux" "aarch64-linux"))
9305dfb9
VM
583 (license (list license:gpl3+ ;; Darktable itself.
584 license:lgpl2.1+)))) ;; Rawspeed library.
1d093724 585
c53d529f
VM
586(define-public photoflare
587 (package
588 (name "photoflare")
6862ae1a 589 (version "1.6.7")
c53d529f
VM
590 (source
591 (origin
592 (method git-fetch)
593 (uri (git-reference
594 (url "https://github.com/photoflare/photoflare")
595 (commit (string-append "v" version))))
596 (file-name (git-file-name name version))
597 (sha256
6862ae1a 598 (base32 "0rh5gvnc1zwx4p9h599s82m69gsxp19nnfcxsblx3b2ddwzxh78v"))))
c53d529f
VM
599 (build-system gnu-build-system)
600 (arguments
601 '(#:tests? #f ;no tests
602 #:phases
603 (modify-phases %standard-phases
604 (replace 'configure
605 (lambda* (#:key inputs outputs #:allow-other-keys)
606 (let ((magickpp (assoc-ref inputs "graphicsmagick"))
607 (out (assoc-ref outputs "out")))
608 (invoke "qmake"
609 (string-append "INCLUDEPATH += " magickpp
610 "/include/GraphicsMagick")
611 (string-append "PREFIX=" out)
612 "Photoflare.pro")))))))
613 (native-inputs
614 `(("pkg-config" ,pkg-config)
615 ("qttools" ,qttools)))
616 (inputs
617 `(("graphicsmagick" ,graphicsmagick)
618 ("libomp" ,libomp)
619 ("qtbase" ,qtbase)))
620 (home-page "https://photoflare.io")
621 (synopsis "Quick, simple but powerful image editor")
622 (description "Photoflare is a cross-platform image editor with an aim
623to balance between powerful features and a very friendly graphical user
624interface. It suits a wide variety of different tasks and users who value a
625more nimble workflow. Features include basic image editing capabilities,
626paint brushes, image filters, colour adjustments and more advanced features
627such as Batch image processing.")
628 (license license:gpl3+)))
629
0c73eed3
VM
630(define-public entangle
631 (package
632 (name "entangle")
633 (version "3.0")
634 (source
635 (origin
636 (method git-fetch)
637 (uri (git-reference
638 (url "https://gitlab.com/entangle/entangle")
639 (commit (string-append "v" version))))
640 (file-name (git-file-name name version))
641 (sha256
642 (base32 "1pdmgxjdb3xlcqsaz7l8qzj5f7g7nwzhsrgid8929bm36d49cgc7"))))
643 (build-system meson-build-system)
644 (arguments
645 `(#:glib-or-gtk? #t
646 #:phases
647 (modify-phases %standard-phases
648 (add-after 'unpack 'skip-gtk-update-icon-cache
649 ;; Don't create 'icon-theme.cache'.
650 (lambda _
651 (substitute* "meson_post_install.py"
652 (("gtk-update-icon-cache") "true"))
653 #t))
654 (add-after 'install 'wrap-gi-python
655 ;; Make GTK find files needed by plugins.
656 (lambda* (#:key inputs outputs #:allow-other-keys)
657 (let ((out (assoc-ref outputs "out"))
658 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
659 (python-path (getenv "PYTHONPATH")))
660 (wrap-program (string-append out "/bin/entangle")
661 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
662 `("PYTHONPATH" ":" prefix (,python-path))))
663 #t)))))
664 (native-inputs
665 `(("cmake" ,cmake)
666 ("gettext" ,gettext-minimal)
667 ("glib:bin" ,glib "bin")
668 ("gobject-introspection" ,gobject-introspection)
669 ("gtk-doc" ,gtk-doc)
670 ("perl" ,perl)
671 ("pkg-config" ,pkg-config)
672 ("xmllint" ,libxml2)))
673 (inputs
674 `(("gdk-pixbuf" ,gdk-pixbuf)
675 ("gexiv2" ,gexiv2)
676 ("gst-plugins-base" ,gst-plugins-base)
677 ("gstreamer" ,gstreamer)
678 ("gtk+" ,gtk+)
679 ("lcms" ,lcms)
680 ("libgphoto2" ,libgphoto2)
681 ("libgudev" ,libgudev)
682 ("libpeas" ,libpeas)
683 ("libraw" ,libraw)
684 ("python" ,python)
685 ("python-pygobject" ,python-pygobject)))
686 (home-page "https://entangle-photo.org/")
687 (synopsis "Camera control and capture")
688 (description
689 "Entangle is an application which uses GTK and libgphoto2 to provide a
690graphical interface for tethered photography with digital cameras. It
691includes control over camera shooting and configuration settings and 'hands
692off' shooting directly from the controlling computer.")
693 (license license:gpl3+)))
694
1d093724
AE
695(define-public hugin
696 (package
697 (name "hugin")
5fb1bff1 698 (version "2020.0.0")
1d093724
AE
699 (source (origin
700 (method url-fetch)
701 (uri (string-append "mirror://sourceforge/hugin/hugin/hugin-"
702 (version-major+minor version)
703 "/hugin-" version ".tar.bz2"))
704 (sha256
705 (base32
5fb1bff1 706 "1jyazc0mbr9g7vrichpqqnfl72lj21244csk0z5i8ycs4l0pcgi8"))))
1d093724
AE
707 (build-system cmake-build-system)
708 (native-inputs
f2d97d57 709 `(("gettext" ,gettext-minimal)
1d093724
AE
710 ("pkg-config" ,pkg-config)))
711 (inputs
712 `(("boost" ,boost)
713 ("enblend-enfuse" ,enblend-enfuse)
5fb1bff1 714 ("exiv2" ,exiv2)
1d093724
AE
715 ("fftw" ,fftw)
716 ("flann" ,flann)
717 ("freeglut" ,freeglut)
718 ("glew" ,glew)
719 ("lcms" ,lcms)
4bd428a7 720 ("libjpeg" ,libjpeg-turbo)
1d093724
AE
721 ("libpano13" ,libpano13)
722 ("libpng" ,libpng)
723 ("libtiff" ,libtiff)
724 ("libxi" ,libxi)
725 ("libxmu" ,libxmu)
726 ("mesa" ,mesa)
727 ("openexr" ,openexr)
728 ("sqlite" ,sqlite)
729 ("vigra" ,vigra)
730 ("wxwidgets" ,wxwidgets)
731 ("zlib" ,zlib)))
732 (arguments
733 `(#:tests? #f ; no check target
734 #:configure-flags
735 (list
736 ;; The header files of ilmbase (propagated by openexr) are not found
737 ;; when included by the header files of openexr, and an explicit
738 ;; flag needs to be set.
739 (string-append "-DCMAKE_CXX_FLAGS=-I"
740 (assoc-ref %build-inputs "ilmbase")
741 "/include/OpenEXR")
742 ;; Disable installation of the Python scripting interface.
743 ;; It would require the additional inputs python and swig.
744 ;; Installation would need to be tweaked, as it tries to install
745 ;; into the python directory.
746 "-DBUILD_HSI=OFF")
747 #:phases
748 (modify-phases %standard-phases
749 (add-before 'configure 'substitute
750 (lambda _
751 (substitute* "src/hugin1/base_wx/StitchingExecutor.cpp"
752 (("wxT\\(\"enblend\"\\)")
753 (string-append "wxT(\"" (which "enblend") "\")"))
754 (("wxT\\(\"enfuse\"\\)")
755 (string-append "wxT(\"" (which "enfuse") "\")")))
756 #t)))))
757 (home-page "http://hugin.sourceforge.net/")
758 (synopsis "Panorama photo stitcher")
759 (description
760 "Hugin is an easy to use panoramic imaging toolchain with a graphical
761user interface. It can be used to assemble a mosaic of photographs into
762a complete panorama and stitch any series of overlapping pictures.")
763 (license license:gpl2+)))
764
13d9794d
LF
765(define-public rawtherapee
766 (package
767 (name "rawtherapee")
0dc1f651 768 (version "5.8")
13d9794d
LF
769 (source (origin
770 (method url-fetch)
771 (uri (string-append "http://rawtherapee.com/shared/source/"
772 "rawtherapee-" version ".tar.xz"))
773 (sha256
774 (base32
0dc1f651 775 "0lq8qi7g0a28h3rab7bk5bbbd4gvfma42bvlz1dfn8p9mah2h19n"))))
13d9794d
LF
776 (build-system cmake-build-system)
777 (arguments
e48c3dd9 778 '(#:tests? #f ; no test suite
3def739d 779 #:build-type "release"
13d9794d
LF
780 #:configure-flags
781 (list (string-append "-DLENSFUNDBDIR="
782 (assoc-ref %build-inputs "lensfun")
783 "/share/lensfun")
e48c3dd9
TGR
784 ;; Don't optimize the build for the host machine. See the file
785 ;; 'ProcessorTargets.cmake' in the source distribution for more
786 ;; information.
13d9794d 787 "-DPROC_TARGET_NUMBER=1"
e48c3dd9
TGR
788 ;; These flags are recommended by upstream for distributed packages.
789 ;; See the file 'RELEASE_NOTES.txt' in the source distribution.
13d9794d
LF
790 "-O3"
791 "-DCACHE_NAME_SUFFIX=\"\"")))
792 (native-inputs
793 `(("pkg-config" ,pkg-config)))
794 (inputs
795 `(("expat" ,expat)
796 ("fftw" ,fftwf)
797 ("glib" ,glib)
798 ("glibmm" ,glibmm)
799 ("gtk+" ,gtk+)
800 ("gtkmm" ,gtkmm)
801 ("lcms" ,lcms)
802 ("lensfun" ,lensfun)
803 ("libcanberra" ,libcanberra)
804 ("libiptcdata" ,libiptcdata)
4bd428a7 805 ("libjpeg" ,libjpeg-turbo)
13d9794d 806 ("libpng" ,libpng)
e48c3dd9 807 ("librsvg" ,librsvg)
13d9794d
LF
808 ("libsigc++" ,libsigc++)
809 ("libtiff" ,libtiff)
810 ("zlib" ,zlib)))
811 (home-page "http://rawtherapee.com")
812 (synopsis "Raw image developing and processing")
813 (description "RawTherapee is a raw image processing suite. It comprises a
814subset of image editing operations specifically aimed at non-destructive raw
815photo post-production and is primarily focused on improving a photographer's
816workflow by facilitating the handling of large numbers of images. Most raw
817formats are supported, including Pentax Pixel Shift, Canon Dual-Pixel, and those
818from Foveon and X-Trans sensors.")
819 (license license:gpl3+)))