guix-commits
[Top][All Lists]
Advanced

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

07/07: gnu: xz: Move liblzma.a to separate output.


From: guix-commits
Subject: 07/07: gnu: xz: Move liblzma.a to separate output.
Date: Wed, 12 Dec 2018 14:12:55 -0500 (EST)

mbakke pushed a commit to branch core-updates
in repository guix.

commit 5b2da2a659bea9a442a36c89be241a1d6c820d45
Author: Marius Bakke <address@hidden>
Date:   Wed Dec 12 20:08:28 2018 +0100

    gnu: xz: Move liblzma.a to separate output.
    
    * gnu/packages/compression.scm (xz)[arguments, outputs]: New fields.
    * gnu/packages/make-bootstrap.scm (%static-inputs)[xz]: Don't inherit 
outputs.
---
 gnu/packages/compression.scm    | 17 +++++++++++++++++
 gnu/packages/make-bootstrap.scm |  1 +
 2 files changed, 18 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index e8a50c6..69f7290 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -425,6 +425,23 @@ compressed with pbzip2 can be decompressed with bzip2).")
              (base32
               "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
    (build-system gnu-build-system)
+   (arguments
+    `(#:phases
+      (modify-phases %standard-phases
+        (add-after 'install 'move-static-lib
+          (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/liblzma.a")
+                           (string-append static "/lib/liblzma.a"))
+              ;; Remove reference to the static library from the .la file
+              ;; so Libtool does the right thing when both the shared and
+              ;; static library is available.
+              (substitute* (string-append out "/lib/liblzma.la")
+                (("^old_library='liblzma.a'") "old_library=''"))
+              #t))))))
+   (outputs '("out" "static"))
    (synopsis "General-purpose data compression")
    (description
     "XZ Utils is free general-purpose data compression software with high
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 761420a..d0f8d62 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -159,6 +159,7 @@ for `sh' in $PATH, and without nscd, and with static NSS 
modules."
                                "LDFLAGS = -static"))
                             #t))))))))
         (xz (package (inherit xz)
+              (outputs '("out"))
               (arguments
                `(#:strip-flags '("--strip-all")
                  #:phases (modify-phases %standard-phases



reply via email to

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