Two patches attached, since "make check" did not work for libtiff with libjepg 9, so I also added libjpeg 8d.
Andreas
From 88ec8e5dffe86f70a3769aed970ba89b5cec493c Mon Sep 17 00:00:00 2001 From: Andreas Enge <andr...@enge.fr> Date: Thu, 17 Jan 2013 22:49:23 +0100 Subject: [PATCH 1/2] distro: Add Libjpeg 8. * distro/packages/libjpeg.scm (libjpeg-8): New variable. --- distro/packages/libjpeg.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/distro/packages/libjpeg.scm b/distro/packages/libjpeg.scm index 5add26f..b24d6b0 100644 --- a/distro/packages/libjpeg.scm +++ b/distro/packages/libjpeg.scm @@ -23,6 +23,27 @@ #:use-module (guix download) #:use-module (guix build-system gnu)) +(define-public libjpeg-8 + (package + (name "libjpeg-8") + (version "8d") + (source (origin + (method url-fetch) + (uri (string-append "http://www.ijg.org/files/jpegsrc.v" + version ".tar.gz")) + (sha256 (base32 + "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0")))) + (build-system gnu-build-system) + (synopsis "Libjpeg, a library for handling JPEG files") + (description + "Libjpeg implements JPEG image encoding, decoding, and transcoding. +JPEG is a standardized compression method for full-color and gray-scale +images. +The included programs provide conversion between the JPEG format and +image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.") + (license ijg) + (home-page "http://www.ijg.org/"))) + (define-public libjpeg (package (name "libjpeg") -- 1.7.10.4
From 43a29b58cd810facc268d2eaf76f37cb538ee2f0 Mon Sep 17 00:00:00 2001 From: Andreas Enge <andr...@enge.fr> Date: Thu, 17 Jan 2013 22:54:26 +0100 Subject: [PATCH 2/2] distro: Add libtiff. * distro/packages/libtiff.scm: New file. * Makefile.am (MODULES): Add it. --- Makefile.am | 1 + distro/packages/libtiff.scm | 65 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 distro/packages/libtiff.scm diff --git a/Makefile.am b/Makefile.am index 918d8d0..c05ed2a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -85,6 +85,7 @@ MODULES = \ distro/packages/libidn.scm \ distro/packages/libjpeg.scm \ distro/packages/libsigsegv.scm \ + distro/packages/libtiff.scm \ distro/packages/libunistring.scm \ distro/packages/libusb.scm \ distro/packages/linux.scm \ diff --git a/distro/packages/libtiff.scm b/distro/packages/libtiff.scm new file mode 100644 index 0000000..b5a12c5 --- /dev/null +++ b/distro/packages/libtiff.scm @@ -0,0 +1,65 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Andreas Enge <andr...@enge.fr> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (distro packages libtiff) + #:use-module (distro) + #:use-module (distro packages file) + #:use-module (distro packages libjpeg) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public libtiff + (package + (name "libtiff") + (version "4.0.3") + (source (origin + (method url-fetch) + (uri (string-append "ftp://ftp.remotesensing.org/pub/libtiff/tiff-" + version ".tar.gz")) + (sha256 (base32 + "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa")))) + (build-system gnu-build-system) + (inputs `(("file" ,file) + ("libjpeg-8" ,libjpeg-8))) + ;; currently does not compile with libjpeg version 9 + (arguments + `(#:configure-flags + (list (string-append "--with-jpeg-include-dir=" + (assoc-ref %build-inputs "libjpeg-8") + "/include")) + #:phases + (alist-replace + 'configure + (lambda* (#:key #:allow-other-keys #:rest args) + (let ((configure (assoc-ref %standard-phases 'configure))) + (substitute* "configure" + (("`/usr/bin/file") + (string-append "`" (which "file")))) + (apply configure args))) + %standard-phases))) + (synopsis "Libtiff, a library for handling TIFF files") + (description + "Libtiff provides support for the Tag Image File Format (TIFF), a format +used for storing image data. +Included are a library, libtiff, for reading and writing TIFF and a small +collection of tools for doing simple manipulations of TIFF images.") + (license (bsd-style "file://COPYRIGHT" + "See COPYRIGHT in the distribution.")) + (home-page "http://www.libtiff.org/"))) -- 1.7.10.4