about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2009-10-02 12:45:13 +0000
committerPeter Simons <simons@cryp.to>2009-10-02 12:45:13 +0000
commit7ec88bf6bd6a9dfe4faff8d559f6b7769fb90175 (patch)
tree34a41ba5b2e4012822d68a8665d274038984398a /pkgs/applications
parente25c7cb4457c5c3cddf0fd7c36e46296cc619751 (diff)
downloadnixlib-7ec88bf6bd6a9dfe4faff8d559f6b7769fb90175.tar
nixlib-7ec88bf6bd6a9dfe4faff8d559f6b7769fb90175.tar.gz
nixlib-7ec88bf6bd6a9dfe4faff8d559f6b7769fb90175.tar.bz2
nixlib-7ec88bf6bd6a9dfe4faff8d559f6b7769fb90175.tar.lz
nixlib-7ec88bf6bd6a9dfe4faff8d559f6b7769fb90175.tar.xz
nixlib-7ec88bf6bd6a9dfe4faff8d559f6b7769fb90175.tar.zst
nixlib-7ec88bf6bd6a9dfe4faff8d559f6b7769fb90175.zip
emacs-23: apply the crt{1,i,n}.o patch only on Linux
svn path=/nixpkgs/trunk/; revision=17603
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/emacs-23/builder.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/applications/editors/emacs-23/builder.sh b/pkgs/applications/editors/emacs-23/builder.sh
index a975fa4601eb..d04e7a4fdd3f 100644
--- a/pkgs/applications/editors/emacs-23/builder.sh
+++ b/pkgs/applications/editors/emacs-23/builder.sh
@@ -1,14 +1,19 @@
 source $stdenv/setup
 
+# This hook is supposed to be run on Linux. It patches the proper locations of
+# the crt{1,i,n}.o files into the build to ensure that Emacs is linked with
+# *our* versions, not the ones found in the system, as it would do by default.
+# On other platforms, this appears to be unnecessary.
 preConfigure() {
-    libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
-    echo "libc: $libc"
-
     case "${system}" in
-	x86_64-*)	glibclibdir=lib64 ;;
-	*)		glibclibdir=lib ;;
+	x86_64-linux)	glibclibdir=lib64 ;;
+	i686-linux)	glibclibdir=lib ;;
+        *)              return;
     esac
 
+    libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
+    echo "libc: $libc"
+
     for i in src/s/*.h src/m/*.h; do
         substituteInPlace $i \
             --replace /usr/${glibclibdir}/crt1.o $libc/${glibclibdir}/crt1.o \