X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/ebbb7286b91e21cb26153e3d0a3ea8017cf16224..53ed3e4bbda8ccc7f4d8c20564c6ff3ac2e0a726:/gnu/packages/ghostscript.scm diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index d8c0050513..03a516dc52 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -2,12 +2,13 @@ ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver ;;; Copyright © 2015 Ricardo Wurmus -;;; Copyright © 2013, 2015, 2016, 2017 Ludovic Courtès +;;; Copyright © 2013, 2015, 2016, 2017, 2019 Ludovic Courtès ;;; Copyright © 2017 Alex Vong -;;; Copyright © 2017, 2018 Efraim Flashner +;;; Copyright © 2017, 2018, 2019 Efraim Flashner ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2018 Tobias Geerinckx-Rice -;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2018, 2020 Marius Bakke +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,10 +53,14 @@ (method url-fetch) (uri (string-append "mirror://sourceforge/lcms/lcms/" version "/lcms2-" version ".tar.gz")) + + (patches (search-patches "lcms-CVE-2018-16435.patch")) (sha256 (base32 "083xisy6z01zhm7p7rgk4bx9d6zlr8l20qkfv1g29ylnhgwzvij8")))) (build-system gnu-build-system) - (inputs `(("libjpeg" ,libjpeg) + (arguments + `(#:configure-flags '("--disable-static"))) + (inputs `(("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("zlib" ,zlib))) (synopsis "Little CMS, a small-footprint colour management engine") @@ -82,6 +87,25 @@ Consortium standard (ICC), approved as ISO 15076-1.") (sha256 (base32 "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q")))) (build-system gnu-build-system) + (native-inputs + `(("automake" ,automake))) ; For up to date 'config.guess' and 'config.sub'. + (arguments + `(#:configure-flags '("--disable-static") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-configure + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.sub and config.guess: + (for-each (lambda (file) + (install-file + (string-append (assoc-ref + (or native-inputs inputs) "automake") + "/share/automake-" + ,(version-major+minor + (package-version automake)) + "/" file) ".")) + '("config.sub" "config.guess")) + #t))))) (synopsis "Library for handling paper sizes") (description "The paper library and accompanying files are intended to provide a simple @@ -135,7 +159,7 @@ printing, and psresize, for adjusting page sizes.") (define-public ghostscript (package (name "ghostscript") - (version "9.26") + (version "9.52") (source (origin (method url-fetch) @@ -145,8 +169,10 @@ printing, and psresize, for adjusting page sizes.") "/ghostscript-" version ".tar.xz")) (sha256 (base32 - "1645f47all5w27bfhiq15vycdm954lmr6agqkrp68ksq6xglgvch")) - (patches (search-patches "ghostscript-no-header-creationdate.patch" + "0z1w42y2jmcpl2m1l3z0sfii6zmvzcwcgzn6bydklia6ig7jli2p")) + (patches (search-patches "ghostscript-freetype-compat.patch" + "ghostscript-CVE-2020-15900.patch" + "ghostscript-no-header-creationdate.patch" "ghostscript-no-header-id.patch" "ghostscript-no-header-uuid.patch")) (modules '((guix build utils))) @@ -163,6 +189,13 @@ printing, and psresize, for adjusting page sizes.") (outputs '("out" "doc")) ;19 MiB of HTML/PS doc + examples (arguments `(#:disallowed-references ("doc") + ;; XXX: Starting with version 9.27, building the tests in parallel + ;; occasionally fails like this: + ;; In file included from ./base/memory_.h:23:0, + ;; from ./obj/gsmd5.h:1, + ;; from ./obj/gsmd5.c:56: + ;; ./base/std.h:25:10: fatal error: arch.h: No such file or directory + #:parallel-tests? #f #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib") @@ -171,6 +204,10 @@ printing, and psresize, for adjusting page sizes.") (string-append "ZLIBDIR=" (assoc-ref %build-inputs "zlib") "/include") "--enable-dynamic" + "--disable-compile-inits" + (string-append "--with-fontpath=" + (assoc-ref %build-inputs "gs-fonts") + "/share/fonts/type1/ghostscript") ,@(if (%current-target-system) '(;; Specify the native compiler, which is used to build 'echogs' @@ -198,10 +235,6 @@ printing, and psresize, for adjusting page sizes.") (substitute* "base/gscdef.c" (("GS_DOCDIR") "\"~/.guix-profile/share/doc/ghostscript\"")) - ;; The docdir default changed in 9.23 and a compatibility - ;; symlink was added from datadir->docdir. Remove it. - (substitute* "base/unixinst.mak" - (("ln -s \\$\\(DESTDIR\\)\\$\\(docdir\\).*") "")) #t)) (add-after 'configure 'patch-config-files (lambda _ @@ -234,6 +267,7 @@ printing, and psresize, for adjusting page sizes.") #t)))))) (native-inputs `(("perl" ,perl) + ("pkg-config" ,pkg-config) ;needed for freetype ("python" ,python-wrapper) ("tcl" ,tcl) @@ -241,12 +275,14 @@ printing, and psresize, for adjusting page sizes.") ;; these libraries. ,@(if (%current-target-system) `(("zlib/native" ,zlib) - ("libjpeg/native" ,libjpeg)) + ("libjpeg/native" ,libjpeg-turbo)) '()))) (inputs - `(("freetype" ,freetype) + `(("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("gs-fonts" ,gs-fonts) ("jbig2dec" ,jbig2dec) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpaper" ,libpaper) ("libpng" ,libpng) ("libtiff" ,libtiff)