diff options
Diffstat (limited to 'Library/Homebrew/software_spec.rb')
| -rw-r--r-- | Library/Homebrew/software_spec.rb | 14 | 
1 files changed, 13 insertions, 1 deletions
| diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index fe0277adb..390f31e17 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -80,7 +80,15 @@ class SoftwareSpec      name = name.to_s if Symbol === name      raise ArgumentError, "option name is required" if name.empty?      raise ArgumentError, "options should not start with dashes" if name.start_with?("-") -    build.add(name, description) + +    description ||= case name +      when "universal" then "Build a universal binary" +      when "32-bit" then "Build 32-bit only" +      when "c++11" then "Build using C++11 mode" +      else "" +      end + +    options << Option.new(name, description)    end    def depends_on spec @@ -115,6 +123,10 @@ class SoftwareSpec        options << Option.new("without-#{name}", "Build without #{name} support")      end    end + +  def add_legacy_options(list) +    list.each { |opt, desc| options << Option.new(opt[/^--(.+)$/, 1], desc) } +  end  end  class HeadSoftwareSpec < SoftwareSpec | 
