diff options
| author | Adam Vandenberg | 2010-07-18 10:38:45 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-08-07 18:08:52 -0700 |
| commit | bdf245ff98e2c3498528d3f5f9ebb128fad5d700 (patch) | |
| tree | 5a2c00c386f7a56241de88b7d6a38fd10d3a51d2 /Library | |
| parent | 1bc71794e92a6c2948c58c993a495a37dc0cf7ef (diff) | |
| download | brew-bdf245ff98e2c3498528d3f5f9ebb128fad5d700.tar.bz2 | |
Add keg-only to DSL
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index e39dfa8b8..81b139e8e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -163,7 +163,9 @@ class Formula # rarely, you don't want your library symlinked into the main prefix # see gettext.rb for an example - def keg_only?; false end + def keg_only? + self.class.keg_only_reason || false + end # sometimes the clean process breaks things # skip cleaning paths in a formula with a class method like this: @@ -477,7 +479,7 @@ EOF end end - attr_rw :version, :homepage, :specs, :deps, :external_deps + attr_rw :version, :homepage, :specs, :deps, :external_deps, :keg_only_reason attr_rw *CHECKSUM_TYPES def head val=nil, specs=nil @@ -538,6 +540,10 @@ EOF puts "Aliases to Formula. The name of the symlink will be" puts "detected as an alias for the target formula." end + + def keg_only reason + @keg_only_reason = reason + end end end |
