homebrew-core/Formula/mutt.rb

69 lines
2.3 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Mutt < Formula
homepage 'http://www.mutt.org/'
url 'ftp://ftp.mutt.org/mutt/devel/mutt-1.5.21.tar.gz'
sha1 'a8475f2618ce5d5d33bff85c0affdf21ab1d76b9'
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"
2013-01-21 04:13:50 +00:00
depends_on 'tokyo-cabinet'
depends_on 'slang' if build.include? 'with-slang'
def patches
2011-07-31 21:58:26 +00:00
urls = [
['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'],
2011-07-31 21:58:26 +00:00
]
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
2011-07-31 21:58:26 +00:00
p = []
urls.each do |u|
p << u[1] if build.include? u[0]
end
return p
end
def install
2011-01-17 01:37:37 +00:00
args = ["--disable-dependency-tracking",
"--disable-warnings",
"--prefix=#{prefix}",
"--with-ssl",
"--with-sasl",
"--with-gss",
"--enable-imap",
"--enable-smtp",
"--enable-pop",
"--enable-hcache",
"--with-tokyocabinet",
# This is just a trick to keep 'make install' from trying to chgrp
# the mutt_dotlock file (which we can't do if we're running as an
# unpriviledged user)
2011-06-13 22:18:46 +00:00
"--with-homespool=.mbox"]
args << "--with-slang" if build.include? 'with-slang'
2011-01-17 01:37:37 +00:00
if build.include? 'with-debug'
2011-01-17 01:37:37 +00:00
args << "--enable-debug"
else
2011-01-17 01:37:37 +00:00
args << "--disable-debug"
end
2011-01-17 01:37:37 +00:00
system "./configure", *args
system "make install"
end
end