1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-07-31 20:01:28 +02:00

gnu: perl-5.14: Improve style.

* gnu/packages/perl.scm (perl-5.14)[arguments]: Improve style.

Change-Id: I1f2a0afc0c960f0f489d55d84ad07e832f2e44cf
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Nicolas Graves
2026-02-16 08:45:31 +01:00
committed by Ludovic Courtès
parent 569ee1b1c1
commit 3ccf2a67ec
+35 -37
View File
@@ -295,46 +295,44 @@ more.")
(properties `((release-date . "2013-03-10")))
(build-system gnu-build-system)
(arguments
'(#:tests? #f
#: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")))
(list
#:tests? #f
#:phases
#~(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key inputs #:allow-other-keys)
(let ((libc (assoc-ref inputs "libc")))
;; Use the right path for `pwd'.
(substitute* "dist/Cwd/Cwd.pm"
(("/bin/pwd")
(which "pwd")))
(invoke "./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")
(invoke "./Configure"
(string-append "-Dprefix=" #$output)
(string-append "-Dman1dir=" #$output "/share/man/man1")
(string-append "-Dman3dir=" #$output "/share/man/man3")
"-de" "-Dcc=gcc"
"-Uinstallusrbinperl"
"-Dinstallstyle=lib/perl5"
"-Duseshrplib"
(string-append "-Dlocincpth=" libc "/include")
(string-append "-Dloclibpth=" libc "/lib")
;; Force the library search path to contain only libc
;; because it is recorded in Config.pm and
;; Config_heavy.pl; we don't want to keep a reference
;; to everything that's in $LIBRARY_PATH at build
;; time (Binutils, bzip2, file, etc.)
(string-append "-Dlibpth=" libc "/lib")
(string-append "-Dplibpth=" libc "/lib")))))
;; Force the library search path to contain only libc
;; because it is recorded in Config.pm and
;; Config_heavy.pl; we don't want to keep a reference
;; to everything that's in $LIBRARY_PATH at build
;; time (Binutils, bzip2, file, etc.)
(string-append "-Dlibpth=" libc "/lib")
(string-append "-Dplibpth=" 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$"))))))))
(add-before 'strip 'make-shared-objects-writable
(lambda _
;; The 'lib/perl5' directory contains ~50 MiB of .so. Make them
;; writable so that 'strip' actually strips them.
(for-each
(lambda (dso) (chmod dso #o755))
(find-files (string-append #$output "/lib") "\\.so$")))))))
(native-inputs
(list gcc-7))
(native-search-paths (list (search-path-specification