-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1680 from natalie-lang/brew-pkg-config
- Loading branch information
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Homebrew does not put the .pc files in a common place that pkg-config can find. | ||
# This script sets up the PKG_CONFIG_PATH so that the packages can be found by Natalie. | ||
# You can run this prior to running `bin/natalie` or `rake test` or whatever. | ||
# | ||
# Usage: | ||
# | ||
# eval(test/setup_pkgconfig_with_homebrew.sh) | ||
|
||
set -e | ||
|
||
packages=("libyaml") | ||
|
||
if ! type -P brew &>/dev/null; then | ||
echo "Could not find $(brew) command. This script assumes you have Homebrew installed." | ||
exit 1 | ||
fi | ||
|
||
for package in ${packages[@]}; do | ||
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(brew --prefix $package)/lib/pkgconfig" | ||
done | ||
|
||
echo "export PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" |