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) |
bf4018fb AE |
23 | #:use-module (gnu packages libjpeg) |
24 | #:use-module (gnu packages libpng) | |
25 | #:use-module (gnu packages libtiff) | |
26 | #:use-module (gnu packages perl) | |
27 | #:use-module (gnu packages pkg-config) | |
28 | #:use-module (gnu packages python) | |
29 | #:use-module (gnu packages tcl) | |
30 | #:use-module ((guix licenses) #:renamer (symbol-prefix-proc 'license:)) | |
31 | #:use-module (guix packages) | |
32 | #:use-module (guix download) | |
33 | #:use-module (guix build-system gnu)) | |
34 | ||
35 | (define-public lcms | |
36 | (package | |
37 | (name "lcms") | |
38 | (version "2.4") | |
39 | (source (origin | |
40 | (method url-fetch) | |
41 | (uri (string-append | |
42 | "http://downloads.sourceforge.net/project/lcms/lcms/" | |
43 | version "/lcms2-" version ".tar.gz")) | |
44 | (sha256 (base32 | |
45 | "1s1ppvqaydf2yqc72mw6zfviwxccb311a6hrbi802sgjxw84sl9a")))) | |
46 | (build-system gnu-build-system) | |
47 | (inputs `(("libjpeg-8" ,libjpeg-8) | |
48 | ("libtiff" ,libtiff) | |
49 | ("zlib" ,zlib))) | |
50 | (synopsis "Little CMS, a small-footprint colour management engine") | |
51 | (description | |
52 | "Little CMS is a small-footprint colour management engine, with special | |
53 | focus on accuracy and performance. It uses the International Color | |
54 | Consortium standard (ICC), approved as ISO 15076-1.") | |
55 | (license license:x11) | |
56 | (home-page "http://www.littlecms.com/"))) | |
57 | ||
58 | (define-public libpaper | |
59 | (package | |
60 | (name "libpaper") | |
61 | (version "1.1.24") | |
62 | (source (origin | |
63 | (method url-fetch) | |
64 | (uri (string-append | |
65 | "http://ftp.de.debian.org/debian/pool/main/libp/libpaper/libpaper_" | |
66 | version ".tar.gz")) | |
67 | (sha256 (base32 | |
68 | "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q")))) | |
69 | (build-system gnu-build-system) | |
70 | (synopsis "libpaper, a library for handling paper sizes") | |
71 | (description | |
72 | "The paper library and accompanying files are intended to provide a simple | |
73 | way for applications to take actions based on a system- or user-specified | |
74 | paper size.") | |
75 | (license license:gpl2) | |
76 | (home-page "http://packages.qa.debian.org/libp/libpaper.html"))) | |
77 | ||
87ec7a7a AE |
78 | (define-public psutils |
79 | (package | |
80 | (name "psutils") | |
81 | (version "17") | |
82 | (source (origin | |
83 | (method url-fetch) | |
84 | (uri "ftp://ftp.knackered.org/pub/psutils/psutils.tar.gz") | |
85 | (sha256 (base32 | |
86 | "1r4ab1fvgganm02kmm70b2r1azwzbav2am41gbigpa2bb1wynlrq")))) | |
87 | (build-system gnu-build-system) | |
88 | (inputs `(("perl" ,perl))) | |
89 | (arguments | |
90 | `(#:tests? #f ; none provided | |
91 | #:phases | |
92 | (alist-replace | |
93 | 'configure | |
94 | (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) | |
95 | (let ((perl (assoc-ref inputs "perl")) | |
96 | (out (assoc-ref outputs "out"))) | |
97 | (copy-file "Makefile.unix" "Makefile") | |
98 | (substitute* "Makefile" | |
99 | (("/usr/local/bin/perl") (string-append perl "/bin/perl"))) | |
100 | (substitute* "Makefile" | |
101 | (("/usr/local") out)) | |
102 | ;; for the install phase | |
103 | (substitute* "Makefile" | |
104 | (("-mkdir") "mkdir -p")) | |
105 | ;; drop installation of non-free files | |
106 | (substitute* "Makefile" | |
107 | ((" install.include") "")))) | |
108 | %standard-phases))) | |
109 | (synopsis "psutils, a collection of utilities for manipulating PostScript documents") | |
110 | (description | |
111 | "PSUtils is a collection of utilities for manipulating PostScript | |
112 | documents. Programs included are psnup, for placing out several logical pages | |
113 | on a single sheet of paper, psselect, for selecting pages from a document, | |
114 | pstops, for general imposition, psbook, for signature generation for booklet | |
115 | printing, and psresize, for adjusting page sizes.") | |
116 | (license (license:bsd-style "file://LICENSE" | |
117 | "See LICENSE in the distribution.")) | |
118 | (home-page "http://knackered.org/angus/psutils/"))) | |
119 | ||
bf4018fb AE |
120 | (define-public ghostscript |
121 | (package | |
122 | (name "ghostscript") | |
123 | (version "9.06.0") | |
124 | (source (origin | |
125 | (method url-fetch) | |
126 | (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-" | |
127 | version ".tar.xz")) | |
128 | (sha256 (base32 | |
129 | "0bcg2203p7cm0f53f3s883xhj2c91xnaxakj2cy7kcdknfxplvs4")))) | |
130 | (build-system gnu-build-system) | |
131 | (inputs `(("freetype" ,freetype) | |
132 | ("lcms" ,lcms) | |
133 | ("libjpeg-8" ,libjpeg-8) | |
134 | ("libpng" ,libpng) | |
135 | ("libpaper" ,libpaper) | |
136 | ("libtiff" ,libtiff) | |
137 | ("perl" ,perl) | |
138 | ("pkg-config" ,pkg-config) ; needed to find libtiff | |
ee3e314b | 139 | ("python" ,python-wrapper) |
bf4018fb AE |
140 | ("tcl" ,tcl) |
141 | ("zlib" ,zlib))) | |
142 | (arguments | |
143 | `(#:phases | |
144 | (alist-replace | |
145 | 'configure | |
146 | (lambda* (#:key #:allow-other-keys #:rest args) | |
147 | (let ((configure (assoc-ref %standard-phases 'configure))) | |
148 | (apply configure args) | |
149 | (substitute* "base/all-arch.mak" | |
150 | (("/bin/sh") (which "bash"))) | |
151 | (substitute* "base/unixhead.mak" | |
152 | (("/bin/sh") (which "bash"))))) | |
2b902c3c AE |
153 | (alist-replace |
154 | 'build | |
155 | (lambda* (#:key #:allow-other-keys #:rest args) | |
156 | (let ((build (assoc-ref %standard-phases 'build))) | |
157 | (apply build args) | |
158 | (system* "make" "so"))) | |
159 | (alist-replace | |
160 | 'install | |
161 | (lambda* (#:key #:allow-other-keys #:rest args) | |
162 | (let ((install (assoc-ref %standard-phases 'install))) | |
163 | (apply install args) | |
164 | (system* "make" "install-so"))) | |
165 | %standard-phases))))) | |
f50d2669 | 166 | (synopsis "PostScript and PDF interpreter") |
bf4018fb AE |
167 | (description |
168 | "GNU Ghostscript is an interpreter for PostScript and Portable Document | |
169 | Format (PDF) files. | |
170 | It consists of a PostScript interpreter layer, and a graphics | |
171 | library.") | |
172 | (license license:gpl3+) | |
173 | (home-page "http://www.gnu.org/software/ghostscript/"))) | |
1f7c6a1f AE |
174 | |
175 | (define-public gs-fonts | |
176 | (package | |
177 | (name "gs-fonts") | |
178 | (version "8.11") | |
179 | (source (origin | |
180 | (method url-fetch) | |
181 | (uri (string-append "mirror://sourceforge/gs-fonts/gs-fonts/" | |
182 | version | |
183 | "%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-" | |
184 | version | |
185 | ".tar.gz")) | |
186 | (sha256 (base32 | |
187 | "00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf")))) | |
188 | (build-system gnu-build-system) | |
189 | (arguments | |
190 | `(#:tests? #f ; nothing to check, just files to copy | |
191 | #:modules ((guix build gnu-build-system) | |
192 | (guix build utils) | |
193 | (srfi srfi-1)) ; for alist-delete | |
194 | #:phases | |
195 | (alist-delete | |
196 | 'configure | |
197 | (alist-delete | |
198 | 'build | |
199 | (alist-replace | |
200 | 'install | |
201 | (lambda* (#:key outputs #:allow-other-keys) | |
202 | (let* ((out (assoc-ref outputs "out")) | |
203 | (dir (string-append out "/share/fonts/type1/ghostscript"))) | |
204 | (mkdir-p dir) | |
205 | (for-each | |
206 | (lambda (file) | |
207 | (copy-file file (string-append dir "/" file))) | |
208 | (find-files "." "pfb|afm")))) | |
209 | %standard-phases))))) | |
210 | (synopsis "free replacements for the PostScript fonts") | |
211 | (description | |
212 | "gs-fonts provides fonts and font metrics customarily distributed with | |
213 | Ghostscript. It currently includes the 35 standard PostScript fonts.") | |
214 | (license license:gpl2) | |
215 | (home-page "http://sourceforge.net/projects/gs-fonts/"))) | |
c5ea1201 | 216 | |
7cf2a2a1 AE |
217 | (define-public libspectre |
218 | (package | |
219 | (name "libspectre") | |
220 | (version "0.2.7") | |
221 | (source (origin | |
222 | (method url-fetch) | |
223 | (uri (string-append "http://libspectre.freedesktop.org/releases/libspectre-" | |
224 | version ".tar.gz")) | |
225 | (sha256 (base32 | |
226 | "1v63lqc6bhhxwkpa43qmz8phqs8ci4dhzizyy16d3vkb20m846z8")))) | |
227 | (build-system gnu-build-system) | |
228 | (inputs `(("ghostscript" ,ghostscript) | |
229 | ("pkg-config" ,pkg-config))) | |
230 | (synopsis "postscript rendering library") | |
231 | (description | |
232 | "libspectre is a small library for rendering Postscript documents. | |
233 | It provides a convenient easy to use API for handling and rendering | |
234 | Postscript documents.") | |
235 | (license license:gpl2+) | |
236 | (home-page "http://www.freedesktop.org/wiki/Software/libspectre"))) |