bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#27120: [PATCH] gnu: graphicsmagick: Remove bundled libraries from so


From: Leo Famulari
Subject: bug#27120: [PATCH] gnu: graphicsmagick: Remove bundled libraries from source checkout.
Date: Sun, 28 May 2017 18:03:18 -0400

Fixes <https://bugs.gnu.org/27120>.

* gnu/packages/imagemagick.scm (graphicsmagick)[source]: Add a snippet
to delete bundled libraries.
[version]: Bump the package revision counter to 3.
---
 gnu/packages/imagemagick.scm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index bde3ebe40..3f7d95c2e 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -163,7 +163,7 @@ script.")
 
 (define-public graphicsmagick
   (let ((changeset "6156b4c2992d855ece6079653b3b93c3229fc4b8") ; fix 
CVE-2017-6335
-        (revision "2"))
+        (revision "3"))
     (package
       (name "graphicsmagick")
       (version (string-append "1.3.25-" revision "."
@@ -180,7 +180,20 @@ script.")
                 ;;                    "/GraphicsMagick-" version ".tar.xz"))
                 (sha256
                  (base32
-                  "08yfsn8mrqkwpax43vv1crfr55rcf004wwpzsinr5c6m0asqr08b"))))
+                  "08yfsn8mrqkwpax43vv1crfr55rcf004wwpzsinr5c6m0asqr08b"))
+                (modules '((guix build utils)))
+                (snippet
+                 '(begin
+                    ;; Remove bundled software. This reduces the size of the
+                    ;; build source checkout from 177 MiB to 49 MiB. This 
should
+                    ;; not be necessary when using the GraphicsMagick release
+                    ;; tarball, because these files are not distributed there.
+                    (for-each delete-file-recursively '("bzlib" "dcraw" "hp2xx"
+                                                        "jbig" "jp2" "jpeg"
+                                                        "lcms" "libxml" "png"
+                                                        "ralcgm" "tiff" "ttf"
+                                                        "webp" "wmf" "xlib"
+                                                        "zlib"))))))
       (build-system gnu-build-system)
       (arguments
        `(#:configure-flags
-- 
2.13.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]