projects/guix·blob version-0.8.3 · refs

289 lines · 11.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <[email protected]>
3;;; Copyright © 2014 Mark H Weaver <[email protected]>
4;;; Copyright © 2015 Ricardo Wurmus <[email protected]>
5;;; Copyright © 2015 Ludovic Courtès <[email protected]>
6;;;
7;;; This file is part of GNU Guix.
8;;;
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.
13;;;
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.
18;;;
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/>.
21
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))
36
37(define-public lcms
38 (package
39 (name "lcms")
40 (version "2.6")
41 (source (origin
42 (method url-fetch)
43 (uri (string-append
44 "mirror://sourceforge/lcms/lcms2-" version ".tar.gz"))
45 (sha256 (base32
46 "1c8lgq8gfs3nyplvbx9k8wzfj6r2bqi3f611vb1m8z3476454wji"))))
47 (build-system gnu-build-system)
48 (inputs `(("libjpeg-8" ,libjpeg-8)
49 ("libtiff" ,libtiff)
50 ("zlib" ,zlib)))
51 (synopsis "Little CMS, a small-footprint colour management engine")
52 (description
53 "Little CMS is a small-footprint colour management engine, with special
54focus on accuracy and performance. It uses the International Color
55Consortium standard (ICC), approved as ISO 15076-1.")
56 (license license:x11)
57 (home-page "http://www.littlecms.com/")))
58
59(define-public libpaper
60 (package
61 (name "libpaper")
62 (version "1.1.24")
63 (source (origin
64 (method url-fetch)
65 (uri (string-append
66 "http://ftp.de.debian.org/debian/pool/main/libp/libpaper/libpaper_"
67 version ".tar.gz"))
68 (sha256 (base32
69 "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q"))))
70 (build-system gnu-build-system)
71 (synopsis "Library for handling paper sizes")
72 (description
73 "The paper library and accompanying files are intended to provide a simple
74way for applications to take actions based on a system- or user-specified
75paper size.")
76 (license license:gpl2)
77 (home-page "http://packages.qa.debian.org/libp/libpaper.html")))
78
79(define-public psutils
80 (package
81 (name "psutils")
82 (version "17")
83 (source (origin
84 (method url-fetch)
85 (uri "ftp://ftp.knackered.org/pub/psutils/psutils.tar.gz")
86 (sha256 (base32
87 "1r4ab1fvgganm02kmm70b2r1azwzbav2am41gbigpa2bb1wynlrq"))))
88 (build-system gnu-build-system)
89 (inputs `(("perl" ,perl)))
90 (arguments
91 `(#:tests? #f ; none provided
92 #:phases
93 (alist-replace
94 'configure
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") ""))))
109 %standard-phases)))
110 (synopsis "Collection of utilities for manipulating PostScript documents")
111 (description
112 "PSUtils is a collection of utilities for manipulating PostScript
113documents. Programs included are psnup, for placing out several logical pages
114on a single sheet of paper, psselect, for selecting pages from a document,
115pstops, for general imposition, psbook, for signature generation for booklet
116printing, 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/")))
120
121(define-public ghostscript
122 (package
123 (name "ghostscript")
124 (version "9.14.0")
125 (source (origin
126 (method url-fetch)
127 (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
128 version ".tar.xz"))
129 (sha256
130 (base32
131 "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))
132 (patches (list (search-patch "ghostscript-runpath.patch")))
133 (modules '((guix build utils)))
134 (snippet
135 ;; Honor --docdir.
136 '(substitute* "Makefile.in"
137 (("^docdir=.*$") "docdir = @docdir@\n")
138 (("^exdir=.*$") "exdir = $(docdir)/examples\n")))))
139 (build-system gnu-build-system)
140 (outputs '("out" "doc")) ;16 MiB of HTML/PS doc + examples
141 (inputs `(("freetype" ,freetype)
142 ("lcms" ,lcms)
143 ("libjpeg-8" ,libjpeg-8)
144 ("libpng" ,libpng)
145 ("libpaper" ,libpaper)
146 ("libtiff" ,libtiff)
147 ("zlib" ,zlib)))
148 (native-inputs
149 `(("perl" ,perl)
150 ("pkg-config" ,pkg-config) ; needed to find libtiff
151 ("python" ,python-wrapper)
152 ("tcl" ,tcl)))
153 (arguments
154 `(#:phases
155 (modify-phases %standard-phases
156 (add-after 'configure 'patch-config-files
157 (lambda _
158 (substitute* "base/all-arch.mak"
159 (("/bin/sh") (which "bash")))
160 (substitute* "base/unixhead.mak"
161 (("/bin/sh") (which "bash")))))
162 (add-after 'configure 'remove-doc-reference
163 (lambda _
164 ;; Don't retain a reference to the 'doc' output in 'gs'.
165 ;; The only use of this definition is in the output of
166 ;; 'gs --help', so this change is fine.
167 (substitute* "base/gscdef.c"
168 (("GS_DOCDIR")
169 "\"~/.guix-profile/share/doc/ghostscript\""))))
170 (add-after 'build 'build-so
171 (lambda _
172 (zero? (system* "make" "so"))))
173 (add-after 'install 'install-so
174 (lambda _
175 (zero? (system* "make" "install-so")))))))
176 (synopsis "PostScript and PDF interpreter")
177 (description
178 "Ghostscript is an interpreter for the PostScript language and the PDF
179file format. It also includes a C library that implements the graphics
180capabilities of the PostScript language. It supports a wide variety of
181output file formats and printers.")
182 (license license:agpl3+)
183 (home-page "http://www.gnu.org/software/ghostscript/")))
184
185(define-public ijs
186 (package
187 (name "ijs")
188 (version "9.14.0")
189 (source (origin
190 (method url-fetch)
191 (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
192 version ".tar.xz"))
193 (sha256 (base32
194 "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))))
195 (build-system gnu-build-system)
196 (native-inputs
197 `(("libtool" ,libtool)
198 ("automake" ,automake)
199 ("autoconf" ,autoconf)))
200 (arguments
201 `(#:phases
202 (alist-cons-after
203 'unpack 'autogen
204 (lambda _
205 ;; need to regenerate macros
206 (system* "autoreconf" "-if")
207 ;; do not run configure
208 (substitute* "autogen.sh"
209 (("^.*\\$srcdir/configure.*") ""))
210 (system* "bash" "autogen.sh")
211
212 ;; create configure script in ./ijs/
213 (chdir "ijs")
214 ;; do not run configure
215 (substitute* "autogen.sh"
216 (("^.*\\$srcdir/configure.*") "")
217 (("^ + && echo Now type.*$") ""))
218 (zero? (system* "bash" "autogen.sh")))
219 %standard-phases)))
220 (synopsis "IJS driver framework for inkjet and other raster devices")
221 (description
222 "IJS is a protocol for transmission of raster page images. This package
223provides the reference implementation of the raster printer driver
224architecture.")
225 (license license:expat)
226 (home-page "http://www.gnu.org/software/ghostscript/")))
227
228(define-public gs-fonts
229 (package
230 (name "gs-fonts")
231 (version "8.11")
232 (source (origin
233 (method url-fetch)
234 (uri (string-append "mirror://sourceforge/gs-fonts/gs-fonts/"
235 version
236 "%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-"
237 version
238 ".tar.gz"))
239 (sha256 (base32
240 "00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf"))))
241 (build-system gnu-build-system)
242 (arguments
243 `(#:tests? #f ; nothing to check, just files to copy
244 #:modules ((guix build gnu-build-system)
245 (guix build utils)
246 (srfi srfi-1)) ; for alist-delete
247 #:phases
248 (alist-delete
249 'configure
250 (alist-delete
251 'build
252 (alist-replace
253 'install
254 (lambda* (#:key outputs #:allow-other-keys)
255 (let* ((out (assoc-ref outputs "out"))
256 (dir (string-append out "/share/fonts/type1/ghostscript")))
257 (mkdir-p dir)
258 (for-each
259 (lambda (file)
260 (copy-file file (string-append dir "/" file)))
261 (find-files "." "pfb|afm"))))
262 %standard-phases)))))
263 (synopsis "Free replacements for the PostScript fonts")
264 (description
265 "Ghostscript fonts provides fonts and font metrics customarily distributed with
266Ghostscript. It currently includes the 35 standard PostScript fonts.")
267 (license license:gpl2)
268 (home-page "http://sourceforge.net/projects/gs-fonts/")))
269
270(define-public libspectre
271 (package
272 (name "libspectre")
273 (version "0.2.7")
274 (source (origin
275 (method url-fetch)
276 (uri (string-append "http://libspectre.freedesktop.org/releases/libspectre-"
277 version ".tar.gz"))
278 (sha256 (base32
279 "1v63lqc6bhhxwkpa43qmz8phqs8ci4dhzizyy16d3vkb20m846z8"))))
280 (build-system gnu-build-system)
281 (inputs `(("ghostscript" ,ghostscript)))
282 (native-inputs `(("pkg-config" ,pkg-config)))
283 (synopsis "Postscript rendering library")
284 (description
285 "libspectre is a small library for rendering Postscript documents.
286It provides a convenient easy to use API for handling and rendering
287Postscript documents.")
288 (license license:gpl2+)
289 (home-page "http://www.freedesktop.org/wiki/Software/libspectre")))