qtbase: don't patch non-existent .pc files on Darwin

This commit is contained in:
Thomas Tuegel 2017-03-10 09:23:05 -06:00
parent 1b73890f5b
commit 66bc2135f6
No known key found for this signature in database
GPG Key ID: 22CBF5249D4B4D59
3 changed files with 27 additions and 9 deletions

View File

@ -267,10 +267,20 @@ 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 ''
# fixup .pc file (where to find 'moc' etc.)
+ lib.optionalString (!stdenv.isDarwin) ''
sed -i "$dev/lib/pkgconfig/Qt5Core.pc" \
"s|^host_bins=.*|host_bins=$dev/bin|"
''
# 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=()

View File

@ -228,10 +228,14 @@ 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"
''
# fixup .pc file (where to find 'moc' etc.)
+ lib.optionalString (!stdenv.isDarwin) ''
sed -i "$dev/lib/pkgconfig/Qt5Core.pc" \
"s|^host_bins=.*|host_bins=$dev/bin|"
''
# 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

View File

@ -225,10 +225,14 @@ 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"
''
# fixup .pc file (where to find 'moc' etc.)
+ lib.optionalString (!stdenv.isDarwin) ''
sed -i "$dev/lib/pkgconfig/Qt5Core.pc" \
"s|^host_bins=.*|host_bins=$dev/bin|"
''
# 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