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