Merge remote-tracking branch 'master' into core-updates.
[jackhill/guix/guix.git] / gnu / packages / compression.scm
index 5583c8a..8884011 100644 (file)
@@ -24,6 +24,7 @@
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
 ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -650,13 +651,14 @@ This package is mostly for compatibility and historical interest.")
     (name "sfarklib")
     (version "2.24")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/raboof/sfArkLib/archive/"
-                                  version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/raboof/sfArkLib.git")
+                     (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0bzs2d98rk1xw9qwpnc7gmlbxwmwc3dg1rpn310afy9pq1k9clzi"))))
+                "0jrxy24gak7q5ml06p5jjgzk9i5r2mkfjk4ycirkp4kg7k5a237w"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ;no "check" target
@@ -735,7 +737,7 @@ decompression of some loosely related file formats used by Microsoft.")
 (define-public lz4
   (package
     (name "lz4")
-    (version "1.9.1")
+    (version "1.9.2")
     (source
      (origin
        (method git-fetch)
@@ -743,10 +745,13 @@ decompression of some loosely related file formats used by Microsoft.")
                            (commit (string-append "v" version))))
        (sha256
         (base32
-         "1l1caxrik1hqs40vj3bpv1pikw6b74cfazv5c0v6g48zpcbmshl0"))
+         "0lpaypmk70ag2ks3kf2dl4ac3ba40n5kc1ainkp9wfjawz76mh61"))
        (file-name (git-file-name name version))))
     (build-system gnu-build-system)
-    (native-inputs `(("valgrind" ,valgrind)))    ;for tests
+    (native-inputs
+     `(;; For tests.
+       ("python" ,python)
+       ("valgrind" ,valgrind)))
     (arguments
      `(#:test-target "test"
        #:make-flags (list "CC=gcc"
@@ -774,7 +779,7 @@ time for compression ratio.")
 (define-public squashfs-tools
   (package
     (name "squashfs-tools")
-    (version "4.3")
+    (version "4.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
@@ -782,10 +787,10 @@ time for compression ratio.")
                                   "squashfs" version ".tar.gz"))
               (sha256
                (base32
-                "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d"))))
+                "0zmhvczscqz0mzh4b9m8m42asq14db0a6lc8clp5ljq5ybrv70d9"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f ; no check target
+     '(#:tests? #f                      ; no check target
        #:make-flags
        (list "CC=gcc"
              "XZ_SUPPORT=1"
@@ -797,13 +802,6 @@ time for compression ratio.")
          (replace 'configure
            (lambda _
              (chdir "squashfs-tools")
-             #t))
-         (add-after 'unpack 'fix-glibc-compatability
-           (lambda _
-             (substitute* '("squashfs-tools/mksquashfs.c"
-                            "squashfs-tools/unsquashfs.c")
-               (("<sys/sysinfo.h>")
-                "<sys/sysinfo.h>\n#include <sys/sysmacros.h>"))
              #t)))))
     (inputs
      `(("lz4" ,lz4)
@@ -821,23 +819,6 @@ systems where low overhead is needed.  This package allows you to create and
 extract such file systems.")
     (license license:gpl2+)))
 
-;; We need this for building squashfs images with symlinks.
-(define-public squashfs-tools-next
-  (let ((commit "fb33dfc32b131a1162dcf0e35bd88254ae10e265")
-        (revision "1"))
-    (package (inherit squashfs-tools)
-      (name "squashfs-tools-next")
-      (version (string-append "4.3-" revision (string-take commit 7)))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/plougher/squashfs-tools.git")
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "1x2skf8hxzfch978nzx5mh46d4hhi6gl22270hiarjszsjk3bnsx")))))))
-
 (define-public pigz
   (package
     (name "pigz")
@@ -1106,12 +1087,13 @@ well as bzip2.")
     (version "1.1.7")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/google/snappy/archive/"
-                           version ".tar.gz"))
-       (file-name (string-append "snappy-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/google/snappy.git")
+              (commit version)))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "1m7rcdqzkys5lspj8jcsaah8w33zh28s771bw0ga2lgzfgl05yix"))
+        (base32 "1x7r8sjmdqlqjz0xfiwdyrqpgaj5yrvrgb28ivgpvnxgar5qv6m2"))
        (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch"))))
     (build-system cmake-build-system)
     (arguments
@@ -1178,7 +1160,7 @@ for most inputs, but the resulting compressed files are anywhere from 20% to
              (invoke "make" "test")
              (invoke "make" "test_7z")
              (invoke "make" "test_7zr"))))))
-    (inputs
+    (native-inputs
      (let ((system (or (%current-target-system)
                        (%current-system))))
        `(,@(cond ((string-prefix? "x86_64" system)
@@ -1300,13 +1282,14 @@ or junctions, and always follows hard links.")
     (name "unshield")
     (version "1.4.3")
     (source
-     (origin (method url-fetch)
-             (uri (string-append "http://github.com/twogood/unshield/archive/"
-                                 version ".tar.gz"))
-             (file-name (string-append name "-" version ".tar.gz"))
+     (origin (method git-fetch)
+             (uri (git-reference
+                    (url "http://github.com/twogood/unshield.git")
+                    (commit version)))
+             (file-name (git-file-name name version))
              (sha256
               (base32
-               "1avv5c11jbmzwizq10pwvlh1dmyna8ccvpgacv95h4gbq26rg35a"))))
+               "19wn22vszhci8dfcixx5rliz7phx3lv5ablvhjlclvj75k2vsdqd"))))
     (build-system cmake-build-system)
     (inputs
      `(("zlib" ,zlib)
@@ -1388,18 +1371,18 @@ or junctions, and always follows hard links.")
 (define-public zstd
   (package
     (name "zstd")
-    (version "1.4.2")
+    (version "1.4.4")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/facebook/zstd/releases/download/"
                            "v" version "/zstd-" version ".tar.gz"))
        (sha256
-        (base32 "1ja3nrjynmiwwdjrf6crraizkbagp7y414bqqq2ady91nn1hjwqj"))))
+        (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr"))))
     (build-system gnu-build-system)
-    (outputs '("out"                    ;1.1MiB executables and documentation
-               "lib"                    ;1MiB shared library and headers
-               "static"))               ;1MiB static library
+    (outputs '("out"                    ;1.2MiB executables and documentation
+               "lib"                    ;1.2MiB shared library and headers
+               "static"))               ;1.2MiB static library
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -1419,12 +1402,10 @@ or junctions, and always follows hard links.")
                            (delete-file ar))
                          (find-files shared-libs "\\.a$"))
 
-               ;; While here, remove prefix= from the pkg-config file because it
-               ;; is unused, and because it contains a needless reference to $out.
-               ;; XXX: It would be great if #:disallow-references worked between
-               ;; outputs.
+               ;; Make sure the pkg-config file refers to the right output.
                (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc")
-                 (("^prefix=.*") ""))
+                 (("^prefix=.*")
+                  (string-append "prefix=" lib "\n")))
 
                #t))))
        #:make-flags
@@ -1812,16 +1793,16 @@ single-member files which can't be decompressed in parallel.")
 (define-public innoextract
   (package
    (name "innoextract")
-   (version "1.7")
+   (version "1.8")
    (source
     (origin
      (method url-fetch)
-     (uri (string-append "https://github.com/dscharrer/innoextract/archive/"
-                         version ".tar.gz"))
+     (uri (string-append "https://github.com/dscharrer/innoextract/releases"
+                         "/download/" version
+                         "/innoextract-" version ".tar.gz"))
      (sha256
       (base32
-       "0khwi9f0q0h6xfbixrrc1rfpgj0b7ajwilq7yhmxnn5lpc807f6x"))
-     (file-name (string-append name "-" version ".tar.gz"))))
+       "0saj50n8ds85shygy4mq1h6s99510r9wgjjdll4dmvhra4lzcy2y"))))
    (build-system cmake-build-system)
    (arguments
     `(#:tests? #f
@@ -2104,3 +2085,32 @@ at run time, and must be installed separately.")
 archives generated by @command{makeself} or @command{mojo} without running the
 possibly untrusted extraction shell script.")
       (license license:gpl3+))))
+
+(define-public ncompress
+  (package
+    (name "ncompress")
+    (version "4.2.4.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/vapier/ncompress")
+                    (commit (string-append "v" version))))
+              (patches (search-patches "ncompress-fix-softlinks.patch"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0s3ik7k5a5vzcfiayhsxrc87drg3l425aqapspmw5py91b9jhc8r"))))
+    (arguments
+     '(#:make-flags (list "CC=gcc"
+                          (string-append "BINDIR=" %output "/bin")
+                          (string-append "MANDIR=" %output "/share/man/man1"))
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure))))
+    (build-system gnu-build-system)
+    (home-page "https://github.com/vapier/ncompress/")
+    (synopsis "Original Lempel-Ziv compress/uncompress programs")
+    (description "(N)compress provides the original compress and uncompress
+programs that used to be the de facto UNIX standard for compressing and
+uncompressing files.  These programs implement a fast, simple Lempel-Ziv (LZW)
+file compression algorithm.")
+    (license license:gpl2+)))