2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-04 04:29:53 +00:00
|
|
|
|
2013-06-26 19:10:46 +00:00
|
|
|
class MuttHtmldocs < Formula
|
2013-06-28 23:00:37 +00:00
|
|
|
head 'http://dev.mutt.org/doc/manual.html', :using => :nounzip
|
2013-06-26 19:10:46 +00:00
|
|
|
end
|
|
|
|
|
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'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'a8475f2618ce5d5d33bff85c0affdf21ab1d76b9'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2013-06-26 19:10:46 +00:00
|
|
|
head 'http://dev.mutt.org/hg/mutt#HEAD', :using => :hg
|
|
|
|
|
2013-01-19 03:05:25 +00:00
|
|
|
option "with-debug", "Build with debug option enabled"
|
2013-06-26 19:10:46 +00:00
|
|
|
option "with-sidebar-patch", "Apply sidebar (folder list) patch" unless build.head?
|
2013-01-19 03:05:25 +00:00
|
|
|
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"
|
2010-01-14 22:36:08 +00:00
|
|
|
|
2013-01-21 04:13:50 +00:00
|
|
|
depends_on 'tokyo-cabinet'
|
2013-06-28 15:45:22 +00:00
|
|
|
depends_on 'slang' => :optional
|
2013-06-26 19:10:46 +00:00
|
|
|
if build.head?
|
|
|
|
depends_on :autoconf
|
|
|
|
depends_on :automake
|
|
|
|
end
|
2013-01-21 04:13:50 +00:00
|
|
|
|
2010-01-14 22:36:08 +00:00
|
|
|
def patches
|
2011-07-31 21:58:26 +00:00
|
|
|
urls = [
|
2013-05-19 08:43:04 +00:00
|
|
|
['with-sidebar-patch', 'http://lunar-linux.org/~tchan/mutt/patch-1.5.21.sidebar.20130219.txt'],
|
2013-01-19 03:05:25 +00:00
|
|
|
['with-trash-patch', 'http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.2/features/trash-folder'],
|
2013-05-06 00:47:21 +00:00
|
|
|
# original source for this went missing, patch sourced from Arch at
|
|
|
|
# https://aur.archlinux.org/packages/mutt-ignore-thread/
|
|
|
|
['with-ignore-thread-patch', 'https://gist.github.com/mistydemeo/5522742/raw/1439cc157ab673dc8061784829eea267cd736624/ignore-thread-1.5.21.patch'],
|
2013-01-19 03:05:25 +00:00
|
|
|
['with-pgp-verbose-mime-patch',
|
2012-09-13 09:12:54 +00:00
|
|
|
'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
|
|
|
]
|
2011-07-10 19:08:39 +00:00
|
|
|
|
2013-06-26 19:10:46 +00:00
|
|
|
if build.with? "ignore-thread-patch" and build.with? "sidebar-patch"
|
2013-01-19 03:05:25 +00:00
|
|
|
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|
|
2013-01-19 03:05:25 +00:00
|
|
|
p << u[1] if build.include? u[0]
|
2011-07-31 21:50:15 +00:00
|
|
|
end
|
2013-01-19 03:05:25 +00:00
|
|
|
|
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-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"]
|
2013-06-26 19:10:46 +00:00
|
|
|
args << "--with-slang" if build.with? 'slang'
|
2011-01-17 01:37:37 +00:00
|
|
|
|
2013-06-26 19:10:46 +00:00
|
|
|
if build.with? '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
|
|
|
|
|
2013-06-26 19:10:46 +00:00
|
|
|
if build.head?
|
|
|
|
system "./prepare", *args
|
|
|
|
else
|
|
|
|
system "./configure", *args
|
|
|
|
end
|
|
|
|
system "make"
|
|
|
|
system "make", "install"
|
|
|
|
|
|
|
|
if build.head?
|
|
|
|
MuttHtmldocs.new.brew { (share/'doc/mutt').install 'manual.html' }
|
|
|
|
end
|
2009-09-04 04:29:53 +00:00
|
|
|
end
|
|
|
|
end
|