mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-24 11:39:46 -05:00
gnu: autoconf-2.69: Repatriate unpatch-shebangs phase from 2.71.
* gnu/packages/autotools.scm (autoconf-2.71)[phases]{unpatch-shebangs}: Move to... * gnu/packages/autotools.scm (autoconf-2.69)[phases]: ... here.
This commit is contained in:
parent
756188a8da
commit
1c3a922542
1 changed files with 33 additions and 36 deletions
|
@ -68,29 +68,38 @@ (define-public autoconf-2.69
|
||||||
`(;; XXX: testsuite: 209 and 279 failed. The latter is an impurity. It
|
`(;; XXX: testsuite: 209 and 279 failed. The latter is an impurity. It
|
||||||
;; should use our own "cpp" instead of "/lib/cpp".
|
;; should use our own "cpp" instead of "/lib/cpp".
|
||||||
#:tests? #f
|
#:tests? #f
|
||||||
,@(if (%current-target-system)
|
#:phases
|
||||||
`(#:phases
|
(modify-phases %standard-phases
|
||||||
(modify-phases %standard-phases
|
,@(if (%current-target-system)
|
||||||
(add-after 'install 'patch-non-shebang-references
|
'((add-after 'install 'patch-non-shebang-references
|
||||||
(lambda* (#:key build inputs outputs #:allow-other-keys)
|
(lambda* (#:key build inputs outputs #:allow-other-keys)
|
||||||
;; `patch-shebangs' patches shebangs only, and the Perl
|
;; `patch-shebangs' patches shebangs only, and the Perl
|
||||||
;; scripts use a re-exec feature that references the
|
;; scripts use a re-exec feature that references the
|
||||||
;; build hosts' perl. Also, BASH and M4 store references
|
;; build hosts' perl. Also, BASH and M4 store references
|
||||||
;; hide in the scripts.
|
;; hide in the scripts.
|
||||||
(let ((bash (assoc-ref inputs "bash"))
|
(let ((bash (assoc-ref inputs "bash"))
|
||||||
(m4 (assoc-ref inputs "m4"))
|
(m4 (assoc-ref inputs "m4"))
|
||||||
(perl (assoc-ref inputs "perl"))
|
(perl (assoc-ref inputs "perl"))
|
||||||
(out (assoc-ref outputs "out"))
|
(out (assoc-ref outputs "out"))
|
||||||
(store-directory (%store-directory)))
|
(store-directory (%store-directory)))
|
||||||
(substitute* (find-files (string-append out "/bin"))
|
(substitute* (find-files (string-append out "/bin"))
|
||||||
(((string-append store-directory "/[^/]*-bash-[^/]*"))
|
(((string-append store-directory "/[^/]*-bash-[^/]*"))
|
||||||
bash)
|
bash)
|
||||||
(((string-append store-directory "/[^/]*-m4-[^/]*"))
|
(((string-append store-directory "/[^/]*-m4-[^/]*"))
|
||||||
m4)
|
m4)
|
||||||
(((string-append store-directory "/[^/]*-perl-[^/]*"))
|
(((string-append store-directory "/[^/]*-perl-[^/]*"))
|
||||||
perl))
|
perl))))))
|
||||||
#t)))))
|
'())
|
||||||
'())))
|
(add-after 'install 'unpatch-shebangs
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
;; Scripts that "autoconf -i" installs (config.guess,
|
||||||
|
;; config.sub, and install-sh) must use a regular shebang
|
||||||
|
;; rather than a reference to the store. Restore it.
|
||||||
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
(build-aux (string-append
|
||||||
|
out "/share/autoconf/build-aux")))
|
||||||
|
(substitute* (find-files build-aux)
|
||||||
|
(("^#!.*/bin/sh") "#!/bin/sh"))))))))
|
||||||
(home-page "https://www.gnu.org/software/autoconf/")
|
(home-page "https://www.gnu.org/software/autoconf/")
|
||||||
(synopsis "Create source code configuration scripts")
|
(synopsis "Create source code configuration scripts")
|
||||||
(description
|
(description
|
||||||
|
@ -130,19 +139,7 @@ (define-public autoconf-2.71
|
||||||
(executable-file? file)))
|
(executable-file? file)))
|
||||||
(find-files "bin"
|
(find-files "bin"
|
||||||
(lambda (file stat)
|
(lambda (file stat)
|
||||||
(executable-file? file)))))
|
(executable-file? file)))))))))))))
|
||||||
#t))
|
|
||||||
(add-after 'install 'unpatch-shebangs
|
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
|
||||||
;; Scripts that "autoconf -i" installs (config.guess,
|
|
||||||
;; config.sub, and install-sh) must use a regular shebang
|
|
||||||
;; rather than a reference to the store. Restore it.
|
|
||||||
;; TODO: Move this phase to 'autoconf-2.69'.
|
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
|
||||||
(build-aux (string-append
|
|
||||||
out "/share/autoconf/build-aux")))
|
|
||||||
(substitute* (find-files build-aux)
|
|
||||||
(("^#!.*/bin/sh") "#!/bin/sh")))))))))))
|
|
||||||
|
|
||||||
(define-public autoconf autoconf-2.69)
|
(define-public autoconf autoconf-2.69)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue