From e5ba31fcdcc4150e5aa8ecf110cfa502dd62a802 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 14 Dec 2015 19:47:19 +0000 Subject: Allow multiple option_names in dep/reqs. This means that dependencies can be merged but still maintain all their option names. Closes Homebrew/homebrew#46916. Signed-off-by: Mike McQuaid --- Library/Homebrew/software_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/software_spec.rb') diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 92b6b7a9c..b6ca59961 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -185,12 +185,12 @@ class SoftwareSpec end def add_dep_option(dep) - name = dep.option_name - - if dep.optional? && !option_defined?("with-#{name}") - options << Option.new("with-#{name}", "Build with #{name} support") - elsif dep.recommended? && !option_defined?("without-#{name}") - options << Option.new("without-#{name}", "Build without #{name} support") + dep.option_names.each do |name| + if dep.optional? && !option_defined?("with-#{name}") + options << Option.new("with-#{name}", "Build with #{name} support") + elsif dep.recommended? && !option_defined?("without-#{name}") + options << Option.new("without-#{name}", "Build without #{name} support") + end end end end -- cgit v1.2.3