Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5f020d562778
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a88146d308fb
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 29, 2017

  1. Copy the full SHA
    8b0ef2a View commit details
  2. qt4: fix parallel building of moc_qtgradientviewdialog.o

    Previously the last of these commands:
    
    ```
    make -j sub-tools-bootstrap
    make -j sub-uic sub-moc sub-rcc
    make -C tools/designer/src/lib .obj/release-shared/moc_qtgradientviewdialog.o
    ```
    
    failed with this error:
    
    ```
    In file included from .uic/release-shared/ui_qtgradientviewdialog.h:63:0,
                     from .moc/release-shared/../../../../../shared/qtgradienteditor/qtgradientviewdialog.h:47,
                     from .moc/release-shared/moc_qtgradientviewdialog.cpp:9:
    ../../../shared/qtgradienteditor/qtgradientview.h:47:31: fatal error: ui_qtgradientview.h: No such file or directory
    ```
    
    because uic did not ensure that the build of moc_qtgradientviewdialog.o happens
    after the build of moc_qtgradientview.o.
    orivej committed Nov 29, 2017
    Copy the full SHA
    a88146d View commit details
9 changes: 8 additions & 1 deletion pkgs/development/libraries/qt-4.x/4.8/default.nix
Original file line number Diff line number Diff line change
@@ -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,13 +118,19 @@ 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 ''
sed -i 's/QMAKE_CC = gcc/QMAKE_CC = clang/' mkspecs/common/g++-base.conf
sed -i 's/QMAKE_CXX = g++/QMAKE_CXX = clang++/' mkspecs/common/g++-base.conf
'';

postConfigure = ''
echo "applying patch ${./parallel-build.patch}"
patch -p1 < ${./parallel-build.patch}
'';

prefixKey = "-prefix ";

configureFlags =
@@ -251,7 +258,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;
};
}
6 changes: 6 additions & 0 deletions pkgs/development/libraries/qt-4.x/4.8/parallel-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--- a/tools/designer/src/lib/Makefile
+++ b/tools/designer/src/lib/Makefile
@@ -7167,2 +7167,3 @@ compiler_moc_header_clean:
.uic/release-shared/ui_qtgradientviewdialog.h \
+ .uic/release-shared/ui_qtgradientview.h \
../../../shared/qtgradienteditor/qtgradientviewdialog.h
22 changes: 22 additions & 0 deletions pkgs/development/libraries/qt-4.x/4.8/parallel-configure.patch
Original file line number Diff line number Diff line change
@@ -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