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>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages photo)
22 #:use-module (guix build-system cmake)
23 #:use-module (guix build-system gnu)
24 #:use-module (guix build-system perl)
25 #:use-module (guix download)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix utils)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages boost)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages ghostscript)
34 #:use-module (gnu packages gl)
35 #:use-module (gnu packages graphics)
36 #:use-module (gnu packages image)
37 #:use-module (gnu packages imagemagick)
38 #:use-module (gnu packages libusb)
39 #:use-module (gnu packages maths)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages popt)
43 #:use-module (gnu packages readline)
44 #:use-module (gnu packages web)
45 #:use-module (gnu packages xfig)
46 #:use-module (gnu packages xml))
54 (uri (string-append "http://www.libraw.org/data/LibRaw-"
58 "043kckxjqanw8dl3m9f6kvsf0l20ywxmgxd1xb0slj6m8l4w4hz6"))))
59 (build-system gnu-build-system)
60 (home-page "http://www.libraw.org")
61 (synopsis "Raw image decoder")
63 "LibRaw is a library for reading RAW files obtained from digital photo
64 cameras (CRW/CR2, NEF, RAF, DNG, and others).")
65 (license license:lgpl2.1+)))
67 (define-public libexif
73 (uri (string-append "mirror://sourceforge/libexif/libexif-"
77 "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n"))))
78 (build-system gnu-build-system)
79 (home-page "http://libexif.sourceforge.net/")
80 (synopsis "Read and manipulate EXIF data in digital photographs")
82 "The libexif C library allows applications to read, edit, and save EXIF
83 data as produced by digital cameras.")
84 (license license:lgpl2.1+)))
86 (define-public libgphoto2
92 (uri (string-append "mirror://sourceforge/gphoto/libgphoto2-"
96 "0f1818l1vs5fbmrihzyv3qasddbqi3r01jik5crrxddwalsi2bd3"))))
97 (build-system gnu-build-system)
98 (native-inputs `(("pkg-config" ,pkg-config)))
100 `(;; ("libjpeg-turbo" ,libjpeg-turbo)
104 `(;; The .pc refers to libexif.
105 ("libexif" ,libexif)))
106 (home-page "http://www.gphoto.org/proj/libgphoto2/")
107 (synopsis "Accessing digital cameras")
109 "This is the library backend for gphoto2. It contains the code for PTP,
110 MTP, and other vendor specific protocols for controlling and transferring data
111 from digital cameras.")
113 ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+.
114 (license license:lgpl2.1+)))
116 (define-public gphoto2
122 (uri (string-append "mirror://sourceforge/gphoto/gphoto2-"
126 "16c8k1cxfypg7v5h8xi87grclw7a5ayaamn548ys3zkj727r5fcf"))))
127 (build-system gnu-build-system)
129 `(("pkg-config" ,pkg-config)))
131 `(("readline" ,readline)
132 ;; ("libjpeg-turbo" ,libjpeg-turbo)
135 ("libgphoto2" ,libgphoto2)))
137 '(#:phases (alist-cons-before
139 (lambda* (#:key inputs #:allow-other-keys)
140 (substitute* (find-files "tests/data" "\\.param$")
145 ;; FIXME: There are 2 test failures, most likely related to the build
149 (home-page "http://www.gphoto.org/")
150 (synopsis "Command-line tools to access digital cameras")
152 "Gphoto2 is a set of command line utilities for manipulating a large
153 number of different digital cameras. Through libgphoto2, it supports PTP,
154 MTP, and much more.")
156 ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+.
157 (license license:gpl2+)))
159 (define-public perl-image-exiftool
161 (name "perl-image-exiftool")
166 "mirror://cpan/authors/id/E/EX/EXIFTOOL/Image-ExifTool-"
170 "074yxjgy50iacnjakdvac37wvrzrqmabkn0nzk0n70y3hssli7d5"))))
171 (build-system perl-build-system)
173 '(#:phases (alist-cons-after
174 'install 'post-install
175 (lambda* (#:key outputs #:allow-other-keys)
176 ;; Make sure the 'exiftool' commands finds the library.
177 ;; XXX: Shouldn't it be handled by PERL-BUILD-SYSTEM?
178 (let* ((out (assoc-ref outputs "out"))
179 (pm (find-files out "^ExifTool\\.pm$"))
180 (lib (dirname (dirname (car pm)))))
181 (wrap-program (string-append out "/bin/exiftool")
182 `("PERL5LIB" prefix (,lib)))))
185 "http://search.cpan.org/~exiftool/Image-ExifTool-9.70/lib/Image/ExifTool.pod")
186 (synopsis "Program and Perl library to manipulate EXIF tags")
188 "This package provides the 'exiftool' command and the 'Image::ExifTool'
189 Perl library to manipulate EXIF tags of digital images.")
190 (license (package-license perl))))
192 (define-public libpano13
198 (uri (string-append "mirror://sourceforge/panotools/libpano13/"
199 "libpano13-" version "/"
200 "libpano13-" version ".tar.gz"))
203 "1a4m3plmfcrrplqs9zfzhc5apibn10m5sajpizm1sd3q74w5fwq3"))))
204 (build-system cmake-build-system)
206 `(("libjpeg" ,libjpeg)
210 (home-page "http://panotools.sourceforge.net/")
211 (synopsis "Library for panoramic images")
213 "The libpano13 package contains the backend library written by the
214 Panorama Tools project for building panoramic images from a set of
215 overlapping images, as well as some command line tools.")
216 (license license:gpl2+)))
218 (define-public enblend-enfuse
220 (name "enblend-enfuse")
224 (uri (string-append "mirror://sourceforge/enblend/"
226 name "-" (version-major+minor version) "/"
227 name "-" version ".tar.gz"))
230 "1b7r1nnwaind0344ckwggy0ghl0ipbk9jzylsxcjfl05rnasw00w"))))
231 (build-system gnu-build-system)
233 `(("pkg-config" ,pkg-config)
235 ("perl-timedate" ,perl-timedate)
236 ;; for building the documentation
238 ("imagemagick" ,imagemagick)
241 ("transfig" ,transfig)))
253 `(#:configure-flags `("--enable-openmp")))
254 (home-page "http://enblend.sourceforge.net/")
255 (synopsis "Tools for combining and blending images")
257 "Enblend blends away the seams in a panoramic image mosaic using a
258 multi-resolution spline. Enfuse merges different exposures of the same
259 scene to produce an image that looks much like a tone-mapped image.")
260 (license license:gpl2+)))