From f93b4f44ad4995b1b6ddceec4615d78d8a6d6ea4 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 16 Feb 2013 17:15:14 -0600 Subject: [PATCH] Fix option flag naming for tap deps Fixes Homebrew/homebrew#17866. --- Library/Homebrew/formula.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 04ea1f29d9..256959bcb3 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -806,10 +806,11 @@ private def post_depends_on(dep) # Generate with- or without- options for optional and recommended # dependencies and requirements - if dep.optional? && !build.has_option?("with-#{dep.name}") - build.add("with-#{dep.name}", "Build with #{dep.name} support") - elsif dep.recommended? && !build.has_option?("without-#{dep.name}") - build.add("without-#{dep.name}", "Build without #{dep.name} support") + name = dep.name.split("/").last # strip any tap prefix + if dep.optional? && !build.has_option?("with-#{name}") + build.add("with-#{name}", "Build with #{name} support") + elsif dep.recommended? && !build.has_option?("without-#{name}") + build.add("without-#{name}", "Build without #{name} support") end end end