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 []);
nativeBuildInputs =
(args.nativeBuildInputs or [])
++ [ pkgs.perl self.fixQtModuleCMakeConfig self.qmakeHook ];
++ [ pkgs.perl self.qmakeHook ];
NIX_QT_SUBMODULE = args.NIX_QT_SUBMODULE or true;
@ -111,7 +111,6 @@ let
];
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;
};

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

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchgit, copyPathsToStore, fixQtModuleCMakeConfig
{ stdenv, lib, fetchgit, copyPathsToStore
, srcs
, xlibs, libX11, libxcb, libXcursor, libXext, libXrender, libXi
@ -206,7 +206,7 @@ stdenv.mkDerivation {
++ lib.optional (postgresql != null) postgresql
++ 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
NIX_CFLAGS_COMPILE = "-Wno-error=sign-compare";
@ -222,17 +222,6 @@ stdenv.mkDerivation {
mkdir -p "$dev/share"
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
mkdir -p "$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.
sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri
fixQtModuleCMakeConfig "Concurrent"
fixQtModuleCMakeConfig "Core"
fixQtModuleCMakeConfig "DBus"
fixQtModuleCMakeConfig "Gui"
fixQtModuleCMakeConfig "Network"
fixQtModuleCMakeConfig "OpenGL"
fixQtModuleCMakeConfig "OpenGLExtensions"
fixQtModuleCMakeConfig "PrintSupport"
fixQtModuleCMakeConfig "Sql"
fixQtModuleCMakeConfig "Test"
fixQtModuleCMakeConfig "Widgets"
fixQtModuleCMakeConfig "Xml"
# 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
# Ensure that CMake can find the shared libraries
lndir -silent "''${!outputLib}/lib" "''${!outputDev}/lib"
fi
'';
setupHook = ./setup-hook.sh;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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