summaryrefslogtreecommitdiff
path: root/gnu/packages/perl.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-01-28 18:34:45 +0100
committerRicardo Wurmus <rekado@elephly.net>2022-02-07 14:02:15 +0100
commit013086c3dbaa2e28dd1b3c21a7ebe51ac829a1eb (patch)
treef7fb6a850048b806d40183c3deea8eed638c85c5 /gnu/packages/perl.scm
parent26d9e6c9043e8dd6a40498b1d7fbeedf6e134d6d (diff)
downloadguix-patches-013086c3dbaa2e28dd1b3c21a7ebe51ac829a1eb.tar
guix-patches-013086c3dbaa2e28dd1b3c21a7ebe51ac829a1eb.tar.gz
gnu: Add perl-5.14.
* gnu/packages/patches/perl-5.14-autosplit-default-time.patch, gnu/packages/patches/perl-5.14-module-pluggable-search.patch, gnu/packages/patches/perl-5.14-no-sys-dirs.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/perl.scm (perl-5.14): New variable.
Diffstat (limited to 'gnu/packages/perl.scm')
-rw-r--r--gnu/packages/perl.scm73
1 files changed, 73 insertions, 0 deletions
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 069c2c6e2e..d6ca055147 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -65,6 +65,7 @@
#:use-module (gnu packages databases)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages gd)
#:use-module (gnu packages gl)
#:use-module (gnu packages gtk)
@@ -258,6 +259,78 @@ more.")
(home-page "https://www.perl.org/")
(license license:gpl1+))) ; or "Artistic"
+(define-public perl-5.14
+ (package
+ (name "perl")
+ (version "5.14.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://cpan/src/5.0/perl-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1js47zzna3v38fjnirf2vq6y0rjp8m86ysj5vagzgkig956d8gw0"))
+ (patches (search-patches
+ "perl-5.14-no-sys-dirs.patch"
+ "perl-5.14-autosplit-default-time.patch"
+ "perl-5.14-module-pluggable-search.patch"))))
+ (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")))
+
+ (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")
+
+ ;; 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$"))))))))
+ (native-inputs
+ (list gcc-7))
+ (native-search-paths (list (search-path-specification
+ (variable "PERL5LIB")
+ (files '("lib/perl5/site_perl")))))
+ (home-page "https://www.perl.org/")
+ (synopsis "Implementation of the Perl programming language")
+ (description
+ "Perl is a general-purpose programming language originally developed for
+text manipulation and now used for a wide range of tasks including system
+administration, web development, network programming, GUI development, and
+more.")
+ (license license:gpl1+)))
+
(define-public perl-algorithm-c3
(package
(name "perl-algorithm-c3")