guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch staging updated: gnu: lz4: Add a :static output.


From: guix-commits
Subject: branch staging updated: gnu: lz4: Add a :static output.
Date: Thu, 05 Nov 2020 18:21:37 -0500

This is an automated email from the git hooks/post-receive script.

nckx pushed a commit to branch staging
in repository guix.

The following commit(s) were added to refs/heads/staging by this push:
     new 2e8a9db  gnu: lz4: Add a :static output.
2e8a9db is described below

commit 2e8a9db6efd67e5524eecae8c8d1482a9bce8004
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Thu Nov 5 13:31:53 2020 +0100

    gnu: lz4: Add a :static output.
    
    * gnu/packages/compression.scm (lz4)[outputs]: Add "static" to this new
    field.
    [arguments]: Replace the ‘delete-static-library’ phase with
    ‘move-static-library’.
---
 gnu/packages/compression.scm | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 43831e0..818624f 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -798,6 +798,7 @@ decompression of some loosely related file formats used by 
Microsoft.")
          "0lpaypmk70ag2ks3kf2dl4ac3ba40n5kc1ainkp9wfjawz76mh61"))
        (file-name (git-file-name name version))))
     (build-system gnu-build-system)
+    (outputs (list "out" "static"))
     (native-inputs
      `(;; For tests.
        ("python" ,python)
@@ -806,20 +807,24 @@ decompression of some loosely related file formats used 
by Microsoft.")
      `(#:test-target "test"
        #:make-flags (list (string-append "CC=" ,(cc-for-target))
                           (string-append "prefix=" (assoc-ref %outputs "out")))
-       #:phases (modify-phases %standard-phases
-                  (delete 'configure)            ;no configure script
-                  (add-before 'check 'disable-broken-test
-                    (lambda _
-                      ;; XXX: test_install.sh fails when prefix is a 
subdirectory.
-                      (substitute* "tests/Makefile"
-                        (("^test: (.*) test-install" _ targets)
-                         (string-append "test: " targets)))
-                      #t))
-                  (add-after 'install 'delete-static-library
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      (let ((out (assoc-ref outputs "out")))
-                        (delete-file (string-append out "/lib/liblz4.a"))
-                        #t))))))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ; no configure script
+         (add-before 'check 'disable-broken-test
+           (lambda _
+             (substitute* "tests/Makefile"
+               ;; This fails when $prefix is not a single top-level directory.
+               (("^test: (.*) test-install" _ targets)
+                (string-append "test: " targets)))
+             #t))
+         (add-after 'install 'move-static-library
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (static (assoc-ref outputs "static")))
+               (mkdir-p (string-append static "/lib"))
+               (rename-file (string-append out "/lib/liblz4.a")
+                            (string-append static "/lib/liblz4.a"))
+               #t))))))
     (home-page "https://www.lz4.org";)
     (synopsis "Compression algorithm focused on speed")
     (description "LZ4 is a lossless compression algorithm, providing



reply via email to

[Prev in Thread] Current Thread [Next in Thread]