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:
parent
46ba7cf94a
commit
f5d460a7a0
|
@ -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;
|
||||
|
|
|
@ -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=()
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue