diff options
| author | Adam Vandenberg | 2010-07-18 10:38:45 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-08-07 18:08:52 -0700 |
| commit | 9f58ebf25d518bf1d91174e31187d1ecd3ec116e (patch) | |
| tree | a31c7236db3b3acb2cf29f3e9b6a76770236df2a /Library | |
| parent | 39226fb31b269977c74eaed965e1d7568cbd6a84 (diff) | |
| download | homebrew-9f58ebf25d518bf1d91174e31187d1ecd3ec116e.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 |
