homebrew-core/Formula/mutt.rb
Alex Dunn defbd9365c mutt: remove confirm-attachment-patch (#4074)
(It doesn't apply to 1.7.0)

Point to NeoMutt in the comments.
2016-08-22 11:22:31 +01:00

96 lines
3 KiB
Ruby

# Note: Mutt has a large number of non-upstream patches available for
# it, some of which conflict with each other. These patches are also
# not kept up-to-date when new versions of mutt (occasionally) come
# out.
#
# To reduce Homebrew's maintenance burden, patches are not accepted
# for this formula. The NeoMutt project has a Homebrew tap for their
# patched version of Mutt: https://github.com/neomutt/homebrew-neomutt
class Mutt < Formula
desc "Mongrel of mail user agents (part elm, pine, mush, mh, etc.)"
homepage "http://www.mutt.org/"
url "https://bitbucket.org/mutt/mutt/downloads/mutt-1.7.0.tar.gz"
mirror "ftp://ftp.mutt.org/pub/mutt/mutt-1.7.0.tar.gz"
sha256 "1d3e987433d8c92ef88a604f4dcefdb35a86ce73f3eff0157e2e491e5b55b345"
bottle do
sha256 "d6d8b79f1b714d1d6f94b82e81825958ea7aa507fa47d8aacdf9bee93132d5b7" => :el_capitan
sha256 "90db768f00dc9d6c8e96a98f5d8f5a74c605b5bc46ea98871d99611da25184fb" => :yosemite
sha256 "63d588e1c1487ff6bfffc51180ff644307ffc8e6463436b9a001706dffcc1368" => :mavericks
end
head do
url "https://dev.mutt.org/hg/mutt#default", :using => :hg
resource "html" do
url "https://dev.mutt.org/doc/manual.html", :using => :nounzip
end
end
option "with-debug", "Build with debug option enabled"
option "with-s-lang", "Build against slang instead of ncurses"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "openssl"
depends_on "tokyo-cabinet"
depends_on "gettext" => :optional
depends_on "gpgme" => :optional
depends_on "libidn" => :optional
depends_on "s-lang" => :optional
conflicts_with "tin",
:because => "both install mmdf.5 and mbox.5 man pages"
def install
user_admin = Etc.getgrnam("admin").mem.include?(ENV["USER"])
args = %W[
--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
--enable-sidebar
]
# 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 unprivileged user)
args << "--with-homespool=.mbox" unless user_admin
args << "--disable-nls" if build.without? "gettext"
args << "--enable-gpgme" if build.with? "gpgme"
args << "--with-slang" if build.with? "s-lang"
if build.with? "debug"
args << "--enable-debug"
else
args << "--disable-debug"
end
system "./prepare", *args
system "make"
# This permits the `mutt_dotlock` file to be installed under a group
# that isn't `mail`.
# https://github.com/Homebrew/homebrew/issues/45400
if user_admin
inreplace "Makefile", /^DOTLOCK_GROUP =.*$/, "DOTLOCK_GROUP = admin"
end
system "make", "install"
doc.install resource("html") if build.head?
end
test do
system bin/"mutt", "-D"
end
end