summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/libraries/glibc-2.11/common.nix4
-rw-r--r--pkgs/development/libraries/glibc-2.11/locale-override.patch72
2 files changed, 1 insertions, 75 deletions
diff --git a/pkgs/development/libraries/glibc-2.11/common.nix b/pkgs/development/libraries/glibc-2.11/common.nix
index fcdccd90f2e..4fe261c7fdc 100644
--- a/pkgs/development/libraries/glibc-2.11/common.nix
+++ b/pkgs/development/libraries/glibc-2.11/common.nix
@@ -44,9 +44,6 @@ stdenv.mkDerivation ({
        failure to find mdns4_minimal. */
     ./nss-skip-unavail.patch
 
-    /* Make it possible to override the locale-archive in NixOS. */
-    ./locale-override.patch
-
     /* Have rpcgen(1) look for cpp(1) in $PATH.  */
     ./rpcgen-path.patch
 
@@ -60,6 +57,7 @@ stdenv.mkDerivation ({
   configureFlags = [
     "-C"
     "--enable-add-ons"
+    "--localedir=/var/run/current-system/sw/lib/locale"
     (if kernelHeaders != null
      then "--with-headers=${kernelHeaders}/include"
      else "--without-headers")
diff --git a/pkgs/development/libraries/glibc-2.11/locale-override.patch b/pkgs/development/libraries/glibc-2.11/locale-override.patch
deleted file mode 100644
index 72340993c33..00000000000
--- a/pkgs/development/libraries/glibc-2.11/locale-override.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff -rc glibc-2.9-20081208-orig/locale/loadarchive.c glibc-2.9-20081208/locale/loadarchive.c
-*** glibc-2.9-20081208-orig/locale/loadarchive.c	2005-09-09 18:56:52.000000000 +0200
---- glibc-2.9-20081208/locale/loadarchive.c	2009-04-19 13:54:26.000000000 +0200
-***************
-*** 124,129 ****
---- 124,142 ----
-  }
-  
-  
-+ static int
-+ open_locale_archive ()
-+ {
-+   int fd = -1;
-+   char *path = getenv ("LOCALE_ARCHIVE_2_11");
-+   if (path)
-+     fd = open_not_cancel_2 (path, O_RDONLY|O_LARGEFILE);
-+   if (fd < 0)
-+     fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
-+   return fd;
-+ }
-+ 
-+ 
-  /* Find the locale *NAMEP in the locale archive, and return the
-     internalized data structure for its CATEGORY data.  If this locale has
-     already been loaded from the archive, just returns the existing data
-***************
-*** 203,209 ****
-        archmapped = &headmap;
-  
-        /* The archive has never been opened.  */
-!       fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
-        if (fd < 0)
-  	/* Cannot open the archive, for whatever reason.  */
-  	return NULL;
---- 216,222 ----
-        archmapped = &headmap;
-  
-        /* The archive has never been opened.  */
-!       fd = open_locale_archive ();
-        if (fd < 0)
-  	/* Cannot open the archive, for whatever reason.  */
-  	return NULL;
-***************
-*** 394,400 ****
-  	  if (fd == -1)
-  	    {
-  	      struct stat64 st;
-! 	      fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
-  	      if (fd == -1)
-  		/* Cannot open the archive, for whatever reason.  */
-  		return NULL;
---- 407,413 ----
-  	  if (fd == -1)
-  	    {
-  	      struct stat64 st;
-! 	      fd = open_locale_archive ();
-  	      if (fd == -1)
-  		/* Cannot open the archive, for whatever reason.  */
-  		return NULL;
-diff -rc glibc-2.9-20081208-orig/sysdeps/generic/unsecvars.h glibc-2.9-20081208/sysdeps/generic/unsecvars.h
-*** glibc-2.9-20081208-orig/sysdeps/generic/unsecvars.h	2006-10-11 18:24:05.000000000 +0200
---- glibc-2.9-20081208/sysdeps/generic/unsecvars.h	2009-04-19 13:55:34.000000000 +0200
-***************
-*** 16,21 ****
---- 16,22 ----
-    "LD_SHOW_AUXV\0"							      \
-    "LD_USE_LOAD_BIAS\0"							      \
-    "LOCALDOMAIN\0"							      \
-+   "LOCALE_ARCHIVE_2_11\0"							      \
-    "LOCPATH\0"								      \
-    "MALLOC_TRACE\0"							      \
-    "NIS_PATH\0"								      \