gnu: Add setBfree.
[jackhill/guix/guix.git] / gnu / packages / compression.scm
index 7c22300..78f967c 100644 (file)
@@ -1,7 +1,9 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
+;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,7 +25,9 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
-  #:use-module (gnu packages which))
+  #:use-module (guix build-system perl)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages perl))
 
 (define-public zlib
   (package
@@ -70,6 +74,26 @@ independent of the input data and can be reduced, if necessary, at some cost
 in compression.")
     (license license:zlib)))
 
+(define-public fastjar
+  (package
+   (name "fastjar")
+   (version "0.98")
+   (source (origin
+             (method url-fetch)
+             (uri (string-append "mirror://savannah/fastjar/fastjar-"
+                                 version ".tar.gz"))
+             (sha256
+              (base32
+               "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi"))))
+   (build-system gnu-build-system)
+   (inputs `(("zlib" ,zlib)))
+   (home-page "http://savannah.nongnu.org/projects/fastjar")
+   (synopsis "Replacement for Sun's 'jar' utility")
+   (description
+    "FastJar is an attempt to create a much faster replacement for Sun's 'jar'
+utility.  Instead of being written in Java, FastJar is written in C.")
+   (license license:gpl2+)))
+
 (define-public gzip
   (package
    (name "gzip")
@@ -95,13 +119,7 @@ file; as a result, it is often used in conjunction with \"tar\", resulting in
    (home-page "http://www.gnu.org/software/gzip/")))
 
 (define-public bzip2
-  (let ((fix-man-dir
-         ;; Move man pages to $out/share/.
-         '(lambda* (#:key outputs #:allow-other-keys)
-            (with-directory-excursion (assoc-ref outputs "out")
-              (mkdir "share")
-              (rename-file "man" "share/man"))))
-        (build-shared-lib
+  (let ((build-shared-lib
          ;; Build a shared library.
          '(lambda* (#:key inputs #:allow-other-keys)
             (patch-makefile-SHELL "Makefile-libbz2_so")
@@ -151,20 +169,16 @@ file; as a result, it is often used in conjunction with \"tar\", resulting in
               `(alist-cons-before
                 'build 'build-shared-lib ,build-shared-lib
                 (alist-cons-after
-                 'install 'fix-man-dir ,fix-man-dir
-                 (alist-cons-after
-                  'install 'install-shared-lib ,install-shared-lib
-                  (alist-replace 'configure ,set-cross-environment
-                                 %standard-phases))))
+                 'install 'install-shared-lib ,install-shared-lib
+                 (alist-replace 'configure ,set-cross-environment
+                                %standard-phases)))
 
               ;; Native compilation: build the shared library.
               `(alist-cons-before
                 'build 'build-shared-lib ,build-shared-lib
                 (alist-cons-after
-                 'install 'fix-man-dir ,fix-man-dir
-                 (alist-cons-after
-                  'install 'install-shared-lib ,install-shared-lib
-                  (alist-delete 'configure %standard-phases)))))
+                 'install 'install-shared-lib ,install-shared-lib
+                 (alist-delete 'configure %standard-phases))))
 
          #:make-flags (list (string-append "PREFIX="
                                            (assoc-ref %outputs "out")))
@@ -180,7 +194,7 @@ compressor.  It typically compresses files to within 10% to 15% of the best
 available techniques (the PPM family of statistical compressors), whilst
 being around twice as fast at compression and six times faster at
 decompression.")
-      (license (license:bsd-style "file://LICENSE"
+      (license (license:non-copyleft "file://LICENSE"
                                   "See LICENSE in the distribution."))
       (home-page "http://www.bzip.org/"))))
 
@@ -283,7 +297,7 @@ archiving.  Lzip is a clean implementation of the LZMA algorithm.")
 (define-public sharutils
   (package
     (name "sharutils")
-    (version "4.14")
+    (version "4.15.2")
     (source
      (origin
       (method url-fetch)
@@ -291,7 +305,7 @@ archiving.  Lzip is a clean implementation of the LZMA algorithm.")
                           version ".tar.xz"))
       (sha256
        (base32
-        "033sq1v0cp0bi1mp320xaqwd4fhakqc5747hh6qa1asjrzpqiqza"))))
+        "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))))
     (build-system gnu-build-system)
     (inputs
      `(("which" ,which)))
@@ -314,3 +328,98 @@ processed by a Bourne-type shell to unpack the original collection of files.
 This package is mostly for compatibility and historical interest.")
     (license license:gpl3+)))
 
+(define-public libmspack
+  (package
+    (name "libmspack")
+    (version "0.5")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "http://www.cabextract.org.uk/libmspack/libmspack-"
+                          version "alpha.tar.gz"))
+      (sha256
+       (base32 "04413hynb7zizxnkgy9riik3612dwirkpr6fcjrnfl2za9sz4rw9"))))
+    (build-system gnu-build-system)
+    (home-page "http://www.cabextract.org.uk/libmspack/")
+    (synopsis "Compression tools for some formats used by Microsoft")
+    (description
+     "The purpose of libmspack is to provide both compression and
+decompression of some loosely related file formats used by Microsoft.")
+    (license license:lgpl2.1+)))
+
+(define-public perl-compress-raw-bzip2
+  (package
+    (name "perl-compress-raw-bzip2")
+    (version "2.068")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
+                           "Compress-Raw-Bzip2-" version ".tar.gz"))
+       (sha256
+        (base32
+         "16hl58xppckldz05zdyid1l5gpaykzwvkq682h3rc3nilbhgjqqg"))))
+    (build-system perl-build-system)
+    ;; TODO: Use our bzip2 package.
+    (home-page "http://search.cpan.org/dist/Compress-Raw-Bzip2")
+    (synopsis "Low-level interface to bzip2 compression library")
+    (description "This module provides a Perl interface to the bzip2
+compression library.")
+    (license (package-license perl))))
+
+(define-public perl-compress-raw-zlib
+  (package
+    (name "perl-compress-raw-zlib")
+    (version "2.068")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
+                           "Compress-Raw-Zlib-" version ".tar.gz"))
+       (sha256
+        (base32
+         "06q7n87g26nn5gv4z2p31ca32f6zk124hqxc25rfgkjd3qi5798i"))))
+    (build-system perl-build-system)
+    (inputs
+     `(("zlib" ,zlib)))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before
+                   'configure 'configure-zlib
+                   (lambda* (#:key inputs #:allow-other-keys)
+                     (call-with-output-file "config.in"
+                       (lambda (port)
+                         (format port "
+BUILD_ZLIB = False
+INCLUDE = ~a/include
+LIB = ~:*~a/lib
+OLD_ZLIB = False
+GZIP_OS_CODE = AUTO_DETECT"
+                                 (assoc-ref inputs "zlib")))))))))
+    (home-page "http://search.cpan.org/dist/Compress-Raw-Zlib")
+    (synopsis "Low-level interface to zlib compression library")
+    (description "This module provides a Perl interface to the zlib
+compression library.")
+    (license (package-license perl))))
+
+(define-public perl-io-compress
+  (package
+    (name "perl-io-compress")
+    (version "2.068")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
+                           "IO-Compress-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0dy0apjp7j9dfkzfjspjd3z9gh26srx5vac72g59bkkz1jf8s1gs"))))
+    (build-system perl-build-system)
+    (propagated-inputs
+     `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib)     ; >=2.068
+       ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.068
+    (home-page "http://search.cpan.org/dist/IO-Compress")
+    (synopsis "IO Interface to compressed files/buffers")
+    (description "IO-Compress provides a Perl interface to allow reading and
+writing of compressed data created with the zlib and bzip2 libraries.")
+    (license (package-license perl))))