homebrew-core/Formula/mutt.rb
Josh Bode 57a79cb935 mutt: update patches
- Fixed provided `configure` script failing with hard-dependency on
  automake-1.13 (uses `prepare` to regenerate new `configure` script)
- trashfolder patch updated (existing patch url is 500ing)
- pgp-verbose-mime patch updated (existing patch url is 500ing)
2014-05-03 09:16:28 -07:00

100 lines
3.4 KiB
Ruby

require 'formula'
class Mutt < Formula
homepage 'http://www.mutt.org/'
url 'ftp://ftp.mutt.org/mutt/mutt-1.5.23.tar.gz'
mirror 'http://fossies.org/linux/misc/mutt-1.5.23.tar.gz'
sha1 '8ac821d8b1e25504a31bf5fda9c08d93a4acc862'
revision 1
bottle do
sha1 "0b5b7346ec5450821d9416151426917aba099c5e" => :mavericks
sha1 "13e20a8a78933a64ba857ad3734ac45d421bd7e2" => :mountain_lion
sha1 "2772138cb1e6b63d0e0095790261fa6c2bad1068" => :lion
end
head do
url 'http://dev.mutt.org/hg/mutt#default', :using => :hg
resource 'html' do
url 'http://dev.mutt.org/doc/manual.html', :using => :nounzip
end
end
unless Tab.for_name('signing-party').used_options.include? 'with-rename-pgpring'
conflicts_with 'signing-party',
:because => 'mutt installs a private copy of pgpring'
end
conflicts_with 'tin',
:because => 'both install mmdf.5 and mbox.5 man pages'
option "with-debug", "Build with debug option enabled"
option "with-trash-patch", "Apply trash folder patch"
option "with-s-lang", "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"
option "with-confirm-attachment-patch", "Apply confirm attachment patch"
depends_on :autoconf
depends_on :automake
depends_on 'openssl'
depends_on 'tokyo-cabinet'
depends_on 's-lang' => :optional
depends_on 'gpgme' => :optional
patch do
url "ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/mutt/trashfolder-1.5.22.diff0.gz"
sha1 "c597566c26e270b99c6f57e046512a663d2f415e"
end if build.with? "trash-patch"
# original source for this went missing, patch sourced from Arch at
# https://aur.archlinux.org/packages/mutt-ignore-thread/
patch do
url "https://gist.githubusercontent.com/mistydemeo/5522742/raw/1439cc157ab673dc8061784829eea267cd736624/ignore-thread-1.5.21.patch"
sha1 "dbcf5de46a559bca425028a18da0a63d34f722d3"
end if build.with? "ignore-thread-patch"
patch do
url "https://raw.githubusercontent.com/psych0tik/mutt/73c09bc56e79605cf421a31c7e36958422055a20/debian/patches/features-old/patch-1.5.4.vk.pgp_verbose_mime"
sha1 "a436f967aa46663cfc9b8933a6499ca165ec0a21"
end if build.with? "pgp-verbose-mime-patch"
patch do
url "https://gist.githubusercontent.com/tlvince/5741641/raw/c926ca307dc97727c2bd88a84dcb0d7ac3bb4bf5/mutt-attach.patch"
sha1 "94da52d50508d8951aa78ca4b073023414866be1"
end if build.with? "confirm-attachment-patch"
def install
args = ["--disable-dependency-tracking",
"--disable-warnings",
"--prefix=#{prefix}",
"--with-ssl=#{Formula['openssl'].opt_prefix}",
"--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)
"--with-homespool=.mbox"]
args << "--with-slang" if build.with? 's-lang'
args << "--enable-gpgme" if build.with? 'gpgme'
if build.with? 'debug'
args << "--enable-debug"
else
args << "--disable-debug"
end
system "./prepare", *args
system "make"
system "make", "install"
(share/'doc/mutt').install resource('html') if build.head?
end
end