3
0
Fork 0
forked from mirrors/nixpkgs

qt5.qtbase: fix host_bins= path in pkg-config file

So that pkg-config can be used to find 'moc' etc. (Currently it points
to a non-existing path.)

Fixes #22945 ('Linux kbuild incompatible with "nix-shell -p qt5.full"').
This commit is contained in:
Bjørn Forsman 2017-03-01 18:30:27 +01:00 committed by Thomas Tuegel
parent 46ba7cf94a
commit f5d460a7a0
No known key found for this signature in database
GPG key ID: 22CBF5249D4B4D59
4 changed files with 55 additions and 1 deletions

View file

@ -269,6 +269,9 @@ stdenv.mkDerivation {
done
popd
fi
# fixup .pc file (where to find 'moc' etc.)
sed "s|^host_bins=.*|host_bins=$dev/bin|" -i "$dev/lib/pkgconfig/Qt5Core.pc"
'';
inherit lndir;

View file

@ -267,6 +267,9 @@ stdenv.mkDerivation {
done
popd
fi
# fixup .pc file (where to find 'moc' etc.)
sed "s|^host_bins=.*|host_bins=$dev/bin|" -i "$dev/lib/pkgconfig/Qt5Core.pc"
'' + lib.optionalString stdenv.isDarwin ''
fixDarwinDylibNames_rpath() {
local flags=()

View file

@ -228,6 +228,29 @@ stdenv.mkDerivation {
done
popd
fi
# fixup .pc file (where to find 'moc' etc.)
sed "s|^host_bins=.*|host_bins=$dev/bin|" -i "$dev/lib/pkgconfig/Qt5Core.pc"
''
# Don't move .prl files on darwin because they end up in
# "dev/lib/Foo.framework/Foo.prl" which interferes with subsequent
# use of lndir in the qtbase setup-hook. On Linux, the .prl files
# are in lib, and so do not cause a subsequent recreation of deep
# framework directory trees.
+ lib.optionalString stdenv.isDarwin ''
fixDarwinDylibNames_rpath() {
local flags=()
for fn in "$@"; do
flags+=(-change "@rpath/$fn.framework/Versions/5/$fn" "$out/lib/$fn.framework/Versions/5/$fn")
done
for fn in "$@"; do
echo "$fn: fixing dylib"
install_name_tool -id "$out/lib/$fn.framework/Versions/5/$fn" "''${flags[@]}" "$out/lib/$fn.framework/Versions/5/$fn"
done
}
fixDarwinDylibNames_rpath "QtConcurrent" "QtPrintSupport" "QtCore" "QtSql" "QtDBus" "QtTest" "QtGui" "QtWidgets" "QtNetwork" "QtXml" "QtOpenGL"
'';
inherit lndir;

View file

@ -225,10 +225,35 @@ stdenv.mkDerivation {
done
popd
fi
# fixup .pc file (where to find 'moc' etc.)
sed "s|^host_bins=.*|host_bins=$dev/bin|" -i "$dev/lib/pkgconfig/Qt5Core.pc"
''
# Don't move .prl files on darwin because they end up in
# "dev/lib/Foo.framework/Foo.prl" which interferes with subsequent
# use of lndir in the qtbase setup-hook. On Linux, the .prl files
# are in lib, and so do not cause a subsequent recreation of deep
# framework directory trees.
+ lib.optionalString stdenv.isDarwin ''
fixDarwinDylibNames_rpath() {
local flags=()
for fn in "$@"; do
flags+=(-change "@rpath/$fn.framework/Versions/5/$fn" "$out/lib/$fn.framework/Versions/5/$fn")
done
for fn in "$@"; do
echo "$fn: fixing dylib"
install_name_tool -id "$out/lib/$fn.framework/Versions/5/$fn" "''${flags[@]}" "$out/lib/$fn.framework/Versions/5/$fn"
done
}
fixDarwinDylibNames_rpath "QtConcurrent" "QtPrintSupport" "QtCore" "QtSql" "QtDBus" "QtTest" "QtGui" "QtWidgets" "QtNetwork" "QtXml" "QtOpenGL"
'';
inherit lndir;
setupHook = ../../qtbase-setup-hook.sh;
setupHook = if stdenv.isDarwin
then ../../qtbase-setup-hook-darwin.sh
else ../../qtbase-setup-hook.sh;
enableParallelBuilding = true;