| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 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 (gnu packages xorg)
|
| 33 | #:use-module ((guix licenses) #:prefix license:)
|
| 34 | #:use-module (guix packages)
|
| 35 | #:use-module (guix download)
|
| 36 | #:use-module (guix build-system gnu)
|
| 37 | #:use-module (guix build-system trivial))
|
| 38 |
|
| 39 | (define-public lcms
|
| 40 | (package
|
| 41 | (name "lcms")
|
| 42 | (version "2.6")
|
| 43 | (source (origin
|
| 44 | (method url-fetch)
|
| 45 | (uri (string-append "mirror://sourceforge/lcms/lcms/" version
|
| 46 | "/lcms2-" version ".tar.gz"))
|
| 47 | (sha256 (base32
|
| 48 | "1c8lgq8gfs3nyplvbx9k8wzfj6r2bqi3f611vb1m8z3476454wji"))))
|
| 49 | (build-system gnu-build-system)
|
| 50 | (inputs `(("libjpeg-8" ,libjpeg-8)
|
| 51 | ("libtiff" ,libtiff)
|
| 52 | ("zlib" ,zlib)))
|
| 53 | (synopsis "Little CMS, a small-footprint colour management engine")
|
| 54 | (description
|
| 55 | "Little CMS is a small-footprint colour management engine, with special
|
| 56 | focus on accuracy and performance. It uses the International Color
|
| 57 | Consortium standard (ICC), approved as ISO 15076-1.")
|
| 58 | (license license:x11)
|
| 59 | (home-page "http://www.littlecms.com/")))
|
| 60 |
|
| 61 | (define-public libpaper
|
| 62 | (package
|
| 63 | (name "libpaper")
|
| 64 | (version "1.1.24")
|
| 65 | (source (origin
|
| 66 | (method url-fetch)
|
| 67 | (uri (string-append
|
| 68 | |
| 69 | |
| 70 | "http://pkgs.fedoraproject.org/repo/pkgs/libpaper/libpaper_"
|
| 71 | version ".tar.gz/5bc87d494ba470aba54f6d2d51471834/libpaper_"
|
| 72 | version ".tar.gz"))
|
| 73 | (sha256 (base32
|
| 74 | "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q"))))
|
| 75 | (build-system gnu-build-system)
|
| 76 | (synopsis "Library for handling paper sizes")
|
| 77 | (description
|
| 78 | "The paper library and accompanying files are intended to provide a simple
|
| 79 | way for applications to take actions based on a system- or user-specified
|
| 80 | paper size.")
|
| 81 | (license license:gpl2)
|
| 82 | (home-page "https://packages.qa.debian.org/libp/libpaper.html")))
|
| 83 |
|
| 84 | (define-public psutils
|
| 85 | (package
|
| 86 | (name "psutils")
|
| 87 | (version "17")
|
| 88 | (source (origin
|
| 89 | (method url-fetch)
|
| 90 | (uri "ftp://ftp.knackered.org/pub/psutils/psutils.tar.gz")
|
| 91 | (sha256 (base32
|
| 92 | "1r4ab1fvgganm02kmm70b2r1azwzbav2am41gbigpa2bb1wynlrq"))))
|
| 93 | (build-system gnu-build-system)
|
| 94 | (inputs `(("perl" ,perl)))
|
| 95 | (arguments
|
| 96 | `(#:tests? #f |
| 97 | #:phases
|
| 98 | (alist-replace
|
| 99 | 'configure
|
| 100 | (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
|
| 101 | (let ((perl (assoc-ref inputs "perl"))
|
| 102 | (out (assoc-ref outputs "out")))
|
| 103 | (copy-file "Makefile.unix" "Makefile")
|
| 104 | (substitute* "Makefile"
|
| 105 | (("/usr/local/bin/perl") (string-append perl "/bin/perl")))
|
| 106 | (substitute* "Makefile"
|
| 107 | (("/usr/local") out))
|
| 108 | |
| 109 | (substitute* "Makefile"
|
| 110 | (("-mkdir") "mkdir -p"))
|
| 111 | |
| 112 | (substitute* "Makefile"
|
| 113 | ((" install.include") ""))))
|
| 114 | %standard-phases)))
|
| 115 | (synopsis "Collection of utilities for manipulating PostScript documents")
|
| 116 | (description
|
| 117 | "PSUtils is a collection of utilities for manipulating PostScript
|
| 118 | documents. Programs included are psnup, for placing out several logical pages
|
| 119 | on a single sheet of paper, psselect, for selecting pages from a document,
|
| 120 | pstops, for general imposition, psbook, for signature generation for booklet
|
| 121 | printing, and psresize, for adjusting page sizes.")
|
| 122 | (license (license:non-copyleft "file://LICENSE"
|
| 123 | "See LICENSE in the distribution."))
|
| 124 | (home-page "http://knackered.org/angus/psutils/")))
|
| 125 |
|
| 126 | (define-public ghostscript
|
| 127 | (package
|
| 128 | (name "ghostscript")
|
| 129 | (version "9.14.0")
|
| 130 | (source (origin
|
| 131 | (method url-fetch)
|
| 132 | (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
|
| 133 | version ".tar.xz"))
|
| 134 | (sha256
|
| 135 | (base32
|
| 136 | "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))
|
| 137 | (patches (search-patches "ghostscript-CVE-2013-5653.patch"
|
| 138 | "ghostscript-CVE-2015-3228.patch"
|
| 139 | "ghostscript-CVE-2016-7976.patch"
|
| 140 | "ghostscript-CVE-2016-7978.patch"
|
| 141 | "ghostscript-CVE-2016-7979.patch"
|
| 142 | "ghostscript-CVE-2016-8602.patch"
|
| 143 | "ghostscript-runpath.patch"))
|
| 144 | (modules '((guix build utils)))
|
| 145 | (snippet
|
| 146 | |
| 147 | '(substitute* "Makefile.in"
|
| 148 | (("^docdir=.*$") "docdir = @docdir@\n")
|
| 149 | (("^exdir=.*$") "exdir = $(docdir)/examples\n")))))
|
| 150 | (build-system gnu-build-system)
|
| 151 | (outputs '("out" "doc")) |
| 152 | (inputs `(("freetype" ,freetype)
|
| 153 | ("lcms" ,lcms)
|
| 154 | ("libjpeg-8" ,libjpeg-8)
|
| 155 | ("libpng" ,libpng)
|
| 156 | ("libpaper" ,libpaper)
|
| 157 | ("libtiff" ,libtiff)
|
| 158 | ("zlib" ,zlib)))
|
| 159 | (native-inputs
|
| 160 | `(("perl" ,perl)
|
| 161 | ("pkg-config" ,pkg-config) |
| 162 | ("python" ,python-wrapper)
|
| 163 | ("tcl" ,tcl)))
|
| 164 | (arguments
|
| 165 | `(#:disallowed-references ("doc")
|
| 166 | #:phases
|
| 167 | (modify-phases %standard-phases
|
| 168 | (add-after 'configure 'patch-config-files
|
| 169 | (lambda _
|
| 170 | (substitute* "base/all-arch.mak"
|
| 171 | (("/bin/sh") (which "bash")))
|
| 172 | (substitute* "base/unixhead.mak"
|
| 173 | (("/bin/sh") (which "bash")))))
|
| 174 | (add-after 'configure 'remove-doc-reference
|
| 175 | (lambda _
|
| 176 | |
| 177 | |
| 178 | |
| 179 | (substitute* "base/gscdef.c"
|
| 180 | (("GS_DOCDIR")
|
| 181 | "\"~/.guix-profile/share/doc/ghostscript\""))))
|
| 182 | (replace 'build
|
| 183 | (lambda _
|
| 184 | |
| 185 | |
| 186 | (zero? (system* "make" "so" "-j"
|
| 187 | (number->string (parallel-job-count))))))
|
| 188 | (replace 'install
|
| 189 | (lambda _
|
| 190 | (zero? (system* "make" "soinstall"))))
|
| 191 | (add-after 'install 'create-gs-symlink
|
| 192 | (lambda* (#:key outputs #:allow-other-keys)
|
| 193 | (let ((out (assoc-ref outputs "out")))
|
| 194 | |
| 195 | (symlink "gsc" (string-append out "/bin/gs"))))))))
|
| 196 | (synopsis "PostScript and PDF interpreter")
|
| 197 | (description
|
| 198 | "Ghostscript is an interpreter for the PostScript language and the PDF
|
| 199 | file format. It also includes a C library that implements the graphics
|
| 200 | capabilities of the PostScript language. It supports a wide variety of
|
| 201 | output file formats and printers.")
|
| 202 | (license license:agpl3+)
|
| 203 | (home-page "http://www.gnu.org/software/ghostscript/")
|
| 204 | (properties '((upstream-name . "gnu-ghostscript")))))
|
| 205 |
|
| 206 | (define-public ghostscript/x
|
| 207 | (package (inherit ghostscript)
|
| 208 | (name (string-append (package-name ghostscript) "-with-x"))
|
| 209 | (inputs `(("libxext" ,libxext)
|
| 210 | ("libxt" ,libxt)
|
| 211 | ,@(package-inputs ghostscript)))))
|
| 212 |
|
| 213 | (define-public ijs
|
| 214 | (package
|
| 215 | (name "ijs")
|
| 216 | (version "9.14.0")
|
| 217 | (source (origin
|
| 218 | (method url-fetch)
|
| 219 | (uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
|
| 220 | version ".tar.xz"))
|
| 221 | (sha256 (base32
|
| 222 | "0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))))
|
| 223 | (build-system gnu-build-system)
|
| 224 | (native-inputs
|
| 225 | `(("libtool" ,libtool)
|
| 226 | ("automake" ,automake)
|
| 227 | ("autoconf" ,autoconf)))
|
| 228 | (arguments
|
| 229 | `(#:phases
|
| 230 | (alist-cons-after
|
| 231 | 'unpack 'autogen
|
| 232 | (lambda _
|
| 233 | |
| 234 | (system* "autoreconf" "-if")
|
| 235 | |
| 236 | (substitute* "autogen.sh"
|
| 237 | (("^.*\\$srcdir/configure.*") ""))
|
| 238 | (system* "bash" "autogen.sh")
|
| 239 |
|
| 240 | |
| 241 | (chdir "ijs")
|
| 242 | |
| 243 | (substitute* "autogen.sh"
|
| 244 | (("^.*\\$srcdir/configure.*") "")
|
| 245 | (("^ + && echo Now type.*$") ""))
|
| 246 | (zero? (system* "bash" "autogen.sh")))
|
| 247 | %standard-phases)))
|
| 248 | (synopsis "IJS driver framework for inkjet and other raster devices")
|
| 249 | (description
|
| 250 | "IJS is a protocol for transmission of raster page images. This package
|
| 251 | provides the reference implementation of the raster printer driver
|
| 252 | architecture.")
|
| 253 | (license license:expat)
|
| 254 | (home-page "http://www.gnu.org/software/ghostscript/")))
|
| 255 |
|
| 256 | (define-public gs-fonts
|
| 257 | (package
|
| 258 | (name "gs-fonts")
|
| 259 | (version "8.11")
|
| 260 | (source (origin
|
| 261 | (method url-fetch)
|
| 262 | (uri (string-append "mirror://sourceforge/gs-fonts/gs-fonts/"
|
| 263 | version
|
| 264 | "%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-"
|
| 265 | version
|
| 266 | ".tar.gz"))
|
| 267 | (sha256 (base32
|
| 268 | "00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf"))))
|
| 269 | (build-system gnu-build-system)
|
| 270 | (arguments
|
| 271 | `(#:tests? #f |
| 272 | #:modules ((guix build gnu-build-system)
|
| 273 | (guix build utils)
|
| 274 | (srfi srfi-1)) |
| 275 | #:phases
|
| 276 | (alist-delete
|
| 277 | 'configure
|
| 278 | (alist-delete
|
| 279 | 'build
|
| 280 | (alist-replace
|
| 281 | 'install
|
| 282 | (lambda* (#:key outputs #:allow-other-keys)
|
| 283 | (let* ((out (assoc-ref outputs "out"))
|
| 284 | (dir (string-append out "/share/fonts/type1/ghostscript")))
|
| 285 | (mkdir-p dir)
|
| 286 | (for-each
|
| 287 | (lambda (file)
|
| 288 | (copy-file file (string-append dir "/" file)))
|
| 289 | (find-files "." "pfb|afm"))))
|
| 290 | %standard-phases)))))
|
| 291 | (synopsis "Free replacements for the PostScript fonts")
|
| 292 | (description
|
| 293 | "Ghostscript fonts provides fonts and font metrics customarily distributed with
|
| 294 | Ghostscript. It currently includes the 35 standard PostScript fonts.")
|
| 295 | (license license:gpl2)
|
| 296 | (home-page "http://sourceforge.net/projects/gs-fonts/")))
|
| 297 |
|
| 298 | (define-public libspectre
|
| 299 | (package
|
| 300 | (name "libspectre")
|
| 301 | (version "0.2.7")
|
| 302 | (source (origin
|
| 303 | (method url-fetch)
|
| 304 | (uri (string-append "https://libspectre.freedesktop.org/releases/libspectre-"
|
| 305 | version ".tar.gz"))
|
| 306 | (sha256 (base32
|
| 307 | "1v63lqc6bhhxwkpa43qmz8phqs8ci4dhzizyy16d3vkb20m846z8"))))
|
| 308 | (build-system gnu-build-system)
|
| 309 | (inputs `(("ghostscript" ,ghostscript)))
|
| 310 | (native-inputs `(("pkg-config" ,pkg-config)))
|
| 311 | (synopsis "Postscript rendering library")
|
| 312 | (description
|
| 313 | "libspectre is a small library for rendering Postscript documents.
|
| 314 | It provides a convenient easy to use API for handling and rendering
|
| 315 | Postscript documents.")
|
| 316 | (license license:gpl2+)
|
| 317 | (home-page "http://www.freedesktop.org/wiki/Software/libspectre")))
|