diff options
| author | Jack Nagel | 2014-02-24 22:44:30 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-02-24 22:44:30 -0500 |
| commit | 03811e6423879162225a6912cbfbda535d72067f (patch) | |
| tree | d312a486366037de4888c904a113d774083034ad | |
| parent | d6f7bc6446ecaf25a8434a20881c34e119781390 (diff) | |
| download | brew-03811e6423879162225a6912cbfbda535d72067f.tar.bz2 | |
Add example using a stable block
| -rw-r--r-- | Library/Contributions/example-formula.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Contributions/example-formula.rb b/Library/Contributions/example-formula.rb index 0e048ae5e..40783f398 100644 --- a/Library/Contributions/example-formula.rb +++ b/Library/Contributions/example-formula.rb @@ -38,6 +38,17 @@ class ExampleFormula < Formula # Leave it empty at first and `brew install` will tell you the expected. sha1 'cafebabe78901234567890123456789012345678' + # Stable-only dependencies should be nested inside a `stable` block rather than + # using a conditional. It is preferrable to also pull the URL and checksum into + # the block if one is necessary. + stable do + url "https://example.com/foo-1.0.tar.gz" + sha1 "cafebabe78901234567890123456789012345678" + + depends_on "libxml2" + depends_on "libffi" + end + # Optionally, specify a repository to be used. Brew then generates a # `--HEAD` option. Remember to also test it. # The download strategies (:using =>) are the same as for `url`. |
