diff --git a/pkgs/applications/graphics/paraview/default.nix b/pkgs/applications/graphics/paraview/default.nix index 0ecb7289f71..a2dfaabe86d 100644 --- a/pkgs/applications/graphics/paraview/default.nix +++ b/pkgs/applications/graphics/paraview/default.nix @@ -7,6 +7,8 @@ stdenv.mkDerivation { sha256 = "27544f442e957e9aa60b32c674f2dcd84fffeecc9a40071ef6e305333413187d"; }; + patches = [ ./include-qobject.patch ]; + # I added these flags to get all the rpaths right, which I guess they are # taken from the qt4 sources. Not very nice. cmakeFlags = "-DCMAKE_SHARED_LINKER_FLAGS=\"-Wl,-rpath,$out/lib/paraview-3.4\"" + diff --git a/pkgs/applications/graphics/paraview/include-qobject.patch b/pkgs/applications/graphics/paraview/include-qobject.patch new file mode 100644 index 00000000000..bdb95c752e4 --- /dev/null +++ b/pkgs/applications/graphics/paraview/include-qobject.patch @@ -0,0 +1,38 @@ +diff --git a/VTK/GUISupport/Qt/CMakeLists.txt b/VTK/GUISupport/Qt/CMakeLists.txt +index 2c35be7..866f1aa 100644 +--- a/VTK/GUISupport/Qt/CMakeLists.txt ++++ b/VTK/GUISupport/Qt/CMakeLists.txt +@@ -166,6 +166,7 @@ IF(DESIRED_QT_VERSION MATCHES 4) + ) + ENDIF(QT_QTGUI_LIBRARY) + INCLUDE_DIRECTORIES(${QT_QTDESIGNER_INCLUDE_DIR}) ++ INCLUDE_DIRECTORIES(${QT_QTCORE_INCLUDE_DIR}) + QT4_WRAP_CPP ( PluginMocSrcs ${PluginMocHeaders} ) + ELSE(DESIRED_QT_VERSION MATCHES 4) + QT_WRAP_CPP ( QVTKWidgetPlugin PluginMocSrcs ${PluginMocHeaders} ) +diff --git a/VTK/GUISupport/Qt/vtkEventQtSlotConnect.h b/VTK/GUISupport/Qt/vtkEventQtSlotConnect.h +index 6782b90..ced3a67 100644 +--- a/VTK/GUISupport/Qt/vtkEventQtSlotConnect.h ++++ b/VTK/GUISupport/Qt/vtkEventQtSlotConnect.h +@@ -43,7 +43,7 @@ + #include "vtkObject.h" + #include "vtkCommand.h" // for event defines + #include "QVTKWin32Header.h" // for export define +-#include "qobject.h" // for version info ++#include // for version info + + class QObject; + class vtkQtConnections; +diff --git a/VTK/GUISupport/Qt/vtkQtConnection.h b/VTK/GUISupport/Qt/vtkQtConnection.h +index 923ec2e..b189ddc 100644 +--- a/VTK/GUISupport/Qt/vtkQtConnection.h ++++ b/VTK/GUISupport/Qt/vtkQtConnection.h +@@ -33,7 +33,7 @@ + + #include "vtkObject.h" + #include "vtkCommand.h" // for event defines +-#include "qobject.h" ++#include + + class QObject; + class vtkCallbackCommand; diff --git a/pkgs/development/libraries/qt-4/setup-hook.sh b/pkgs/development/libraries/qt-4/setup-hook.sh index 6e0bbfe7f45..f9ecacbbb7d 100644 --- a/pkgs/development/libraries/qt-4/setup-hook.sh +++ b/pkgs/development/libraries/qt-4/setup-hook.sh @@ -1,9 +1,8 @@ export QTDIR=@out@ -if [ -z "$normalQt" ]; then +if [ -n "$includeAllQtDirs" ]; then # This helps for g++, but not for moc. And no qt4 package should expect - # having all qt4 header files dirs into -I. But the KDE nix expressions want - # this. + # having all qt4 header files dirs into -I. for d in @out@/include/*; do export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$d" done diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 1a9db5745d9..12764e77303 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { sha256 = "1wpxr5x4aggaqrqzjq3kg4hh09f0vyr1njik1pad01bvwd923pcw"; }; + patches = [ ./findqt4.patch ]; + postUnpack = '' dontUseCmakeConfigure=1 source $setupHook diff --git a/pkgs/development/tools/build-managers/cmake/findqt4.patch b/pkgs/development/tools/build-managers/cmake/findqt4.patch new file mode 100644 index 00000000000..43fa5591506 --- /dev/null +++ b/pkgs/development/tools/build-managers/cmake/findqt4.patch @@ -0,0 +1,13 @@ +diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake +index 3bb77d1..7fdbe4a 100644 +--- a/Modules/FindQt4.cmake ++++ b/Modules/FindQt4.cmake +@@ -579,6 +579,8 @@ IF (QT4_QMAKE_FOUND) + FOREACH(QT_MODULE ${QT_MODULES}) + STRING(TOUPPER ${QT_MODULE} _upper_qt_module) + FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE} ++ NO_CMAKE_PATH ++ NO_CMAKE_ENVIRONMENT_PATH + PATHS + ${QT_HEADERS_DIR}/${QT_MODULE} + ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers