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