qt56: remove fixQtModuleCMakeConfig

This commit is contained in:
Thomas Tuegel 2016-05-11 10:19:28 -05:00
parent dd34c61097
commit d22df66c54
17 changed files with 25 additions and 82 deletions

View File

@ -45,7 +45,7 @@ let
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);
nativeBuildInputs = nativeBuildInputs =
(args.nativeBuildInputs or []) (args.nativeBuildInputs or [])
++ [ pkgs.perl self.fixQtModuleCMakeConfig self.qmakeHook ]; ++ [ pkgs.perl self.qmakeHook ];
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true; NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
@ -111,7 +111,6 @@ let
]; ];
makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh;
fixQtModuleCMakeConfig = makeSetupHook { } ./fix-qt-module-cmake-config.sh;
qmakeHook = makeSetupHook { substitutions = { qt_dev = qtbase.dev; lndir = pkgs.xorg.lndir; }; } ./qmake-hook.sh; qmakeHook = makeSetupHook { substitutions = { qt_dev = qtbase.dev; lndir = pkgs.xorg.lndir; }; } ./qmake-hook.sh;
}; };

View File

@ -1,5 +0,0 @@
fixQtModuleCMakeConfig() {
local module="$1"
sed -e "/set(imported_location/ s@\\\${_qt5${module}_install_prefix}@${!outputLib}@" \
-i "${!outputDev}/lib/cmake/Qt5${module}/Qt5${module}Config.cmake"
}

View File

@ -44,7 +44,7 @@ _qtSetQmakePath() {
export PATH="$qtOut/bin${PATH:+:}$PATH" export PATH="$qtOut/bin${PATH:+:}$PATH"
} }
_qtMultioutModuleDevs() { _qtModuleMultioutDevsPre() {
# We cannot simply set these paths in configureFlags because libQtCore retains # We cannot simply set these paths in configureFlags because libQtCore retains
# references to the paths it was built with. # references to the paths it was built with.
moveToOutput "bin" "${!outputDev}" moveToOutput "bin" "${!outputDev}"
@ -53,7 +53,9 @@ _qtMultioutModuleDevs() {
# The destination directory must exist or moveToOutput will do nothing # The destination directory must exist or moveToOutput will do nothing
mkdir -p "${!outputDev}/share" mkdir -p "${!outputDev}/share"
moveToOutput "share/doc" "${!outputDev}" moveToOutput "share/doc" "${!outputDev}"
}
_qtModuleMultioutDevsPost() {
# Move libtool archives and qmake project files to $dev/lib # Move libtool archives and qmake project files to $dev/lib
if [ "z${!outputLib}" != "z${!outputDev}" ]; then if [ "z${!outputLib}" != "z${!outputDev}" ]; then
pushd "${!outputLib}" pushd "${!outputLib}"
@ -63,6 +65,10 @@ _qtMultioutModuleDevs() {
mkdir -p "${!outputDev}/$(dirname "$file")" mkdir -p "${!outputDev}/$(dirname "$file")"
mv "${!outputLib}/$file" "${!outputDev}/$file" mv "${!outputLib}/$file" "${!outputDev}/$file"
done done
# Ensure that CMake can find the shared libraries
mkdir -p "${!outputDev}/lib"
@lndir@/bin/lndir -silent "${!outputLib}/lib" "${!outputDev}/lib"
fi fi
popd popd
fi fi
@ -108,7 +114,8 @@ fi
if [ -n "$NIX_QT_SUBMODULE" ]; then if [ -n "$NIX_QT_SUBMODULE" ]; then
postInstallHooks+=(_qtRmQmake _qtRmModules) postInstallHooks+=(_qtRmQmake _qtRmModules)
preFixupHooks+=(_qtMultioutModuleDevs) preFixupHooks+=(_qtModuleMultioutDevsPre)
postFixupHooks+=(_qtModuleMultioutDevsPost)
fi fi
fi fi

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchgit, copyPathsToStore, fixQtModuleCMakeConfig { stdenv, lib, fetchgit, copyPathsToStore
, srcs , srcs
, xlibs, libX11, libxcb, libXcursor, libXext, libXrender, libXi , xlibs, libX11, libxcb, libXcursor, libXext, libXrender, libXi
@ -206,7 +206,7 @@ stdenv.mkDerivation {
++ lib.optional (postgresql != null) postgresql ++ lib.optional (postgresql != null) postgresql
++ lib.optionals gtkStyle [gnome_vfs.out libgnomeui.out gtk GConf]; ++ lib.optionals gtkStyle [gnome_vfs.out libgnomeui.out gtk GConf];
nativeBuildInputs = [ fixQtModuleCMakeConfig lndir patchelf perl pkgconfig python ]; nativeBuildInputs = [ lndir patchelf perl pkgconfig python ];
# freetype-2.5.4 changed signedness of some struct fields # freetype-2.5.4 changed signedness of some struct fields
NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare"; NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare";
@ -222,17 +222,6 @@ stdenv.mkDerivation {
mkdir -p "$dev/share" mkdir -p "$dev/share"
moveToOutput "share/doc" "$dev" moveToOutput "share/doc" "$dev"
# Move libtool archives and qmake projects
if [ "z''${!outputLib}" != "z''${!outputDev}" ]; then
pushd "''${!outputLib}"
find lib -name '*.a' -o -name '*.la' -o -name '*.prl' | \
while read -r file; do
mkdir -p "''${!outputDev}/$(dirname "$file")"
mv "''${!outputLib}/$file" "''${!outputDev}/$file"
done
popd
fi
# Move the QGtkStyle plugin to the gtk output # Move the QGtkStyle plugin to the gtk output
mkdir -p "$gtk/lib/qt5/plugins/platformthemes" mkdir -p "$gtk/lib/qt5/plugins/platformthemes"
mv "$out/lib/qt5/plugins/platformthemes/libqgtk2.so" "$gtk/lib/qt5/plugins/platformthemes" mv "$out/lib/qt5/plugins/platformthemes/libqgtk2.so" "$gtk/lib/qt5/plugins/platformthemes"
@ -255,18 +244,19 @@ stdenv.mkDerivation {
# Don't retain build-time dependencies like gdb and ruby. # Don't retain build-time dependencies like gdb and ruby.
sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
fixQtModuleCMakeConfig "Concurrent" # Move libtool archives and qmake projects
fixQtModuleCMakeConfig "Core" if [ "z''${!outputLib}" != "z''${!outputDev}" ]; then
fixQtModuleCMakeConfig "DBus" pushd "''${!outputLib}"
fixQtModuleCMakeConfig "Gui" find lib -name '*.a' -o -name '*.la' -o -name '*.prl' | \
fixQtModuleCMakeConfig "Network" while read -r file; do
fixQtModuleCMakeConfig "OpenGL" mkdir -p "''${!outputDev}/$(dirname "$file")"
fixQtModuleCMakeConfig "OpenGLExtensions" mv "''${!outputLib}/$file" "''${!outputDev}/$file"
fixQtModuleCMakeConfig "PrintSupport" done
fixQtModuleCMakeConfig "Sql" popd
fixQtModuleCMakeConfig "Test"
fixQtModuleCMakeConfig "Widgets" # Ensure that CMake can find the shared libraries
fixQtModuleCMakeConfig "Xml" lndir -silent "''${!outputLib}/lib" "''${!outputDev}/lib"
fi
''; '';
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;

View File

@ -3,8 +3,4 @@
qtSubmodule { qtSubmodule {
name = "qtconnectivity"; name = "qtconnectivity";
qtInputs = [ qtbase qtdeclarative ]; qtInputs = [ qtbase qtdeclarative ];
postFixup = ''
fixQtModuleCMakeConfig "Bluetooth"
fixQtModuleCMakeConfig "Nfc"
'';
} }

View File

@ -5,10 +5,4 @@ qtSubmodule {
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
qtInputs = [ qtbase qtsvg qtxmlpatterns ]; qtInputs = [ qtbase qtsvg qtxmlpatterns ];
nativeBuildInputs = [ python ]; nativeBuildInputs = [ python ];
postFixup = ''
fixQtModuleCMakeConfig "Qml"
fixQtModuleCMakeConfig "Quick"
fixQtModuleCMakeConfig "QuickTest"
fixQtModuleCMakeConfig "QuickWidgets"
'';
} }

View File

@ -3,7 +3,4 @@
qtSubmodule { qtSubmodule {
name = "qtenginio"; name = "qtenginio";
qtInputs = [ qtdeclarative ]; qtInputs = [ qtdeclarative ];
postFixup = ''
fixQtModuleCMakeConfig "Enginio"
'';
} }

View File

@ -3,8 +3,4 @@
qtSubmodule { qtSubmodule {
name = "qtlocation"; name = "qtlocation";
qtInputs = [ qtbase qtmultimedia ]; qtInputs = [ qtbase qtmultimedia ];
postFixup = ''
fixQtModuleCMakeConfig "Location"
fixQtModuleCMakeConfig "Positioning"
'';
} }

View File

@ -9,8 +9,4 @@ qtSubmodule {
pkgconfig alsaLib gstreamer gst-plugins-base libpulseaudio pkgconfig alsaLib gstreamer gst-plugins-base libpulseaudio
]; ];
qmakeFlags = [ "GST_VERSION=1.0" ]; qmakeFlags = [ "GST_VERSION=1.0" ];
postFixup = ''
fixQtModuleCMakeConfig "Multimedia"
fixQtModuleCMakeConfig "MultimediaWidgets"
'';
} }

View File

@ -4,7 +4,4 @@ qtSubmodule {
name = "qtscript"; name = "qtscript";
qtInputs = [ qtbase qttools ]; qtInputs = [ qtbase qttools ];
patches = [ ./0001-glib-2.32.patch ]; patches = [ ./0001-glib-2.32.patch ];
postFixup = ''
fixQtModuleCMakeConfig "Script"
'';
} }

View File

@ -3,7 +3,4 @@
qtSubmodule { qtSubmodule {
name = "qtsensors"; name = "qtsensors";
qtInputs = [ qtbase qtdeclarative ]; qtInputs = [ qtbase qtdeclarative ];
postFixup = ''
fixQtModuleCMakeConfig "Sensors"
'';
} }

View File

@ -9,7 +9,4 @@ qtSubmodule {
libudev = libudev.out; libudev = libudev.out;
}) })
]; ];
postFixup = ''
fixQtModuleCMakeConfig "SerialPort"
'';
} }

View File

@ -3,7 +3,4 @@
qtSubmodule { qtSubmodule {
name = "qtsvg"; name = "qtsvg";
qtInputs = [ qtbase ]; qtInputs = [ qtbase ];
postFixup = ''
fixQtModuleCMakeConfig "Svg"
'';
} }

View File

@ -6,11 +6,5 @@ qtSubmodule {
postFixup = '' postFixup = ''
moveToOutput "bin/qdbus" "$out" moveToOutput "bin/qdbus" "$out"
moveToOutput "bin/qtpaths" "$out" moveToOutput "bin/qtpaths" "$out"
fixQtModuleCMakeConfig "Designer"
fixQtModuleCMakeConfig "Help"
fixQtModuleCMakeConfig "LinguistTools"
fixQtModuleCMakeConfig "UiPlugin"
fixQtModuleCMakeConfig "UiTools"
''; '';
} }

View File

@ -3,7 +3,4 @@
qtSubmodule { qtSubmodule {
name = "qtwebsockets"; name = "qtwebsockets";
qtInputs = [ qtbase qtdeclarative ]; qtInputs = [ qtbase qtdeclarative ];
postFixup = ''
fixQtModuleCMakeConfig "WebSockets"
'';
} }

View File

@ -3,7 +3,4 @@
qtSubmodule { qtSubmodule {
name = "qtx11extras"; name = "qtx11extras";
qtInputs = [ qtbase ]; qtInputs = [ qtbase ];
postFixup = ''
fixQtModuleCMakeConfig "X11Extras"
'';
} }

View File

@ -3,7 +3,4 @@
qtSubmodule { qtSubmodule {
name = "qtxmlpatterns"; name = "qtxmlpatterns";
qtInputs = [ qtbase ]; qtInputs = [ qtbase ];
postFixup = ''
fixQtModuleCMakeConfig "XmlPatterns"
'';
} }