licenses: Rename 'bsd-style' to 'non-copyleft'.
[jackhill/guix/guix.git] / gnu / packages / ghostscript.scm
CommitLineData
bf4018fb
AE
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
6b282cc9 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
01aae5fc 4;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
bf4018fb
AE
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages ghostscript)
22 #:use-module (gnu packages)
01aae5fc 23 #:use-module (gnu packages autotools)
bf4018fb 24 #:use-module (gnu packages compression)
a86177d6 25 #:use-module (gnu packages fontutils)
e55354b8 26 #:use-module (gnu packages image)
bf4018fb
AE
27 #:use-module (gnu packages perl)
28 #:use-module (gnu packages pkg-config)
29 #:use-module (gnu packages python)
30 #:use-module (gnu packages tcl)
b5b73a82 31 #:use-module ((guix licenses) #:prefix license:)
bf4018fb
AE
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix build-system gnu))
35
36(define-public lcms
37 (package
38 (name "lcms")
6b282cc9 39 (version "2.6")
bf4018fb
AE
40 (source (origin
41 (method url-fetch)
42 (uri (string-append
43 "http://downloads.sourceforge.net/project/lcms/lcms/"
44 version "/lcms2-" version ".tar.gz"))
45 (sha256 (base32
6b282cc9 46 "1c8lgq8gfs3nyplvbx9k8wzfj6r2bqi3f611vb1m8z3476454wji"))))
bf4018fb
AE
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
35b9e423 54focus on accuracy and performance. It uses the International Color
bf4018fb
AE
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)
35b9e423 71 (synopsis "Library for handling paper sizes")
bf4018fb
AE
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
87ec7a7a
AE
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)))
35b9e423 110 (synopsis "Collection of utilities for manipulating PostScript documents")
87ec7a7a
AE
111 (description
112 "PSUtils is a collection of utilities for manipulating PostScript
35b9e423 113documents. Programs included are psnup, for placing out several logical pages
87ec7a7a
AE
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:bsd-style "file://LICENSE"
118 "See LICENSE in the distribution."))
119 (home-page "http://knackered.org/angus/psutils/")))
120
bf4018fb
AE
121(define-public ghostscript
122 (package
123 (name "ghostscript")
a6e81858 124 (version "9.14.0")
bf4018fb
AE
125 (source (origin
126 (method url-fetch)
127 (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
128 version ".tar.xz"))
129 (sha256 (base32
a6e81858 130 "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))))
bf4018fb
AE
131 (build-system gnu-build-system)
132 (inputs `(("freetype" ,freetype)
133 ("lcms" ,lcms)
134 ("libjpeg-8" ,libjpeg-8)
135 ("libpng" ,libpng)
136 ("libpaper" ,libpaper)
137 ("libtiff" ,libtiff)
bf4018fb 138 ("zlib" ,zlib)))
c4c4cc05
JD
139 (native-inputs
140 `(("perl" ,perl)
141 ("pkg-config" ,pkg-config) ; needed to find libtiff
142 ("python" ,python-wrapper)
143 ("tcl" ,tcl)))
bf4018fb
AE
144 (arguments
145 `(#:phases
d4bf49b1
EB
146 (alist-cons-after
147 'configure 'patch-config-files
148 (lambda _
149 (substitute* "base/all-arch.mak"
150 (("/bin/sh") (which "bash")))
151 (substitute* "base/unixhead.mak"
152 (("/bin/sh") (which "bash"))))
153 (alist-cons-after
154 'build 'build-so
155 (lambda _ (system* "make" "so"))
156 (alist-cons-after
157 'install 'install-so
158 (lambda _ (system* "make" "install-so"))
2b902c3c 159 %standard-phases)))))
f50d2669 160 (synopsis "PostScript and PDF interpreter")
bf4018fb 161 (description
a22dc0c4
LC
162 "Ghostscript is an interpreter for the PostScript language and the PDF
163file format. It also includes a C library that implements the graphics
164capabilities of the PostScript language. It supports a wide variety of
165output file formats and printers.")
a6e81858 166 (license license:agpl3+)
bf4018fb 167 (home-page "http://www.gnu.org/software/ghostscript/")))
1f7c6a1f 168
01aae5fc
RW
169(define-public ijs
170 (package
171 (name "ijs")
172 (version "9.14.0")
173 (source (origin
174 (method url-fetch)
175 (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
176 version ".tar.xz"))
177 (sha256 (base32
178 "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))))
179 (build-system gnu-build-system)
180 (native-inputs
181 `(("libtool" ,libtool)
182 ("automake" ,automake)
183 ("autoconf" ,autoconf)))
184 (arguments
185 `(#:phases
186 (alist-cons-after
187 'unpack 'autogen
188 (lambda _
189 ;; need to regenerate macros
190 (system* "autoreconf" "-if")
191 ;; do not run configure
192 (substitute* "autogen.sh"
193 (("^.*\\$srcdir/configure.*") ""))
194 (system* "bash" "autogen.sh")
195
196 ;; create configure script in ./ijs/
197 (chdir "ijs")
198 ;; do not run configure
199 (substitute* "autogen.sh"
200 (("^.*\\$srcdir/configure.*") "")
201 (("^ + && echo Now type.*$") ""))
202 (zero? (system* "bash" "autogen.sh")))
203 %standard-phases)))
204 (synopsis "IJS driver framework for inkjet and other raster devices")
205 (description
206 "IJS is a protocol for transmission of raster page images. This package
207provides the reference implementation of the raster printer driver
208architecture.")
209 (license license:expat)
210 (home-page "http://www.gnu.org/software/ghostscript/")))
211
1f7c6a1f
AE
212(define-public gs-fonts
213 (package
214 (name "gs-fonts")
215 (version "8.11")
216 (source (origin
217 (method url-fetch)
218 (uri (string-append "mirror://sourceforge/gs-fonts/gs-fonts/"
219 version
220 "%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-"
221 version
222 ".tar.gz"))
223 (sha256 (base32
224 "00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf"))))
225 (build-system gnu-build-system)
226 (arguments
227 `(#:tests? #f ; nothing to check, just files to copy
228 #:modules ((guix build gnu-build-system)
229 (guix build utils)
230 (srfi srfi-1)) ; for alist-delete
231 #:phases
232 (alist-delete
233 'configure
234 (alist-delete
235 'build
236 (alist-replace
237 'install
238 (lambda* (#:key outputs #:allow-other-keys)
239 (let* ((out (assoc-ref outputs "out"))
240 (dir (string-append out "/share/fonts/type1/ghostscript")))
241 (mkdir-p dir)
242 (for-each
243 (lambda (file)
244 (copy-file file (string-append dir "/" file)))
245 (find-files "." "pfb|afm"))))
246 %standard-phases)))))
35b9e423 247 (synopsis "Free replacements for the PostScript fonts")
1f7c6a1f 248 (description
35b9e423
EB
249 "Ghostscript fonts provides fonts and font metrics customarily distributed with
250Ghostscript. It currently includes the 35 standard PostScript fonts.")
1f7c6a1f
AE
251 (license license:gpl2)
252 (home-page "http://sourceforge.net/projects/gs-fonts/")))
c5ea1201 253
7cf2a2a1
AE
254(define-public libspectre
255 (package
256 (name "libspectre")
257 (version "0.2.7")
258 (source (origin
259 (method url-fetch)
260 (uri (string-append "http://libspectre.freedesktop.org/releases/libspectre-"
261 version ".tar.gz"))
262 (sha256 (base32
263 "1v63lqc6bhhxwkpa43qmz8phqs8ci4dhzizyy16d3vkb20m846z8"))))
264 (build-system gnu-build-system)
c4c4cc05
JD
265 (inputs `(("ghostscript" ,ghostscript)))
266 (native-inputs `(("pkg-config" ,pkg-config)))
35b9e423 267 (synopsis "Postscript rendering library")
7cf2a2a1
AE
268 (description
269 "libspectre is a small library for rendering Postscript documents.
270It provides a convenient easy to use API for handling and rendering
271Postscript documents.")
272 (license license:gpl2+)
273 (home-page "http://www.freedesktop.org/wiki/Software/libspectre")))