Commit | Line | Data |
---|---|---|
9208d0c1 | 1 | ;;; GNU Guix --- Functional package management for GNU |
3246cc91 | 2 | ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
9208d0c1 LC |
3 | ;;; |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
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. | |
10 | ;;; | |
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. | |
15 | ;;; | |
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/>. | |
18 | ||
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) | |
b138ec94 | 24 | #:use-module (guix build-system perl) |
9208d0c1 LC |
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) | |
b138ec94 | 30 | #:use-module (gnu packages perl) |
38cf2ba0 | 31 | #:use-module (gnu packages base)) |
9208d0c1 LC |
32 | |
33 | (define-public libexif | |
34 | (package | |
35 | (name "libexif") | |
36 | (version "0.6.21") | |
37 | (source (origin | |
38 | (method url-fetch) | |
39 | (uri (string-append "mirror://sourceforge/libexif/libexif-" | |
40 | version ".tar.bz2")) | |
41 | (sha256 | |
42 | (base32 | |
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") | |
47 | (description | |
48 | "The libexif C library allows applications to read, edit, and save EXIF | |
49 | data as produced by digital cameras.") | |
50 | (license lgpl2.1+))) | |
51 | ||
52 | (define-public libgphoto2 | |
53 | (package | |
54 | (name "libgphoto2") | |
55 | (version "2.5.2") | |
56 | (source (origin | |
57 | (method url-fetch) | |
58 | (uri (string-append "mirror://sourceforge/gphoto/libgphoto2-" | |
59 | version ".tar.bz2")) | |
60 | (sha256 | |
61 | (base32 | |
62 | "0f1818l1vs5fbmrihzyv3qasddbqi3r01jik5crrxddwalsi2bd3")))) | |
63 | (build-system gnu-build-system) | |
64 | (native-inputs `(("pkg-config" ,pkg-config))) | |
65 | (inputs | |
66 | `(;; ("libjpeg-turbo" ,libjpeg-turbo) | |
3246cc91 | 67 | ("libltdl" ,libltdl) |
9208d0c1 LC |
68 | ("libusb" ,libusb))) |
69 | (propagated-inputs | |
70 | `(;; The .pc refers to libexif. | |
71 | ("libexif" ,libexif))) | |
72 | (home-page "http://www.gphoto.org/proj/libgphoto2/") | |
73 | (synopsis "Accessing digital cameras") | |
74 | (description | |
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.") | |
78 | ||
79 | ;; 'COPYING' says LGPLv2.1+, but in practices files are under LGPLv2+. | |
80 | (license lgpl2.1+))) | |
81 | ||
82 | (define-public gphoto2 | |
83 | (package | |
84 | (name "gphoto2") | |
85 | (version "2.5.2") | |
86 | (source (origin | |
87 | (method url-fetch) | |
88 | (uri (string-append "mirror://sourceforge/gphoto/gphoto2-" | |
89 | version ".tar.bz2")) | |
90 | (sha256 | |
91 | (base32 | |
92 | "16c8k1cxfypg7v5h8xi87grclw7a5ayaamn548ys3zkj727r5fcf")))) | |
93 | (build-system gnu-build-system) | |
94 | (native-inputs | |
95 | `(("pkg-config" ,pkg-config))) | |
96 | (inputs | |
97 | `(("readline" ,readline) | |
98 | ;; ("libjpeg-turbo" ,libjpeg-turbo) | |
99 | ("popt" ,popt) | |
100 | ("libexif" ,libexif) | |
101 | ("libgphoto2" ,libgphoto2))) | |
102 | (arguments | |
103 | '(#:phases (alist-cons-before | |
104 | 'check 'pre-check | |
105 | (lambda* (#:key inputs #:allow-other-keys) | |
106 | (substitute* (find-files "tests/data" "\\.param$") | |
107 | (("/usr/bin/env") | |
108 | (which "env")))) | |
109 | %standard-phases) | |
110 | ||
111 | ;; FIXME: There are 2 test failures, most likely related to the build | |
112 | ;; environment. | |
113 | #:tests? #f)) | |
114 | ||
115 | (home-page "http://www.gphoto.org/") | |
116 | (synopsis "Command-line tools to access digital cameras") | |
117 | (description | |
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.") | |
121 | ||
122 | ;; Files are typically under LGPLv2+, but 'COPYING' says GPLv2+. | |
123 | (license gpl2+))) | |
b138ec94 LC |
124 | |
125 | (define-public perl-image-exiftool | |
126 | (package | |
127 | (name "perl-image-exiftool") | |
128 | (version "9.70") | |
129 | (source (origin | |
130 | (method url-fetch) | |
131 | (uri (string-append | |
132 | "mirror://cpan/authors/id/E/EX/EXIFTOOL/Image-ExifTool-" | |
133 | version ".tar.gz")) | |
134 | (sha256 | |
135 | (base32 | |
136 | "074yxjgy50iacnjakdvac37wvrzrqmabkn0nzk0n70y3hssli7d5")))) | |
137 | (build-system perl-build-system) | |
138 | (arguments | |
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))))) | |
149 | %standard-phases))) | |
150 | (home-page | |
151 | "http://search.cpan.org/~exiftool/Image-ExifTool-9.70/lib/Image/ExifTool.pod") | |
152 | (synopsis "Program and Perl library to manipulate EXIF tags") | |
153 | (description | |
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)))) |