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