diff options
| author | Yousef Ourabi | 2013-01-18 19:05:25 -0800 | 
|---|---|---|
| committer | Adam Vandenberg | 2013-01-18 19:42:56 -0800 | 
| commit | 054f155c3f63369e36d61cab116e20285583de58 (patch) | |
| tree | 05414a1dba834621a6523b119f93cd283f4169af /Library/Formula/mutt.rb | |
| parent | 850640f274dc9adff82ef0867ba5d205ad769d60 (diff) | |
| download | homebrew-054f155c3f63369e36d61cab116e20285583de58.tar.bz2 | |
mutt: make thread/sidebar patches mutually exclusive
Fixes #16461.
Closes #17182.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/mutt.rb')
| -rw-r--r-- | Library/Formula/mutt.rb | 39 | 
1 files changed, 21 insertions, 18 deletions
diff --git a/Library/Formula/mutt.rb b/Library/Formula/mutt.rb index f01c0da5d..a0928a29a 100644 --- a/Library/Formula/mutt.rb +++ b/Library/Formula/mutt.rb @@ -6,32 +6,35 @@ class Mutt < Formula    sha1 'a8475f2618ce5d5d33bff85c0affdf21ab1d76b9'    depends_on 'tokyo-cabinet' -  depends_on 'slang' if ARGV.include? '--with-slang' +  depends_on 'slang' if build.include? 'with-slang' -  def options -    [ -      ['--enable-debug', "Build with debug option enabled"], -      ['--sidebar-patch', "Apply sidebar (folder list) patch"], -      ['--trash-patch', "Apply trash folder patch"], -      ['--with-slang', "Build against slang instead of ncurses"], -      ['--ignore-thread-patch', "Apply ignore-thread patch"], -      ['--pgp-verbose-mime-patch', "Apply PGP verbose mime patch"] -    ] -  end +  option "with-debug", "Build with debug option enabled" +  option "with-sidebar-patch", "Apply sidebar (folder list) patch" +  option "with-trash-patch", "Apply trash folder patch" +  option "with-slang", "Build against slang instead of ncurses" +  option "with-ignore-thread-patch", "Apply ignore-thread patch" +  option "with-pgp-verbose-mime-patch", "Apply PGP verbose mime patch"    def patches      urls = [ -      ['--sidebar-patch', 'http://lunar-linux.org/~tchan/mutt/patch-1.5.21.sidebar.20120829.txt'], -      ['--trash-patch', 'http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.2/features/trash-folder'], -      ['--ignore-thread-patch', 'http://ben.at.tanjero.com/patches/ignore-thread-1.5.21.patch'], -      ['--pgp-verbose-mime-patch', +      ['with-sidebar-patch', 'http://lunar-linux.org/~tchan/mutt/patch-1.5.21.sidebar.20120829.txt'], +      ['with-trash-patch', 'http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.2/features/trash-folder'], +      ['with-ignore-thread-patch', 'http://ben.at.tanjero.com/patches/ignore-thread-1.5.21.patch'], +      ['with-pgp-verbose-mime-patch',            'http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.2/features-old/patch-1.5.4.vk.pgp_verbose_mime'],      ] +    if build.include? "with-ignore-thread-patch" and build.include? "with-sidebar-patch" +      puts "\n" +      onoe "The ignore-thread-patch and sidebar-patch options are mutually exlusive. Please pick one" +      exit 1 +    end +      p = []      urls.each do |u| -      p << u[1] if ARGV.include? u[0] +      p << u[1] if build.include? u[0]      end +      return p    end @@ -52,9 +55,9 @@ class Mutt < Formula              # the mutt_dotlock file (which we can't do if we're running as an              # unpriviledged user)              "--with-homespool=.mbox"] -    args << "--with-slang" if ARGV.include? '--with-slang' +    args << "--with-slang" if build.include? 'with-slang' -    if ARGV.include? '--enable-debug' +    if build.include? 'with-debug'        args << "--enable-debug"      else        args << "--disable-debug"  | 
