diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2004-03-19 16:53:04 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2004-03-19 16:53:04 +0000 |
commit | 5941f66f0e76cadbda30b3240ba00b30ea365ac7 (patch) | |
tree | 35ecc8fde93aa1dd9b5705fe5302cae77ead3860 /pkgs/development/libraries | |
parent | 0fd59fd7a41a47478f241b4a27c39d39f42914b9 (diff) | |
download | nixlib-5941f66f0e76cadbda30b3240ba00b30ea365ac7.tar nixlib-5941f66f0e76cadbda30b3240ba00b30ea365ac7.tar.gz nixlib-5941f66f0e76cadbda30b3240ba00b30ea365ac7.tar.bz2 nixlib-5941f66f0e76cadbda30b3240ba00b30ea365ac7.tar.lz nixlib-5941f66f0e76cadbda30b3240ba00b30ea365ac7.tar.xz nixlib-5941f66f0e76cadbda30b3240ba00b30ea365ac7.tar.zst nixlib-5941f66f0e76cadbda30b3240ba00b30ea365ac7.zip |
* The stdenv setup script now defines a generic builder that allows
builders for typical Autoconf-style to be much shorten, e.g., . $stdenv/setup genericBuild The generic builder does lots of stuff automatically: - Unpacks source archives specified by $src or $srcs (it knows about gzip, bzip2, tar, zip, and unpacked source trees). - Determines the source tree. - Applies patches specified by $patches. - Fixes libtool not to search for libraries in /lib etc. - Runs `configure'. - Runs `make'. - Runs `make install'. - Strips debug information from static libraries. - Writes nested log information (in the format accepted by `log2xml'). There are also lots of hooks and variables to customise the generic builder. See `stdenv/generic/docs.txt'. * Adapted the base packages (i.e., the ones used by stdenv) to use the generic builder. * We now use `curl' instead of `wget' to download files in `fetchurl'. * Neither `curl' nor `wget' are part of stdenv. We shouldn't encourage people to download stuff in builders (impure!). * Updated some packages. * `buildinputs' is now `buildInputs' (but the old name also works). * `findInputs' in the setup script now prevents inputs from being processed multiple times (which could happen, e.g., if an input was a propagated input of several other inputs; this caused the size variables like $PATH to blow up exponentially in the worst case). * Patched GNU Make to write nested log information in the format accepted by `log2xml'. Also, prior to writing the build command, Make now writes a line `building X' to indicate what is being built. This is unfortunately often obscured by the gigantic tool invocations in many Makefiles. The actual build commands are marked `unimportant' so that they don't clutter pages generated by `log2html'. svn path=/nixpkgs/trunk/; revision=845
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/aterm/aterm-2.0.5.nix | 10 | ||||
-rwxr-xr-x | pkgs/development/libraries/aterm/builder.sh | 10 | ||||
-rw-r--r-- | pkgs/development/libraries/aterm/default.nix | 12 | ||||
-rwxr-xr-x | pkgs/development/libraries/fontconfig/builder.sh | 1 | ||||
-rwxr-xr-x | pkgs/development/libraries/glibc/builder.sh | 40 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/default.nix | 7 | ||||
-rwxr-xr-x | pkgs/development/libraries/gtk+-1/gtk+/builder.sh | 2 | ||||
-rwxr-xr-x | pkgs/development/libraries/gtk+/gtk+/builder.sh | 12 | ||||
-rwxr-xr-x | pkgs/development/libraries/gtk+/pango/builder.sh | 2 | ||||
-rwxr-xr-x | pkgs/development/libraries/libpng/builder.sh | 2 | ||||
-rwxr-xr-x | pkgs/development/libraries/pcre/builder.sh | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/pcre/default.nix | 6 | ||||
-rwxr-xr-x | pkgs/development/libraries/zlib/builder.sh | 14 | ||||
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 12 |
14 files changed, 71 insertions, 71 deletions
diff --git a/pkgs/development/libraries/aterm/aterm-2.0.5.nix b/pkgs/development/libraries/aterm/aterm-2.0.5.nix deleted file mode 100644 index 9ed878d37752..000000000000 --- a/pkgs/development/libraries/aterm/aterm-2.0.5.nix +++ /dev/null @@ -1,10 +0,0 @@ -{stdenv, fetchurl}: derivation { - name = "aterm-2.0.5"; - system = stdenv.system; - builder = ./builder.sh; - src = fetchurl { - url = http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.5.tar.gz; - md5 = "68aefb0c10b2ab876b8d3c0b2d0cdb1b"; - }; - stdenv = stdenv; -} diff --git a/pkgs/development/libraries/aterm/builder.sh b/pkgs/development/libraries/aterm/builder.sh index 5915dc0f87d1..5946961adc58 100755 --- a/pkgs/development/libraries/aterm/builder.sh +++ b/pkgs/development/libraries/aterm/builder.sh @@ -1,10 +1,6 @@ #! /bin/sh -. $stdenv/setup || exit 1 +. $stdenv/setup -tar xvfz $src || exit 1 -cd aterm-* || exit 1 -./configure --prefix=$out --with-gcc || exit 1 -make || exit 1 -make install || exit 1 -strip -S $out/lib/*.a || exit 1 +configureFlags="--with-gcc" +genericBuild diff --git a/pkgs/development/libraries/aterm/default.nix b/pkgs/development/libraries/aterm/default.nix index 56b4c265ec0b..2d2a946f60a9 100644 --- a/pkgs/development/libraries/aterm/default.nix +++ b/pkgs/development/libraries/aterm/default.nix @@ -1,10 +1,12 @@ -{stdenv, fetchurl}: derivation { - name = "aterm-2.0"; +{stdenv, fetchurl}: + +derivation { + name = "aterm-2.0.5"; system = stdenv.system; builder = ./builder.sh; src = fetchurl { - url = http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.tar.gz; - md5 = "853474e4bcf4a85f7d38a0676b36bded"; + url = http://www.cwi.nl/projects/MetaEnv/aterm/aterm-2.0.5.tar.gz; + md5 = "68aefb0c10b2ab876b8d3c0b2d0cdb1b"; }; - stdenv = stdenv; + inherit stdenv; } diff --git a/pkgs/development/libraries/fontconfig/builder.sh b/pkgs/development/libraries/fontconfig/builder.sh index 7a521ea16f00..dc4243fadfec 100755 --- a/pkgs/development/libraries/fontconfig/builder.sh +++ b/pkgs/development/libraries/fontconfig/builder.sh @@ -10,7 +10,6 @@ export TZ=UTC tar xvfz $src cd fontconfig-* ./configure --prefix=$out --with-confdir=$out/etc/fonts \ - --x-includes=$x11/include --x-libraries=$x11/lib \ --with-expat-includes=$expat/include --with-expat-lib=$expat/lib make make install diff --git a/pkgs/development/libraries/glibc/builder.sh b/pkgs/development/libraries/glibc/builder.sh index e2423ad37c29..29bcc7dc8e79 100755 --- a/pkgs/development/libraries/glibc/builder.sh +++ b/pkgs/development/libraries/glibc/builder.sh @@ -2,26 +2,36 @@ # glibc cannot have itself in its rpath. export NIX_NO_SELF_RPATH=1 -buildinputs="$patch" + . $stdenv/setup -tar xvfj $glibcSrc -(cd glibc-* && tar xvfj $linuxthreadsSrc) || false -(cd glibc-* && patch -p1 < $vaargsPatch) || false +postUnpack() { + cd $sourceRoot + unpackFile $linuxthreadsSrc + cd .. +} + +postUnpack=postUnpack + + +preConfigure() { + mkdir ../build + cd ../build + configureScript=../$sourceRoot/configure + configureFlags="--enable-add-ons --disable-profile" +} + +preConfigure=preConfigure -mkdir build -cd build -../glibc-*/configure --prefix=$out --enable-add-ons --disable-profile -make -make install -make localedata/install-locales -strip -S $out/lib/*.a $out/lib/*.so $out/lib/gconv/*.so || true -strip -s $out/bin/* $out/sbin/* $out/libexec/* || true +postInstall() { + make localedata/install-locales + rm $out/etc/ld.so.cache + (cd $out/include && ln -s $kernelHeaders/include/* .) || exit 1 +} -rm $out/etc/ld.so.cache +postInstall=postInstall -(cd $out/include && ln -s $kernelHeaders/include/* .) || false -exit 0 +genericBuild diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 6106e92812f7..c65281a7ce3a 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -7,7 +7,7 @@ derivation { system = stdenv.system; builder = ./builder.sh; - glibcSrc = fetchurl { + src = fetchurl { url = ftp://ftp.nl.net/pub/gnu/glibc/glibc-2.3.2.tar.bz2; md5 = "ede969aad568f48083e413384f20753c"; }; @@ -18,7 +18,8 @@ derivation { # This is a patch to make glibc compile under GCC 3.3. Presumably # later releases of glibc won't need this. - vaargsPatch = ./glibc-2.3.2-sscanf-1.patch; + patches = [./glibc-2.3.2-sscanf-1.patch]; - inherit stdenv kernelHeaders patch; + buildInputs = [patch]; + inherit stdenv kernelHeaders; } diff --git a/pkgs/development/libraries/gtk+-1/gtk+/builder.sh b/pkgs/development/libraries/gtk+-1/gtk+/builder.sh index 38cd16b31c78..14ba61f7054d 100755 --- a/pkgs/development/libraries/gtk+-1/gtk+/builder.sh +++ b/pkgs/development/libraries/gtk+-1/gtk+/builder.sh @@ -5,7 +5,7 @@ buildinputs="$x11 $glib" tar xvfz $src cd gtk+-* -./configure --prefix=$out --x-includes=$x11/include --x-libraries=$x11/lib +./configure --prefix=$out make make install diff --git a/pkgs/development/libraries/gtk+/gtk+/builder.sh b/pkgs/development/libraries/gtk+/gtk+/builder.sh index f899bec6cb61..0b444c1f0093 100755 --- a/pkgs/development/libraries/gtk+/gtk+/builder.sh +++ b/pkgs/development/libraries/gtk+/gtk+/builder.sh @@ -3,9 +3,19 @@ buildinputs="$pkgconfig $x11 $glib $atk $pango $perl $libtiff $libjpeg $libpng" . $stdenv/setup +IFS=: +for i in $PATH; do echo $i; done + +#exit 1 +# A utility function for fixing up libtool scripts that scan in +# default directories like /usr. This is a bit of a hack. A better +# solution would be to fix libtool, but since it is included in so +# many packages that is not feasible right now. + tar xvfj $src cd gtk+-* -./configure --prefix=$out --x-includes=$x11/include --x-libraries=$x11/lib +fixLibtool ltmain.sh +./configure --prefix=$out make make install diff --git a/pkgs/development/libraries/gtk+/pango/builder.sh b/pkgs/development/libraries/gtk+/pango/builder.sh index e3d0a68fd5f9..6242083508d8 100755 --- a/pkgs/development/libraries/gtk+/pango/builder.sh +++ b/pkgs/development/libraries/gtk+/pango/builder.sh @@ -5,7 +5,7 @@ buildinputs="$pkgconfig $x11 $glib $xft" tar xvfj $src cd pango-* -./configure --prefix=$out --x-includes=$x11/include --x-libraries=$x11/lib +./configure --prefix=$out make make install diff --git a/pkgs/development/libraries/libpng/builder.sh b/pkgs/development/libraries/libpng/builder.sh index 51e7a38a831c..24b847b59860 100755 --- a/pkgs/development/libraries/libpng/builder.sh +++ b/pkgs/development/libraries/libpng/builder.sh @@ -1,6 +1,6 @@ #! /bin/sh -e -buildinputs="$zlib" +buildInputs="$zlib" . $stdenv/setup tar xvfj $src diff --git a/pkgs/development/libraries/pcre/builder.sh b/pkgs/development/libraries/pcre/builder.sh index dea883667fcc..a73f5a6d5b8d 100755 --- a/pkgs/development/libraries/pcre/builder.sh +++ b/pkgs/development/libraries/pcre/builder.sh @@ -1,9 +1,3 @@ -#! /bin/sh - -. $stdenv/setup || exit 1 - -tar xvfj $src || exit 1 -cd pcre-* || exit 1 -./configure --prefix=$out || exit 1 -make || exit 1 -make install || exit 1 +#! /bin/sh -e +. $stdenv/setup +genericBuild diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 9e18d88fccf2..5b98a264e3ca 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -1,4 +1,6 @@ -{stdenv, fetchurl}: derivation { +{stdenv, fetchurl}: + +derivation { name = "pcre-4.3"; system = stdenv.system; builder = ./builder.sh; @@ -6,5 +8,5 @@ url = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-4.3.tar.bz2; md5 = "7bc7d5b590a41e6f9ede30f272002a02"; }; - stdenv = stdenv; + inherit stdenv; } diff --git a/pkgs/development/libraries/zlib/builder.sh b/pkgs/development/libraries/zlib/builder.sh index 4ca1a8305440..b8e06a6907f9 100755 --- a/pkgs/development/libraries/zlib/builder.sh +++ b/pkgs/development/libraries/zlib/builder.sh @@ -1,10 +1,4 @@ -#! /bin/sh - -. $stdenv/setup || exit 1 - -tar xvfz $src || exit 1 -cd zlib-* || exit 1 -./configure --prefix=$out --shared || exit 1 -make || exit 1 -mkdir $out || exit 1 -make install || exit 1 +#! /bin/sh -e +. $stdenv/setup +configureFlags="--shared" +genericBuild diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 7dfe3e6a9ab8..c5889e57fb4a 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -1,10 +1,12 @@ -{stdenv, fetchurl}: derivation { - name = "zlib-1.1.4"; +{stdenv, fetchurl}: + +derivation { + name = "zlib-1.2.1"; system = stdenv.system; builder = ./builder.sh; src = fetchurl { - url = http://www.gzip.org/zlib/zlib-1.1.4.tar.gz; - md5 = "abc405d0bdd3ee22782d7aa20e440f08"; + url = http://www.gzip.org/zlib/zlib-1.2.1.tar.gz; + md5 = "ef1cb003448b4a53517b8f25adb12452"; }; - stdenv = stdenv; + inherit stdenv; } |