diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 53a9b60fdb..9591dbdb1d 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,59 @@ output file formats and printers.") (home-page "https://www.ghostscript.com/") (license license:agpl3+))) +(define-public ghostscript/fixed + (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)) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (add-after 'install 'create-cmap-symlink + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (init (car (find-files out "^Init$" + #:directories? #t))) + (fontdir (string-append out "/share/ghostscript/fonts")) + (fontdir1 (string-append out "/share/fonts/type1/ghostscript"))) + (symlink "../CMap" + (string-append init "/CMap")) + (symlink "../Init/Fontmap" + (string-append init "/../Font/Fontmap")) + + (mkdir-p fontdir) + (symlink (string-append init "/Fontmap") + (string-append fontdir "/Fontmap")) + (mkdir-p fontdir1) + (symlink (string-append init "/Fontmap") + (string-append fontdir1 "/Fontmap")) + #t))))))) + (inputs `(("gs-fonts" ,gs-fonts) + ,@(package-inputs ghostscript))))) + +(define-public ghostscript/static + ;; Like before commit eb354bdacbf4154ec66038dac07f19bf4ced1fad. + (package + (inherit ghostscript) + (name "ghostscript-static") + (arguments + (substitute-keyword-arguments (package-arguments ghostscript) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (replace 'build + (lambda _ + (invoke "make" "-j5"))) + (replace 'install + (lambda _ + (invoke "make" "install"))) + (delete 'create-gs-symlink))))))) + (define-public ghostscript/x (package/inherit ghostscript (name (string-append (package-name ghostscript) "-with-x"))