aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/compression.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r--gnu/packages/compression.scm109
1 files changed, 51 insertions, 58 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 26decfaf84..c44882b23c 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
@@ -97,9 +97,8 @@
,@(if (%current-target-system)
`((setenv "CHOST" ,(%current-target-system)))
'())
- (zero?
- (system* "./configure"
- (string-append "--prefix=" out)))))))))
+ (invoke "./configure"
+ (string-append "--prefix=" out))))))))
(home-page "https://zlib.net/")
(synopsis "Compression library")
(description
@@ -201,14 +200,14 @@ adding and extracting files to/from a tar archive.")
(define-public gzip
(package
(name "gzip")
- (version "1.8")
+ (version "1.9")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gzip/gzip-"
version ".tar.xz"))
(sha256
(base32
- "1lxv3p4iyx7833mlihkn5wfwmz4cys5nybwpz3dfawag8kn6f5zz"))))
+ "16h8g4acy7fgfxcjacr3wijjsnixwsfd2jhz3zwdi2qrzi262l5f"))))
(build-system gnu-build-system)
(synopsis "General file (de)compression (using lzw)")
(arguments
@@ -251,33 +250,31 @@ file; as a result, it is often used in conjunction with \"tar\", resulting in
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key target #:allow-other-keys)
- (if ,(%current-target-system)
- ;; Cross-compilation: use the cross tools.
- (substitute* (find-files "." "Makefile")
- (("CC=.*$")
- (string-append "CC = " target "-gcc\n"))
- (("AR=.*$")
- (string-append "AR = " target "-ar\n"))
- (("RANLIB=.*$")
- (string-append "RANLIB = " target "-ranlib\n"))
- (("^all:(.*)test" _ prerequisites)
- ;; Remove 'all' -> 'test' dependency.
- (string-append "all:" prerequisites "\n")))
- #t)))
+ (when ,(%current-target-system)
+ ;; Cross-compilation: use the cross tools.
+ (substitute* (find-files "." "Makefile")
+ (("CC=.*$")
+ (string-append "CC = " target "-gcc\n"))
+ (("AR=.*$")
+ (string-append "AR = " target "-ar\n"))
+ (("RANLIB=.*$")
+ (string-append "RANLIB = " target "-ranlib\n"))
+ (("^all:(.*)test" _ prerequisites)
+ ;; Remove 'all' -> 'test' dependency.
+ (string-append "all:" prerequisites "\n"))))
+ #t))
(add-before 'build 'build-shared-lib
(lambda* (#:key inputs #:allow-other-keys)
(patch-makefile-SHELL "Makefile-libbz2_so")
- (zero? (system* "make" "-f" "Makefile-libbz2_so"))))
+ (invoke "make" "-f" "Makefile-libbz2_so")))
(add-after 'install 'install-shared-lib
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(libdir (string-append out "/lib")))
(for-each (lambda (file)
- (let ((base (basename file)))
- (format #t "installing `~a' to `~a'~%"
- base libdir)
- (copy-file file
- (string-append libdir "/" base))))
+ (format #t "installing `~a' to `~a'~%"
+ (basename file) libdir)
+ (install-file file libdir))
(find-files "." "^libbz2\\.so")))
#t))
(add-after 'install-shared-lib 'patch-scripts
@@ -476,14 +473,14 @@ some compression ratio).")
(define-public lzip
(package
(name "lzip")
- (version "1.19")
+ (version "1.20")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/lzip/lzip-"
version ".tar.gz"))
(sha256
(base32
- "1abbch762gv8rjr579q3qyyk6c80plklbv2mw4x0vg71dgsw9bgz"))))
+ "0319q59kb8g324wnj7xzbr7vvlx5bcs13lr34j0zb3kqlyjq2fy9"))))
(build-system gnu-build-system)
(home-page "https://www.nongnu.org/lzip/lzip.html")
(synopsis "Lossless data compressor based on the LZMA algorithm")
@@ -924,10 +921,11 @@ tarballs.")
(base32
"1qxxsasvwbbbh6dl3138y9h3fg0q2v7xdk5jjc690bdg7g1wrj6n"))
(modules '((guix build utils)))
- (snippet
- ;; This is a recursive submodule that is unnecessary for this
- ;; package, so delete it.
- '(delete-file-recursively "brotli/terryfy"))))
+ (snippet '(begin
+ ;; This is a recursive submodule that is
+ ;; unnecessary for this package, so delete it.
+ (delete-file-recursively "brotli/terryfy")
+ #t))))
(build-system gnu-build-system)
(native-inputs
`(("autoconf" ,autoconf)
@@ -986,7 +984,9 @@ respectively, based on the reference implementation from Google.")
(file-name (string-append name "-" version ".tar.gz"))
(snippet
;; This file isn't freely distributable and has no effect on building.
- '(delete-file "xdelta3/draft-korn-vcdiff.txt"))))
+ '(begin
+ (delete-file "xdelta3/draft-korn-vcdiff.txt")
+ #t))))
(build-system gnu-build-system)
(native-inputs
`(("autoconf" ,autoconf)
@@ -1454,7 +1454,9 @@ handles the 7z format which features very high compression ratios.")
(modules '((guix build utils)))
(snippet
;; Remove pre-compiled object.
- '(delete-file "gzstream.o"))))
+ '(begin
+ (delete-file "gzstream.o")
+ #t))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
@@ -1491,7 +1493,9 @@ functionality in a C++ iostream.")
(modules '((guix build utils)))
(snippet
;; Delete irrelevant pre-compiled binaries.
- '(for-each delete-file (find-files "." "\\.exe$")))))
+ '(begin
+ (for-each delete-file (find-files "." "\\.exe$"))
+ #t))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -1710,14 +1714,11 @@ the actual decompression, the other input and output.")
(list "-f" "unix/Makefile"
(string-append "prefix=" out)
(string-append "MANDIR=" out "/share/man/man1")))
- #:modules ((guix build gnu-build-system)
- (guix build utils)
- (srfi srfi-1))
#:phases
(modify-phases %standard-phases
(replace 'build
(lambda* (#:key (make-flags '()) #:allow-other-keys)
- (zero? (apply system* "make" "generic_gcc" make-flags))))
+ (apply invoke "make" "generic_gcc" make-flags)))
(delete 'configure))))
(home-page "http://www.info-zip.org/Zip.html")
(synopsis "Compression and file packing utility")
@@ -1739,7 +1740,6 @@ Compression ratios of 2:1 to 3:1 are common for text files.")
(define-public unzip
(package (inherit zip)
(name "unzip")
- (replacement unzip/fixed)
(version "6.0")
(source
(origin
@@ -1767,13 +1767,20 @@ Compression ratios of 2:1 to 3:1 are common for text files.")
(arguments
`(#:phases (modify-phases %standard-phases
(delete 'configure)
+ (add-after 'unpack 'fortify
+ (lambda _
+ ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
+ ;; This environment variable is recommended in 'unix/Makefile'
+ ;; for passing flags to the C compiler.
+ (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
+ #t))
(replace 'build
(lambda* (#:key make-flags #:allow-other-keys)
- (zero? (apply system* "make"
- `("-j" ,(number->string
- (parallel-job-count))
- ,@make-flags
- "generic_gcc"))))))
+ (apply invoke "make"
+ `("-j" ,(number->string
+ (parallel-job-count))
+ ,@make-flags
+ "generic_gcc")))))
#:make-flags (list "-f" "unix/Makefile"
(string-append "prefix=" %output)
(string-append "MANDIR=" %output "/share/man/man1"))))
@@ -1790,20 +1797,6 @@ recreates the stored directory structure by default.")
(license (license:non-copyleft "file://LICENSE"
"See LICENSE in the distribution."))))
-(define unzip/fixed
- (package/inherit unzip
- (arguments
- (substitute-keyword-arguments (package-arguments unzip)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'fortify
- (lambda _
- ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
- ;; This environment variable is recommended in 'unix/Makefile'
- ;; for passing flags to the C compiler.
- (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
- #t))))))))
-
(define-public zziplib
(package
(name "zziplib")