gnu: skalibs: Build reproducibly.
[jackhill/guix/guix.git] / gnu / packages / photo.scm
CommitLineData
9208d0c1 1;;; GNU Guix --- Functional package management for GNU
3246cc91 2;;; Copyright © 2014, 2015 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>
4dbef239 5;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
c49840f8 6;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
9208d0c1
LC
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages photo)
0e6412c1 24 #:use-module (guix build-system cmake)
9208d0c1 25 #:use-module (guix build-system gnu)
b138ec94 26 #:use-module (guix build-system perl)
f0644195
AE
27 #:use-module (guix download)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
8957241d 30 #:use-module (guix utils)
1d093724 31 #:use-module (gnu packages algebra)
9208d0c1 32 #:use-module (gnu packages autotools)
f0644195 33 #:use-module (gnu packages base)
8957241d 34 #:use-module (gnu packages boost)
0e6412c1 35 #:use-module (gnu packages compression)
91a9c65c
RJ
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages databases)
1d093724 38 #:use-module (gnu packages gettext)
8957241d
AE
39 #:use-module (gnu packages ghostscript)
40 #:use-module (gnu packages gl)
91a9c65c 41 #:use-module (gnu packages gnome)
c49840f8 42 #:use-module (gnu packages glib)
8957241d 43 #:use-module (gnu packages graphics)
91a9c65c 44 #:use-module (gnu packages gtk)
0e6412c1 45 #:use-module (gnu packages image)
8957241d 46 #:use-module (gnu packages imagemagick)
f0644195 47 #:use-module (gnu packages libusb)
91a9c65c 48 #:use-module (gnu packages llvm)
d16479c5 49 #:use-module (gnu packages man)
8957241d 50 #:use-module (gnu packages maths)
b138ec94 51 #:use-module (gnu packages perl)
f0644195
AE
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages popt)
91a9c65c 54 #:use-module (gnu packages python)
8957241d 55 #:use-module (gnu packages readline)
8f9ac901 56 #:use-module (gnu packages tex)
8957241d 57 #:use-module (gnu packages web)
1d093724 58 #:use-module (gnu packages wxwidgets)
8957241d 59 #:use-module (gnu packages xfig)
1d093724 60 #:use-module (gnu packages xorg)
4dbef239
EF
61 #:use-module (gnu packages xml)
62 #:use-module (srfi srfi-1)
63 #:use-module (srfi srfi-26))
9208d0c1 64
d9cef612
RW
65(define-public libraw
66 (package
67 (name "libraw")
b280e67c 68 (version "0.17.2")
d9cef612
RW
69 (source (origin
70 (method url-fetch)
71 (uri (string-append "http://www.libraw.org/data/LibRaw-"
72 version ".tar.gz"))
73 (sha256
74 (base32
b280e67c 75 "0p6imxpsfn82i0i9w27fnzq6q6gwzvb9f7sygqqakv36fqnc9c4j"))))
d9cef612
RW
76 (build-system gnu-build-system)
77 (home-page "http://www.libraw.org")
78 (synopsis "Raw image decoder")
79 (description
80 "LibRaw is a library for reading RAW files obtained from digital photo
81cameras (CRW/CR2, NEF, RAF, DNG, and others).")
341f4965 82 (license license:lgpl2.1+)))
d9cef612 83
9208d0c1
LC
84(define-public libexif
85 (package
86 (name "libexif")
87 (version "0.6.21")
88 (source (origin
89 (method url-fetch)
de67e922
LF
90 (uri (string-append "mirror://sourceforge/libexif/libexif/"
91 version "/libexif-" version ".tar.bz2"))
9208d0c1
LC
92 (sha256
93 (base32
94 "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n"))))
95 (build-system gnu-build-system)
96 (home-page "http://libexif.sourceforge.net/")
97 (synopsis "Read and manipulate EXIF data in digital photographs")
98 (description
99 "The libexif C library allows applications to read, edit, and save EXIF
100data as produced by digital cameras.")
341f4965 101 (license license:lgpl2.1+)))
9208d0c1
LC
102
103(define-public libgphoto2
104 (package
105 (name "libgphoto2")
69874f5f 106 (version "2.5.11")
9208d0c1
LC
107 (source (origin
108 (method url-fetch)
de67e922
LF
109 (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
110 version "/libgphoto2-" version ".tar.bz2"))
9208d0c1
LC
111 (sha256
112 (base32
69874f5f 113 "1ap070zz6l4kn2mbyxb1yj4x5ar8hpdbmf2pvjxgnly1ss319dkz"))))
9208d0c1
LC
114 (build-system gnu-build-system)
115 (native-inputs `(("pkg-config" ,pkg-config)))
116 (inputs
7e49a851 117 `(("libjpeg-turbo" ,libjpeg-turbo)
3246cc91 118 ("libltdl" ,libltdl)
d32f4800
TGR
119 ("libusb" ,libusb)
120 ("libxml2" ,libxml2)))
9208d0c1
LC
121 (propagated-inputs
122 `(;; The .pc refers to libexif.
123 ("libexif" ,libexif)))
124 (home-page "http://www.gphoto.org/proj/libgphoto2/")
125 (synopsis "Accessing digital cameras")
126 (description
127 "This is the library backend for gphoto2. It contains the code for PTP,
128MTP, and other vendor specific protocols for controlling and transferring data
129from digital cameras.")
130
131 ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+.
341f4965 132 (license license:lgpl2.1+)))
9208d0c1
LC
133
134(define-public gphoto2
135 (package
136 (name "gphoto2")
f6c44a3f 137 (version "2.5.11")
9208d0c1
LC
138 (source (origin
139 (method url-fetch)
de67e922
LF
140 (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version
141 "/gphoto2-" version ".tar.bz2"))
9208d0c1
LC
142 (sha256
143 (base32
f6c44a3f 144 "1sgr6rsvzzagcwhc8fxbnvz3k02wr2hab0vrbvcb04k5l3b48a1r"))))
9208d0c1
LC
145 (build-system gnu-build-system)
146 (native-inputs
147 `(("pkg-config" ,pkg-config)))
148 (inputs
149 `(("readline" ,readline)
7e49a851 150 ("libjpeg-turbo" ,libjpeg-turbo)
9208d0c1
LC
151 ("popt" ,popt)
152 ("libexif" ,libexif)
153 ("libgphoto2" ,libgphoto2)))
154 (arguments
155 '(#:phases (alist-cons-before
156 'check 'pre-check
157 (lambda* (#:key inputs #:allow-other-keys)
158 (substitute* (find-files "tests/data" "\\.param$")
159 (("/usr/bin/env")
160 (which "env"))))
161 %standard-phases)
162
163 ;; FIXME: There are 2 test failures, most likely related to the build
164 ;; environment.
165 #:tests? #f))
166
167 (home-page "http://www.gphoto.org/")
168 (synopsis "Command-line tools to access digital cameras")
169 (description
170 "Gphoto2 is a set of command line utilities for manipulating a large
171number of different digital cameras. Through libgphoto2, it supports PTP,
172MTP, and much more.")
173
174 ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+.
341f4965 175 (license license:gpl2+)))
b138ec94
LC
176
177(define-public perl-image-exiftool
178 (package
179 (name "perl-image-exiftool")
33717a17 180 (version "10.55")
b138ec94
LC
181 (source (origin
182 (method url-fetch)
183 (uri (string-append
184 "mirror://cpan/authors/id/E/EX/EXIFTOOL/Image-ExifTool-"
185 version ".tar.gz"))
186 (sha256
187 (base32
33717a17 188 "0z8zwjjfvyllnhsafhddbybywpgqv0pl1dbn1g034cs27yj836q2"))))
b138ec94
LC
189 (build-system perl-build-system)
190 (arguments
33717a17
LF
191 '(#:phases
192 (modify-phases %standard-phases
193 (add-after 'install 'post-install
194 (lambda* (#:key outputs #:allow-other-keys)
195 ;; Make sure the 'exiftool' commands finds the library.
196 ;; XXX: Shouldn't it be handled by PERL-BUILD-SYSTEM?
197 (let* ((out (assoc-ref outputs "out"))
198 (pm (find-files out "^ExifTool\\.pm$"))
199 (lib (dirname (dirname (car pm)))))
200 (wrap-program (string-append out "/bin/exiftool")
201 `("PERL5LIB" prefix (,lib)))))))))
67abcc05 202 (home-page "http://search.cpan.org/dist/Image-ExifTool")
ae6591ef
LF
203 (synopsis "Program and Perl library to manipulate EXIF and other metadata")
204 (description "This package provides the @code{exiftool} command and the
205@code{Image::ExifTool} Perl library to manipulate EXIF tags of digital images
206and a wide variety of other metadata.")
2f3108ad 207 (license license:perl-license)))
0e6412c1
AE
208
209(define-public libpano13
210 (package
211 (name "libpano13")
212 (version "2.9.19")
213 (source (origin
214 (method url-fetch)
215 (uri (string-append "mirror://sourceforge/panotools/libpano13/"
216 "libpano13-" version "/"
217 "libpano13-" version ".tar.gz"))
218 (sha256
219 (base32
220 "1a4m3plmfcrrplqs9zfzhc5apibn10m5sajpizm1sd3q74w5fwq3"))))
221 (build-system cmake-build-system)
222 (inputs
223 `(("libjpeg" ,libjpeg)
224 ("libpng" ,libpng)
225 ("libtiff" ,libtiff)
226 ("zlib" ,zlib)))
227 (home-page "http://panotools.sourceforge.net/")
228 (synopsis "Library for panoramic images")
229 (description
230 "The libpano13 package contains the backend library written by the
231Panorama Tools project for building panoramic images from a set of
232overlapping images, as well as some command line tools.")
233 (license license:gpl2+)))
8957241d
AE
234
235(define-public enblend-enfuse
236 (package
237 (name "enblend-enfuse")
d16479c5 238 (version "4.2")
8957241d
AE
239 (source (origin
240 (method url-fetch)
241 (uri (string-append "mirror://sourceforge/enblend/"
242 name "/"
243 name "-" (version-major+minor version) "/"
244 name "-" version ".tar.gz"))
245 (sha256
246 (base32
d16479c5 247 "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7"))))
8957241d
AE
248 (build-system gnu-build-system)
249 (native-inputs
250 `(("pkg-config" ,pkg-config)
251 ("perl" ,perl)
252 ("perl-timedate" ,perl-timedate)
253 ;; for building the documentation
254 ("gnuplot" ,gnuplot)
d16479c5 255 ("help2man" ,help2man)
8957241d
AE
256 ("imagemagick" ,imagemagick)
257 ("libxml2" ,libxml2)
84de27c8 258 ("texlive-minimal" ,texlive-tiny)
8957241d
AE
259 ("tidy" ,tidy)
260 ("transfig" ,transfig)))
261 (inputs
262 `(("boost" ,boost)
263 ("gsl" ,gsl)
264 ("lcms" ,lcms)
265 ("libjpeg" ,libjpeg)
266 ("libpng" ,libpng)
267 ("libtiff" ,libtiff)
268 ("openexr" ,openexr)
269 ("vigra" ,vigra)
270 ("zlib" ,zlib)))
271 (arguments
272 `(#:configure-flags `("--enable-openmp")))
273 (home-page "http://enblend.sourceforge.net/")
274 (synopsis "Tools for combining and blending images")
275 (description
276 "Enblend blends away the seams in a panoramic image mosaic using a
277multi-resolution spline. Enfuse merges different exposures of the same
278scene to produce an image that looks much like a tone-mapped image.")
279 (license license:gpl2+)))
c49840f8
RJ
280
281(define-public lensfun
282 (package
283 (name "lensfun")
284 (version "0.3.2")
285 (source (origin
286 (method url-fetch)
287 (uri (string-append
288 "mirror://sourceforge/lensfun/"
289 version "/lensfun-" version ".tar.gz"))
290 (sha256
291 (base32
292 "0cfk8jjhs9nbfjfdy98plrj9ayi59aph0nx6ppslgjhlcvacm2xf"))))
293 (build-system cmake-build-system)
4dbef239
EF
294 (arguments
295 `(,@(if (any (cute string-prefix? <> (or (%current-system)
296 (%current-target-system)))
297 '("x86_64" "i686"))
298 ;; SSE and SSE2 are supported only on Intel processors.
299 '()
300 '(#:configure-flags '("-DBUILD_FOR_SSE=OFF" "-DBUILD_FOR_SSE2=OFF")))
301 #:tests? #f)) ; There are no tests to run.
c49840f8
RJ
302 (native-inputs
303 `(("pkg-config" ,pkg-config)))
304 (inputs
305 `(("glib" ,glib)))
306 (home-page "https://sourceforge.net/projects/lensfun/")
307 (synopsis "Library to correct optical lens defects with a lens database")
308 (description "Digital photographs are not ideal. Of course, the better is
309your camera, the better the results will be, but in any case if you look
310carefully at shots taken even by the most expensive cameras equipped with the
311most expensive lenses you will see various artifacts. It is very hard to make
312ideal cameras, because there are a lot of factors that affect the final image
313quality, and at some point camera and lens designers have to trade one factor
314for another to achieve the optimal image quality, within the given design
315restrictions and budget. But we all want ideal shots, don't we? So that's
316what's Lensfun is all about: rectifying the defects introduced by your
317photographic equipment.")
318 ;; The libraries are licensed under the LGPL3, the programs are
319 ;; licensed GPL3, and the database is license CC-BY-SA 3.0. See the
320 ;; README.md file for this clarification.
321 (license (list license:lgpl3 license:gpl3 license:cc-by-sa3.0))))
91a9c65c
RJ
322
323(define-public darktable
324 (package
325 (name "darktable")
e4073104 326 (version "2.2.5")
91a9c65c
RJ
327 (source (origin
328 (method url-fetch)
329 (uri (string-append
330 "https://github.com/darktable-org/darktable/releases/"
331 "download/release-"
332 version "/darktable-" version ".tar.xz"))
333 (sha256
334 (base32
e4073104 335 "10gjzd4irxhladh4jyss9kgp627k8vgx2divipsb33pp6cms80z3"))))
91a9c65c
RJ
336 (build-system cmake-build-system)
337 (arguments
338 `(#:tests? #f ; There are no tests.
339 #:configure-flags '("-DCMAKE_INSTALL_LIBDIR=lib")
340 #:make-flags
341 (list
342 (string-append "CPATH=" (assoc-ref %build-inputs "ilmbase")
343 "/include/OpenEXR:" (or (getenv "CPATH") "")))
344 #:phases
345 (modify-phases %standard-phases
346 (add-before 'configure 'set-ldflags
347 (lambda* (#:key outputs #:allow-other-keys)
348 (setenv "LDFLAGS"
349 (string-append
350 "-Wl,-rpath="
351 (assoc-ref outputs "out") "/lib/darktable"))
352 #t)))))
353 (native-inputs
354 `(("llvm" ,llvm-3.9.1)
355 ("clang" ,clang-3.9.1)))
356 (inputs
357 `(("libxslt" ,libxslt)
358 ("libxml2" ,libxml2)
359 ("pugixml" ,pugixml)
360 ("gtk+" ,gtk+)
361 ("sqlite" ,sqlite)
362 ("libjpeg" ,libjpeg)
363 ("libpng" ,libpng)
364 ("cairo" ,cairo)
365 ("lcms" ,lcms)
366 ("exiv2" ,exiv2)
367 ("libtiff" ,libtiff)
368 ("curl" ,curl)
369 ("libgphoto2" ,libgphoto2)
370 ("dbus-glib" ,dbus-glib)
371 ("openexr" ,openexr)
372 ("ilmbase" ,ilmbase)
373 ("libsoup" ,libsoup)
374 ("python-jsonschema" ,python-jsonschema)
375 ("intltool" ,intltool)
376 ("perl" ,perl)
377 ("pkg-config" ,pkg-config)
378 ("libwebp" ,libwebp)
379 ("lensfun" ,lensfun)
380 ("librsvg" ,librsvg)
381 ("json-glib" ,json-glib)
382 ("freeimage" ,freeimage)))
383 (home-page "https://www.darktable.org")
384 (synopsis "Virtual lighttable and darkroom for photographers")
385 (description "Darktable is a photography workflow application and RAW
386developer. It manages your digital negatives in a database, lets you view
387them through a zoomable lighttable and enables you to develop raw images
388and enhance them.")
03b055a1
EF
389 ;; see src/is_supported_platform.h for supported platforms
390 (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
91a9c65c 391 (license license:gpl3+)))
1d093724
AE
392
393(define-public hugin
394 (package
395 (name "hugin")
396 (version "2016.2.0")
397 (source (origin
398 (method url-fetch)
399 (uri (string-append "mirror://sourceforge/hugin/hugin/hugin-"
400 (version-major+minor version)
401 "/hugin-" version ".tar.bz2"))
402 (sha256
403 (base32
404 "058zd63vx29yrx2pphbbll7kzcxkai22q26lpw13rn4lvp41pasl"))))
405 (build-system cmake-build-system)
406 (native-inputs
407 `(("gettext" ,gnu-gettext)
408 ("pkg-config" ,pkg-config)))
409 (inputs
410 `(("boost" ,boost)
411 ("enblend-enfuse" ,enblend-enfuse)
412 ("exiv2" ,exiv2)
413 ("fftw" ,fftw)
414 ("flann" ,flann)
415 ("freeglut" ,freeglut)
416 ("glew" ,glew)
417 ("lcms" ,lcms)
418 ("libjpeg" ,libjpeg)
419 ("libpano13" ,libpano13)
420 ("libpng" ,libpng)
421 ("libtiff" ,libtiff)
422 ("libxi" ,libxi)
423 ("libxmu" ,libxmu)
424 ("mesa" ,mesa)
425 ("openexr" ,openexr)
426 ("sqlite" ,sqlite)
427 ("vigra" ,vigra)
428 ("wxwidgets" ,wxwidgets)
429 ("zlib" ,zlib)))
430 (arguments
431 `(#:tests? #f ; no check target
432 #:configure-flags
433 (list
434 ;; The header files of ilmbase (propagated by openexr) are not found
435 ;; when included by the header files of openexr, and an explicit
436 ;; flag needs to be set.
437 (string-append "-DCMAKE_CXX_FLAGS=-I"
438 (assoc-ref %build-inputs "ilmbase")
439 "/include/OpenEXR")
440 ;; Disable installation of the Python scripting interface.
441 ;; It would require the additional inputs python and swig.
442 ;; Installation would need to be tweaked, as it tries to install
443 ;; into the python directory.
444 "-DBUILD_HSI=OFF")
445 #:phases
446 (modify-phases %standard-phases
447 (add-before 'configure 'substitute
448 (lambda _
449 (substitute* "src/hugin1/base_wx/StitchingExecutor.cpp"
450 (("wxT\\(\"enblend\"\\)")
451 (string-append "wxT(\"" (which "enblend") "\")"))
452 (("wxT\\(\"enfuse\"\\)")
453 (string-append "wxT(\"" (which "enfuse") "\")")))
454 #t)))))
455 (home-page "http://hugin.sourceforge.net/")
456 (synopsis "Panorama photo stitcher")
457 (description
458 "Hugin is an easy to use panoramic imaging toolchain with a graphical
459user interface. It can be used to assemble a mosaic of photographs into
460a complete panorama and stitch any series of overlapping pictures.")
461 (license license:gpl2+)))
462