Added kde-team version for qt4.
KDE4 needs their own version of qt4 (with KDE patches). I've added this version. You could choose Trolltech version for specific package by qt4 = qt4_alts.trolltech or change default in configuration.nix svn path=/nixpkgs/trunk/; revision=9458
This commit is contained in:
parent
8a0194b4e5
commit
51e3a34bdb
@ -1,62 +1,37 @@
|
|||||||
{ stdenv, fetchurl
|
args: with args;
|
||||||
, libXft, pkgconfig, libX11, inputproto
|
let common =
|
||||||
, xrenderSupport ? true, libXrender ? null
|
rec {
|
||||||
, xrandrSupport ? true, libXrandr ? null, randrproto ? null
|
setupHook = ./setup-hook.sh;
|
||||||
, xineramaSupport ? true, libXinerama ? null, xineramaproto ? null
|
propagatedBuildInputs = [libXft libXrender libXrandr randrproto xextproto
|
||||||
, cursorSupport ? true, libXcursor ? null, libXext ? null
|
libXinerama xineramaproto libXcursor zlib libjpeg mysql libpng which mesa
|
||||||
, mysqlSupport ? true, mysql ? null
|
libXmu openssl dbus cups pkgconfig libXext freetype fontconfig inputproto
|
||||||
, openglSupport ? false, mesa ? null, libXmu ? null
|
fixesproto libXfixes glib];
|
||||||
, cupsSupport ? true, cups ? null
|
prefixKey = "-prefix ";
|
||||||
, dbusSupport ? true, dbus ? null
|
|
||||||
, xfixesSupport ? true, fixesproto ? null, libXfixes ? null
|
|
||||||
, smSupport ? true, libICE ? null, libSM ? null
|
|
||||||
, freetypeSupport ? true, fontconfig ? null, freetype ? null
|
|
||||||
, glibSupport ? true, glib ? null
|
|
||||||
, openssl, xextproto, zlib, libjpeg, libpng, which
|
|
||||||
}:
|
|
||||||
|
|
||||||
assert xrenderSupport -> libXrender != null;
|
|
||||||
assert xrandrSupport -> libXrandr != null && randrproto != null;
|
|
||||||
assert cursorSupport -> libXcursor != null && libXext != null;
|
|
||||||
assert mysqlSupport -> mysql != null;
|
|
||||||
assert openglSupport -> mesa != null && libXmu != null;
|
|
||||||
assert dbusSupport -> dbus != null;
|
|
||||||
assert cupsSupport -> cups != null;
|
|
||||||
assert glibSupport -> glib != null;
|
|
||||||
assert smSupport -> libICE != null && libSM != null;
|
|
||||||
assert freetypeSupport -> fontconfig != null && freetype != null;
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "qt-4.3.0";
|
|
||||||
|
|
||||||
builder = ./builder.sh;
|
|
||||||
hook = ./setup-hook.sh;
|
|
||||||
src = fetchurl {
|
|
||||||
url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.0.tar.gz;
|
|
||||||
sha256 = "0h0liy7sdp5sarhzdfn7ss61d4ky9h0ky8jysg8v3a97sds7ghxb";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [libXft libXrender libXrandr randrproto xextproto libXinerama xineramaproto libXcursor zlib libjpeg mysql libpng which mesa libXmu openssl dbus cups pkgconfig libXext freetype fontconfig inputproto fixesproto libXfixes glib];
|
|
||||||
|
|
||||||
patchPhase = "sed -e 's@/bin/pwd@pwd@' -i configure; sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf";
|
|
||||||
dontAddPrefix = 1;
|
|
||||||
postConfigure = "export LD_LIBRARY_PATH=$(pwd)/lib";
|
|
||||||
configureFlags = "
|
configureFlags = "
|
||||||
-v -no-separate-debug-info -release
|
-v -no-separate-debug-info -release -nomake examples -nomake demos
|
||||||
-system-zlib -system-libpng -system-libjpeg
|
-system-zlib -system-libpng -system-libjpeg -fast
|
||||||
-qt-gif -confirm-license
|
-qt-gif -confirm-license
|
||||||
${if openglSupport then "-opengl" else "-no-opengl"}
|
-opengl -xrender -xrandr -xinerama -xcursor -qt-sql-mysql
|
||||||
${if xrenderSupport then "-xrender" else "-no-xrender"}
|
-L${mysql}/lib/mysql -I${mysql}/include/mysql -qdbus -cups -glib -xfixes
|
||||||
${if xrandrSupport then "-xrandr" else "-no-xrandr"}
|
-fontconfig -I${freetype}/include/freetype2";
|
||||||
${if xineramaSupport then "-xinerama" else "-no-xinerama"}
|
patchPhase = "sed -e 's@/bin/pwd@pwd@' -i configure; sed -e 's@/usr@/FOO@' -i config.tests/*/*.test -i mkspecs/*/*.conf";
|
||||||
${if cursorSupport then "-xcursor" else "-no-xcursor"}
|
}; in
|
||||||
${if mysqlSupport then "-qt-sql-mysql -L${mysql}/lib/mysql -I${mysql}/include/mysql" else ""}
|
rec {
|
||||||
${if dbusSupport then "-qdbus" else "-no-qdbus"}
|
trolltech = stdenv.mkDerivation (common // {
|
||||||
${if cupsSupport then "-cups" else "-no-cups"}
|
name = "qt-4.3.1";
|
||||||
${if glibSupport then "-glib" else "-no-glib"}
|
src = fetchurl {
|
||||||
${if xfixesSupport then "-xfixes" else "-no-xfixes"}
|
url = ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-4.3.1.tar.gz;
|
||||||
${if freetypeSupport then "-fontconfig -I${freetype}/include/freetype2" else "-no-fontconfig"}
|
sha256 = "0qg6apy2r7jbbfinxh0v1jm08yv890r40hhmy5cysn239v3x0nad";
|
||||||
";
|
};
|
||||||
|
patchPhase = common.patchPhase;
|
||||||
passthru = {inherit mysqlSupport;};
|
});
|
||||||
|
kde = stdenv.mkDerivation (common // {
|
||||||
|
name = "qt-kde-4.3svn";
|
||||||
|
src = fetchsvn {
|
||||||
|
url = svn://anonsvn.kde.org/home/kde/trunk/qt-copy;
|
||||||
|
md5 = "b0588d8ef36642613bdb92930a2330b4";
|
||||||
|
};
|
||||||
|
patchPhase = "mkdir .svn; bash apply_patches;patch -R -p0 < patches/0172-prefer-xrandr-over-xinerama.diff;" + common.patchPhase;
|
||||||
|
});
|
||||||
|
default = kde;
|
||||||
}
|
}
|
||||||
|
@ -1 +1,6 @@
|
|||||||
export QTDIR=@out@
|
export QTDIR=@out@
|
||||||
|
if [ -n $qt4BadIncludes ]; then
|
||||||
|
for d in @out@/include/*; do
|
||||||
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d";
|
||||||
|
done;
|
||||||
|
fi
|
||||||
|
@ -1992,12 +1992,17 @@ rec {
|
|||||||
mysqlSupport = false;
|
mysqlSupport = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
qt4 = getVersion "qt4" qt4_alts;
|
||||||
# Builds, but not tested yet
|
# Builds, but not tested yet
|
||||||
qt4 = import ../development/libraries/qt-4 {
|
# There are two versions: kde and trolltech
|
||||||
inherit fetchurl stdenv zlib libjpeg libpng which mysql mesa openssl cups dbus fontconfig freetype pkgconfig;
|
qt4_alts = import ../development/libraries/qt-4 {
|
||||||
|
inherit fetchurl fetchsvn zlib libjpeg libpng which mysql mesa openssl cups dbus
|
||||||
|
fontconfig freetype pkgconfig;
|
||||||
inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
|
inherit (xlibs) xextproto libXft libXrender libXrandr randrproto
|
||||||
libXmu libXinerama xineramaproto libXcursor libICE libSM libX11 libXext inputproto fixesproto libXfixes;
|
libXmu libXinerama xineramaproto libXcursor libICE libSM libX11 libXext
|
||||||
|
inputproto fixesproto libXfixes;
|
||||||
inherit (gnome) glib;
|
inherit (gnome) glib;
|
||||||
|
stdenv = overrideSetup stdenv ../stdenv/generic/setup-new-2.sh;
|
||||||
openglSupport = mesaSupported;
|
openglSupport = mesaSupported;
|
||||||
mysqlSupport = true;
|
mysqlSupport = true;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user