1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00

qt55.qtbase: move sed scripts to postPatch

This commit is contained in:
Thomas Tuegel 2015-12-19 11:59:05 -06:00
parent 8b890cac07
commit 14f27e5eb7

View file

@ -41,16 +41,6 @@ stdenv.mkDerivation {
mv qtbase-opensource-src-${version} ./qt-everywhere-opensource-src-${version}/qtbase
'';
prePatch = ''
substituteInPlace configure --replace /bin/pwd pwd
substituteInPlace qtbase/configure --replace /bin/pwd pwd
substituteInPlace qtbase/src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
substituteInPlace qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \
--replace /usr/share/X11/locale ${libX11}/share/X11/locale \
--replace /usr/lib/X11/locale ${libX11}/share/X11/locale
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i qtbase/mkspecs/*/*.conf
'';
patches =
copyPathsToStore (lib.readPathsFromFile ./. ./series)
++ lib.optional gtkStyle ./dlopen-gtkstyle.patch
@ -60,6 +50,19 @@ stdenv.mkDerivation {
inherit decryptSslTraffic gtkStyle mesaSupported;
postPatch = ''
substituteInPlace configure --replace /bin/pwd pwd
substituteInPlace qtbase/configure --replace /bin/pwd pwd
substituteInPlace qtbase/src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
substituteInPlace qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \
--replace /usr/share/X11/locale ${libX11}/share/X11/locale \
--replace /usr/lib/X11/locale ${libX11}/share/X11/locale
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i qtbase/mkspecs/*/*.conf
sed -i 's/PATHS.*NO_DEFAULT_PATH//' "qtbase/src/corelib/Qt5Config.cmake.in"
sed -i 's/PATHS.*NO_DEFAULT_PATH//' "qtbase/src/corelib/Qt5CoreMacros.cmake"
sed -i 's/NO_DEFAULT_PATH//' "qtbase/src/gui/Qt5GuiConfigExtras.cmake.in"
sed -i 's/PATHS.*NO_DEFAULT_PATH//' "qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in"
substituteInPlace qtbase/src/network/kernel/qdnslookup_unix.cpp \
--replace "@glibc@" "${stdenv.cc.libc}"
substituteInPlace qtbase/src/network/kernel/qhostinfo_unix.cpp \
@ -95,11 +98,6 @@ stdenv.mkDerivation {
export LD_LIBRARY_PATH="$PWD/qtbase/lib:$PWD/qtbase/plugins/platforms:$PWD/qttools/lib:$LD_LIBRARY_PATH"
export MAKEFLAGS=-j$NIX_BUILD_CORES
sed -i 's/PATHS.*NO_DEFAULT_PATH//' "qtbase/src/corelib/Qt5Config.cmake.in"
sed -i 's/PATHS.*NO_DEFAULT_PATH//' "qtbase/src/corelib/Qt5CoreMacros.cmake"
sed -i 's/NO_DEFAULT_PATH//' "qtbase/src/gui/Qt5GuiConfigExtras.cmake.in"
sed -i 's/PATHS.*NO_DEFAULT_PATH//' "qtbase/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in"
export configureFlags+="-plugindir $out/lib/qt5/plugins -importdir $out/lib/qt5/imports -qmldir $out/lib/qt5/qml"
export configureFlags+=" -docdir $out/share/doc/qt5"
'';