X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/3f151d90a3ceb9445305ba84588ea56b802e5ce5..3fe8fe5360a0c53296d807a5109d6a94adc5d95f:/gnu/packages/ghostscript.scm diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 817104cde1..7839ac5b72 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, 2019 Efraim Flashner ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -84,6 +85,24 @@ 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 + `(#: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 @@ -138,6 +157,12 @@ printing, and psresize, for adjusting page sizes.") (package (name "ghostscript") (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) @@ -269,6 +294,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"))