2005-01-19 22:51:27 +00:00
|
|
|
. $stdenv/setup
|
2005-02-15 17:44:45 +00:00
|
|
|
. $substitute
|
|
|
|
|
|
|
|
ensureDir $out/nix-support
|
|
|
|
substitute "$hook" "$out/nix-support/setup-hook" --subst-var out
|
2005-01-19 22:51:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
preConfigure=preConfigure
|
|
|
|
preConfigure() {
|
|
|
|
|
|
|
|
# Patch some of the configure files a bit to get of global paths.
|
|
|
|
# (Buildings using stuff in those paths will fail anyway, but it
|
|
|
|
# will cause ./configure misdetections).
|
2005-01-22 00:19:27 +00:00
|
|
|
for i in config.tests/unix/checkavail config.tests/*/*.test mkspecs/*/qmake.conf; do
|
2005-01-19 22:51:27 +00:00
|
|
|
echo "patching $i..."
|
2005-02-15 17:44:45 +00:00
|
|
|
substituteInPlace "$i" \
|
|
|
|
--replace " /lib" " /FOO" \
|
|
|
|
--replace "/usr" "/FOO"
|
2005-01-19 22:51:27 +00:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# !!! TODO: -system-libmng
|
|
|
|
configureFlags="-v -prefix $out -system-zlib -system-libpng -system-libjpeg"
|
|
|
|
dontAddPrefix=1
|
|
|
|
|
2005-01-20 14:23:34 +00:00
|
|
|
if test -n "$threadSupport"; then
|
2005-01-20 15:55:05 +00:00
|
|
|
configureFlags="-thread $configureFlags";
|
2005-01-20 14:23:34 +00:00
|
|
|
else
|
2005-01-20 15:55:05 +00:00
|
|
|
configureFlags="-no-thread $configureFlags";
|
2005-01-20 14:23:34 +00:00
|
|
|
fi
|
|
|
|
|
2005-01-19 22:51:27 +00:00
|
|
|
if test -n "$xftSupport"; then
|
|
|
|
configureFlags="-xft -L$libXft/lib -I$libXft/include \
|
|
|
|
-L$freetype/lib -I$freetype/include \
|
|
|
|
-L$fontconfig/lib -I$fontconfig/include \
|
|
|
|
$configureFlags"
|
|
|
|
fi
|
|
|
|
|
2005-01-22 00:19:27 +00:00
|
|
|
if test -n "$mysqlSupport"; then
|
|
|
|
configureFlags="-qt-sql-mysql -L$mysql/lib/mysql -I$mysql/include/mysql $configureFlags";
|
|
|
|
else
|
|
|
|
configureFlags="-no-thread $configureFlags";
|
|
|
|
fi
|
|
|
|
|
2005-01-19 22:51:27 +00:00
|
|
|
if test -n "$xrenderSupport"; then
|
|
|
|
configureFlags="-xrender -L$libXrender/lib -I$libXrender/include $configureFlags"
|
|
|
|
fi
|
|
|
|
|
|
|
|
configureScript=configureScript
|
|
|
|
configureScript() {
|
|
|
|
echo yes | ./configure $configureFlags
|
|
|
|
export LD_LIBRARY_PATH=$(pwd)/lib
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-01-20 11:39:12 +00:00
|
|
|
postInstall=postInstall
|
|
|
|
postInstall() {
|
|
|
|
# Qt's `make install' is broken; it copies ./bin/qmake, which
|
|
|
|
# is a symlink to ./qmake/qmake. So we end up with a dangling
|
|
|
|
# symlink.
|
|
|
|
rm $out/bin/qmake
|
|
|
|
cp -p qmake/qmake $out/bin
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
genericBuild
|