From 466ff55c72959ba1499ce3ec69f534b3038eb30b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 25 Aug 2019 21:14:27 +0200 Subject: gnu: ghostscript: Add a new variant that depends on Freetype. Fixes . Reported by Diego Nicola Barbato and sirmacik . * gnu/packages/ghostscript.scm (ghostscript/fixed): New variable. --- gnu/packages/ghostscript.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'gnu/packages/ghostscript.scm') diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 53a9b60fdb..bcd853d1e3 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -2,7 +2,7 @@ ;;; 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 @@ -269,6 +269,26 @@ output file formats and printers.") (home-page "https://www.ghostscript.com/") (license license:agpl3+))) +(define-public ghostscript/fixed + ;; This adds the Freetype dependency (among other things), which fixes the + ;; rendering issues described in . + (package/inherit + ghostscript + (version (string-append (package-version ghostscript) "-1")) + (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")) -- cgit v1.2.3 From 0b859092a7346f3b4d0a3a4dac878fd64fd70b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 25 Aug 2019 21:32:06 +0200 Subject: gnu: ghostscript: Replace with the "fixed" Ghostscript. * gnu/packages/ghostscript.scm (ghostscript)[replacement]: New field. (ghostscript/fixed)[version]: Remove, to comply with the same-length constraint of grafts. --- gnu/packages/ghostscript.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gnu/packages/ghostscript.scm') diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index bcd853d1e3..139682b5d0 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -145,6 +145,12 @@ printing, and psresize, for adjusting page sizes.") (package (name "ghostscript") (version "9.26") + + ;; 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) @@ -274,7 +280,6 @@ output file formats and printers.") ;; rendering issues described in . (package/inherit ghostscript - (version (string-append (package-version ghostscript) "-1")) (arguments (substitute-keyword-arguments (package-arguments ghostscript) ((#:configure-flags flags ''()) -- cgit v1.2.3