mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
* Perl nixification fixes. Oh, the humanity.
svn path=/nixpkgs/trunk/; revision=813
This commit is contained in:
parent
1999676d30
commit
f82050134e
@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
#! /bin/sh -e
|
||||
|
||||
. $stdenv/setup || exit 1
|
||||
buildinputs="$patch"
|
||||
. $stdenv/setup
|
||||
|
||||
tar xvfz $src || exit 1
|
||||
cd perl-* || exit 1
|
||||
tar xvfz $src
|
||||
cd perl-*
|
||||
|
||||
# Perl's Configure messes with PATH. We can't have that, so we patch it.
|
||||
# Yeah, this is an ugly hack.
|
||||
@ -14,13 +15,14 @@ cat Configure | \
|
||||
grep -v '^glibpth=' | \
|
||||
grep -v '^loclibpth=' | \
|
||||
grep -v '^locincpth=' | \
|
||||
cat > Configure.tmp || exit 1
|
||||
mv Configure.tmp Configure || exit 1
|
||||
chmod +x Configure || exit 1
|
||||
cat > Configure.tmp
|
||||
mv Configure.tmp Configure
|
||||
chmod +x Configure
|
||||
|
||||
patch -p1 < $srcPatch
|
||||
|
||||
./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl \
|
||||
-Dlocincpth="$NIX_LIBC_INCLUDES" \
|
||||
-Dloclibpth="$NIX_LIBC_LIBS" \
|
||||
|| exit 1
|
||||
make || exit 1
|
||||
make install || exit 1
|
||||
-Dloclibpth="$NIX_LIBC_LIBS"
|
||||
make
|
||||
make install
|
||||
|
@ -1,10 +1,23 @@
|
||||
{stdenv, fetchurl}: derivation {
|
||||
name = "perl-5.8.0";
|
||||
{stdenv, fetchurl, patch}:
|
||||
|
||||
derivation {
|
||||
name = "perl-5.8.3";
|
||||
system = stdenv.system;
|
||||
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.cs.uu.nl/mirror/CPAN/src/5.0/perl-5.8.1.tar.gz;
|
||||
md5 = "87cf132f1fbf23e780f0b218046438a6";
|
||||
};
|
||||
stdenv = stdenv;
|
||||
url = ftp://ftp.cs.uu.nl/mirror/CPAN/src/5.0/perl-5.8.3.tar.gz;
|
||||
md5 = "6d2b389f8c6424b7af303f417947714f";
|
||||
};
|
||||
|
||||
# This patch does the following:
|
||||
# 1) Do use the PATH environment variable to find the `pwd' command.
|
||||
# By default, Perl will only look for it in /lib and /usr/lib.
|
||||
# !!! what are the security implications of this?
|
||||
# 2) Force the use of <errno.h>, not /usr/include/errno.h, on Linux
|
||||
# systems. (This actually appears to be due to a bug in Perl.)
|
||||
|
||||
srcPatch = ./patch;
|
||||
|
||||
inherit stdenv patch;
|
||||
}
|
||||
|
42
pkgs/development/interpreters/perl/patch
Normal file
42
pkgs/development/interpreters/perl/patch
Normal file
@ -0,0 +1,42 @@
|
||||
diff -rc perl-5.8.3-orig/ext/Errno/Errno_pm.PL perl-5.8.3/ext/Errno/Errno_pm.PL
|
||||
*** perl-5.8.3-orig/ext/Errno/Errno_pm.PL 2003-08-04 09:37:13.000000000 +0200
|
||||
--- perl-5.8.3/ext/Errno/Errno_pm.PL 2004-02-20 16:59:05.000000000 +0100
|
||||
***************
|
||||
*** 105,111 ****
|
||||
# Watch out for cross compiling for EPOC (usually done on linux)
|
||||
$file{'/usr/local/epocemx/epocsdk/include/libc/sys/errno.h'} = 1;
|
||||
} elsif ($^O eq 'linux' &&
|
||||
! $Config{gccversion} ne '' # might be using, say, Intel's icc
|
||||
) {
|
||||
# Some Linuxes have weird errno.hs which generate
|
||||
# no #file or #line directives
|
||||
--- 105,111 ----
|
||||
# Watch out for cross compiling for EPOC (usually done on linux)
|
||||
$file{'/usr/local/epocemx/epocsdk/include/libc/sys/errno.h'} = 1;
|
||||
} elsif ($^O eq 'linux' &&
|
||||
! $Config{gccversion} eq '' # might be using, say, Intel's icc
|
||||
) {
|
||||
# Some Linuxes have weird errno.hs which generate
|
||||
# no #file or #line directives
|
||||
Only in perl-5.8.3/ext/Errno: Errno_pm.PL~
|
||||
diff -rc perl-5.8.3-orig/lib/Cwd.pm perl-5.8.3/lib/Cwd.pm
|
||||
*** perl-5.8.3-orig/lib/Cwd.pm 2003-12-20 00:05:30.000000000 +0100
|
||||
--- perl-5.8.3/lib/Cwd.pm 2004-02-20 16:58:16.000000000 +0100
|
||||
***************
|
||||
*** 201,207 ****
|
||||
|
||||
# The 'natural and safe form' for UNIX (pwd may be setuid root)
|
||||
sub _backtick_pwd {
|
||||
! local @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)};
|
||||
my $cwd = `$pwd_cmd`;
|
||||
# Belt-and-suspenders in case someone said "undef $/".
|
||||
local $/ = "\n";
|
||||
--- 201,207 ----
|
||||
|
||||
# The 'natural and safe form' for UNIX (pwd may be setuid root)
|
||||
sub _backtick_pwd {
|
||||
! local @ENV{qw(IFS CDPATH ENV BASH_ENV)};
|
||||
my $cwd = `$pwd_cmd`;
|
||||
# Belt-and-suspenders in case someone said "undef $/".
|
||||
local $/ = "\n";
|
||||
Only in perl-5.8.3/lib: Cwd.pm~
|
@ -232,6 +232,7 @@
|
||||
|
||||
perl = (import ../development/interpreters/perl) {
|
||||
inherit fetchurl stdenv;
|
||||
patch = gnupatch;
|
||||
};
|
||||
|
||||
python = (import ../development/interpreters/python) {
|
||||
|
Loading…
Reference in New Issue
Block a user