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 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages photo)
23 #:use-module (guix build-system cmake)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix build-system perl)
26 #:use-module (guix download)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix utils)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages base)
32 #:use-module (gnu packages boost)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages ghostscript)
35 #:use-module (gnu packages gl)
36 #:use-module (gnu packages graphics)
37 #:use-module (gnu packages image)
38 #:use-module (gnu packages imagemagick)
39 #:use-module (gnu packages libusb)
40 #:use-module (gnu packages man)
41 #:use-module (gnu packages maths)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages popt)
45 #:use-module (gnu packages readline)
46 #:use-module (gnu packages tex)
47 #:use-module (gnu packages web)
48 #:use-module (gnu packages xfig)
49 #:use-module (gnu packages xml))
57 (uri (string-append "http://www.libraw.org/data/LibRaw-"
61 "0p6imxpsfn82i0i9w27fnzq6q6gwzvb9f7sygqqakv36fqnc9c4j"))))
62 (build-system gnu-build-system)
63 (home-page "http://www.libraw.org")
64 (synopsis "Raw image decoder")
66 "LibRaw is a library for reading RAW files obtained from digital photo
67 cameras (CRW/CR2, NEF, RAF, DNG, and others).")
68 (license license:lgpl2.1+)))
70 (define-public libexif
76 (uri (string-append "mirror://sourceforge/libexif/libexif/"
77 version "/libexif-" version ".tar.bz2"))
80 "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n"))))
81 (build-system gnu-build-system)
82 (home-page "http://libexif.sourceforge.net/")
83 (synopsis "Read and manipulate EXIF data in digital photographs")
85 "The libexif C library allows applications to read, edit, and save EXIF
86 data as produced by digital cameras.")
87 (license license:lgpl2.1+)))
89 (define-public libgphoto2
95 (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
96 version "/libgphoto2-" version ".tar.bz2"))
99 "0f1818l1vs5fbmrihzyv3qasddbqi3r01jik5crrxddwalsi2bd3"))))
100 (build-system gnu-build-system)
101 (native-inputs `(("pkg-config" ,pkg-config)))
103 `(;; ("libjpeg-turbo" ,libjpeg-turbo)
107 `(;; The .pc refers to libexif.
108 ("libexif" ,libexif)))
109 (home-page "http://www.gphoto.org/proj/libgphoto2/")
110 (synopsis "Accessing digital cameras")
112 "This is the library backend for gphoto2. It contains the code for PTP,
113 MTP, and other vendor specific protocols for controlling and transferring data
114 from digital cameras.")
116 ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+.
117 (license license:lgpl2.1+)))
119 (define-public gphoto2
125 (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version
126 "/gphoto2-" version ".tar.bz2"))
129 "16c8k1cxfypg7v5h8xi87grclw7a5ayaamn548ys3zkj727r5fcf"))))
130 (build-system gnu-build-system)
132 `(("pkg-config" ,pkg-config)))
134 `(("readline" ,readline)
135 ;; ("libjpeg-turbo" ,libjpeg-turbo)
138 ("libgphoto2" ,libgphoto2)))
140 '(#:phases (alist-cons-before
142 (lambda* (#:key inputs #:allow-other-keys)
143 (substitute* (find-files "tests/data" "\\.param$")
148 ;; FIXME: There are 2 test failures, most likely related to the build
152 (home-page "http://www.gphoto.org/")
153 (synopsis "Command-line tools to access digital cameras")
155 "Gphoto2 is a set of command line utilities for manipulating a large
156 number of different digital cameras. Through libgphoto2, it supports PTP,
157 MTP, and much more.")
159 ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+.
160 (license license:gpl2+)))
162 (define-public perl-image-exiftool
164 (name "perl-image-exiftool")
169 "mirror://cpan/authors/id/E/EX/EXIFTOOL/Image-ExifTool-"
173 "0akdnxvb23ibcwa63ncibaj5m5k56cb34x8gy90z9lqcjl0f4sph"))))
174 (build-system perl-build-system)
176 '(#:phases (alist-cons-after
177 'install 'post-install
178 (lambda* (#:key outputs #:allow-other-keys)
179 ;; Make sure the 'exiftool' commands finds the library.
180 ;; XXX: Shouldn't it be handled by PERL-BUILD-SYSTEM?
181 (let* ((out (assoc-ref outputs "out"))
182 (pm (find-files out "^ExifTool\\.pm$"))
183 (lib (dirname (dirname (car pm)))))
184 (wrap-program (string-append out "/bin/exiftool")
185 `("PERL5LIB" prefix (,lib)))))
187 (home-page "http://search.cpan.org/dist/Image-ExifTool")
188 (synopsis "Program and Perl library to manipulate EXIF tags")
190 "This package provides the 'exiftool' command and the 'Image::ExifTool'
191 Perl library to manipulate EXIF tags of digital images.")
192 (license (package-license perl))))
194 (define-public libpano13
200 (uri (string-append "mirror://sourceforge/panotools/libpano13/"
201 "libpano13-" version "/"
202 "libpano13-" version ".tar.gz"))
205 "1a4m3plmfcrrplqs9zfzhc5apibn10m5sajpizm1sd3q74w5fwq3"))))
206 (build-system cmake-build-system)
208 `(("libjpeg" ,libjpeg)
212 (home-page "http://panotools.sourceforge.net/")
213 (synopsis "Library for panoramic images")
215 "The libpano13 package contains the backend library written by the
216 Panorama Tools project for building panoramic images from a set of
217 overlapping images, as well as some command line tools.")
218 (license license:gpl2+)))
220 (define-public enblend-enfuse
222 (name "enblend-enfuse")
226 (uri (string-append "mirror://sourceforge/enblend/"
228 name "-" (version-major+minor version) "/"
229 name "-" version ".tar.gz"))
232 "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7"))))
233 (build-system gnu-build-system)
235 `(("pkg-config" ,pkg-config)
237 ("perl-timedate" ,perl-timedate)
238 ;; for building the documentation
240 ("help2man" ,help2man)
241 ("imagemagick" ,imagemagick)
243 ("texlive-minimal" ,texlive-minimal)
245 ("transfig" ,transfig)))
257 `(#:configure-flags `("--enable-openmp")))
258 (home-page "http://enblend.sourceforge.net/")
259 (synopsis "Tools for combining and blending images")
261 "Enblend blends away the seams in a panoramic image mosaic using a
262 multi-resolution spline. Enfuse merges different exposures of the same
263 scene to produce an image that looks much like a tone-mapped image.")
264 (license license:gpl2+)))