diff options
Diffstat (limited to 'Library/Homebrew/formula.rb')
| -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 |
