1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages photo)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (guix build-system perl)
25 #:use-module (gnu packages pkg-config)
26 #:use-module (gnu packages libusb)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages readline)
29 #:use-module (gnu packages popt)
30 #:use-module (gnu packages perl)
31 #:use-module ((gnu packages base) #:select (tzdata)))
33 (define-public libexif
39 (uri (string-append "mirror://sourceforge/libexif/libexif-"
43 "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n"))))
44 (build-system gnu-build-system)
45 (home-page "http://libexif.sourceforge.net/")
46 (synopsis "Read and manipulate EXIF data in digital photographs")
48 "The libexif C library allows applications to read, edit, and save EXIF
49 data as produced by digital cameras.")
52 (define-public libgphoto2
58 (uri (string-append "mirror://sourceforge/gphoto/libgphoto2-"
62 "0f1818l1vs5fbmrihzyv3qasddbqi3r01jik5crrxddwalsi2bd3"))))
63 (build-system gnu-build-system)
64 (native-inputs `(("pkg-config" ,pkg-config)))
66 `(;; ("libjpeg-turbo" ,libjpeg-turbo)
70 `(;; The .pc refers to libexif.
71 ("libexif" ,libexif)))
72 (home-page "http://www.gphoto.org/proj/libgphoto2/")
73 (synopsis "Accessing digital cameras")
75 "This is the library backend for gphoto2. It contains the code for PTP,
76 MTP, and other vendor specific protocols for controlling and transferring data
77 from digital cameras.")
79 ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+.
82 (define-public gphoto2
88 (uri (string-append "mirror://sourceforge/gphoto/gphoto2-"
92 "16c8k1cxfypg7v5h8xi87grclw7a5ayaamn548ys3zkj727r5fcf"))))
93 (build-system gnu-build-system)
95 `(("pkg-config" ,pkg-config)))
97 `(("readline" ,readline)
98 ;; ("libjpeg-turbo" ,libjpeg-turbo)
101 ("libgphoto2" ,libgphoto2)))
103 '(#:phases (alist-cons-before
105 (lambda* (#:key inputs #:allow-other-keys)
106 (substitute* (find-files "tests/data" "\\.param$")
111 ;; FIXME: There are 2 test failures, most likely related to the build
115 (home-page "http://www.gphoto.org/")
116 (synopsis "Command-line tools to access digital cameras")
118 "Gphoto2 is a set of command line utilities for manipulating a large
119 number of different digital cameras. Through libgphoto2, it supports PTP,
120 MTP, and much more.")
122 ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+.
125 (define-public perl-image-exiftool
127 (name "perl-image-exiftool")
132 "mirror://cpan/authors/id/E/EX/EXIFTOOL/Image-ExifTool-"
136 "074yxjgy50iacnjakdvac37wvrzrqmabkn0nzk0n70y3hssli7d5"))))
137 (build-system perl-build-system)
139 '(#:phases (alist-cons-after
140 'install 'post-install
141 (lambda* (#:key outputs #:allow-other-keys)
142 ;; Make sure the 'exiftool' commands finds the library.
143 ;; XXX: Shouldn't it be handled by PERL-BUILD-SYSTEM?
144 (let* ((out (assoc-ref outputs "out"))
145 (pm (find-files out "^ExifTool\\.pm$"))
146 (lib (dirname (dirname (car pm)))))
147 (wrap-program (string-append out "/bin/exiftool")
148 `("PERL5LIB" prefix (,lib)))))
151 "http://search.cpan.org/~exiftool/Image-ExifTool-9.70/lib/Image/ExifTool.pod")
152 (synopsis "Program and Perl library to manipulate EXIF tags")
154 "This package provides the 'exiftool' command and the 'Image::ExifTool'
155 Perl library to manipulate EXIF tags of digital images.")
156 (license (package-license perl))))