aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ghostscript.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ghostscript.scm')
-rw-r--r--gnu/packages/ghostscript.scm65
1 files changed, 13 insertions, 52 deletions
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 09b10f7741..87e4d0e3f2 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -127,7 +127,6 @@ printing, and psresize, for adjusting page sizes.")
(package
(name "ghostscript")
(version "9.14.0")
- (replacement ghostscript/fixed)
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/ghostscript/gnu-ghostscript-"
@@ -135,7 +134,12 @@ printing, and psresize, for adjusting page sizes.")
(sha256
(base32
"0q4jj41p0qbr4mgcc9q78f5zs8cm1g57wgryhsm2yq4lfslm3ib1"))
- (patches (search-patches "ghostscript-CVE-2015-3228.patch"
+ (patches (search-patches "ghostscript-CVE-2013-5653.patch"
+ "ghostscript-CVE-2015-3228.patch"
+ "ghostscript-CVE-2016-7976.patch"
+ "ghostscript-CVE-2016-7978.patch"
+ "ghostscript-CVE-2016-7979.patch"
+ "ghostscript-CVE-2016-8602.patch"
"ghostscript-runpath.patch"))
(modules '((guix build utils)))
(snippet
@@ -183,7 +187,12 @@ printing, and psresize, for adjusting page sizes.")
(number->string (parallel-job-count))))))
(replace 'install
(lambda _
- (zero? (system* "make" "soinstall")))))))
+ (zero? (system* "make" "soinstall"))))
+ (add-after 'install 'create-gs-symlink
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ ;; some programs depend on having a 'gs' binary available
+ (symlink "gsc" (string-append out "/bin/gs"))))))))
(synopsis "PostScript and PDF interpreter")
(description
"Ghostscript is an interpreter for the PostScript language and the PDF
@@ -193,61 +202,13 @@ output file formats and printers.")
(license license:agpl3+)
(home-page "http://www.gnu.org/software/ghostscript/")))
-(define ghostscript/fixed
- (package
- (inherit ghostscript)
- (replacement #f) ; Prevent ghostscript/x from inheriting the replacement
- (source (origin
- (inherit (package-source ghostscript))
- (patches (search-patches "ghostscript-CVE-2013-5653.patch"
- "ghostscript-CVE-2015-3228.patch"
- "ghostscript-CVE-2016-7976.patch"
- "ghostscript-CVE-2016-7978.patch"
- "ghostscript-CVE-2016-7979.patch"
- "ghostscript-CVE-2016-8602.patch"
- "ghostscript-runpath.patch"))))))
-
(define-public ghostscript/x
- (package (inherit ghostscript/fixed)
+ (package (inherit ghostscript)
(name (string-append (package-name ghostscript) "-with-x"))
(inputs `(("libxext" ,libxext)
("libxt" ,libxt)
,@(package-inputs ghostscript)))))
-(define (ghostscript-wrapper name ghostscript)
- ;; Return a GHOSTSCRIPT wrapper that provides the 'gs' command.
- ;; See <https://lists.gnu.org/archive/html/guix-devel/2016-07/msg00987.html>.
- (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")