Commit | Line | Data |
---|---|---|
bf4018fb AE |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> | |
3 | ;;; | |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
7 | ;;; under the terms of the GNU General Public License as published by | |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
18 | ||
19 | (define-module (gnu packages ghostscript) | |
20 | #:use-module (gnu packages) | |
21 | #:use-module (gnu packages compression) | |
a86177d6 | 22 | #:use-module (gnu packages fontutils) |
e55354b8 | 23 | #:use-module (gnu packages image) |
bf4018fb AE |
24 | #:use-module (gnu packages perl) |
25 | #:use-module (gnu packages pkg-config) | |
26 | #:use-module (gnu packages python) | |
27 | #:use-module (gnu packages tcl) | |
b5b73a82 | 28 | #:use-module ((guix licenses) #:prefix license:) |
bf4018fb AE |
29 | #:use-module (guix packages) |
30 | #:use-module (guix download) | |
31 | #:use-module (guix build-system gnu)) | |
32 | ||
33 | (define-public lcms | |
34 | (package | |
35 | (name "lcms") | |
36 | (version "2.4") | |
37 | (source (origin | |
38 | (method url-fetch) | |
39 | (uri (string-append | |
40 | "http://downloads.sourceforge.net/project/lcms/lcms/" | |
41 | version "/lcms2-" version ".tar.gz")) | |
42 | (sha256 (base32 | |
43 | "1s1ppvqaydf2yqc72mw6zfviwxccb311a6hrbi802sgjxw84sl9a")))) | |
44 | (build-system gnu-build-system) | |
45 | (inputs `(("libjpeg-8" ,libjpeg-8) | |
46 | ("libtiff" ,libtiff) | |
47 | ("zlib" ,zlib))) | |
48 | (synopsis "Little CMS, a small-footprint colour management engine") | |
49 | (description | |
50 | "Little CMS is a small-footprint colour management engine, with special | |
35b9e423 | 51 | focus on accuracy and performance. It uses the International Color |
bf4018fb AE |
52 | Consortium standard (ICC), approved as ISO 15076-1.") |
53 | (license license:x11) | |
54 | (home-page "http://www.littlecms.com/"))) | |
55 | ||
56 | (define-public libpaper | |
57 | (package | |
58 | (name "libpaper") | |
59 | (version "1.1.24") | |
60 | (source (origin | |
61 | (method url-fetch) | |
62 | (uri (string-append | |
63 | "http://ftp.de.debian.org/debian/pool/main/libp/libpaper/libpaper_" | |
64 | version ".tar.gz")) | |
65 | (sha256 (base32 | |
66 | "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q")))) | |
67 | (build-system gnu-build-system) | |
35b9e423 | 68 | (synopsis "Library for handling paper sizes") |
bf4018fb AE |
69 | (description |
70 | "The paper library and accompanying files are intended to provide a simple | |
71 | way for applications to take actions based on a system- or user-specified | |
72 | paper size.") | |
73 | (license license:gpl2) | |
74 | (home-page "http://packages.qa.debian.org/libp/libpaper.html"))) | |
75 | ||
87ec7a7a AE |
76 | (define-public psutils |
77 | (package | |
78 | (name "psutils") | |
79 | (version "17") | |
80 | (source (origin | |
81 | (method url-fetch) | |
82 | (uri "ftp://ftp.knackered.org/pub/psutils/psutils.tar.gz") | |
83 | (sha256 (base32 | |
84 | "1r4ab1fvgganm02kmm70b2r1azwzbav2am41gbigpa2bb1wynlrq")))) | |
85 | (build-system gnu-build-system) | |
86 | (inputs `(("perl" ,perl))) | |
87 | (arguments | |
88 | `(#:tests? #f ; none provided | |
89 | #:phases | |
90 | (alist-replace | |
91 | 'configure | |
92 | (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) | |
93 | (let ((perl (assoc-ref inputs "perl")) | |
94 | (out (assoc-ref outputs "out"))) | |
95 | (copy-file "Makefile.unix" "Makefile") | |
96 | (substitute* "Makefile" | |
97 | (("/usr/local/bin/perl") (string-append perl "/bin/perl"))) | |
98 | (substitute* "Makefile" | |
99 | (("/usr/local") out)) | |
100 | ;; for the install phase | |
101 | (substitute* "Makefile" | |
102 | (("-mkdir") "mkdir -p")) | |
103 | ;; drop installation of non-free files | |
104 | (substitute* "Makefile" | |
105 | ((" install.include") "")))) | |
106 | %standard-phases))) | |
35b9e423 | 107 | (synopsis "Collection of utilities for manipulating PostScript documents") |
87ec7a7a AE |
108 | (description |
109 | "PSUtils is a collection of utilities for manipulating PostScript | |
35b9e423 | 110 | documents. Programs included are psnup, for placing out several logical pages |
87ec7a7a AE |
111 | on a single sheet of paper, psselect, for selecting pages from a document, |
112 | pstops, for general imposition, psbook, for signature generation for booklet | |
113 | printing, and psresize, for adjusting page sizes.") | |
114 | (license (license:bsd-style "file://LICENSE" | |
115 | "See LICENSE in the distribution.")) | |
116 | (home-page "http://knackered.org/angus/psutils/"))) | |
117 | ||
bf4018fb AE |
118 | (define-public ghostscript |
119 | (package | |
120 | (name "ghostscript") | |
121 | (version "9.06.0") | |
122 | (source (origin | |
123 | (method url-fetch) | |
124 | (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-" | |
125 | version ".tar.xz")) | |
126 | (sha256 (base32 | |
127 | "0bcg2203p7cm0f53f3s883xhj2c91xnaxakj2cy7kcdknfxplvs4")))) | |
128 | (build-system gnu-build-system) | |
129 | (inputs `(("freetype" ,freetype) | |
130 | ("lcms" ,lcms) | |
131 | ("libjpeg-8" ,libjpeg-8) | |
132 | ("libpng" ,libpng) | |
133 | ("libpaper" ,libpaper) | |
134 | ("libtiff" ,libtiff) | |
bf4018fb | 135 | ("zlib" ,zlib))) |
c4c4cc05 JD |
136 | (native-inputs |
137 | `(("perl" ,perl) | |
138 | ("pkg-config" ,pkg-config) ; needed to find libtiff | |
139 | ("python" ,python-wrapper) | |
140 | ("tcl" ,tcl))) | |
bf4018fb AE |
141 | (arguments |
142 | `(#:phases | |
d4bf49b1 EB |
143 | (alist-cons-after |
144 | 'configure 'patch-config-files | |
145 | (lambda _ | |
146 | (substitute* "base/all-arch.mak" | |
147 | (("/bin/sh") (which "bash"))) | |
148 | (substitute* "base/unixhead.mak" | |
149 | (("/bin/sh") (which "bash")))) | |
150 | (alist-cons-after | |
151 | 'build 'build-so | |
152 | (lambda _ (system* "make" "so")) | |
153 | (alist-cons-after | |
154 | 'install 'install-so | |
155 | (lambda _ (system* "make" "install-so")) | |
2b902c3c | 156 | %standard-phases))))) |
f50d2669 | 157 | (synopsis "PostScript and PDF interpreter") |
bf4018fb | 158 | (description |
a22dc0c4 LC |
159 | "Ghostscript is an interpreter for the PostScript language and the PDF |
160 | file format. It also includes a C library that implements the graphics | |
161 | capabilities of the PostScript language. It supports a wide variety of | |
162 | output file formats and printers.") | |
bf4018fb AE |
163 | (license license:gpl3+) |
164 | (home-page "http://www.gnu.org/software/ghostscript/"))) | |
1f7c6a1f AE |
165 | |
166 | (define-public gs-fonts | |
167 | (package | |
168 | (name "gs-fonts") | |
169 | (version "8.11") | |
170 | (source (origin | |
171 | (method url-fetch) | |
172 | (uri (string-append "mirror://sourceforge/gs-fonts/gs-fonts/" | |
173 | version | |
174 | "%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-" | |
175 | version | |
176 | ".tar.gz")) | |
177 | (sha256 (base32 | |
178 | "00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf")))) | |
179 | (build-system gnu-build-system) | |
180 | (arguments | |
181 | `(#:tests? #f ; nothing to check, just files to copy | |
182 | #:modules ((guix build gnu-build-system) | |
183 | (guix build utils) | |
184 | (srfi srfi-1)) ; for alist-delete | |
185 | #:phases | |
186 | (alist-delete | |
187 | 'configure | |
188 | (alist-delete | |
189 | 'build | |
190 | (alist-replace | |
191 | 'install | |
192 | (lambda* (#:key outputs #:allow-other-keys) | |
193 | (let* ((out (assoc-ref outputs "out")) | |
194 | (dir (string-append out "/share/fonts/type1/ghostscript"))) | |
195 | (mkdir-p dir) | |
196 | (for-each | |
197 | (lambda (file) | |
198 | (copy-file file (string-append dir "/" file))) | |
199 | (find-files "." "pfb|afm")))) | |
200 | %standard-phases))))) | |
35b9e423 | 201 | (synopsis "Free replacements for the PostScript fonts") |
1f7c6a1f | 202 | (description |
35b9e423 EB |
203 | "Ghostscript fonts provides fonts and font metrics customarily distributed with |
204 | Ghostscript. It currently includes the 35 standard PostScript fonts.") | |
1f7c6a1f AE |
205 | (license license:gpl2) |
206 | (home-page "http://sourceforge.net/projects/gs-fonts/"))) | |
c5ea1201 | 207 | |
7cf2a2a1 AE |
208 | (define-public libspectre |
209 | (package | |
210 | (name "libspectre") | |
211 | (version "0.2.7") | |
212 | (source (origin | |
213 | (method url-fetch) | |
214 | (uri (string-append "http://libspectre.freedesktop.org/releases/libspectre-" | |
215 | version ".tar.gz")) | |
216 | (sha256 (base32 | |
217 | "1v63lqc6bhhxwkpa43qmz8phqs8ci4dhzizyy16d3vkb20m846z8")))) | |
218 | (build-system gnu-build-system) | |
c4c4cc05 JD |
219 | (inputs `(("ghostscript" ,ghostscript))) |
220 | (native-inputs `(("pkg-config" ,pkg-config))) | |
35b9e423 | 221 | (synopsis "Postscript rendering library") |
7cf2a2a1 AE |
222 | (description |
223 | "libspectre is a small library for rendering Postscript documents. | |
224 | It provides a convenient easy to use API for handling and rendering | |
225 | Postscript documents.") | |
226 | (license license:gpl2+) | |
227 | (home-page "http://www.freedesktop.org/wiki/Software/libspectre"))) |