brew
https://github.com/homebrew/brew
Ruby
🍺 The missing package manager for macOS
BuildOptions#with?
True if a {Formula} is being built with a specific option.
<pre>args << "--i-want-spam" if build.with? "spam"
args << "--qt-gui" if build.with? "qt" # "--with-qt" ==> build.with? "qt"
# If a formula presents a user with a choice, but the choice must be fulfilled:
if build.with? "example2"
args << "--with-example2"
else
args << "--with-example1"
end</pre>Edit
git clone [email protected]:homebrew/brew.git
cd brew
open Library/Homebrew/build_options.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-BuildOptions-with--for-pr
# Commit to gitgit add Library/Homebrew/build_options.rbgit commit -m "better docs for BuildOptions#with?"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-BuildOptions-with--for-pr
hub pull-request
# Celebrate!