* Provide a wrapper around `aclocal' (in Automake) that automatically

adds all directories specified in `ACLOCAL_PATH' to the `aclocal'
  command line as `-I' flags.  Also, it provides a setup hook that
  adds the `.../share/aclocal' directory of every build input to
  `ACLOCAL_PATH'.

* Upgraded Libtool.

* Graphviz requires the X Athena widgets, which in turn requires the X
  miscellaneous utilities library; added those.  However it doesn't
  work yet since libXt is broken.
  

svn path=/nixpkgs/trunk/; revision=888
This commit is contained in:
Eelco Dolstra
2004-03-31 22:47:06 +00:00
parent cbdf9a0408
commit 817d1b27ef
15 changed files with 102 additions and 119 deletions
@@ -1,8 +1,47 @@
buildinputs="$perl $autoconf"
. $stdenv/setup || exit 1
. $stdenv/setup
tar xvfj $src || exit 1
cd automake-* || exit 1
./configure --prefix=$out || exit 1
make || exit 1
make install || exit 1
postInstall() {
# Create a wrapper around `aclocal' that converts every element in
# `ACLOCAL_PATH' into a `-I dir' option. This way `aclocal'
# becomes modular; M4 macros do not need to be stored in a single
# global directory, while callers of `aclocal' do not need to pass
# `-I' options explicitly.
mv $out/bin/aclocal $out/bin/_tmp
for i in $out/bin/aclocal*; do
rm $i
ln -s aclocal $i
done
cat > $out/bin/aclocal <<EOF
#! $SHELL -e
oldIFS=\$IFS
IFS=:
extra=
for i in \$ACLOCAL_PATH; do
if test -n "\$i"; then
extra="\$extra -I \$i"
fi
done
IFS=\$oldIFS
exec $out/bin/aclocal-orig \${extra[@]} "\$@"
EOF
chmod +x $out/bin/aclocal
mv $out/bin/_tmp $out/bin/aclocal-orig
# Automatically let `ACLOCAL_PATH' include all build inputs that
# have a `.../share/aclocal' directory.
test -x $out/nix-support || mkdir $out/nix-support
cp -p $setupHook $out/nix-support/setup-hook
}
postInstall=postInstall
genericBuild
@@ -1,11 +1,12 @@
{stdenv, fetchurl, perl, autoconf}:
stdenv.mkDerivation {
name = "automake-1.7.9";
builder = ./builder.sh;
setupHook = ./setup-hook.sh;
src = fetchurl {
url = ftp://ftp.nluug.nl/pub/gnu/automake/automake-1.7.9.tar.bz2;
md5 = "571fd0b0598eb2a27dcf68adcfddfacb";
};
perl = perl;
autoconf = autoconf;
buildInputs = [perl autoconf];
}
@@ -0,0 +1,7 @@
addAclocals () {
if test -d $1/share/aclocal; then
export ACLOCAL_PATH="$ACLOCAL_PATH${ACLOCAL_PATH:+:}$1/share/aclocal"
fi
}
envHooks=(${envHooks[@]} addAclocals)