1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: libtool: Use gexps.

* gnu/packages/autotools.scm (libtool)[arguments]: Change to gexps.

Change-Id: I61c8e9850fb0af200b4e3115fc6fe80d4a5c0098
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Ludovic Courtès
2026-03-31 11:27:30 +02:00
parent 682c9c4462
commit f075ff26d1

View File

@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2012-2018, 2020-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012-2018, 2020-2022, 2026 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2015, 2017, 2018 Mark H Weaver <mhw@netris.org>
@@ -504,49 +504,56 @@ Makefile, simplifying the entire process for the developer.")
autoconf-wrapper)) ; others on 'autom4te'
(arguments
`(;; Libltdl is provided as a separate package, so don't install it here.
#:configure-flags '("--disable-ltdl-install")
(list ;; Libltdl is provided as a separate package, so don't install it here.
#:configure-flags #~'("--disable-ltdl-install")
;; XXX: There are test failures on mips64el-linux starting from 2.4.4:
;; <http://hydra.gnu.org/build/181662>.
;; Also, do not run tests when cross compiling
#:tests? ,(not (or (%current-target-system)
(string-prefix? "mips64"
(%current-system))))
;; XXX: There are test failures on mips64el-linux starting from 2.4.4:
;; <http://hydra.gnu.org/build/181662>.
;; Also, do not run tests when cross compiling
#:tests? (not (or (%current-target-system)
(string-prefix? "mips64"
(%current-system))))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-some-tests-on-extra-archs
(lambda _
(with-directory-excursion "tests"
(substitute* '("demo.at" "testsuite")
(("hppa\\*\\|amd64\\*\\|x86_64\\*\\|s390\\*" all)
(string-append all "|arm*|mips*|riscv*"))))))
(add-before 'check 'pre-check
(lambda* (#:key inputs native-inputs parallel-tests? #:allow-other-keys)
;; Run the test suite in parallel, if possible.
(setenv "TESTSUITEFLAGS"
(string-append
"-j"
(if parallel-tests?
(number->string (parallel-job-count))
"1")))
;; Patch references to /bin/sh.
(let ((/bin/sh (search-input-file (or native-inputs inputs) "bin/sh")))
(substitute* "tests/testsuite"
(("/bin/sh") /bin/sh)))))
;; These files may be copied into source trees by libtoolize,
;; therefore they must not point to store file names that would be
;; leaked with tarballs generated by make dist.
(add-after 'install 'restore-build-aux-shebang
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(dir (string-append out "/share/libtool/build-aux")))
(for-each (lambda (file)
(format #t "restoring shebang on `~a'~%" file)
(substitute* file
(("^#!.*/bin/sh") "#!/bin/sh")))
(find-files dir))))))))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'skip-some-tests-on-extra-archs
(lambda _
(with-directory-excursion "tests"
(substitute* '("demo.at" "testsuite")
(("hppa\\*\\|amd64\\*\\|x86_64\\*\\|s390\\*"
all)
(string-append all "|arm*|mips*|riscv*"))))))
(add-before 'check 'pre-check
(lambda* (#:key inputs native-inputs parallel-tests?
#:allow-other-keys)
;; Run the test suite in parallel, if possible.
(setenv "TESTSUITEFLAGS"
(string-append
"-j"
(if parallel-tests?
(number->string (parallel-job-count))
"1")))
;; Patch references to /bin/sh.
(let ((/bin/sh (search-input-file (or native-inputs inputs)
"bin/sh")))
(substitute* "tests/testsuite"
(("/bin/sh")
/bin/sh)))))
;; These files may be copied into source trees by libtoolize,
;; therefore they must not point to store file names that would be
;; leaked with tarballs generated by make dist.
(add-after 'install 'restore-build-aux-shebang
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(dir (string-append out
"/share/libtool/build-aux")))
(for-each (lambda (file)
(format #t "restoring shebang on `~a'~%"
file)
(substitute* file
(("^#!.*/bin/sh")
"#!/bin/sh")))
(find-files dir))))))))
(synopsis "Generic shared library support tools")
(description