diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-08 00:32:12 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-08 00:32:12 +0000 |
commit | 4b27d2870197b26b7c170caa333944231715d4a3 (patch) | |
tree | 6b781861cb96e9ce0660ca0b904ed3dda1cc6905 /pkgs/development/libraries | |
parent | 6e86ca940f9cb7fdbbf8663bc5c19af45fbc1e17 (diff) | |
download | nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.gz nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.bz2 nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.lz nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.xz nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.tar.zst nixpkgs-4b27d2870197b26b7c170caa333944231715d4a3.zip |
Porting changes from stdenv-updates into this branch.
This comes from: svn diff ^/nixpkgs/trunk/@18255 ^/nixpkgs/branches/stdenv-updates/ > diff patch -p0 < diff and then adding into svn all files new from the patch. trunk@18255 comes from the last time I updated stdenv-updates from trunk. svn path=/nixpkgs/stdenv-updates2/; revision=18272
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/eglibc/builder.sh | 63 | ||||
-rw-r--r-- | pkgs/development/libraries/eglibc/default.nix | 32 | ||||
-rw-r--r-- | pkgs/development/libraries/freetype/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc-2.9/binutils-2.20.patch | 42 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc-2.9/builder.sh | 9 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc-2.9/default.nix | 33 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc-2.9/info.nix | 5 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc-2.9/locales.nix | 32 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc-2.9/localesbuilder.sh | 50 | ||||
-rw-r--r-- | pkgs/development/libraries/icu/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/libxcrypt/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/readline/link-against-ncurses.patch | 18 | ||||
-rw-r--r-- | pkgs/development/libraries/readline/readline-patches.nix | 8 | ||||
-rw-r--r-- | pkgs/development/libraries/readline/readline6.nix | 17 |
14 files changed, 304 insertions, 19 deletions
diff --git a/pkgs/development/libraries/eglibc/builder.sh b/pkgs/development/libraries/eglibc/builder.sh new file mode 100644 index 00000000000..47cd1b5e252 --- /dev/null +++ b/pkgs/development/libraries/eglibc/builder.sh @@ -0,0 +1,63 @@ +# Glibc cannot have itself in its RPATH. +export NIX_NO_SELF_RPATH=1 + +source $stdenv/setup + +# Explicitly tell glibc to use our pwd, not /bin/pwd. +export PWD_P=$(type -tP pwd) + +# Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to +# prevent a retained dependency on the bootstrap tools in the +# stdenv-linux bootstrap. +export BASH_SHELL=/bin/sh + +preConfigure() { + + for i in libc/configure libc/io/ftwtest-sh; do + # Can't use substituteInPlace here because replace hasn't been + # built yet in the bootstrap. + sed -i "$i" -e "s^/bin/pwd^$PWD_P^g" + done + + # Include source for debugging + ensureDir $out/src + cp -R libc ports $out/src + ln -s $out/src/ports $out/src/libc/ports + # glibc wants -O2 minimum + export CFLAGS="-pipe -g -O2" + + mkdir $NIX_BUILD_TOP/build + cd $NIX_BUILD_TOP/build + + configureScript=$out/src/libc/configure +} + + +postConfigure() { + # Hack: get rid of the `-static' flag set by the bootstrap stdenv. + # This has to be done *after* `configure' because it builds some + # test binaries. + export NIX_CFLAGS_LINK= + export NIX_LDFLAGS_BEFORE= + + export NIX_DONT_SET_RPATH=1 + unset CFLAGS +} + + +postInstall() { + if test -n "$installLocales"; then + make localedata/install-locales + fi + rm $out/etc/ld.so.cache + (cd $out/include && ln -s $kernelHeaders/include/* .) || exit 1 + + # Fix for NIXOS-54 (ldd not working on x86_64). Make a symlink + # "lib64" to "lib". + if test -n "$is64bit"; then + ln -s lib $out/lib64 + fi +} + + +genericBuild diff --git a/pkgs/development/libraries/eglibc/default.nix b/pkgs/development/libraries/eglibc/default.nix new file mode 100644 index 00000000000..a27d0f53fbf --- /dev/null +++ b/pkgs/development/libraries/eglibc/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchsvn, kernelHeaders +, installLocales ? true +, profilingLibraries ? false +}: + +stdenv.mkDerivation rec { + name = "eglibc-2.10"; + + src = fetchsvn { + url = svn://svn.eglibc.org/branches/eglibc-2_10; + rev = 8690; + sha256 = "029hklrx2rlhsb5r2csd0gapjm0rbr8n28ib6jnnhms12x302viq"; + }; + + inherit kernelHeaders installLocales; + + configureFlags = [ + "--with-headers=${kernelHeaders}/include" + "--without-fp" + "--enable-add-ons=libidn,ports,nptl" + "--disable-profile" + "--host=arm-linux-gnueabi" + "--build=arm-linux-gnueabi" + ]; + + builder = ./builder.sh; + + meta = { + homepage = http://www.gnu.org/software/libc/; + description = "The GNU C Library"; + }; +} diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 0bf2db03cd8..d3814bdb972 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -1,5 +1,4 @@ { stdenv, fetchurl - , # FreeType supports hinting using a TrueType bytecode interpreter, # as well as sub-pixel rendering. These are patented by Apple and # Microsoft, respectively, so they are disabled by default. This @@ -8,7 +7,7 @@ useEncumberedCode ? false }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { name = "freetype-2.3.11"; src = fetchurl { @@ -26,4 +25,7 @@ stdenv.mkDerivation rec { homepage = http://www.freetype.org/; license = "GPLv2+"; # or the FreeType License (BSD + advertising clause) }; -} +} // +# The asm for armel is written with the 'asm' keyword. +(if (stdenv.system == "armv5tel-linux") then + {CFLAGS = "-std=gnu99";} else {})) diff --git a/pkgs/development/libraries/glibc-2.9/binutils-2.20.patch b/pkgs/development/libraries/glibc-2.9/binutils-2.20.patch new file mode 100644 index 00000000000..ab3d6144d6e --- /dev/null +++ b/pkgs/development/libraries/glibc-2.9/binutils-2.20.patch @@ -0,0 +1,42 @@ +Support GNU Binutils 2.20 and beyond. Patch from +http://sourceware.org/ml/libc-alpha/2009-09/msg00009.html . + +diff --git a/configure b/configure +index 48e6952..b1d84d7 100755 +--- a/configure ++++ b/configure +@@ -4841,7 +4841,7 @@ $as_echo_n "checking version of $AS... " >&6; } + ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 2.1[3-9]*) ++ 2.1[3-9]*|[2-9].[2-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +@@ -4904,7 +4904,7 @@ $as_echo_n "checking version of $LD... " >&6; } + ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 2.1[3-9]*) ++ 2.1[3-9]*|[2-9].[2-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +diff --git a/configure.in b/configure.in +index 4584afe..7c4f71f 100644 +--- a/configure.in ++++ b/configure.in +@@ -897,10 +897,10 @@ AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in + # Accept binutils 2.13 or newer. + AC_CHECK_PROG_VER(AS, $AS, --version, + [GNU assembler.* \([0-9]*\.[0-9.]*\)], +- [2.1[3-9]*], AS=: critic_missing="$critic_missing as") ++ [2.1[3-9]*|[2-9].[2-9]*], AS=: critic_missing="$critic_missing as") + AC_CHECK_PROG_VER(LD, $LD, --version, + [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], +- [2.1[3-9]*], LD=: critic_missing="$critic_missing ld") ++ [2.1[3-9]*|[2-9].[2-9]*], LD=: critic_missing="$critic_missing ld") + + # We need the physical current working directory. We cannot use the + # "pwd -P" shell builtin since that's not portable. Instead we try to diff --git a/pkgs/development/libraries/glibc-2.9/builder.sh b/pkgs/development/libraries/glibc-2.9/builder.sh index 8cc6be4cf73..adb73656c2a 100644 --- a/pkgs/development/libraries/glibc-2.9/builder.sh +++ b/pkgs/development/libraries/glibc-2.9/builder.sh @@ -26,11 +26,13 @@ preConfigure() { # don't want as a dependency in the Nixpkgs bootstrap. So force # the output file to be newer. touch locale/C-translit.h + + tar xvjf "$srcPorts" - mkdir ../build - cd ../build + mkdir build + cd build - configureScript=../$sourceRoot/configure + configureScript=../configure } @@ -42,6 +44,7 @@ postConfigure() { export NIX_LDFLAGS_BEFORE= export NIX_DONT_SET_RPATH=1 + unset CFLAGS } diff --git a/pkgs/development/libraries/glibc-2.9/default.nix b/pkgs/development/libraries/glibc-2.9/default.nix index c94cedab018..33f93befb21 100644 --- a/pkgs/development/libraries/glibc-2.9/default.nix +++ b/pkgs/development/libraries/glibc-2.9/default.nix @@ -9,8 +9,13 @@ stdenv.mkDerivation rec { builder = ./builder.sh; src = fetchurl { - url = http://nixos.org/tarballs/glibc-2.9-20081208.tar.bz2; - sha256 = "0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h"; + url = http://ftp.gnu.org/gnu/glibc/glibc-2.9.tar.bz2; + sha256 = "0v53m7flx6qcx7cvrvvw6a4dx4x3y6k8nvpc4wfv5xaaqy2am2q9"; + }; + + srcPorts = fetchurl { + url = http://ftp.gnu.org/gnu/glibc/glibc-ports-2.9.tar.bz2; + sha256 = "0r2sn527wxqifi63di7ns9wbjh1cainxn978w178khhy7yw9fk42"; }; inherit kernelHeaders installLocales; @@ -46,12 +51,28 @@ stdenv.mkDerivation rec { /* Have rpcgen(1) look for cpp(1) in $PATH. */ ./rpcgen-path.patch + + /* Support GNU Binutils 2.20 and above. */ + ./binutils-2.20.patch ]; - configureFlags = '' - --enable-add-ons - --with-headers=${kernelHeaders}/include - ${if profilingLibraries then "--enable-profile" else "--disable-profile"} + configureFlags = [ + "--enable-add-ons" + "--with-headers=${kernelHeaders}/include" + (if profilingLibraries then "--enable-profile" else "--disable-profile") + ] ++ (if (stdenv.system == "armv5tel-linux") then [ + "--host=arm-linux-gnueabi" + "--build=arm-linux-gnueabi" + "--without-fp" + ] else []); + + preInstall = '' + ensureDir $out/lib + ln -s ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 + ''; + + postInstall = '' + rm $out/lib/libgcc_s.so.1 ''; # Workaround for this bug: diff --git a/pkgs/development/libraries/glibc-2.9/info.nix b/pkgs/development/libraries/glibc-2.9/info.nix index 9653690606a..3201bb47440 100644 --- a/pkgs/development/libraries/glibc-2.9/info.nix +++ b/pkgs/development/libraries/glibc-2.9/info.nix @@ -8,6 +8,11 @@ stdenv.mkDerivation rec { sha256 = "0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h"; }; + patches = [ + /* Support GNU Binutils 2.20 and above. */ + ./binutils-2.20.patch + ]; + preConfigure = '' export PWD_P=$(type -tP pwd) for i in configure io/ftwtest-sh; do diff --git a/pkgs/development/libraries/glibc-2.9/locales.nix b/pkgs/development/libraries/glibc-2.9/locales.nix index a5ef4797810..3046374ca34 100644 --- a/pkgs/development/libraries/glibc-2.9/locales.nix +++ b/pkgs/development/libraries/glibc-2.9/locales.nix @@ -10,13 +10,35 @@ stdenv.mkDerivation rec { name = "glibc-locales-2.9"; - + + builder = ./localesbuilder.sh; + src = fetchurl { - url = http://nixos.org/tarballs/glibc-2.9-20081208.tar.bz2; - sha256 = "0zhxbgcsl97pf349m0lz8d5ljvvzrcqc23yf08d888xlk4ms8m3h"; + url = http://ftp.gnu.org/gnu/glibc/glibc-2.9.tar.bz2; + sha256 = "0v53m7flx6qcx7cvrvvw6a4dx4x3y6k8nvpc4wfv5xaaqy2am2q9"; + }; + + srcPorts = fetchurl { + url = http://ftp.gnu.org/gnu/glibc/glibc-ports-2.9.tar.bz2; + sha256 = "0r2sn527wxqifi63di7ns9wbjh1cainxn978w178khhy7yw9fk42"; }; - configurePhase = "true"; + inherit (stdenv) is64bit; + + configureFlags = [ + "--enable-add-ons" + "--without-headers" + "--disable-profile" + ] ++ (if (stdenv.system == "armv5tel-linux") then [ + "--host=arm-linux-gnueabi" + "--build=arm-linux-gnueabi" + "--without-fp" + ] else []); + + patches = [ + /* Support GNU Binutils 2.20 and above. */ + ./binutils-2.20.patch + ]; # Awful hack: `localedef' doesn't allow the path to `locale-archive' # to be overriden, but you *can* specify a prefix, i.e. it will use @@ -25,8 +47,6 @@ stdenv.mkDerivation rec { # $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive. buildPhase = '' - touch config.make - touch config.status mkdir -p $TMPDIR/"$(dirname $(readlink -f $(type -p localedef)))/../lib/locale" make localedata/install-locales \ LOCALEDEF="localedef --prefix=$TMPDIR" \ diff --git a/pkgs/development/libraries/glibc-2.9/localesbuilder.sh b/pkgs/development/libraries/glibc-2.9/localesbuilder.sh new file mode 100644 index 00000000000..a28f6bcbaeb --- /dev/null +++ b/pkgs/development/libraries/glibc-2.9/localesbuilder.sh @@ -0,0 +1,50 @@ +# Glibc cannot have itself in its RPATH. +export NIX_NO_SELF_RPATH=1 + +source $stdenv/setup + +# Explicitly tell glibc to use our pwd, not /bin/pwd. +export PWD_P=$(type -tP pwd) + +# Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to +# prevent a retained dependency on the bootstrap tools in the +# stdenv-linux bootstrap. +export BASH_SHELL=/bin/sh + + +preConfigure() { + + for i in configure io/ftwtest-sh; do + # Can't use substituteInPlace here because replace hasn't been + # built yet in the bootstrap. + sed -i "$i" -e "s^/bin/pwd^$PWD_P^g" + done + + # In the glibc 2.6/2.7 tarballs C-translit.h is a little bit older + # than C-translit.h.in, forcing Make to rebuild it unnecessarily. + # This wouldn't be problem except that it requires Perl, which we + # don't want as a dependency in the Nixpkgs bootstrap. So force + # the output file to be newer. + touch locale/C-translit.h + + tar xvjf "$srcPorts" + + mkdir build + cd build + + configureScript=../configure +} + + +postConfigure() { + # Hack: get rid of the `-static' flag set by the bootstrap stdenv. + # This has to be done *after* `configure' because it builds some + # test binaries. + export NIX_CFLAGS_LINK= + export NIX_LDFLAGS_BEFORE= + + export NIX_DONT_SET_RPATH=1 + unset CFLAGS +} + +genericBuild diff --git a/pkgs/development/libraries/icu/default.nix b/pkgs/development/libraries/icu/default.nix index 82ea06508f0..47217d7fa98 100644 --- a/pkgs/development/libraries/icu/default.nix +++ b/pkgs/development/libraries/icu/default.nix @@ -10,6 +10,9 @@ stdenv.mkDerivation { patchFlags = "-p0"; + CFLAGS = "-O0"; + CXXFLAGS = "-O0"; + patches = [ (fetchurl { url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/dev-libs/icu/files/icu-3.8-setBreakType-public.diff?rev=1.1"; diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index 7124fc72eee..1ae5d3054f4 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -1,4 +1,7 @@ {stdenv, fetchurl}: + +# I could not build it in armv5tel-linux +assert stdenv.system != "armv5tel-linux"; stdenv.mkDerivation { name = "libxcrypt-3.0.2"; diff --git a/pkgs/development/libraries/readline/link-against-ncurses.patch b/pkgs/development/libraries/readline/link-against-ncurses.patch new file mode 100644 index 00000000000..0fd0598f465 --- /dev/null +++ b/pkgs/development/libraries/readline/link-against-ncurses.patch @@ -0,0 +1,18 @@ +This patch is to make sure that `libncurses' is among the `NEEDED' +dependencies of `libreadline.so' and `libhistory.so'. + +Failing to do that, applications linking against Readline are +forced to explicitly link against libncurses as well; in addition, +this trick doesn't work when using GNU ld's `--as-needed'. + +--- shlib/Makefile.in 2009-01-06 18:03:22.000000000 +0100 ++++ shlib/Makefile.in 2009-07-27 14:43:25.000000000 +0200 +@@ -84,7 +84,7 @@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ + SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ + SHOBJ_LIBS = @SHOBJ_LIBS@ + +-SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ ++SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ -lncurses + SHLIB_LIBS = @SHLIB_LIBS@ + + SHLIB_DOT = @SHLIB_DOT@ diff --git a/pkgs/development/libraries/readline/readline-patches.nix b/pkgs/development/libraries/readline/readline-patches.nix new file mode 100644 index 00000000000..701d5fc94ce --- /dev/null +++ b/pkgs/development/libraries/readline/readline-patches.nix @@ -0,0 +1,8 @@ +# Automatically generated by `update-patch-set.sh'; do not edit. + +patch: [ +(patch "001" "1wbqnsxm4nd8rjckl8mdqcb82pphnsj2yxs4f2nf88kyhwzy544i") +(patch "002" "070c3jz8fs5q17yy3l70wxklgnw6hp5ac9zhb0jdnrr9hf0wi6kl") +(patch "003" "1gwssafy42hcijcynmlpqsasch7kqxbv2cqw0p7f9p2y6vp9ng2j") +(patch "004" "1yzaycdfqjs5jdl0k7qg9cx47bdlq9xs0m6lfq42ys3yscmb1jzm") +] diff --git a/pkgs/development/libraries/readline/readline6.nix b/pkgs/development/libraries/readline/readline6.nix index fcf89207da3..60232a8b80b 100644 --- a/pkgs/development/libraries/readline/readline6.nix +++ b/pkgs/development/libraries/readline/readline6.nix @@ -9,7 +9,20 @@ stdenv.mkDerivation rec { }; propagatedBuildInputs = [ncurses]; - + + patchFlags = "-p0"; + patches = + [ ./link-against-ncurses.patch ] + ++ + (let + patch = nr: sha256: + fetchurl { + url = "mirror://gnu/readline/readline-6.0-patches/readline60-${nr}"; + inherit sha256; + }; + in + import ./readline-patches.nix patch); + meta = { description = "GNU Readline, a library for interactive line editing"; @@ -31,5 +44,7 @@ stdenv.mkDerivation rec { homepage = http://savannah.gnu.org/projects/readline/; license = "GPLv3+"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; }; } |