96 lines
3 KiB
Ruby
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.10.1.tar.gz"
|
|
sha256 "734a3883158ec3d180cf6538d8bd7f685ce641d2cdef657aa0038f76e79a54a0"
|
|
|
|
bottle do
|
|
sha256 "389639d2cfb581fbf101df8e0c9eecb255314f1be38864acc7bf2c1c9a2c4a11" => :mojave
|
|
sha256 "ba0ec065c7692ce00cbf5cc47cb4804253c6fd388b3cbdcea0a65a20ef1bc616" => :high_sierra
|
|
sha256 "34d1cd11dc3d60fd6ae0365b90e7ab03e73e16494c1b31ec853741984207a6b1" => :sierra
|
|
sha256 "56802f8c1f2646be1ee70e3ea3ad711546a8e359d6a24b27a506bab24a845809" => :el_capitan
|
|
end
|
|
|
|
head do
|
|
url "https://gitlab.com/muttmua/mutt.git"
|
|
|
|
resource "html" do
|
|
url "https://muttmua.gitlab.io/mutt/manual-dev.html"
|
|
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
|