gnu: Add 'make-ld-wrapper' procedure.
[jackhill/guix/guix.git] / gnu / packages / ghostscript.scm
index 6781ffe..c63e041 100644 (file)
@@ -1,5 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 
 (define-module (gnu packages ghostscript)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages fontutils)
-  #:use-module (gnu packages libjpeg)
-  #:use-module (gnu packages libpng)
-  #:use-module (gnu packages libtiff)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages tcl)
-  #:use-module (gnu packages xorg)
-  #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'license:))
+  #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu))
 (define-public lcms
   (package
    (name "lcms")
-   (version "2.4")
+   (version "2.6")
    (source (origin
             (method url-fetch)
             (uri (string-append
-                   "http://downloads.sourceforge.net/project/lcms/lcms/"
-                   version "/lcms2-" version ".tar.gz"))
+                  "mirror://sourceforge/lcms/lcms2-" version ".tar.gz"))
             (sha256 (base32
-                     "1s1ppvqaydf2yqc72mw6zfviwxccb311a6hrbi802sgjxw84sl9a"))))
+                     "1c8lgq8gfs3nyplvbx9k8wzfj6r2bqi3f611vb1m8z3476454wji"))))
    (build-system gnu-build-system)
    (inputs `(("libjpeg-8" ,libjpeg-8)
              ("libtiff" ,libtiff)
@@ -51,7 +50,7 @@
    (synopsis "Little CMS, a small-footprint colour management engine")
    (description
     "Little CMS is a small-footprint colour management engine, with special
-focus on accuracy and performance. It uses the International Color
+focus on accuracy and performance.  It uses the International Color
 Consortium standard (ICC), approved as ISO 15076-1.")
    (license license:x11)
    (home-page "http://www.littlecms.com/")))
@@ -68,7 +67,7 @@ Consortium standard (ICC), approved as ISO 15076-1.")
             (sha256 (base32
                      "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q"))))
    (build-system gnu-build-system)
-   (synopsis "libpaper, a library for handling paper sizes")
+   (synopsis "Library for handling paper sizes")
    (description
     "The paper library and accompanying files are intended to provide a simple
 way for applications to take actions based on a system- or user-specified
@@ -107,27 +106,27 @@ paper size.")
          (substitute* "Makefile"
            ((" install.include") ""))))
       %standard-phases)))
-   (synopsis "psutils, a collection of utilities for manipulating PostScript documents")
+   (synopsis "Collection of utilities for manipulating PostScript documents")
    (description
     "PSUtils is a collection of utilities for manipulating PostScript
-documents. Programs included are psnup, for placing out several logical pages
+documents.  Programs included are psnup, for placing out several logical pages
 on a single sheet of paper, psselect, for selecting pages from a document,
 pstops, for general imposition, psbook, for signature generation for booklet
 printing, and psresize, for adjusting page sizes.")
-   (license (license:bsd-style "file://LICENSE"
+   (license (license:non-copyleft "file://LICENSE"
                                 "See LICENSE in the distribution."))
    (home-page "http://knackered.org/angus/psutils/")))
 
 (define-public ghostscript
   (package
    (name "ghostscript")
-   (version "9.06.0")
+   (version "9.14.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
                                 version ".tar.xz"))
             (sha256 (base32
-                     "0bcg2203p7cm0f53f3s883xhj2c91xnaxakj2cy7kcdknfxplvs4"))))
+                     "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))))
    (build-system gnu-build-system)
    (inputs `(("freetype" ,freetype)
              ("lcms" ,lcms)
@@ -135,44 +134,78 @@ printing, and psresize, for adjusting page sizes.")
              ("libpng" ,libpng)
              ("libpaper" ,libpaper)
              ("libtiff" ,libtiff)
-             ("libxext" ,libxext)
-             ("libxt" ,libxt)
-             ("perl" ,perl)
-             ("pkg-config" ,pkg-config) ; needed to find libtiff
-             ("python" ,python)
-             ("tcl" ,tcl)
              ("zlib" ,zlib)))
+   (native-inputs
+      `(("perl" ,perl)
+        ("pkg-config" ,pkg-config) ; needed to find libtiff
+        ("python" ,python-wrapper)
+        ("tcl" ,tcl)))
    (arguments
     `(#:phases
-      (alist-replace
-       'configure
-       (lambda* (#:key #:allow-other-keys #:rest args)
-        (let ((configure (assoc-ref %standard-phases 'configure)))
-          (apply configure args)
-          (substitute* "base/all-arch.mak"
-            (("/bin/sh") (which "bash")))
-          (substitute* "base/unixhead.mak"
-            (("/bin/sh") (which "bash")))))
-      (alist-replace
-       'build
-       (lambda* (#:key #:allow-other-keys #:rest args)
-        (let ((build (assoc-ref %standard-phases 'build)))
-          (apply build args)
-          (system* "make" "so")))
-      (alist-replace
-       'install
-       (lambda* (#:key #:allow-other-keys #:rest args)
-        (let ((install (assoc-ref %standard-phases 'install)))
-          (apply install args)
-          (system* "make" "install-so")))
+      (alist-cons-after
+       'configure 'patch-config-files
+       (lambda _
+         (substitute* "base/all-arch.mak"
+           (("/bin/sh") (which "bash")))
+         (substitute* "base/unixhead.mak"
+           (("/bin/sh") (which "bash"))))
+      (alist-cons-after
+       'build 'build-so
+       (lambda _ (system* "make" "so"))
+      (alist-cons-after
+       'install 'install-so
+       (lambda _ (system* "make" "install-so"))
       %standard-phases)))))
    (synopsis "PostScript and PDF interpreter")
    (description
-    "GNU Ghostscript is an interpreter for PostScript and Portable Document
-Format (PDF) files.
-It consists of a PostScript interpreter layer, and a graphics
-library.")
-   (license license:gpl3+)
+    "Ghostscript is an interpreter for the PostScript language and the PDF
+file format.  It also includes a C library that implements the graphics
+capabilities of the PostScript language.  It supports a wide variety of
+output file formats and printers.")
+   (license license:agpl3+)
+   (home-page "http://www.gnu.org/software/ghostscript/")))
+
+(define-public ijs
+  (package
+   (name "ijs")
+   (version "9.14.0")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
+                                version ".tar.xz"))
+            (sha256 (base32
+                     "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))))
+   (build-system gnu-build-system)
+   (native-inputs
+    `(("libtool"    ,libtool)
+      ("automake"   ,automake)
+      ("autoconf"   ,autoconf)))
+   (arguments
+    `(#:phases
+      (alist-cons-after
+       'unpack 'autogen
+       (lambda _
+         ;; need to regenerate macros
+         (system* "autoreconf" "-if")
+         ;; do not run configure
+         (substitute* "autogen.sh"
+           (("^.*\\$srcdir/configure.*") ""))
+         (system* "bash" "autogen.sh")
+
+         ;; create configure script in ./ijs/
+         (chdir "ijs")
+         ;; do not run configure
+         (substitute* "autogen.sh"
+           (("^.*\\$srcdir/configure.*") "")
+           (("^ + && echo Now type.*$")  ""))
+         (zero? (system* "bash" "autogen.sh")))
+       %standard-phases)))
+   (synopsis "IJS driver framework for inkjet and other raster devices")
+   (description
+    "IJS is a protocol for transmission of raster page images.  This package
+provides the reference implementation of the raster printer driver
+architecture.")
+   (license license:expat)
    (home-page "http://www.gnu.org/software/ghostscript/")))
 
 (define-public gs-fonts
@@ -210,35 +243,30 @@ library.")
                 (copy-file file (string-append dir "/" file)))
               (find-files "." "pfb|afm"))))
        %standard-phases)))))
-   (synopsis "free replacements for the PostScript fonts")
+   (synopsis "Free replacements for the PostScript fonts")
    (description
-    "gs-fonts provides fonts and font metrics customarily distributed with
-Ghostscript. It currently includes the 35 standard PostScript fonts.")
+    "Ghostscript fonts provides fonts and font metrics customarily distributed with
+Ghostscript.  It currently includes the 35 standard PostScript fonts.")
    (license license:gpl2)
    (home-page "http://sourceforge.net/projects/gs-fonts/")))
 
-(define-public gv
+(define-public libspectre
   (package
-   (name "gv")
-   (version "3.7.4")
+   (name "libspectre")
+   (version "0.2.7")
    (source (origin
             (method url-fetch)
-            (uri (string-append "mirror://gnu/gv/gv-"
+            (uri (string-append "http://libspectre.freedesktop.org/releases/libspectre-"
                                 version ".tar.gz"))
             (sha256 (base32
-                     "0q8s43z14vxm41pfa8s5h9kyyzk1fkwjhkiwbf2x70alm6rv6qi1"))))
+                     "1v63lqc6bhhxwkpa43qmz8phqs8ci4dhzizyy16d3vkb20m846z8"))))
    (build-system gnu-build-system)
-   (propagated-inputs `(("ghostscript" ,ghostscript)))
-   (inputs `(("libx11" ,libx11)
-             ("libxaw3d" ,libxaw3d)
-             ("libxinerama" ,libxinerama)
-             ("libxpm" ,libxpm)
-             ("pkg-config" ,pkg-config)
-             ("zlib" ,zlib)))
-   (synopsis "postscript and pdf viewer for x")
+   (inputs `(("ghostscript" ,ghostscript)))
+   (native-inputs `(("pkg-config" ,pkg-config)))
+   (synopsis "Postscript rendering library")
    (description
-    "GNU gv allows to view and navigate through PostScript and PDF documents
-on an X display by providing a graphical user interface for the Ghostscript
-interpreter.")
-   (license license:gpl3+)
-   (home-page "http://www.gnu.org/software/gv/")))
+    "libspectre is a small library for rendering Postscript documents.
+It provides a convenient easy to use API for handling and rendering
+Postscript documents.")
+   (license license:gpl2+)
+   (home-page "http://www.freedesktop.org/wiki/Software/libspectre")))