qt4: fix build via adding dependency in generated makefile

Also reorder attributes into the order in which they are run.
This commit is contained in:
Vladimír Čunát 2013-06-09 10:59:23 +02:00
parent ce50fe26cb
commit f06f6955bd

View File

@ -23,7 +23,7 @@ let v = "4.8.4"; in
# * move some plugins (e.g., SQL plugins) to dedicated derivations to avoid
# false build-time dependencies
stdenv.mkDerivation ( rec {
stdenv.mkDerivation rec {
name = "qt-${v}";
src = fetchurl {
@ -31,6 +31,12 @@ stdenv.mkDerivation ( rec {
sha256 = "0w1j16q6glniv4hppdgcvw52w72gb2jab35ylkw0qjn5lj5y7c1k";
};
prePatch = ''
substituteInPlace configure --replace /bin/pwd pwd
substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i mkspecs/*/*.conf
'';
patches =
[ ./glib-2.32.patch
(substituteAll {
@ -63,6 +69,7 @@ stdenv.mkDerivation ( rec {
"
'';
prefixKey = "-prefix ";
configureFlags =
''
-v -no-separate-debug-info -release -no-fast -confirm-license -opensource
@ -83,6 +90,12 @@ stdenv.mkDerivation ( rec {
${if developerBuild then "-developer-build" else ""}
'';
# fix underspecified dependency in a generated makefile
postConfigure = ''
substituteInPlace tools/designer/src/lib/Makefile --replace \
"moc_qtgradientviewdialog.cpp:" "moc_qtgradientviewdialog.cpp: .uic/release-shared/ui_qtgradientview.h"
'';
propagatedBuildInputs =
[ libXrender libXrandr libXinerama libXcursor libXext libXfixes
libXv libXi libSM
@ -100,14 +113,6 @@ stdenv.mkDerivation ( rec {
nativeBuildInputs = [ perl pkgconfig which ];
prefixKey = "-prefix ";
prePatch = ''
substituteInPlace configure --replace /bin/pwd pwd
substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i mkspecs/*/*.conf
'';
enableParallelBuilding = true;
crossAttrs = let
@ -152,13 +157,3 @@ stdenv.mkDerivation ( rec {
platforms = platforms.linux;
};
}
# ToDo: this attribute is optional *only* to prevent rebuild on hydra
// stdenv.lib.optionalAttrs developerBuild {
# fix underspecified dependency in a generated makefile
postConfigure = ''
substituteInPlace tools/designer/src/lib/Makefile --replace \
"moc_qtgradientviewdialog.cpp:" "moc_qtgradientviewdialog.cpp: .uic/release-shared/ui_qtgradientview.h"
'';
}
)