diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-07-22 18:58:48 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-07-22 18:58:48 +0200 |
commit | ccad0e4d6973da7af8badfb7125f35f7e51eb2d7 (patch) | |
tree | 15ff9da1c1c03b088d0ad9240f2c1878f5da5802 /gnu/packages/compression.scm | |
parent | d478cc043557ca3fcd5fced87d2e2c8e246eff03 (diff) | |
parent | 26986544469ef290885f5f8d71006751e9e8daf8 (diff) | |
download | guix-ccad0e4d6973da7af8badfb7125f35f7e51eb2d7.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r-- | gnu/packages/compression.scm | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 11cc00d19c..db5eb45c0e 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -1387,22 +1387,50 @@ or junctions, and always follows hard links.") (define-public zstd (package (name "zstd") - (version "1.3.8") + (version "1.4.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/facebook/zstd/releases/download/" "v" version "/zstd-" version ".tar.gz")) (sha256 - (base32 "13nlsqhkn276frxrzjdn7wz0j9zz414lf336885ykyxcvw2a0gr9")))) + (base32 "180sfl0iz5hy43xcr0gh8kz2vxgpb8rh5d7wmpxn3bxkgs320l2k")))) (build-system gnu-build-system) + (outputs '("out" ;1.1MiB executables and documentation + "lib" ;1MiB shared library and headers + "static")) ;1MiB static library (arguments `(#:phases (modify-phases %standard-phases - (delete 'configure)) ; no configure script + (delete 'configure) ;no configure script + (add-after 'install 'adjust-library-locations + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (assoc-ref outputs "lib")) + (static (assoc-ref outputs "static")) + (shared-libs (string-append lib "/lib")) + (static-libs (string-append static "/lib"))) + ;; Move the static library to its own output to save ~1MiB. + (mkdir-p static-libs) + (for-each (lambda (ar) + (link ar (string-append static-libs "/" + (basename ar))) + (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. + (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc") + (("^prefix=.*") "")) + + #t)))) #:make-flags (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")) + (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib") + (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include") ;; Skip auto-detection of, and creating a dependency on, the build ;; environment's ‘xz’ for what amounts to a dubious feature anyway. "HAVE_LZMA=0" |