2006-09-14 15:24:06 +02:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, xftSupport ? true, libXft ? null
|
|
|
|
, xrenderSupport ? true, libXrender ? null
|
|
|
|
, xrandrSupport ? true, libXrandr ? null, randrproto ? null
|
2009-11-03 22:55:53 +01:00
|
|
|
, xineramaSupport ? true, libXinerama ? null
|
2007-03-26 20:15:32 +02:00
|
|
|
, cursorSupport ? true, libXcursor ? null
|
2005-01-20 15:23:34 +01:00
|
|
|
, threadSupport ? true
|
2012-01-07 18:06:49 +01:00
|
|
|
, mysqlSupport ? false, mysql ? null
|
2006-09-14 15:24:06 +02:00
|
|
|
, openglSupport ? false, mesa ? null, libXmu ? null
|
2013-06-26 16:48:45 +02:00
|
|
|
, x11, xextproto, zlib, libjpeg, libpng, which
|
2005-01-19 23:51:27 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert xftSupport -> libXft != null;
|
2006-09-14 15:24:06 +02:00
|
|
|
assert xrenderSupport -> xftSupport && libXrender != null;
|
|
|
|
assert xrandrSupport -> libXrandr != null && randrproto != null;
|
2007-03-26 20:15:32 +02:00
|
|
|
assert cursorSupport -> libXcursor != null;
|
2005-01-22 01:19:27 +01:00
|
|
|
assert mysqlSupport -> mysql != null;
|
2006-09-14 15:24:06 +02:00
|
|
|
assert openglSupport -> mesa != null && libXmu != null;
|
2005-01-19 23:51:27 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2007-03-26 15:39:50 +02:00
|
|
|
name = "qt-3.3.8";
|
2005-01-19 23:51:27 +01:00
|
|
|
|
|
|
|
builder = ./builder.sh;
|
2009-04-23 15:31:10 +02:00
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2005-01-19 23:51:27 +01:00
|
|
|
src = fetchurl {
|
2007-03-26 15:39:50 +02:00
|
|
|
url = ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.3.8.tar.bz2;
|
|
|
|
sha256 = "0jd4g3bwkgk2s4flbmgisyihm7cam964gzb3pawjlkhas01zghz8";
|
2005-01-19 23:51:27 +01:00
|
|
|
};
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ which ];
|
2014-07-09 20:48:18 +02:00
|
|
|
propagatedBuildInputs = [libpng x11 libXft libXrender zlib libjpeg];
|
2005-01-19 23:51:27 +01:00
|
|
|
|
2006-09-14 15:24:06 +02:00
|
|
|
configureFlags = "
|
|
|
|
-v
|
|
|
|
-system-zlib -system-libpng -system-libjpeg
|
2007-03-26 20:15:32 +02:00
|
|
|
-qt-gif
|
|
|
|
-I${xextproto}/include
|
2006-09-14 15:24:06 +02:00
|
|
|
${if openglSupport then "-dlopen-opengl
|
|
|
|
-L${mesa}/lib -I${mesa}/include
|
|
|
|
-L${libXmu}/lib -I${libXmu}/include" else ""}
|
|
|
|
${if threadSupport then "-thread" else "-no-thread"}
|
|
|
|
${if xrenderSupport then "-xrender -L${libXrender}/lib -I${libXrender}/include" else "-no-xrender"}
|
|
|
|
${if xrandrSupport then "-xrandr
|
|
|
|
-L${libXrandr}/lib -I${libXrandr}/include
|
|
|
|
-I${randrproto}/include" else "-no-xrandr"}
|
2009-11-03 22:55:53 +01:00
|
|
|
${if xineramaSupport then "-xinerama -L${libXinerama}/lib -I${libXinerama}/include" else "-no-xinerama"}
|
2007-03-26 20:15:32 +02:00
|
|
|
${if cursorSupport then "-L${libXcursor}/lib -I${libXcursor}/include" else ""}
|
2006-09-14 15:24:06 +02:00
|
|
|
${if mysqlSupport then "-qt-sql-mysql -L${mysql}/lib/mysql -I${mysql}/include/mysql" else ""}
|
|
|
|
${if xftSupport then "-xft
|
|
|
|
-L${libXft}/lib -I${libXft}/include
|
|
|
|
-L${libXft.freetype}/lib -I${libXft.freetype}/include
|
|
|
|
-L${libXft.fontconfig}/lib -I${libXft.fontconfig}/include" else "-no-xft"}
|
|
|
|
";
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Don't strip everything so we can get useful backtraces.
|
|
|
|
./strip.patch
|
2013-06-25 09:17:34 +02:00
|
|
|
|
2006-09-14 15:24:06 +02:00
|
|
|
# Build on NixOS.
|
|
|
|
./qt-pwd.patch
|
2013-06-25 09:17:34 +02:00
|
|
|
|
2006-09-14 15:24:06 +02:00
|
|
|
# randr.h and Xrandr.h need not be in the same prefix.
|
|
|
|
./xrandr.patch
|
2012-02-26 22:27:15 +01:00
|
|
|
|
|
|
|
# Make it build with gcc 4.6.0
|
|
|
|
./qt3-gcc4.6.0.patch
|
2006-09-14 15:24:06 +02:00
|
|
|
];
|
2006-09-14 15:30:47 +02:00
|
|
|
|
|
|
|
passthru = {inherit mysqlSupport;};
|
2005-01-19 23:51:27 +01:00
|
|
|
}
|