diff --git a/pkgs/development/libraries/qt-3/builder.sh b/pkgs/development/libraries/qt-3/builder.sh new file mode 100644 index 000000000000..57ca0201b5d5 --- /dev/null +++ b/pkgs/development/libraries/qt-3/builder.sh @@ -0,0 +1,44 @@ +. $stdenv/setup + + +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). + for i in config.tests/x11/*.test mkspecs/*/qmake.conf; do + echo "patching $i..." + sed < $i > $i.tmp \ + -e 's^ /lib^ /FOO^g' \ + -e 's^/usr^/FOO^g' + mv $i.tmp $i + done + + chmod +x config.tests/x11/*.test +} + + +# !!! TODO: -system-libmng +configureFlags="-v -prefix $out -system-zlib -system-libpng -system-libjpeg" +dontAddPrefix=1 + +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 + +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 +} + + +genericBuild \ No newline at end of file diff --git a/pkgs/development/libraries/qt-3/default.nix b/pkgs/development/libraries/qt-3/default.nix new file mode 100644 index 000000000000..a8c62ca99d76 --- /dev/null +++ b/pkgs/development/libraries/qt-3/default.nix @@ -0,0 +1,23 @@ +{ xftSupport ? true +, xrenderSupport ? true +, stdenv, fetchurl, x11, libXft ? null, libXrender ? null +, zlib, libjpeg, libpng +}: + +assert xftSupport -> libXft != null; +assert xrenderSupport -> xftSupport && libXft != null; + +stdenv.mkDerivation { + name = "qt-3.3.3"; + + builder = ./builder.sh; + src = fetchurl { + url = http://sunsite.rediris.es/mirror/Qt/source/qt-x11-free-3.3.3.tar.bz2; + md5 = "3e0a0c8429b0a974b39b5f535ddff01c"; + }; + + buildInputs = [x11 libXft libXrender zlib libjpeg libpng]; + + inherit xftSupport libXft xrenderSupport libXrender; + inherit (libXft) freetype fontconfig; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index e5592d023ed8..6b22cc492a8e 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -604,6 +604,11 @@ rec { inherit fetchurl stdenv x11 libtiff libjpeg libpng; }; + qt = import ../development/libraries/qt-3 { + inherit fetchurl stdenv x11 zlib libjpeg libpng; + inherit (xlibs) libXft libXrender; + }; + audiofile = (import ../development/libraries/audiofile) { inherit fetchurl stdenv; }; @@ -913,6 +918,12 @@ rec { recordingSupport = true; }; + /* + mythtv = (import ../applications/video/mythtv) { + inherit fetchurl stdenv which; + }; + */ + gqview = (import ../applications/graphics/gqview) { inherit fetchurl stdenv pkgconfig libpng; inherit (gtkLibs) gtk;