diff options
author | Sander van der Burg <s.vanderburg@tudelft.nl> | 2009-08-15 14:02:49 +0000 |
---|---|---|
committer | Sander van der Burg <s.vanderburg@tudelft.nl> | 2009-08-15 14:02:49 +0000 |
commit | 9b32ae7ce371bd69d3594969007e183a9383dd04 (patch) | |
tree | e8321680004bdbfd0cfd9bdf7a46a888cae4cb98 /pkgs/development/libraries/qt-4.5 | |
parent | 8f3bb9b4cb1171218e0a5c7e53c25e8e2ef0a05d (diff) |
- Started my initial KDE 4.3.x expression which is a fork of the KDE 4.2.x expression
- Also forked the qt-4.4.x expression and adapted it. The old qt-4.4.x cannot be replaced since KDE 4.2.x does not work with qt-4.5.x, but on the other hand KDE 4.3.x requires qt-4.5.x - It is now possible to disable the demos and examples in the qt-4.5.x build. By default, the demos, examples and documentation are disabled svn path=/nixpkgs/trunk/; revision=16723
Diffstat (limited to 'pkgs/development/libraries/qt-4.5')
-rw-r--r-- | pkgs/development/libraries/qt-4.5/default.nix | 80 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-4.5/setup-hook.sh | 9 |
2 files changed, 89 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-4.5/default.nix b/pkgs/development/libraries/qt-4.5/default.nix new file mode 100644 index 0000000000000..7aebc9c8ad179 --- /dev/null +++ b/pkgs/development/libraries/qt-4.5/default.nix @@ -0,0 +1,80 @@ +{ stdenv, fetchurl +, libXft, libXrender, randrproto, xextproto, libXinerama, xineramaproto, libXcursor, libXmu +, libXext, libXfixes, inputproto, fixesproto, libXrandr, freetype, fontconfig +, zlib, libjpeg, mysql, libpng, which, mesa, openssl, dbus, cups, pkgconfig, libtiff, glib +, buildDemos ? false, buildExamples ? false, keepDocumentation ? false}: + +stdenv.mkDerivation { + name = "qt-4.5.2"; + + src = fetchurl { + url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.5.2.tar.bz2; + sha256 = "0dpq45viarklgyjzmmzrpdgrzv36gwawg6mk2dmf3pwhrg4r8vfj"; + }; + + setupHook = ./setup-hook.sh; + + propagatedBuildInputs = [ + libXft + libXrender + libXrandr + randrproto + xextproto + libXinerama + xineramaproto + libXcursor + zlib + libjpeg + mysql + libpng + which + mesa + libXmu + openssl + dbus.libs + cups + pkgconfig + libXext + freetype + fontconfig + inputproto + fixesproto + libXfixes + glib + libtiff + ]; + + prefixKey = "-prefix "; + + configureFlags = '' + -v -no-separate-debug-info -release + -system-zlib -system-libpng -system-libjpeg -fast + -qt-gif -confirm-license + -opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql + -qdbus -cups -glib -xfixes -dbus-linked + -fontconfig -I${freetype}/include/freetype2 + ${if buildDemos == true then "" else "-nomake demos"} + ${if buildExamples == true then "" else "-nomake examples"} + ''; + + # For some reason I cannot automatically choose the edition, except by passing + # 'o' the the stdin of configure + configureScript = "yes o | ./configure"; + + patchPhase = '' + substituteInPlace configure --replace /bin/pwd pwd + sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf + ''; + + # Remove the documentation: it takes up >= 130 MB, which is more + # than half of the installed size. Ideally we should put this in a + # separate package (as well as the Qt Designer). + postInstall = '' + ${if keepDocumentation == false then "rm -rf $out/doc" else ""} + ''; + + meta = { + homepage = http://www.qtsoftware.com/downloads/opensource/appdev/linux-x11-cpp; + description = "A cross-platform application framework for C++"; + }; +} diff --git a/pkgs/development/libraries/qt-4.5/setup-hook.sh b/pkgs/development/libraries/qt-4.5/setup-hook.sh new file mode 100644 index 0000000000000..f9ecacbbb7df0 --- /dev/null +++ b/pkgs/development/libraries/qt-4.5/setup-hook.sh @@ -0,0 +1,9 @@ +export QTDIR=@out@ + +if [ -n "$includeAllQtDirs" ]; then + # This helps for g++, but not for moc. And no qt4 package should expect + # having all qt4 header files dirs into -I. + for d in @out@/include/*; do + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d" + done +fi |