1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 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 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
8 ;;; This file is part of GNU Guix.
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.
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.
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/>.
23 (define-module (gnu packages photo)
24 #:use-module (guix build-system cmake)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system perl)
27 #:use-module (guix download)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix utils)
31 #:use-module (gnu packages algebra)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages base)
34 #:use-module (gnu packages boost)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages databases)
38 #:use-module (gnu packages gettext)
39 #:use-module (gnu packages ghostscript)
40 #:use-module (gnu packages gl)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages graphics)
44 #:use-module (gnu packages gtk)
45 #:use-module (gnu packages image)
46 #:use-module (gnu packages imagemagick)
47 #:use-module (gnu packages libusb)
48 #:use-module (gnu packages llvm)
49 #:use-module (gnu packages man)
50 #:use-module (gnu packages maths)
51 #:use-module (gnu packages perl)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages popt)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages readline)
56 #:use-module (gnu packages tex)
57 #:use-module (gnu packages web)
58 #:use-module (gnu packages wxwidgets)
59 #:use-module (gnu packages xfig)
60 #:use-module (gnu packages xorg)
61 #:use-module (gnu packages xml)
62 #:use-module (srfi srfi-1)
63 #:use-module (srfi srfi-26))
71 (uri (string-append "https://www.libraw.org/data/LibRaw-"
75 "15qc7g5y1m6yi6w9ia79cd6yk0836z7lqw5yigl62n768qdr7x7a"))))
76 (build-system gnu-build-system)
77 (home-page "https://www.libraw.org")
78 (synopsis "Raw image decoder")
80 "LibRaw is a library for reading RAW files obtained from digital photo
81 cameras (CRW/CR2, NEF, RAF, DNG, and others).")
82 (license license:lgpl2.1+)))
84 (define-public libexif
90 (uri (string-append "mirror://sourceforge/libexif/libexif/"
91 version "/libexif-" version ".tar.bz2"))
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")
99 "The libexif C library allows applications to read, edit, and save EXIF
100 data as produced by digital cameras.")
101 (license license:lgpl2.1+)))
103 (define-public libgphoto2
109 (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
110 version "/libgphoto2-" version ".tar.bz2"))
113 "1ap070zz6l4kn2mbyxb1yj4x5ar8hpdbmf2pvjxgnly1ss319dkz"))))
114 (build-system gnu-build-system)
115 (native-inputs `(("pkg-config" ,pkg-config)))
117 `(("libjpeg-turbo" ,libjpeg-turbo)
120 ("libxml2" ,libxml2)))
122 `(;; The .pc refers to libexif.
123 ("libexif" ,libexif)))
124 (home-page "http://www.gphoto.org/proj/libgphoto2/")
125 (synopsis "Accessing digital cameras")
127 "This is the library backend for gphoto2. It contains the code for PTP,
128 MTP, and other vendor specific protocols for controlling and transferring data
129 from digital cameras.")
131 ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+.
132 (license license:lgpl2.1+)))
134 (define-public gphoto2
140 (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version
141 "/gphoto2-" version ".tar.bz2"))
144 "1sgr6rsvzzagcwhc8fxbnvz3k02wr2hab0vrbvcb04k5l3b48a1r"))))
145 (build-system gnu-build-system)
147 `(("pkg-config" ,pkg-config)))
149 `(("readline" ,readline)
150 ("libjpeg-turbo" ,libjpeg-turbo)
153 ("libgphoto2" ,libgphoto2)))
156 (modify-phases %standard-phases
157 (add-before 'check 'pre-check
158 (lambda* (#:key inputs #:allow-other-keys)
159 (substitute* (find-files "tests/data" "\\.param$")
164 ;; FIXME: There are 2 test failures, most likely related to the build
168 (home-page "http://www.gphoto.org/")
169 (synopsis "Command-line tools to access digital cameras")
171 "Gphoto2 is a set of command line utilities for manipulating a large
172 number of different digital cameras. Through libgphoto2, it supports PTP,
173 MTP, and much more.")
175 ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+.
176 (license license:gpl2+)))
178 (define-public perl-image-exiftool
180 (name "perl-image-exiftool")
185 "mirror://cpan/authors/id/E/EX/EXIFTOOL/Image-ExifTool-"
189 "0z8zwjjfvyllnhsafhddbybywpgqv0pl1dbn1g034cs27yj836q2"))))
190 (build-system perl-build-system)
193 (modify-phases %standard-phases
194 (add-after 'install 'post-install
195 (lambda* (#:key outputs #:allow-other-keys)
196 ;; Make sure the 'exiftool' commands finds the library.
197 ;; XXX: Shouldn't it be handled by PERL-BUILD-SYSTEM?
198 (let* ((out (assoc-ref outputs "out"))
199 (pm (find-files out "^ExifTool\\.pm$"))
200 (lib (dirname (dirname (car pm)))))
201 (wrap-program (string-append out "/bin/exiftool")
202 `("PERL5LIB" prefix (,lib)))))))))
203 (home-page "http://search.cpan.org/dist/Image-ExifTool")
204 (synopsis "Program and Perl library to manipulate EXIF and other metadata")
205 (description "This package provides the @code{exiftool} command and the
206 @code{Image::ExifTool} Perl library to manipulate EXIF tags of digital images
207 and a wide variety of other metadata.")
208 (license license:perl-license)))
210 (define-public libpano13
216 (uri (string-append "mirror://sourceforge/panotools/libpano13/"
217 "libpano13-" version "/"
218 "libpano13-" version ".tar.gz"))
221 "1a4m3plmfcrrplqs9zfzhc5apibn10m5sajpizm1sd3q74w5fwq3"))))
222 (build-system cmake-build-system)
224 `(("libjpeg" ,libjpeg)
228 (home-page "http://panotools.sourceforge.net/")
229 (synopsis "Library for panoramic images")
231 "The libpano13 package contains the backend library written by the
232 Panorama Tools project for building panoramic images from a set of
233 overlapping images, as well as some command line tools.")
234 (license license:gpl2+)))
236 (define-public enblend-enfuse
238 (name "enblend-enfuse")
242 (uri (string-append "mirror://sourceforge/enblend/"
244 name "-" (version-major+minor version) "/"
245 name "-" version ".tar.gz"))
248 "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7"))))
249 (build-system gnu-build-system)
251 `(("pkg-config" ,pkg-config)
253 ("perl-timedate" ,perl-timedate)
254 ;; for building the documentation
256 ("help2man" ,help2man)
257 ("imagemagick" ,imagemagick)
259 ("texlive-minimal" ,texlive-tiny)
261 ("transfig" ,transfig)))
273 `(#:configure-flags `("--enable-openmp")))
274 (home-page "http://enblend.sourceforge.net/")
275 (synopsis "Tools for combining and blending images")
277 "Enblend blends away the seams in a panoramic image mosaic using a
278 multi-resolution spline. Enfuse merges different exposures of the same
279 scene to produce an image that looks much like a tone-mapped image.")
280 (license license:gpl2+)))
282 (define-public lensfun
289 "mirror://sourceforge/lensfun/"
290 version "/lensfun-" version ".tar.gz"))
293 "0cfk8jjhs9nbfjfdy98plrj9ayi59aph0nx6ppslgjhlcvacm2xf"))))
294 (build-system cmake-build-system)
296 `(,@(if (any (cute string-prefix? <> (or (%current-system)
297 (%current-target-system)))
299 ;; SSE and SSE2 are supported only on Intel processors.
301 '(#:configure-flags '("-DBUILD_FOR_SSE=OFF" "-DBUILD_FOR_SSE2=OFF")))
302 #:tests? #f)) ; There are no tests to run.
304 `(("pkg-config" ,pkg-config)))
307 (home-page "https://sourceforge.net/projects/lensfun/")
308 (synopsis "Library to correct optical lens defects with a lens database")
309 (description "Digital photographs are not ideal. Of course, the better is
310 your camera, the better the results will be, but in any case if you look
311 carefully at shots taken even by the most expensive cameras equipped with the
312 most expensive lenses you will see various artifacts. It is very hard to make
313 ideal cameras, because there are a lot of factors that affect the final image
314 quality, and at some point camera and lens designers have to trade one factor
315 for another to achieve the optimal image quality, within the given design
316 restrictions and budget. But we all want ideal shots, don't we? So that's
317 what's Lensfun is all about: rectifying the defects introduced by your
318 photographic equipment.")
319 ;; The libraries are licensed under the LGPL3, the programs are
320 ;; licensed GPL3, and the database is license CC-BY-SA 3.0. See the
321 ;; README.md file for this clarification.
322 (license (list license:lgpl3 license:gpl3 license:cc-by-sa3.0))))
324 (define-public darktable
331 "https://github.com/darktable-org/darktable/releases/"
333 version "/darktable-" version ".tar.xz"))
336 "10gjzd4irxhladh4jyss9kgp627k8vgx2divipsb33pp6cms80z3"))))
337 (build-system cmake-build-system)
339 `(#:tests? #f ; There are no tests.
340 #:configure-flags '("-DCMAKE_INSTALL_LIBDIR=lib")
343 (string-append "CPATH=" (assoc-ref %build-inputs "ilmbase")
344 "/include/OpenEXR:" (or (getenv "CPATH") "")))
346 (modify-phases %standard-phases
347 (add-before 'configure 'set-ldflags
348 (lambda* (#:key outputs #:allow-other-keys)
352 (assoc-ref outputs "out") "/lib/darktable"))
355 `(("llvm" ,llvm-3.9.1)
356 ("clang" ,clang-3.9.1)))
358 `(("libxslt" ,libxslt)
370 ("libgphoto2" ,libgphoto2)
371 ("dbus-glib" ,dbus-glib)
375 ("python-jsonschema" ,python-jsonschema)
376 ("intltool" ,intltool)
378 ("pkg-config" ,pkg-config)
382 ("json-glib" ,json-glib)
383 ("freeimage" ,freeimage)))
384 (home-page "https://www.darktable.org")
385 (synopsis "Virtual lighttable and darkroom for photographers")
386 (description "Darktable is a photography workflow application and RAW
387 developer. It manages your digital negatives in a database, lets you view
388 them through a zoomable lighttable and enables you to develop raw images
390 ;; see src/is_supported_platform.h for supported platforms
391 (supported-systems '("i686-linux" "x86_64-linux" "aarch64-linux"))
392 (license license:gpl3+)))
400 (uri (string-append "mirror://sourceforge/hugin/hugin/hugin-"
401 (version-major+minor version)
402 "/hugin-" version ".tar.bz2"))
405 "058zd63vx29yrx2pphbbll7kzcxkai22q26lpw13rn4lvp41pasl"))))
406 (build-system cmake-build-system)
408 `(("gettext" ,gnu-gettext)
409 ("pkg-config" ,pkg-config)))
412 ("enblend-enfuse" ,enblend-enfuse)
416 ("freeglut" ,freeglut)
420 ("libpano13" ,libpano13)
429 ("wxwidgets" ,wxwidgets)
432 `(#:tests? #f ; no check target
435 ;; The header files of ilmbase (propagated by openexr) are not found
436 ;; when included by the header files of openexr, and an explicit
437 ;; flag needs to be set.
438 (string-append "-DCMAKE_CXX_FLAGS=-I"
439 (assoc-ref %build-inputs "ilmbase")
441 ;; Disable installation of the Python scripting interface.
442 ;; It would require the additional inputs python and swig.
443 ;; Installation would need to be tweaked, as it tries to install
444 ;; into the python directory.
447 (modify-phases %standard-phases
448 (add-before 'configure 'substitute
450 (substitute* "src/hugin1/base_wx/StitchingExecutor.cpp"
451 (("wxT\\(\"enblend\"\\)")
452 (string-append "wxT(\"" (which "enblend") "\")"))
453 (("wxT\\(\"enfuse\"\\)")
454 (string-append "wxT(\"" (which "enfuse") "\")")))
456 (home-page "http://hugin.sourceforge.net/")
457 (synopsis "Panorama photo stitcher")
459 "Hugin is an easy to use panoramic imaging toolchain with a graphical
460 user interface. It can be used to assemble a mosaic of photographs into
461 a complete panorama and stitch any series of overlapping pictures.")
462 (license license:gpl2+)))