gnu: libarchive: Use G-expressions.
* gnu/packages/backup.scm (libarchive)[arguments]: Convert to gexps.
This commit is contained in:
		
							parent
							
								
									2ff1a14bda
								
							
						
					
					
						commit
						1d221b7fea
					
				
					 1 changed files with 53 additions and 54 deletions
				
			
		| 
						 | 
					@ -13,7 +13,7 @@
 | 
				
			||||||
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
 | 
					;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
 | 
				
			||||||
;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 | 
					;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 | 
				
			||||||
;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com>
 | 
					;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com>
 | 
				
			||||||
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
 | 
					;;; Copyright © 2019, 2022 Marius Bakke <marius@gnu.org>
 | 
				
			||||||
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 | 
					;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 | 
				
			||||||
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 | 
					;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 | 
				
			||||||
;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
 | 
					;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
 | 
				
			||||||
| 
						 | 
					@ -260,60 +260,59 @@ backups (called chunks) to allow easy burning to CD/DVD.")
 | 
				
			||||||
           zlib
 | 
					           zlib
 | 
				
			||||||
           `(,zstd "lib")))
 | 
					           `(,zstd "lib")))
 | 
				
			||||||
    (arguments
 | 
					    (arguments
 | 
				
			||||||
     `(#:configure-flags '("--disable-static")
 | 
					     (list
 | 
				
			||||||
       #:phases
 | 
					      #:configure-flags #~'("--disable-static")
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					      #:phases
 | 
				
			||||||
         (add-before 'build 'patch-pwd
 | 
					      #~(modify-phases %standard-phases
 | 
				
			||||||
           (lambda _
 | 
					          (add-before 'build 'patch-pwd
 | 
				
			||||||
             (substitute* "Makefile"
 | 
					            (lambda _
 | 
				
			||||||
               (("/bin/pwd") (which "pwd")))
 | 
					              (substitute* "Makefile"
 | 
				
			||||||
             #t))
 | 
					                (("/bin/pwd") (which "pwd")))))
 | 
				
			||||||
         (replace 'check
 | 
					          (replace 'check
 | 
				
			||||||
           (lambda* (#:key (tests? #t) #:allow-other-keys)
 | 
					            (lambda* (#:key tests? #:allow-other-keys)
 | 
				
			||||||
             (if tests?
 | 
					              (if tests?
 | 
				
			||||||
		 ;; XXX: The test_owner_parse, test_read_disk, and
 | 
							  ;; XXX: The test_owner_parse, test_read_disk, and
 | 
				
			||||||
		 ;; test_write_disk_lookup tests expect user 'root' to
 | 
							  ;; test_write_disk_lookup tests expect user 'root' to
 | 
				
			||||||
		 ;; exist, but the chroot's /etc/passwd doesn't have
 | 
							  ;; exist, but the chroot's /etc/passwd doesn't have
 | 
				
			||||||
		 ;; it.  Turn off those tests.
 | 
							  ;; it.  Turn off those tests.
 | 
				
			||||||
                 (begin
 | 
					                  (begin
 | 
				
			||||||
		   ;; The tests allow one to disable tests matching a globbing pattern.
 | 
							    ;; The tests allow one to disable tests matching a globbing pattern.
 | 
				
			||||||
		   (invoke "make"
 | 
							    (invoke "make"
 | 
				
			||||||
			   "libarchive_test"
 | 
								    "libarchive_test"
 | 
				
			||||||
			   "bsdcpio_test"
 | 
								    "bsdcpio_test"
 | 
				
			||||||
			   "bsdtar_test")
 | 
								    "bsdtar_test")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		   ;; XXX: This glob disables too much.
 | 
							    ;; XXX: This glob disables too much.
 | 
				
			||||||
		   (invoke "./libarchive_test" "^test_*_disk*")
 | 
							    (invoke "./libarchive_test" "^test_*_disk*")
 | 
				
			||||||
		   (invoke "./bsdcpio_test" "^test_owner_parse")
 | 
							    (invoke "./bsdcpio_test" "^test_owner_parse")
 | 
				
			||||||
		   (invoke "./bsdtar_test"))
 | 
							    (invoke "./bsdtar_test"))
 | 
				
			||||||
                 ;; Tests may be disabled if cross-compiling.
 | 
					                  ;; Tests may be disabled if cross-compiling.
 | 
				
			||||||
                 (format #t "Test suite not run.~%"))))
 | 
					                  (format #t "Test suite not run.~%"))))
 | 
				
			||||||
         (add-after 'install 'add--L-in-libarchive-pc
 | 
					          (add-after 'install 'add--L-in-libarchive-pc
 | 
				
			||||||
           (lambda* (#:key inputs outputs #:allow-other-keys)
 | 
					            (lambda* (#:key inputs outputs #:allow-other-keys)
 | 
				
			||||||
             (let* ((out     (assoc-ref outputs "out"))
 | 
					              (let* ((out     #$output)
 | 
				
			||||||
                    (lib     (string-append out "/lib"))
 | 
					                     (lib     (string-append out "/lib"))
 | 
				
			||||||
                    (nettle  (assoc-ref inputs "nettle"))
 | 
					                     (nettle  (assoc-ref inputs "nettle"))
 | 
				
			||||||
                    (libxml2 (assoc-ref inputs "libxml2"))
 | 
					                     (libxml2 (assoc-ref inputs "libxml2"))
 | 
				
			||||||
                    (xz      (assoc-ref inputs "xz"))
 | 
					                     (xz      (assoc-ref inputs "xz"))
 | 
				
			||||||
                    (zlib    (assoc-ref inputs "zlib"))
 | 
					                     (zlib    (assoc-ref inputs "zlib"))
 | 
				
			||||||
                    (zstd    (assoc-ref inputs "zstd"))
 | 
					                     (zstd    (assoc-ref inputs "zstd"))
 | 
				
			||||||
                    (bzip2   (assoc-ref inputs "bzip2")))
 | 
					                     (bzip2   (assoc-ref inputs "bzip2")))
 | 
				
			||||||
               ;; Embed absolute references to these inputs to avoid propagation.
 | 
					                ;; Embed absolute references to these inputs to avoid propagation.
 | 
				
			||||||
               (substitute* (list (string-append lib "/pkgconfig/libarchive.pc")
 | 
					                (substitute* (list (string-append lib "/pkgconfig/libarchive.pc")
 | 
				
			||||||
                                  (string-append lib "/libarchive.la"))
 | 
					                                   (string-append lib "/libarchive.la"))
 | 
				
			||||||
                 (("-lnettle")
 | 
					                  (("-lnettle")
 | 
				
			||||||
                  (string-append "-L" nettle "/lib -lnettle"))
 | 
					                   (string-append "-L" nettle "/lib -lnettle"))
 | 
				
			||||||
                 (("-lxml2")
 | 
					                  (("-lxml2")
 | 
				
			||||||
                  (string-append "-L" libxml2 "/lib -lxml2"))
 | 
					                   (string-append "-L" libxml2 "/lib -lxml2"))
 | 
				
			||||||
                 (("-llzma")
 | 
					                  (("-llzma")
 | 
				
			||||||
                  (string-append "-L" xz "/lib -llzma"))
 | 
					                   (string-append "-L" xz "/lib -llzma"))
 | 
				
			||||||
                 (("-lz")
 | 
					                  (("-lz")
 | 
				
			||||||
                  (string-append "-L" zlib "/lib -lz"))
 | 
					                   (string-append "-L" zlib "/lib -lz"))
 | 
				
			||||||
                 (("-lzstd")
 | 
					                  (("-lzstd")
 | 
				
			||||||
                  (string-append "-L" zstd "/lib -lzstd"))
 | 
					                   (string-append "-L" zstd "/lib -lzstd"))
 | 
				
			||||||
                 (("-lbz2")
 | 
					                  (("-lbz2")
 | 
				
			||||||
                  (string-append "-L" bzip2 "/lib -lbz2")))
 | 
					                   (string-append "-L" bzip2 "/lib -lbz2")))))))))
 | 
				
			||||||
               #t))))))
 | 
					 | 
				
			||||||
    (home-page "https://libarchive.org/")
 | 
					    (home-page "https://libarchive.org/")
 | 
				
			||||||
    (synopsis "Multi-format archive and compression library")
 | 
					    (synopsis "Multi-format archive and compression library")
 | 
				
			||||||
    (description
 | 
					    (description
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue