homebrew-core/Formula/mutt.rb

62 lines
1.6 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Mutt < Formula
2010-11-24 18:36:38 +00:00
url 'ftp://ftp.mutt.org/mutt/devel/mutt-1.5.21.tar.gz'
homepage 'http://www.mutt.org/'
2010-11-24 18:36:38 +00:00
md5 'a29db8f1d51e2f10c070bf88e8a553fd'
depends_on 'tokyo-cabinet'
def options
[
['--enable-debug', "Build with debug option enabled"],
['--sidebar-patch', "Apply sidebar (folder list) patch"],
['--trash-patch', "Apply trash folder patch"]
]
end
def patches
# Fix unsubscribe malformed folder
p = Array.new
if ARGV.include? '--sidebar-patch'
p << 'https://raw.github.com/nedos/mutt-sidebar-patch/master/mutt-sidebar.patch'
end
if ARGV.include? '--trash-patch'
p << 'http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-5/features/trash-folder'
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-gnutls",
"--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)
"--with-homespool=.mbox"
]
if ARGV.include? '--enable-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