gnu: icecat: Use system harfbuzz and graphite2 libraries.
[jackhill/guix/guix.git] / gnu / packages / ghostscript.scm
index d5d5aa2..0561387 100644 (file)
@@ -26,6 +26,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cups)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages image)
   #:use-module (gnu packages perl)
@@ -100,23 +101,23 @@ paper size.")
    (arguments
     `(#:tests? #f ; none provided
       #:phases
-      (alist-replace
-       'configure
-       (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
-        (let ((perl (assoc-ref inputs "perl"))
-              (out (assoc-ref outputs "out")))
-         (copy-file "Makefile.unix" "Makefile")
-         (substitute* "Makefile"
-           (("/usr/local/bin/perl") (string-append perl "/bin/perl")))
-         (substitute* "Makefile"
-           (("/usr/local") out))
-         ;; for the install phase
-         (substitute* "Makefile"
-           (("-mkdir") "mkdir -p"))
-         ;; drop installation of non-free files
-         (substitute* "Makefile"
-           ((" install.include") ""))))
-      %standard-phases)))
+      (modify-phases %standard-phases
+        (replace 'configure
+          (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
+           (let ((perl (assoc-ref inputs "perl"))
+                 (out (assoc-ref outputs "out")))
+            (copy-file "Makefile.unix" "Makefile")
+            (substitute* "Makefile"
+              (("/usr/local/bin/perl") (string-append perl "/bin/perl")))
+            (substitute* "Makefile"
+              (("/usr/local") out))
+            ;; for the install phase
+            (substitute* "Makefile"
+              (("-mkdir") "mkdir -p"))
+            ;; drop installation of non-free files
+            (substitute* "Makefile"
+              ((" install.include") "")))
+           #t)))))
    (synopsis "Collection of utilities for manipulating PostScript documents")
    (description
     "PSUtils is a collection of utilities for manipulating PostScript
@@ -131,7 +132,7 @@ printing, and psresize, for adjusting page sizes.")
 (define-public ghostscript
   (package
     (name "ghostscript")
-    (version "9.21")
+    (version "9.22")
     (source
       (origin
         (method url-fetch)
@@ -141,9 +142,8 @@ printing, and psresize, for adjusting page sizes.")
                             "/ghostscript-" version ".tar.xz"))
         (sha256
          (base32
-          "0lyhjcrkmd5fcmh8h56bs4xr9k4jasmikv5vsix1hd4ai0ad1q9b"))
+          "1fyi4yvdj39bjgs10klr31cda1fbx1ar7a7b7yz7v68gykk65y61"))
         (patches (search-patches "ghostscript-runpath.patch"
-                                 "ghostscript-CVE-2017-8291.patch"
                                  "ghostscript-no-header-creationdate.patch"
                                  "ghostscript-no-header-id.patch"
                                  "ghostscript-no-header-uuid.patch"))
@@ -261,6 +261,12 @@ output file formats and printers.")
               ("libxt" ,libxt)
               ,@(package-inputs ghostscript)))))
 
+(define-public ghostscript/cups
+  (package/inherit ghostscript
+    (name "ghostscript-with-cups")
+    (inputs `(("cups" ,cups-minimal)
+              ,@(package-inputs ghostscript)))))
+
 (define-public ijs
   (package
    (name "ijs")