perl: Add 5.16.1

+236 -2
+63
pkgs/development/interpreters/perl/5.16/default.nix
···
··· 1 + { stdenv, fetchurl }: 2 + 3 + let 4 + 5 + libc = stdenv.gcc.libc or "/usr"; 6 + 7 + in 8 + 9 + stdenv.mkDerivation rec { 10 + name = "perl-5.16.1"; 11 + 12 + src = fetchurl { 13 + url = "mirror://cpan/src/${name}.tar.gz"; 14 + sha256 = "15qxzba3a50c9nik5ydgyfp62x7h9vxxn12yd1jgl93hb1wj96km"; 15 + }; 16 + 17 + patches = 18 + [ # Do not look in /usr etc. for dependencies. 19 + ./no-sys-dirs.patch 20 + ] 21 + ++ stdenv.lib.optional stdenv.isDarwin ./no-libutil.patch; 22 + 23 + # Build a thread-safe Perl with a dynamic libperls.o. We need the 24 + # "installstyle" option to ensure that modules are put under 25 + # $out/lib/perl5 - this is the general default, but because $out 26 + # contains the string "perl", Configure would select $out/lib. 27 + # Miniperl needs -lm. perl needs -lrt. 28 + configureFlags = 29 + [ "-de" 30 + "-Dcc=gcc" 31 + "-Uinstallusrbinperl" 32 + "-Dinstallstyle=lib/perl5" 33 + "-Duseshrplib" 34 + "-Dlocincpth=${libc}/include" 35 + "-Dloclibpth=${libc}/lib" 36 + ] 37 + ++ stdenv.lib.optional (stdenv ? glibc) "-Dusethreads"; 38 + 39 + configureScript = "${stdenv.shell} ./Configure"; 40 + 41 + dontAddPrefix = true; 42 + 43 + enableParallelBuilding = true; 44 + 45 + preConfigure = 46 + '' 47 + configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3" 48 + 49 + ${stdenv.lib.optionalString stdenv.isArm '' 50 + configureFlagsArray=(-Dldflags="-lm -lrt") 51 + ''} 52 + ''; 53 + 54 + preBuild = stdenv.lib.optionalString (!(stdenv ? gcc && stdenv.gcc.nativeTools)) 55 + '' 56 + # Make Cwd work on NixOS (where we don't have a /bin/pwd). 57 + substituteInPlace dist/Cwd/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'" 58 + ''; 59 + 60 + setupHook = ./setup-hook.sh; 61 + 62 + passthru.libPrefix = "lib/perl5/site_perl"; 63 + }
+12
pkgs/development/interpreters/perl/5.16/no-libutil.patch
···
··· 1 + diff -ru -x '*~' perl-5.14.2-orig/Configure perl-5.14.2/Configure 2 + --- perl-5.14.2-orig/Configure 2011-09-26 11:44:34.000000000 +0200 3 + +++ perl-5.14.2/Configure 2012-02-16 17:24:50.779839039 +0100 4 + @@ -1368,7 +1368,7 @@ 5 + : List of libraries we want. 6 + : If anyone needs extra -lxxx, put those in a hint file. 7 + libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun" 8 + -libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" 9 + +libswanted="$libswanted m crypt sec c cposix posix ucb bsd BSD" 10 + : We probably want to search /usr/shlib before most other libraries. 11 + : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. 12 + glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
+152
pkgs/development/interpreters/perl/5.16/no-sys-dirs.patch
···
··· 1 + diff -ru -x '*~' perl-5.14.2-orig/Configure perl-5.14.2/Configure 2 + --- perl-5.14.2-orig/Configure 2011-09-26 11:44:34.000000000 +0200 3 + +++ perl-5.14.2/Configure 2012-01-20 17:05:23.089223129 +0100 4 + @@ -106,15 +106,7 @@ 5 + fi 6 + 7 + : Proper PATH setting 8 + -paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' 9 + -paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin" 10 + -paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin" 11 + -paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" 12 + -paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" 13 + -paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin" 14 + -paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" 15 + -paths="$paths /sbin /usr/sbin /usr/libexec" 16 + -paths="$paths /system/gnu_library/bin" 17 + +paths='' 18 + 19 + for p in $paths 20 + do 21 + @@ -1311,8 +1303,7 @@ 22 + archname='' 23 + : Possible local include directories to search. 24 + : Set locincpth to "" in a hint file to defeat local include searches. 25 + -locincpth="/usr/local/include /opt/local/include /usr/gnu/include" 26 + -locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" 27 + +locincpth="" 28 + : 29 + : no include file wanted by default 30 + inclwanted='' 31 + @@ -1328,17 +1319,12 @@ 32 + archobjs='' 33 + libnames='' 34 + : change the next line if compiling for Xenix/286 on Xenix/386 35 + -xlibpth='/usr/lib/386 /lib/386' 36 + +xlibpth='' 37 + : Possible local library directories to search. 38 + -loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" 39 + -loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" 40 + +loclibpth="" 41 + 42 + : general looking path for locating libraries 43 + -glibpth="/lib /usr/lib $xlibpth" 44 + -glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib" 45 + -test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth" 46 + -test -f /shlib/libc.so && glibpth="/shlib $glibpth" 47 + -test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64" 48 + +glibpth="" 49 + 50 + : Private path used by Configure to find libraries. Its value 51 + : is prepended to libpth. This variable takes care of special 52 + @@ -1371,8 +1357,6 @@ 53 + libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" 54 + : We probably want to search /usr/shlib before most other libraries. 55 + : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. 56 + -glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` 57 + -glibpth="/usr/shlib $glibpth" 58 + : Do not use vfork unless overridden by a hint file. 59 + usevfork=false 60 + 61 + @@ -2380,7 +2364,6 @@ 62 + zip 63 + " 64 + pth=`echo $PATH | sed -e "s/$p_/ /g"` 65 + -pth="$pth /lib /usr/lib" 66 + for file in $loclist; do 67 + eval xxx=\$$file 68 + case "$xxx" in 69 + @@ -4785,7 +4768,7 @@ 70 + : Set private lib path 71 + case "$plibpth" in 72 + '') if ./mips; then 73 + - plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib" 74 + + plibpth="$incpath/usr/lib" 75 + fi;; 76 + esac 77 + case "$libpth" in 78 + @@ -8390,13 +8373,8 @@ 79 + echo " " 80 + case "$sysman" in 81 + '') 82 + - syspath='/usr/share/man/man1 /usr/man/man1' 83 + - syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1" 84 + - syspath="$syspath /usr/man/u_man/man1" 85 + - syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1" 86 + - syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1" 87 + - syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1" 88 + - sysman=`./loc . /usr/man/man1 $syspath` 89 + + syspath='' 90 + + sysman='' 91 + ;; 92 + esac 93 + if $test -d "$sysman"; then 94 + @@ -19721,9 +19699,10 @@ 95 + case "$full_ar" in 96 + '') full_ar=$ar ;; 97 + esac 98 + +full_ar=ar 99 + 100 + : Store the full pathname to the sed program for use in the C program 101 + -full_sed=$sed 102 + +full_sed=sed 103 + 104 + : see what type gids are declared as in the kernel 105 + echo " " 106 + diff -ru -x '*~' perl-5.14.2-orig/ext/Errno/Errno_pm.PL perl-5.14.2/ext/Errno/Errno_pm.PL 107 + --- perl-5.14.2-orig/ext/Errno/Errno_pm.PL 2011-09-26 11:44:34.000000000 +0200 108 + +++ perl-5.14.2/ext/Errno/Errno_pm.PL 2012-01-20 17:02:07.938138311 +0100 109 + @@ -137,11 +137,7 @@ 110 + if ($dep =~ /(\S+errno\.h)/) { 111 + $file{$1} = 1; 112 + } 113 + - } elsif ($^O eq 'linux' && 114 + - $Config{gccversion} ne '' && 115 + - $Config{gccversion} !~ /intel/i 116 + - # might be using, say, Intel's icc 117 + - ) { 118 + + } elsif (0) { 119 + # Some Linuxes have weird errno.hs which generate 120 + # no #file or #line directives 121 + my $linux_errno_h = -e '/usr/include/errno.h' ? 122 + diff -ru -x '*~' perl-5.14.2-orig/hints/freebsd.sh perl-5.14.2/hints/freebsd.sh 123 + --- perl-5.14.2-orig/hints/freebsd.sh 2011-09-19 15:18:22.000000000 +0200 124 + +++ perl-5.14.2/hints/freebsd.sh 2012-01-20 17:10:37.267924044 +0100 125 + @@ -118,21 +118,21 @@ 126 + objformat=`/usr/bin/objformat` 127 + if [ x$objformat = xaout ]; then 128 + if [ -e /usr/lib/aout ]; then 129 + - libpth="/usr/lib/aout /usr/local/lib /usr/lib" 130 + - glibpth="/usr/lib/aout /usr/local/lib /usr/lib" 131 + + libpth="" 132 + + glibpth="" 133 + fi 134 + lddlflags='-Bshareable' 135 + else 136 + - libpth="/usr/lib /usr/local/lib" 137 + - glibpth="/usr/lib /usr/local/lib" 138 + + libpth="" 139 + + glibpth="" 140 + ldflags="-Wl,-E " 141 + lddlflags="-shared " 142 + fi 143 + cccdlflags='-DPIC -fPIC' 144 + ;; 145 + *) 146 + - libpth="/usr/lib /usr/local/lib" 147 + - glibpth="/usr/lib /usr/local/lib" 148 + + libpth="" 149 + + glibpth="" 150 + ldflags="-Wl,-E " 151 + lddlflags="-shared " 152 + cccdlflags='-DPIC -fPIC'
+5
pkgs/development/interpreters/perl/5.16/setup-hook.sh
···
··· 1 + addPerlLibPath () { 2 + addToSearchPath PERL5LIB $1/lib/perl5/site_perl 3 + } 4 + 5 + envHooks=(${envHooks[@]} addPerlLibPath)
+4 -2
pkgs/top-level/all-packages.nix
··· 2727 2728 perl510 = callPackage ../development/interpreters/perl/5.10 { }; 2729 2730 - perl514 = callPackage ../development/interpreters/perl/5.14 { 2731 fetchurl = fetchurlBoot; 2732 }; 2733 2734 - perl = if system != "i686-cygwin" then perl514 else sysPerl; 2735 2736 php = php5_3; 2737
··· 2727 2728 perl510 = callPackage ../development/interpreters/perl/5.10 { }; 2729 2730 + perl514 = callPackage ../development/interpreters/perl/5.14 { }; 2731 + 2732 + perl516 = callPackage ../development/interpreters/perl/5.16 { 2733 fetchurl = fetchurlBoot; 2734 }; 2735 2736 + perl = if system != "i686-cygwin" then perl516 else sysPerl; 2737 2738 php = php5_3; 2739