diff options
Diffstat (limited to 'gnu/packages/perl.scm')
-rw-r--r-- | gnu/packages/perl.scm | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index e5ec25e418..45ca94b279 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -51,28 +51,39 @@ (arguments '(#:tests? #f #:phases - (alist-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/Cwd/Cwd.pm" - (("/bin/pwd") - (which "pwd"))) - - (zero? - (system* "./Configure" - (string-append "-Dprefix=" out) - (string-append "-Dman1dir=" out "/share/man/man1") - (string-append "-Dman3dir=" out "/share/man/man3") - "-de" "-Dcc=gcc" - "-Uinstallusrbinperl" - "-Dinstallstyle=lib/perl5" - "-Duseshrplib" - (string-append "-Dlocincpth=" libc "/include") - (string-append "-Dloclibpth=" libc "/lib"))))) - %standard-phases))) + (modify-phases %standard-phases + (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/Cwd/Cwd.pm" + (("/bin/pwd") + (which "pwd"))) + + (zero? + (system* "./Configure" + (string-append "-Dprefix=" out) + (string-append "-Dman1dir=" out "/share/man/man1") + (string-append "-Dman3dir=" out "/share/man/man3") + "-de" "-Dcc=gcc" + "-Uinstallusrbinperl" + "-Dinstallstyle=lib/perl5" + "-Duseshrplib" + (string-append "-Dlocincpth=" libc "/include") + (string-append "-Dloclibpth=" libc "/lib")))))) + + (add-before + 'strip 'make-shared-objects-writable + (lambda* (#:key outputs #:allow-other-keys) + ;; The 'lib/perl5' directory contains ~50 MiB of .so. Make them + ;; writable so that 'strip' actually strips them. + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib"))) + (for-each (lambda (dso) + (chmod dso #o755)) + (find-files lib "\\.so$")))))))) (native-search-paths (list (search-path-specification (variable "PERL5LIB") (files '("lib/perl5/site_perl"))))) |