1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages ghostscript)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages autotools)
25 #:use-module (gnu packages compression)
26 #:use-module (gnu packages fontutils)
27 #:use-module (gnu packages image)
28 #:use-module (gnu packages perl)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages python)
31 #:use-module (gnu packages tcl)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (guix download)
35 #:use-module (guix build-system gnu))
44 "mirror://sourceforge/lcms/lcms2-" version ".tar.gz"))
46 "1c8lgq8gfs3nyplvbx9k8wzfj6r2bqi3f611vb1m8z3476454wji"))))
47 (build-system gnu-build-system)
48 (inputs `(("libjpeg-8" ,libjpeg-8)
51 (synopsis "Little CMS, a small-footprint colour management engine")
53 "Little CMS is a small-footprint colour management engine, with special
54 focus on accuracy and performance. It uses the International Color
55 Consortium standard (ICC), approved as ISO 15076-1.")
57 (home-page "http://www.littlecms.com/")))
59 (define-public libpaper
66 "http://ftp.de.debian.org/debian/pool/main/libp/libpaper/libpaper_"
69 "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q"))))
70 (build-system gnu-build-system)
71 (synopsis "Library for handling paper sizes")
73 "The paper library and accompanying files are intended to provide a simple
74 way for applications to take actions based on a system- or user-specified
76 (license license:gpl2)
77 (home-page "http://packages.qa.debian.org/libp/libpaper.html")))
79 (define-public psutils
85 (uri "ftp://ftp.knackered.org/pub/psutils/psutils.tar.gz")
87 "1r4ab1fvgganm02kmm70b2r1azwzbav2am41gbigpa2bb1wynlrq"))))
88 (build-system gnu-build-system)
89 (inputs `(("perl" ,perl)))
91 `(#:tests? #f ; none provided
95 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
96 (let ((perl (assoc-ref inputs "perl"))
97 (out (assoc-ref outputs "out")))
98 (copy-file "Makefile.unix" "Makefile")
99 (substitute* "Makefile"
100 (("/usr/local/bin/perl") (string-append perl "/bin/perl")))
101 (substitute* "Makefile"
102 (("/usr/local") out))
103 ;; for the install phase
104 (substitute* "Makefile"
105 (("-mkdir") "mkdir -p"))
106 ;; drop installation of non-free files
107 (substitute* "Makefile"
108 ((" install.include") ""))))
110 (synopsis "Collection of utilities for manipulating PostScript documents")
112 "PSUtils is a collection of utilities for manipulating PostScript
113 documents. Programs included are psnup, for placing out several logical pages
114 on a single sheet of paper, psselect, for selecting pages from a document,
115 pstops, for general imposition, psbook, for signature generation for booklet
116 printing, and psresize, for adjusting page sizes.")
117 (license (license:non-copyleft "file://LICENSE"
118 "See LICENSE in the distribution."))
119 (home-page "http://knackered.org/angus/psutils/")))
121 (define-public ghostscript
127 (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
131 "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))
132 (patches (list (search-patch "ghostscript-runpath.patch")))))
133 (build-system gnu-build-system)
134 (inputs `(("freetype" ,freetype)
136 ("libjpeg-8" ,libjpeg-8)
138 ("libpaper" ,libpaper)
143 ("pkg-config" ,pkg-config) ; needed to find libtiff
144 ("python" ,python-wrapper)
148 (modify-phases %standard-phases
149 (add-after 'configure 'patch-config-files
151 (substitute* "base/all-arch.mak"
152 (("/bin/sh") (which "bash")))
153 (substitute* "base/unixhead.mak"
154 (("/bin/sh") (which "bash")))))
155 (add-after 'build 'build-so
157 (zero? (system* "make" "so"))))
158 (add-after 'install 'install-so
160 (zero? (system* "make" "install-so")))))))
161 (synopsis "PostScript and PDF interpreter")
163 "Ghostscript is an interpreter for the PostScript language and the PDF
164 file format. It also includes a C library that implements the graphics
165 capabilities of the PostScript language. It supports a wide variety of
166 output file formats and printers.")
167 (license license:agpl3+)
168 (home-page "http://www.gnu.org/software/ghostscript/")))
176 (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
179 "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))))
180 (build-system gnu-build-system)
182 `(("libtool" ,libtool)
183 ("automake" ,automake)
184 ("autoconf" ,autoconf)))
190 ;; need to regenerate macros
191 (system* "autoreconf" "-if")
192 ;; do not run configure
193 (substitute* "autogen.sh"
194 (("^.*\\$srcdir/configure.*") ""))
195 (system* "bash" "autogen.sh")
197 ;; create configure script in ./ijs/
199 ;; do not run configure
200 (substitute* "autogen.sh"
201 (("^.*\\$srcdir/configure.*") "")
202 (("^ + && echo Now type.*$") ""))
203 (zero? (system* "bash" "autogen.sh")))
205 (synopsis "IJS driver framework for inkjet and other raster devices")
207 "IJS is a protocol for transmission of raster page images. This package
208 provides the reference implementation of the raster printer driver
210 (license license:expat)
211 (home-page "http://www.gnu.org/software/ghostscript/")))
213 (define-public gs-fonts
219 (uri (string-append "mirror://sourceforge/gs-fonts/gs-fonts/"
221 "%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-"
225 "00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf"))))
226 (build-system gnu-build-system)
228 `(#:tests? #f ; nothing to check, just files to copy
229 #:modules ((guix build gnu-build-system)
231 (srfi srfi-1)) ; for alist-delete
239 (lambda* (#:key outputs #:allow-other-keys)
240 (let* ((out (assoc-ref outputs "out"))
241 (dir (string-append out "/share/fonts/type1/ghostscript")))
245 (copy-file file (string-append dir "/" file)))
246 (find-files "." "pfb|afm"))))
247 %standard-phases)))))
248 (synopsis "Free replacements for the PostScript fonts")
250 "Ghostscript fonts provides fonts and font metrics customarily distributed with
251 Ghostscript. It currently includes the 35 standard PostScript fonts.")
252 (license license:gpl2)
253 (home-page "http://sourceforge.net/projects/gs-fonts/")))
255 (define-public libspectre
261 (uri (string-append "http://libspectre.freedesktop.org/releases/libspectre-"
264 "1v63lqc6bhhxwkpa43qmz8phqs8ci4dhzizyy16d3vkb20m846z8"))))
265 (build-system gnu-build-system)
266 (inputs `(("ghostscript" ,ghostscript)))
267 (native-inputs `(("pkg-config" ,pkg-config)))
268 (synopsis "Postscript rendering library")
270 "libspectre is a small library for rendering Postscript documents.
271 It provides a convenient easy to use API for handling and rendering
272 Postscript documents.")
273 (license license:gpl2+)
274 (home-page "http://www.freedesktop.org/wiki/Software/libspectre")))