GNU bug report logs - #66952
[PATCH] gnu: libarchive: Replace add--L-in-libarchive-pc by configure-flags.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Sun, 5 Nov 2023 15:23:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 66952 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#66952; Package guix-patches. (Sun, 05 Nov 2023 15:23:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 05 Nov 2023 15:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH] gnu: libarchive: Replace add--L-in-libarchive-pc by
 configure-flags.
Date: Sun,  5 Nov 2023 16:21:25 +0100
* gnu/packages/backup.scm (libarchive): Replace add--L-in-libarchive-pc by configure-flags.
[arguments](phases): Remove phase add--L-in-libarchive-pc.
(configuration-flags): Adapt configuration LIBS to avoid propagation.

Change-Id: I85f623043e98b82e46b9afe18c0be53cc7961d4b
---
 gnu/packages/backup.scm | 39 +++++++++++----------------------------
 1 file changed, 11 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 12c4a45b9d..b5e4112c4b 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -24,6 +24,7 @@
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022 Feng Shu <tumashu <at> 163.com>
 ;;; Copyright © 2023 Timo Wilken <guix <at> twilken.net>
+;;; Copyright © 2023 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,7 +42,6 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages backup)
-  #:use-module (guix gexp)
   #:use-module (guix packages)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix gexp)
@@ -262,7 +262,15 @@ (define-public libarchive
            `(,zstd "lib")))
     (arguments
      (list
-      #:configure-flags #~'("--disable-static")
+      ;; Embed absolute references to inputs to avoid propagation.
+      #:configure-flags
+      #~(list "--disable-static"
+              (string-append
+               "LIBS= -L"
+               (string-join
+                (list #$@(map (lambda (in) (this-package-input (car in)))
+                              (package-inputs this-package)))
+                "/lib -L")))
       #:phases
       #~(modify-phases %standard-phases
           (add-before 'build 'patch-pwd
@@ -288,32 +296,7 @@ (define-public libarchive
 		    (invoke "./bsdcpio_test" "^test_owner_parse")
 		    (invoke "./bsdtar_test"))
                   ;; Tests may be disabled if cross-compiling.
-                  (format #t "Test suite not run.~%"))))
-          (add-after 'install 'add--L-in-libarchive-pc
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (let* ((out     #$output)
-                     (lib     (string-append out "/lib"))
-                     (nettle  (assoc-ref inputs "nettle"))
-                     (libxml2 (assoc-ref inputs "libxml2"))
-                     (xz      (assoc-ref inputs "xz"))
-                     (zlib    (assoc-ref inputs "zlib"))
-                     (zstd    (assoc-ref inputs "zstd"))
-                     (bzip2   (assoc-ref inputs "bzip2")))
-                ;; Embed absolute references to these inputs to avoid propagation.
-                (substitute* (list (string-append lib "/pkgconfig/libarchive.pc")
-                                   (string-append lib "/libarchive.la"))
-                  (("-lnettle")
-                   (string-append "-L" nettle "/lib -lnettle"))
-                  (("-lxml2")
-                   (string-append "-L" libxml2 "/lib -lxml2"))
-                  (("-llzma")
-                   (string-append "-L" xz "/lib -llzma"))
-                  (("-lz")
-                   (string-append "-L" zlib "/lib -lz"))
-                  (("-lzstd")
-                   (string-append "-L" zstd "/lib -lzstd"))
-                  (("-lbz2")
-                   (string-append "-L" bzip2 "/lib -lbz2")))))))))
+                  (format #t "Test suite not run.~%")))))))
     (home-page "https://libarchive.org/")
     (synopsis "Multi-format archive and compression library")
     (description
-- 
2.41.0





This bug report was last modified 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.