Patchwork [1/2] gnu: perl: Split configure phase.

login
register
mail settings
Submitter Ben Woodcroft
Date Sept. 20, 2016, 4:56 a.m.
Message ID <20160920045607.18936-2-donttrustben@gmail.com>
Download mbox | patch
Permalink /patch/15786/
State New
Headers show

Comments

Ben Woodcroft - Sept. 20, 2016, 4:56 a.m.
* gnu/packages/perl.scm (perl)[arguments]: Split 'configure' phase into
'setup-configure' and 'configure' phases.
---
 gnu/packages/perl.scm | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
Ludovic Courtès - Sept. 24, 2016, 5:02 a.m.
Ben Woodcroft <donttrustben@gmail.com> skribis:

> * gnu/packages/perl.scm (perl)[arguments]: Split 'configure' phase into
> 'setup-configure' and 'configure' phases.

Good, you can already push this one to core-updates.

Thanks,
Ludo’.

Patch

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 0a26e51..f0c4e36 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -62,22 +62,24 @@ 
      '(#:tests? #f
        #:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'setup-configure
+           (lambda _
+             ;; Use the right path for `pwd'.
+             (substitute* "dist/PathTools/Cwd.pm"
+               (("/bin/pwd")
+                (which "pwd")))
+
+             ;; Build in GNU89 mode to tolerate C++-style comment in libc's
+             ;; <bits/string3.h>.
+             (substitute* "cflags.SH"
+               (("-std=c89")
+                "-std=gnu89"))
+             #t))
          (replace
           'configure
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((out  (assoc-ref outputs "out"))
                   (libc (assoc-ref inputs "libc")))
-              ;; Use the right path for `pwd'.
-              (substitute* "dist/PathTools/Cwd.pm"
-                (("/bin/pwd")
-                 (which "pwd")))
-
-              ;; Build in GNU89 mode to tolerate C++-style comment in libc's
-              ;; <bits/string3.h>.
-              (substitute* "cflags.SH"
-                (("-std=c89")
-                 "-std=gnu89"))
-
               (zero?
                (system* "./Configure"
                         (string-append "-Dprefix=" out)