diff options
Diffstat (limited to 'Library/Homebrew/formula.rb')
| -rw-r--r-- | Library/Homebrew/formula.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index ab5b00fa2..dc9b680f2 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -16,7 +16,7 @@ class Formula include Utils::Inreplace extend Enumerable - attr_reader :name, :path, :homepage, :build + attr_reader :name, :path, :homepage attr_reader :stable, :devel, :head, :active_spec attr_reader :pkg_version, :revision @@ -38,9 +38,8 @@ class Formula @active_spec = determine_active_spec(spec) validate_attributes :url, :name, :version - @build = determine_build_options + active_spec.add_legacy_options(options) @pkg_version = PkgVersion.new(version, revision) - @pin = FormulaPin.new(self) end @@ -65,12 +64,6 @@ class Formula end end - def determine_build_options - build = active_spec.build - options.each { |opt, desc| build.add(opt, desc) } - build - end - def bottle Bottle.new(self, active_spec.bottle_specification) if active_spec.bottled? end @@ -110,6 +103,10 @@ class Formula active_spec.option_defined?(name) end + def build + active_spec.build + end + # if the dir is there, but it's empty we consider it not installed def installed? (dir = installed_prefix).directory? && dir.children.length > 0 |
