2006-09-14 15:24:06 +02:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, xftSupport ? true, libXft ? null
|
|
|
|
, xrenderSupport ? true, libXrender ? null
|
2018-12-31 04:40:47 +01:00
|
|
|
, xrandrSupport ? true, libXrandr ? 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
|
2019-08-17 20:24:29 +02:00
|
|
|
, mysqlSupport ? false, libmysqlclient ? null
|
2019-05-28 20:52:34 +02:00
|
|
|
, libGLSupported ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms
|
|
|
|
, openglSupport ? stdenv.lib.elem stdenv.hostPlatform.system stdenv.lib.platforms.mesaPlatforms
|
2019-11-10 17:44:34 +01:00
|
|
|
, libGL ? null, libGLU ? null, libXmu ? null
|
2018-12-31 04:40:47 +01:00
|
|
|
, xlibsWrapper, xorgproto, 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;
|
2018-12-31 04:40:47 +01:00
|
|
|
assert xrandrSupport -> libXrandr != null;
|
2007-03-26 20:15:32 +02:00
|
|
|
assert cursorSupport -> libXcursor != null;
|
2019-08-17 20:24:29 +02:00
|
|
|
assert mysqlSupport -> libmysqlclient != null;
|
2019-11-10 17:44:34 +01:00
|
|
|
assert openglSupport -> libGL != null && libGLU != 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 {
|
2016-07-16 17:39:03 +02:00
|
|
|
url = http://download.qt.io/archive/qt/3/qt-x11-free-3.3.8.tar.bz2;
|
2007-03-26 15:39:50 +02:00
|
|
|
sha256 = "0jd4g3bwkgk2s4flbmgisyihm7cam964gzb3pawjlkhas01zghz8";
|
2005-01-19 23:51:27 +01:00
|
|
|
};
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ which ];
|
2015-09-15 11:13:22 +02:00
|
|
|
propagatedBuildInputs = [libpng xlibsWrapper libXft libXrender zlib libjpeg];
|
2005-01-19 23:51:27 +01:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-12 16:10:52 +01:00
|
|
|
|
2018-08-31 23:24:28 +02:00
|
|
|
configureFlags = let
|
|
|
|
mk = cond: name: "-${stdenv.lib.optionalString (!cond) "no-"}${name}";
|
|
|
|
in [
|
|
|
|
"-v"
|
|
|
|
"-system-zlib" "-system-libpng" "-system-libjpeg"
|
|
|
|
"-qt-gif"
|
2018-12-31 04:40:47 +01:00
|
|
|
"-I${xorgproto}/include"
|
2018-08-31 23:24:28 +02:00
|
|
|
(mk threadSupport "thread")
|
|
|
|
(mk xrenderSupport "xrender")
|
|
|
|
(mk xrandrSupport "xrandr")
|
|
|
|
(mk xineramaSupport "xinerama")
|
|
|
|
(mk xrandrSupport "xrandr")
|
|
|
|
(mk xftSupport "xft")
|
|
|
|
] ++ stdenv.lib.optionals openglSupport [
|
|
|
|
"-dlopen-opengl"
|
2019-11-10 17:44:34 +01:00
|
|
|
"-L${libGL}/lib" "-I${libGLU}/include"
|
2018-08-31 23:24:28 +02:00
|
|
|
"-L${libXmu.out}/lib" "-I${libXmu.dev}/include"
|
|
|
|
] ++ stdenv.lib.optionals xrenderSupport [
|
|
|
|
"-L${libXrender.out}/lib" "-I${libXrender.dev}/include"
|
|
|
|
] ++ stdenv.lib.optionals xrandrSupport [
|
|
|
|
"-L${libXrandr.out}/lib" "-I${libXrandr.dev}/include"
|
|
|
|
] ++ stdenv.lib.optionals xineramaSupport [
|
|
|
|
"-L${libXinerama.out}/lib" "-I${libXinerama.dev}/include"
|
|
|
|
] ++ stdenv.lib.optionals cursorSupport [
|
|
|
|
"-L${libXcursor.out}/lib -I${libXcursor.dev}/include"
|
|
|
|
] ++ stdenv.lib.optionals mysqlSupport [
|
2019-08-17 20:24:29 +02:00
|
|
|
"-qt-sql-mysql" "-L${libmysqlclient}/lib/mysql" "-I${libmysqlclient}/include/mysql"
|
2018-08-31 23:24:28 +02:00
|
|
|
] ++ stdenv.lib.optionals xftSupport [
|
|
|
|
"-L${libXft.out}/lib" "-I${libXft.dev}/include"
|
|
|
|
"-L${libXft.freetype.out}/lib" "-I${libXft.freetype.dev}/include"
|
|
|
|
"-L${libXft.fontconfig.lib}/lib" "-I${libXft.fontconfig.dev}/include"
|
|
|
|
];
|
2006-09-14 15:24:06 +02:00
|
|
|
|
|
|
|
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;};
|
2016-08-02 18:06:29 +02:00
|
|
|
|
2018-10-27 15:02:30 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
license = with licenses; [ gpl2 qpl ];
|
|
|
|
platforms = platforms.linux;
|
2016-08-02 18:06:29 +02:00
|
|
|
};
|
2005-01-19 23:51:27 +01:00
|
|
|
}
|