mutt: make thread/sidebar patches mutually exclusive
Fixes Homebrew/homebrew#16461. Closes Homebrew/homebrew#17182. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
55dde5a801
commit
61d334dedf
1 changed files with 21 additions and 18 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue