Skip to content

Commit

Permalink
qtbase: don't patch non-existent .pc files on Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
ttuegel committed Mar 10, 2017
1 parent 1b73890 commit 66bc213
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
16 changes: 13 additions & 3 deletions pkgs/development/libraries/qt-5/5.6/qtbase/default.nix
Expand Up @@ -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=()
Expand Down
8 changes: 6 additions & 2 deletions pkgs/development/libraries/qt-5/5.7/qtbase/default.nix
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions pkgs/development/libraries/qt-5/5.8/qtbase/default.nix
Expand Up @@ -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
Expand Down

0 comments on commit 66bc213

Please sign in to comment.