{qt4,qt3}: Fix breakage after eeb9837beba38e0f5c5e26357e478f74a7f6bc7c

- qt-4: Pass the correct configureFlags, in particular `mk` should prepend `no-`
  when `cond` is false.

- qt-3: simply revert the changes
This commit is contained in:
Tor Hedin Brønner 2018-08-13 15:35:19 +02:00
parent ed45e731c2
commit 34baf00b72
2 changed files with 26 additions and 33 deletions

View File

@ -30,38 +30,31 @@ stdenv.mkDerivation {
}; };
nativeBuildInputs = [ which ]; nativeBuildInputs = [ which ];
buildInputs = [ propagatedBuildInputs = [libpng xlibsWrapper libXft libXrender zlib libjpeg];
xextproto
] ++ stdenv.lib.optionals openglSupport [
libGLU_combined libXmu
] ++ stdenv.lib.optionals xftSupport [
libXft libXft.freetype libXft.fontconfig
] ++ stdenv.lib.optional xrenderSupport libXrender
++ stdenv.lib.optional xineramaSupport libXinerama
++ stdenv.lib.optional xrandrSupport libXrandr
++ stdenv.lib.optional xineramaSupport libXinerama;
propagatedBuildInputs = [ libpng xlibsWrapper libXft libXrender zlib libjpeg ];
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
configurePlatforms = []; configureFlags = "
configureFlags = let -v
mk = cond: name: "-${stdenv.lib.optionalString cond "no-"}${name}"; -system-zlib -system-libpng -system-libjpeg
in [ -qt-gif
"-v" -I${xextproto}/include
"-system-zlib" "-system-libpng" "-system-libjpeg" ${if openglSupport then "-dlopen-opengl
"-qt-gif" -L${libGLU_combined}/lib -I${libGLU_combined}/include
(mk xftSupport "xft") -L${libXmu.out}/lib -I${libXmu.dev}/include" else ""}
(mk xrenderSupport "xrender") ${if threadSupport then "-thread" else "-no-thread"}
(mk xrandrSupport "xrandr") ${if xrenderSupport then "-xrender -L${libXrender.out}/lib -I${libXrender.dev}/include" else "-no-xrender"}
(mk xineramaSupport "xinerama") ${if xrandrSupport then "-xrandr
(mk threadSupport "thread") -L${libXrandr.out}/lib -I${libXrandr.dev}/include
] ++ stdenv.lib.optionals mysqlSupport [ -I${randrproto}/include" else "-no-xrandr"}
"-qt-sql-mysql" ${if xineramaSupport then "-xinerama -L${libXinerama.out}/lib -I${libXinerama.dev}/include" else "-no-xinerama"}
"-L${mysql.connector-c}/lib/mysql" ${if cursorSupport then "-L${libXcursor.out}/lib -I${libXcursor.dev}/include" else ""}
"-I${mysql.connector-c}/include/mysql" ${if mysqlSupport then "-qt-sql-mysql -L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql" else ""}
] ++ stdenv.lib.optional openglSupport "-dlopen-opengl"; ${if xftSupport then "-xft
-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" else "-no-xft"}
";
patches = [ patches = [
# Don't strip everything so we can get useful backtraces. # Don't strip everything so we can get useful backtraces.

View File

@ -141,7 +141,7 @@ stdenv.mkDerivation rec {
configurePlatforms = []; configurePlatforms = [];
configureFlags = let configureFlags = let
mk = cond: name: "-${lib.optionalString cond "no-"}${name}"; mk = cond: name: "-${lib.optionalString (!cond) "no-"}${name}";
platformFlag = platformFlag =
if stdenv.hostPlatform != stdenv.buildPlatform if stdenv.hostPlatform != stdenv.buildPlatform
then "-xplatform" then "-xplatform"
@ -167,9 +167,9 @@ stdenv.mkDerivation rec {
"-make" "libs" "-make" "tools" "-make" "translations" "-make" "libs" "-make" "tools" "-make" "translations"
"-no-phonon" (mk buildWebkit "webkit") (mk buildMultimedia "multimedia") "-audio-backend" "-no-phonon" (mk buildWebkit "webkit") (mk buildMultimedia "multimedia") "-audio-backend"
]) ++ [ ]) ++ [
(mk demos "make") "demos" "-${if demos then "" else "no"}make" "demos"
(mk examples "make") "examples" "-${if examples then "" else "no"}make" "examples"
(mk docs "make") "docs" "-${if docs then "" else "no"}make" "docs"
] ++ lib.optional developerBuild "-developer-build" ] ++ lib.optional developerBuild "-developer-build"
++ lib.optionals stdenv.hostPlatform.isDarwin [ platformFlag "unsupported/macx-clang-libc++" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ platformFlag "unsupported/macx-clang-libc++" ]
++ lib.optionals stdenv.hostPlatform.isWindows [ platformFlag "win32-g++-4.6" ]; ++ lib.optionals stdenv.hostPlatform.isWindows [ platformFlag "win32-g++-4.6" ];