Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
0cc4d530
Unverified
Commit
0cc4d530
authored
8 years ago
by
Dominyk Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Formula-Cookbook: document :run
parent
3eb966c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/doc/homebrew/Formula-Cookbook.md
+8
-3
8 additions, 3 deletions
share/doc/homebrew/Formula-Cookbook.md
with
8 additions
and
3 deletions
share/doc/homebrew/Formula-Cookbook.md
+
8
−
3
View file @
0cc4d530
...
...
@@ -121,10 +121,11 @@ Homebrew maintains a special [tap that provides other useful system duplicates](
```
ruby
class
Foo
<
Formula
depends_on
"pkg-config"
=>
:run
depends_on
"jpeg"
depends_on
"gtk+"
=>
:optional
depends_on
"readline"
=>
:recommended
depends_on
"boost"
=>
"with-icu"
depends_on
"readline"
=>
:recommended
depends_on
"gtk+"
=>
:optional
depends_on
:x11
=>
:optional
end
```
...
...
@@ -135,12 +136,16 @@ A Symbol (e.g. `:x11`) specifies a [`Requirement`](http://www.rubydoc.info/githu
A Hash (e.g.
`=>`
) specifies a formula dependency with some additional information. Given a single string key, the value can take several forms:
*
a Symbol (currently one of
`:build`
,
`:optional`
,
`:recommended`
).
*
a Symbol (currently one of
`:build`
,
`:optional`
,
`:run`
or
`:recommended`
).
-
`:build`
means that dependency is a build-time only dependency so it can
be skipped when installing from a bottle or when listing missing
dependencies using
`brew missing`
.
-
`:optional`
generates an implicit
`with-foo`
option for the formula.
This means that, given
`depends_on "foo" => :optional`
, the user must pass
`--with-foo`
in order to use the dependency.
-
`:run`
can mean the dependency is only required at run, or it can be used
to declare build dependencies such as
`pkg-config`
are needed during
runtime as well, which will silence the audit warning.
`:run`
currently
implies
`:build`
as well.
-
`:recommended`
generates an implicit
`without-foo`
option, meaning that
the dependency is enabled by default and the user must pass
`--without-foo`
to disable this dependency. The default
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment