From 455859a50f88f625d13fc2f304111f02369b366b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 1 Aug 2016 23:30:52 +0200 Subject: Merge branch 'core-updates' --- gnu/packages/ghostscript.scm | 57 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 9 deletions(-) (limited to 'gnu/packages/ghostscript.scm') diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index ff5a6a04f4..f013a734e5 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Ricardo Wurmus -;;; Copyright © 2013, 2015 Ludovic Courtès +;;; Copyright © 2013, 2015, 2016 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,7 +33,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial)) (define-public lcms (package @@ -156,7 +157,8 @@ printing, and psresize, for adjusting page sizes.") ("python" ,python-wrapper) ("tcl" ,tcl))) (arguments - `(#:phases + `(#:disallowed-references ("doc") + #:phases (modify-phases %standard-phases (add-after 'configure 'patch-config-files (lambda _ @@ -172,12 +174,15 @@ printing, and psresize, for adjusting page sizes.") (substitute* "base/gscdef.c" (("GS_DOCDIR") "\"~/.guix-profile/share/doc/ghostscript\"")))) - (add-after 'build 'build-so - (lambda _ - (zero? (system* "make" "so")))) - (add-after 'install 'install-so - (lambda _ - (zero? (system* "make" "install-so"))))))) + (replace 'build + (lambda _ + ;; Build 'libgs.so', but don't build the statically-linked 'gs' + ;; binary (saves 18 MiB). + (zero? (system* "make" "so" "-j" + (number->string (parallel-job-count)))))) + (replace 'install + (lambda _ + (zero? (system* "make" "soinstall"))))))) (synopsis "PostScript and PDF interpreter") (description "Ghostscript is an interpreter for the PostScript language and the PDF @@ -194,6 +199,40 @@ output file formats and printers.") ("libxt" ,libxt) ,@(package-inputs ghostscript))))) +(define (ghostscript-wrapper name ghostscript) + ;; Return a GHOSTSCRIPT wrapper that provides the 'gs' command. + ;; See . + (package + (name name) + (version (package-version ghostscript)) + (source #f) + (build-system trivial-build-system) + (inputs `(("ghostscript" ,ghostscript))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin")) + (gs (assoc-ref %build-inputs "ghostscript"))) + (mkdir-p bin) + (with-directory-excursion bin + (symlink (string-append gs "/bin/gsc") "gs") + #t))))) + (synopsis "Wrapper providing Ghostscript's 'gs' command") + (description + "This package provides the @command{gs} command, which used to be +provided by Ghostscript itself and no longer is.") + (license (package-license ghostscript)) + (home-page (package-home-page ghostscript)))) + +(define-public ghostscript-gs + (ghostscript-wrapper "ghostscript-gs" ghostscript)) + +(define-public ghostscript-gs/x + (ghostscript-wrapper "ghostscript-gs-with-x" ghostscript/x)) + (define-public ijs (package (name "ijs") -- cgit v1.2.3