summary refs log tree commit diff
path: root/gnu/packages/compression.scm
diff options
context:
space:
mode:
authorKei Kebreau <kkebreau@posteo.net>2018-11-20 13:52:00 -0500
committerKei Kebreau <kkebreau@posteo.net>2018-11-20 13:55:10 -0500
commitb3175c709d7fb2e8519902c3dd66608436d0f0ff (patch)
tree12891b95ccbd131f5d5f19f6da66da6488a102a4 /gnu/packages/compression.scm
parentea80fd1ff52abbf66499871ada990edbca374c08 (diff)
downloadguix-b3175c709d7fb2e8519902c3dd66608436d0f0ff.tar.gz
gnu: cabextract: Update to 1.9.
* gnu/packages/compression.scm (cabextract): Update to 1.9.
[arguments]: Add phase "unpack-libmspack".
[inputs]: Add libmspack-source.
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r--gnu/packages/compression.scm24
1 files changed, 20 insertions, 4 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index fb39ddab80..e775052b7a 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1017,13 +1017,13 @@ smaller than those produced by @code{Xdelta}.")
  (package
    (name "cabextract")
    (home-page "https://cabextract.org.uk/")
-   (version "1.7")
+   (version "1.9")
    (source (origin
               (method url-fetch)
               (uri (string-append home-page name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1g86wmb8lkjiv2jarfz979ngbgg7d3si8x5il4g801604v406wi9"))
+                "1hf4zhjxfdgq9x172r5zfdnafma9q0zf7372syn8hcn7hcypkg0v"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -1031,11 +1031,27 @@ smaller than those produced by @code{Xdelta}.")
                   (delete-file-recursively "mspack")
                   #t))))
     (build-system gnu-build-system)
-    (arguments '(#:configure-flags '("--with-external-libmspack")))
+    (arguments
+     '(#:configure-flags '("--with-external-libmspack")
+       #:phases
+       (modify-phases %standard-phases
+         ;; cabextract needs some of libmspack's header files.
+         ;; These are located in the "mspack" directory of libmspack.
+         (add-before 'build 'unpack-libmspack
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((dir-name "libmspack-src"))
+               (mkdir dir-name)
+               (invoke "tar" "-xvf" (assoc-ref inputs "libmspack-source")
+                       "-C" dir-name "--strip-components" "1")
+               (rename-file (string-append dir-name "/mspack")
+                            "mspack")
+               (delete-file-recursively dir-name)
+               #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("libmspack" ,libmspack)))
+     `(("libmspack" ,libmspack)
+       ("libmspack-source" ,(package-source libmspack))))
     (synopsis "Tool to unpack Cabinet archives")
     (description "Extracts files out of Microsoft Cabinet (.cab) archives")
     ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.