From f075ff26d1edeab2ef7a598372dc7e2e311c3d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 31 Mar 2026 11:27:30 +0200 Subject: [PATCH] gnu: libtool: Use gexps. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/autotools.scm (libtool)[arguments]: Change to gexps. Change-Id: I61c8e9850fb0af200b4e3115fc6fe80d4a5c0098 Signed-off-by: Ludovic Courtès --- gnu/packages/autotools.scm | 91 ++++++++++++++++++++------------------ 1 file changed, 49 insertions(+), 42 deletions(-) diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index b1efe3a11a..8cf68c00ee 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov -;;; Copyright © 2012-2018, 2020-2022 Ludovic Courtès +;;; Copyright © 2012-2018, 2020-2022, 2026 Ludovic Courtès ;;; Copyright © 2015 Mathieu Lirzin ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis ;;; Copyright © 2015, 2017, 2018 Mark H Weaver @@ -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: - ;; . - ;; 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: + ;; . + ;; 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