From d0161091d8a020652f046fc92db06570cf017376 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Wed, 23 Jan 2013 00:26:26 -0600 Subject: [PATCH] Let option override with/without descriptions --- Library/Homebrew/formula.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index fa4841dd78..9801e0c47b 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -831,12 +831,16 @@ private def finalize_dsl # Synthesize options for optional dependencies dependencies.deps.select(&:optional?).each do |dep| - option "with-#{dep.name}", "Build with #{dep.name} support" + unless build.has_option? "with-#{dep.name}" + option "with-#{dep.name}", "Build with #{dep.name} support" + end end # Synthesize options for recommended dependencies dependencies.deps.select(&:recommended?).each do |dep| - option "without-#{dep.name}", "Build without #{dep.name} support" + unless build.has_option? "without-#{dep.name}" + option "without-#{dep.name}", "Build without #{dep.name} support" + end end end end