* 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user