gnu: hidapi: Fix 'license'.
[jackhill/guix/guix.git] / gnu / packages / photo.scm
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>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
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.
13 ;;;
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.
18 ;;;
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/>.
21
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))
50
51 (define-public libraw
52 (package
53 (name "libraw")
54 (version "0.17.2")
55 (source (origin
56 (method url-fetch)
57 (uri (string-append "http://www.libraw.org/data/LibRaw-"
58 version ".tar.gz"))
59 (sha256
60 (base32
61 "0p6imxpsfn82i0i9w27fnzq6q6gwzvb9f7sygqqakv36fqnc9c4j"))))
62 (build-system gnu-build-system)
63 (home-page "http://www.libraw.org")
64 (synopsis "Raw image decoder")
65 (description
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+)))
69
70 (define-public libexif
71 (package
72 (name "libexif")
73 (version "0.6.21")
74 (source (origin
75 (method url-fetch)
76 (uri (string-append "mirror://sourceforge/libexif/libexif/"
77 version "/libexif-" version ".tar.bz2"))
78 (sha256
79 (base32
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")
84 (description
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+)))
88
89 (define-public libgphoto2
90 (package
91 (name "libgphoto2")
92 (version "2.5.2")
93 (source (origin
94 (method url-fetch)
95 (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
96 version "/libgphoto2-" version ".tar.bz2"))
97 (sha256
98 (base32
99 "0f1818l1vs5fbmrihzyv3qasddbqi3r01jik5crrxddwalsi2bd3"))))
100 (build-system gnu-build-system)
101 (native-inputs `(("pkg-config" ,pkg-config)))
102 (inputs
103 `(;; ("libjpeg-turbo" ,libjpeg-turbo)
104 ("libltdl" ,libltdl)
105 ("libusb" ,libusb)))
106 (propagated-inputs
107 `(;; The .pc refers to libexif.
108 ("libexif" ,libexif)))
109 (home-page "http://www.gphoto.org/proj/libgphoto2/")
110 (synopsis "Accessing digital cameras")
111 (description
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.")
115
116 ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+.
117 (license license:lgpl2.1+)))
118
119 (define-public gphoto2
120 (package
121 (name "gphoto2")
122 (version "2.5.2")
123 (source (origin
124 (method url-fetch)
125 (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version
126 "/gphoto2-" version ".tar.bz2"))
127 (sha256
128 (base32
129 "16c8k1cxfypg7v5h8xi87grclw7a5ayaamn548ys3zkj727r5fcf"))))
130 (build-system gnu-build-system)
131 (native-inputs
132 `(("pkg-config" ,pkg-config)))
133 (inputs
134 `(("readline" ,readline)
135 ;; ("libjpeg-turbo" ,libjpeg-turbo)
136 ("popt" ,popt)
137 ("libexif" ,libexif)
138 ("libgphoto2" ,libgphoto2)))
139 (arguments
140 '(#:phases (alist-cons-before
141 'check 'pre-check
142 (lambda* (#:key inputs #:allow-other-keys)
143 (substitute* (find-files "tests/data" "\\.param$")
144 (("/usr/bin/env")
145 (which "env"))))
146 %standard-phases)
147
148 ;; FIXME: There are 2 test failures, most likely related to the build
149 ;; environment.
150 #:tests? #f))
151
152 (home-page "http://www.gphoto.org/")
153 (synopsis "Command-line tools to access digital cameras")
154 (description
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.")
158
159 ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+.
160 (license license:gpl2+)))
161
162 (define-public perl-image-exiftool
163 (package
164 (name "perl-image-exiftool")
165 (version "10.20")
166 (source (origin
167 (method url-fetch)
168 (uri (string-append
169 "mirror://cpan/authors/id/E/EX/EXIFTOOL/Image-ExifTool-"
170 version ".tar.gz"))
171 (sha256
172 (base32
173 "0akdnxvb23ibcwa63ncibaj5m5k56cb34x8gy90z9lqcjl0f4sph"))))
174 (build-system perl-build-system)
175 (arguments
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)))))
186 %standard-phases)))
187 (home-page "http://search.cpan.org/dist/Image-ExifTool")
188 (synopsis "Program and Perl library to manipulate EXIF tags")
189 (description
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))))
193
194 (define-public libpano13
195 (package
196 (name "libpano13")
197 (version "2.9.19")
198 (source (origin
199 (method url-fetch)
200 (uri (string-append "mirror://sourceforge/panotools/libpano13/"
201 "libpano13-" version "/"
202 "libpano13-" version ".tar.gz"))
203 (sha256
204 (base32
205 "1a4m3plmfcrrplqs9zfzhc5apibn10m5sajpizm1sd3q74w5fwq3"))))
206 (build-system cmake-build-system)
207 (inputs
208 `(("libjpeg" ,libjpeg)
209 ("libpng" ,libpng)
210 ("libtiff" ,libtiff)
211 ("zlib" ,zlib)))
212 (home-page "http://panotools.sourceforge.net/")
213 (synopsis "Library for panoramic images")
214 (description
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+)))
219
220 (define-public enblend-enfuse
221 (package
222 (name "enblend-enfuse")
223 (version "4.2")
224 (source (origin
225 (method url-fetch)
226 (uri (string-append "mirror://sourceforge/enblend/"
227 name "/"
228 name "-" (version-major+minor version) "/"
229 name "-" version ".tar.gz"))
230 (sha256
231 (base32
232 "0j5x011ilalb47ssah50ag0a4phgh1b0wdgxdbbp1gcyjcjf60w7"))))
233 (build-system gnu-build-system)
234 (native-inputs
235 `(("pkg-config" ,pkg-config)
236 ("perl" ,perl)
237 ("perl-timedate" ,perl-timedate)
238 ;; for building the documentation
239 ("gnuplot" ,gnuplot)
240 ("help2man" ,help2man)
241 ("imagemagick" ,imagemagick)
242 ("libxml2" ,libxml2)
243 ("texlive-minimal" ,texlive-minimal)
244 ("tidy" ,tidy)
245 ("transfig" ,transfig)))
246 (inputs
247 `(("boost" ,boost)
248 ("gsl" ,gsl)
249 ("lcms" ,lcms)
250 ("libjpeg" ,libjpeg)
251 ("libpng" ,libpng)
252 ("libtiff" ,libtiff)
253 ("openexr" ,openexr)
254 ("vigra" ,vigra)
255 ("zlib" ,zlib)))
256 (arguments
257 `(#:configure-flags `("--enable-openmp")))
258 (home-page "http://enblend.sourceforge.net/")
259 (synopsis "Tools for combining and blending images")
260 (description
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+)))