2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-04 04:29:53 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mutt < Formula
|
2010-07-29 17:28:30 +00:00
|
|
|
homepage 'http://www.mutt.org/'
|
2012-07-18 00:10:28 +00:00
|
|
|
url 'ftp://ftp.mutt.org/mutt/devel/mutt-1.5.21.tar.gz'
|
2010-11-24 18:36:38 +00:00
|
|
|
md5 'a29db8f1d51e2f10c070bf88e8a553fd'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2010-03-03 21:57:19 +00:00
|
|
|
depends_on 'tokyo-cabinet'
|
2011-05-27 04:11:42 +00:00
|
|
|
depends_on 'slang' if ARGV.include? '--with-slang'
|
2009-09-04 04:29:53 +00:00
|
|
|
|
2010-01-14 22:36:08 +00:00
|
|
|
def options
|
|
|
|
[
|
2011-01-16 15:01:20 +00:00
|
|
|
['--enable-debug', "Build with debug option enabled"],
|
2011-03-14 15:47:30 +00:00
|
|
|
['--sidebar-patch', "Apply sidebar (folder list) patch"],
|
2011-05-27 04:11:42 +00:00
|
|
|
['--trash-patch', "Apply trash folder patch"],
|
2011-07-10 19:08:39 +00:00
|
|
|
['--with-slang', "Build against slang instead of ncurses"],
|
2011-07-31 21:50:15 +00:00
|
|
|
['--ignore-thread-patch', "Apply ignore-thread patch"],
|
|
|
|
['--pgp-verbose-mime-patch', "Apply PGP verbose mime patch"]
|
2010-01-14 22:36:08 +00:00
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def patches
|
2011-07-31 21:58:26 +00:00
|
|
|
urls = [
|
|
|
|
['--sidebar-patch', 'https://raw.github.com/nedos/mutt-sidebar-patch/master/mutt-sidebar.patch'],
|
2012-07-18 00:10:28 +00:00
|
|
|
['--trash-patch', 'http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.1/features/trash-folder'],
|
2011-07-31 21:58:26 +00:00
|
|
|
['--ignore-thread-patch', 'http://ben.at.tanjero.com/patches/ignore-thread-1.5.21.patch'],
|
|
|
|
['--pgp-verbose-mime-patch',
|
2012-07-18 00:10:28 +00:00
|
|
|
'http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.1/features-old/patch-1.5.4.vk.pgp_verbose_mime'],
|
2011-07-31 21:58:26 +00:00
|
|
|
]
|
2011-07-10 19:08:39 +00:00
|
|
|
|
2011-07-31 21:58:26 +00:00
|
|
|
p = []
|
|
|
|
urls.each do |u|
|
|
|
|
p << u[1] if ARGV.include? u[0]
|
2011-07-31 21:50:15 +00:00
|
|
|
end
|
2010-04-07 05:58:35 +00:00
|
|
|
return p
|
2010-01-14 22:36:08 +00:00
|
|
|
end
|
|
|
|
|
2009-09-04 04:29:53 +00:00
|
|
|
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)
|
2011-06-13 22:18:46 +00:00
|
|
|
"--with-homespool=.mbox"]
|
|
|
|
args << "--with-slang" if ARGV.include? '--with-slang'
|
2011-01-17 01:37:37 +00:00
|
|
|
|
2011-01-16 15:01:20 +00:00
|
|
|
if ARGV.include? '--enable-debug'
|
2011-01-17 01:37:37 +00:00
|
|
|
args << "--enable-debug"
|
2011-01-16 15:01:20 +00:00
|
|
|
else
|
2011-01-17 01:37:37 +00:00
|
|
|
args << "--disable-debug"
|
2011-01-16 15:01:20 +00:00
|
|
|
end
|
|
|
|
|
2011-01-17 01:37:37 +00:00
|
|
|
system "./configure", *args
|
2009-09-04 04:29:53 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|