Update `HACKING'.
[jackhill/guix/guix.git] / distro / packages / libtiff.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
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 (distro packages libtiff)
20 #:use-module (distro)
21 #:use-module (distro packages file)
22 #:use-module (distro packages libjpeg)
23 #:use-module (guix licenses)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu))
27
28 (define-public libtiff
29 (package
30 (name "libtiff")
31 (version "4.0.3")
32 (source (origin
33 (method url-fetch)
34 (uri (string-append "ftp://ftp.remotesensing.org/pub/libtiff/tiff-"
35 version ".tar.gz"))
36 (sha256 (base32
37 "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa"))))
38 (build-system gnu-build-system)
39 (inputs `(("file" ,file)
40 ("libjpeg-8" ,libjpeg-8)))
41 ;; currently does not compile with libjpeg version 9
42 (arguments
43 `(#:configure-flags
44 (list (string-append "--with-jpeg-include-dir="
45 (assoc-ref %build-inputs "libjpeg-8")
46 "/include"))
47 #:phases
48 (alist-replace
49 'configure
50 (lambda* (#:key #:allow-other-keys #:rest args)
51 (let ((configure (assoc-ref %standard-phases 'configure)))
52 (substitute* "configure"
53 (("`/usr/bin/file")
54 (string-append "`" (which "file"))))
55 (apply configure args)))
56 %standard-phases)))
57 (synopsis "Libtiff, a library for handling TIFF files")
58 (description
59 "Libtiff provides support for the Tag Image File Format (TIFF), a format
60 used for storing image data.
61 Included are a library, libtiff, for reading and writing TIFF and a small
62 collection of tools for doing simple manipulations of TIFF images.")
63 (license (bsd-style "file://COPYRIGHT"
64 "See COPYRIGHT in the distribution."))
65 (home-page "http://www.libtiff.org/")))