summaryrefslogtreecommitdiff
path: root/gnu/packages/ghostscript.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-14 01:21:28 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-03-14 12:02:52 +0100
commitaf2f11ff00af569f76550b290037818e98e28b29 (patch)
treec2edf3ecbaa167893cb32ed880f1cb46c1faa0c3 /gnu/packages/ghostscript.scm
parent3fd74c45064eba882771b0398b4c3b29b030a44a (diff)
gnu: ghostscript: Update to 9.51.
* gnu/packages/patches/ghostscript-CVE-2019-14869.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/patches/ghostscript-no-header-uuid.patch: Adjust for 9.51. * gnu/packages/ghostscript.scm (ghostscript): Update to 9.51. [source](patches): Remove obsolete patch. [arguments]: Remove obsolete substitution. When cross-compiling, add two workaround phases.
Diffstat (limited to 'gnu/packages/ghostscript.scm')
-rw-r--r--gnu/packages/ghostscript.scm39
1 files changed, 29 insertions, 10 deletions
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 3cd1e4af8d0..ae689925e1e 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -7,7 +7,7 @@
7;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> 7;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
8;;; Copyright © 2017 Leo Famulari <leo@famulari.name> 8;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
9;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> 9;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
10;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> 10;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
11;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> 11;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
12;;; 12;;;
13;;; This file is part of GNU Guix. 13;;; This file is part of GNU Guix.
@@ -159,7 +159,7 @@ printing, and psresize, for adjusting page sizes.")
159(define-public ghostscript 159(define-public ghostscript
160 (package 160 (package
161 (name "ghostscript") 161 (name "ghostscript")
162 (version "9.50") 162 (version "9.51")
163 (source 163 (source
164 (origin 164 (origin
165 (method url-fetch) 165 (method url-fetch)
@@ -169,9 +169,8 @@ printing, and psresize, for adjusting page sizes.")
169 "/ghostscript-" version ".tar.xz")) 169 "/ghostscript-" version ".tar.xz"))
170 (sha256 170 (sha256
171 (base32 171 (base32
172 "1m770dwc82afdgzgq2kar3120r1lbybm3mssdm79f8kggf0v16yv")) 172 "0wdpcq9lq19v8an8xs28cgg7vfzb23f1j12m9p2wdnwa1vwk64by"))
173 (patches (search-patches "ghostscript-CVE-2019-14869.patch" 173 (patches (search-patches "ghostscript-no-header-creationdate.patch"
174 "ghostscript-no-header-creationdate.patch"
175 "ghostscript-no-header-id.patch" 174 "ghostscript-no-header-id.patch"
176 "ghostscript-no-header-uuid.patch")) 175 "ghostscript-no-header-uuid.patch"))
177 (modules '((guix build utils))) 176 (modules '((guix build utils)))
@@ -234,10 +233,6 @@ printing, and psresize, for adjusting page sizes.")
234 (substitute* "base/gscdef.c" 233 (substitute* "base/gscdef.c"
235 (("GS_DOCDIR") 234 (("GS_DOCDIR")
236 "\"~/.guix-profile/share/doc/ghostscript\"")) 235 "\"~/.guix-profile/share/doc/ghostscript\""))
237 ;; The docdir default changed in 9.23 and a compatibility
238 ;; symlink was added from datadir->docdir. Remove it.
239 (substitute* "base/unixinst.mak"
240 (("ln -s \\$\\(DESTDIR\\)\\$\\(docdir\\).*") ""))
241 #t)) 236 #t))
242 (add-after 'configure 'patch-config-files 237 (add-after 'configure 'patch-config-files
243 (lambda _ 238 (lambda _
@@ -245,7 +240,31 @@ printing, and psresize, for adjusting page sizes.")
245 (("/bin/sh") (which "sh"))) 240 (("/bin/sh") (which "sh")))
246 #t)) 241 #t))
247 ,@(if (%current-target-system) 242 ,@(if (%current-target-system)
248 `((add-after 'configure 'add-native-lz 243 `((add-after 'unpack 'define-ARCH_MAX_SIZE_T
244 (lambda _
245 ;; XXX: arch_autoconf.h is missing the recent addition of
246 ;; ARCH_MAX_SIZE_T. Just add it here based on the definition
247 ;; in "base/genarch.c". This can likely be removed for
248 ;; Ghostscript > 9.51.
249 (substitute* "arch/arch_autoconf.h.in"
250 (("#define ARCH_MAX_ULONG.*" all)
251 (string-append all "\n"
252 "#define ARCH_MAX_SIZE_T "
253 "((size_t)~0L + (size_t)0)\n")))
254 #t))
255 (add-before 'configure 'do-not-fail-without-native-freetype
256 (lambda _
257 ;; The configure script recurses to build the native tools.
258 ;; They are built with --disable-freetype, which was made a
259 ;; hard error in 9.51, causing a build failure because a
260 ;; native freetype is not detected. Just ignore the check
261 ;; because it's not needed for these auxiliary tools.
262 (substitute* "configure"
263 (("as_fn_error \\$\\? \"(No usable Freetype.*found)\".*" all msg)
264 (string-append "$as_echo \"$as_me:${as_lineno-$LINENO}: "
265 "WARNING: " msg "\"\n")))
266 #t))
267 (add-after 'configure 'add-native-lz
249 (lambda _ 268 (lambda _
250 ;; Add missing '-lz' for native tools such as 'mkromfs'. 269 ;; Add missing '-lz' for native tools such as 'mkromfs'.
251 (substitute* "Makefile" 270 (substitute* "Makefile"