X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/fe79ce3b1f34300ff3bb94238462323f887c93be..1addc2018f4d69d35f7ae8e529af9a2565c6facb:/gnu/packages/ghostscript.scm diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index b46451d94e..3b74a96966 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -2,9 +2,9 @@ ;;; 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 @@ -52,6 +52,8 @@ (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) @@ -135,7 +137,13 @@ printing, and psresize, for adjusting page sizes.") (define-public ghostscript (package (name "ghostscript") - (version "9.24") + (version "9.27") + + ;; The problems addressed by GHOSTSCRIPT/FIXED are not security-related, + ;; but they have a significant impact on usability, hence this graft. + ;; TODO: Ungraft on next update cycle. + (replacement ghostscript/fixed) + (source (origin (method url-fetch) @@ -145,10 +153,8 @@ printing, and psresize, for adjusting page sizes.") "/ghostscript-" version ".tar.xz")) (sha256 (base32 - "1mk922rnml93w2g42yxiyn8xqanc50cm65irrgh0b6lp4kgifjfl")) - (patches (search-patches "ghostscript-CVE-2018-16509.patch" - "ghostscript-bug-699708.patch" - "ghostscript-no-header-creationdate.patch" + "06dnj0mxyaryfbwlsjwaqf847w91w2h8f108kxxcc41nrnx1y3zw")) + (patches (search-patches "ghostscript-no-header-creationdate.patch" "ghostscript-no-header-id.patch" "ghostscript-no-header-uuid.patch")) (modules '((guix build utils))) @@ -165,6 +171,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") @@ -262,6 +275,25 @@ output file formats and printers.") (home-page "https://www.ghostscript.com/") (license license:agpl3+))) +(define ghostscript/fixed + ;; This adds the Freetype dependency (among other things), which fixes the + ;; rendering issues described in . + (package/inherit + ghostscript + (arguments + (substitute-keyword-arguments (package-arguments ghostscript) + ((#:configure-flags flags ''()) + `(append (list "--disable-compile-inits" + (string-append "--with-fontpath=" + (assoc-ref %build-inputs "gs-fonts") + "/share/fonts/type1/ghostscript")) + ,flags)))) + (native-inputs `(("pkg-config" ,pkg-config) ;needed for freetype + ,@(package-native-inputs ghostscript))) + (inputs `(("gs-fonts" ,gs-fonts) + ("fontconfig" ,fontconfig) + ,@(package-inputs ghostscript))))) + (define-public ghostscript/x (package/inherit ghostscript (name (string-append (package-name ghostscript) "-with-x"))