diff options
author | Orivej Desh <orivej@gmx.fr> | 2017-11-29 09:02:01 +0000 |
---|---|---|
committer | Orivej Desh <orivej@gmx.fr> | 2017-11-29 09:06:42 +0000 |
commit | 8b0ef2a5644fc0cd7d4627b8eb6f2bc3ee355ad6 (patch) | |
tree | 4c03852af6ebc75b1096c05d3fe874fe72b500f1 /pkgs/development/libraries/qt-4.x | |
parent | 5f020d5627789ce77b2997e360ece984c261bce7 (diff) |
qt4: enable parallel building in the configure phase
Diffstat (limited to 'pkgs/development/libraries/qt-4.x')
-rw-r--r-- | pkgs/development/libraries/qt-4.x/4.8/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-4.x/4.8/parallel-configure.patch | 22 |
2 files changed, 25 insertions, 1 deletions
diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 056ba301d8430..66a58dba32e22 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -67,6 +67,7 @@ stdenv.mkDerivation rec { patches = [ ./glib-2.32.patch ./libressl.patch + ./parallel-configure.patch (substituteAll { src = ./dlopen-absolute-paths.diff; cups = if cups != null then stdenv.lib.getLib cups else null; @@ -117,6 +118,7 @@ stdenv.mkDerivation rec { -demosdir $TMPDIR/share/doc/${name}/demos -datadir $out/share/${name} -translationdir $out/share/${name}/translations + --jobs=$NIX_BUILD_CORES " unset LD # Makefile uses gcc for linking; setting LD interferes '' + optionalString stdenv.cc.isClang '' @@ -251,7 +253,7 @@ stdenv.mkDerivation rec { homepage = http://qt-project.org/; description = "A cross-platform application framework for C++"; license = licenses.lgpl21Plus; # or gpl3 - maintainers = with maintainers; [ lovek323 phreedom sander ]; + maintainers = with maintainers; [ orivej lovek323 phreedom sander ]; platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/qt-4.x/4.8/parallel-configure.patch b/pkgs/development/libraries/qt-4.x/4.8/parallel-configure.patch new file mode 100644 index 0000000000000..b9b9d6d0a683d --- /dev/null +++ b/pkgs/development/libraries/qt-4.x/4.8/parallel-configure.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -1087,2 +1087,3 @@ fi + #------------------------------------------------------------------------------- ++JOBS= + +@@ -2528,2 +2529,5 @@ while [ "$#" -gt 0 ]; do + ;; ++ jobs) ++ JOBS=-j$VAL ++ ;; + *) +@@ -5072,3 +5076,3 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; + if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then +- (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1 ++ (cd "$outpath/qmake" && "$MAKE" $JOBS -f "$mkfile" depend) >/dev/null 2>&1 + sed "s,^.*/\([^/]*.o\):,\1:,g" "$mkfile" >"$mkfile.tmp" +@@ -5080,3 +5084,3 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; + QMAKE_BUILD_ERROR=no +- (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes ++ (cd "$outpath/qmake"; "$MAKE" $JOBS) || QMAKE_BUILD_ERROR=yes + [ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake |