about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2003-08-26 10:34:51 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2003-08-26 10:34:51 +0000
commitd6cbd38bfb9b714589bfa4949b053c95a2902b2b (patch)
tree7da7190f68e59e9436a59a0cea37f48d14159cd9 /pkgs
parent0de9e19de7a79011de46fc7ab3eab3edafa77d5b (diff)
* Patched Perl's configure script to stop it from scanning well-known system
  directories for libraries.  (Fortunately, the build would still fail because
  Perl's idea of "standard" library directories no longer matched that of the
  linker.)

* `stdenv-linux/setup.sh' now puts the path of glibc in an environment
  variable so that it can be used by other packages (for example, we need to
  pass it to Perl's configure, because otherwise it will think that, e.g.,
  libm.so doesn't exist).

svn path=/nixpkgs/trunk/; revision=359
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/perl/perl-build.sh14
-rw-r--r--pkgs/stdenv-linux/setup.sh3
2 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/perl/perl-build.sh b/pkgs/perl/perl-build.sh
index c0f13934450b2..7a925e6dbfd84 100755
--- a/pkgs/perl/perl-build.sh
+++ b/pkgs/perl/perl-build.sh
@@ -7,10 +7,20 @@ cd perl-* || exit 1
 
 # Perl's Configure messes with PATH.  We can't have that, so we patch it.
 # Yeah, this is an ugly hack.
-grep -v '^paths=' Configure > Configure.tmp || exit 1
+cat Configure | \
+ grep -v '^paths=' | \
+ grep -v '^locincpth=' | \
+ grep -v '^xlibpth=' | \
+ 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
 
-./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl || exit 1
+./Configure -de -Dcc=gcc -Dprefix=$out -Uinstallusrbinperl \
+ -Dlocincpth="$NIX_LIBC_INCLUDES" \
+ -Dloclibpth="$NIX_LIBC_LIBS" \
+ || exit 1
 make || exit 1
 make install || exit 1
diff --git a/pkgs/stdenv-linux/setup.sh b/pkgs/stdenv-linux/setup.sh
index ce25963e91290..1e7c8b4d2a56d 100644
--- a/pkgs/stdenv-linux/setup.sh
+++ b/pkgs/stdenv-linux/setup.sh
@@ -7,3 +7,6 @@ export NIX_CFLAGS="-isystem @GLIBC@/include $NIX_CFLAGS"
 export NIX_LDFLAGS="-L@GLIBC@/lib -Wl,-dynamic-linker,@GLIBC@/lib/ld-linux.so.2,-rpath,@GLIBC@/lib $NIX_LDFLAGS -L@GCC@/lib -Wl,-rpath,@GCC@/lib"
 export NIX_CC=@CC@
 export NIX_CXX=@CXX@
+
+export NIX_LIBC_INCLUDES="@GLIBC@/include"
+export NIX_LIBC_LIBS="@GLIBC@/lib"