>From c81a0521d44f6dc6fa70b745b4062db2fc89a5b6 Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Mon, 31 Aug 2020 16:39:02 +1000 Subject: [PATCH 1/3] gnu: lz4: Install static build to "static" output. * gnu/packages/compression.scm (lz4): Mimic the zlib package by moving the static build output to a separate "static" output. This allows programs like chez-scheme to link to the static version. --- gnu/packages/compression.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 97f254ff6e..63f398e89d 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2020 Björn Höfling ;;; Copyright © 2020 Arun Isaac ;;; Copyright © 2020 Lars-Dominik Braun +;;; Copyright © 2020 Brendan Tildesley ;;; ;;; This file is part of GNU Guix. ;;; @@ -797,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 '("out" "static")) (native-inputs `(;; For tests. ("python" ,python) @@ -814,11 +816,14 @@ decompression of some loosely related file formats used by Microsoft.") (("^test: (.*) test-install" _ targets) (string-append "test: " targets))) #t)) - (add-after 'install 'delete-static-library + (add-after 'install 'move-static-library (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (delete-file (string-append out "/lib/liblz4.a")) - #t)))))) + (let ((out (assoc-ref outputs "out")) + (static (assoc-ref outputs "static"))) + (with-directory-excursion (string-append out "/lib") + (install-file "liblz4.a" (string-append static "/lib")) + (delete-file "liblz4.a") + #t))))))) (home-page "https://www.lz4.org") (synopsis "Compression algorithm focused on speed") (description "LZ4 is a lossless compression algorithm, providing -- 2.28.0