75 lines
2.4 KiB
Ruby
75 lines
2.4 KiB
Ruby
class Notmuch < Formula
|
|
desc "Thread-based email index, search, and tagging"
|
|
homepage "https://notmuchmail.org"
|
|
url "https://notmuchmail.org/releases/notmuch-0.25.2.tar.gz"
|
|
sha256 "e4b6ba9d4016b10249a4acc24e063d23e0c52ed6f8c1cbe4f98e7f9ef4da262a"
|
|
head "git://notmuchmail.org/git/notmuch"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "c32f237a40813d044fbfae14baa7dc361a81bdec147eec4636602e890adfacc3" => :high_sierra
|
|
sha256 "779e06544613fe0983b21eed5869198620e4209b5992ad526d8ed30b1778d1a8" => :sierra
|
|
sha256 "fd7a503ffdbe1e47f4f7e3dbc3b7cba1bb1e8d6eb1b238a5c7c6aa2448602948" => :el_capitan
|
|
end
|
|
|
|
option "without-python", "Build without python support"
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "libgpg-error" => :build
|
|
depends_on "glib"
|
|
depends_on "gmime"
|
|
depends_on "talloc"
|
|
depends_on "xapian"
|
|
depends_on "zlib"
|
|
depends_on :emacs => ["24.1", :optional]
|
|
depends_on :python3 => :optional
|
|
depends_on :ruby => ["1.9", :optional]
|
|
|
|
# Fix SIP issue with python bindings
|
|
# A more comprehensive patch has been submitted upstream
|
|
# https://notmuchmail.org/pipermail/notmuch/2016/022631.html
|
|
patch :DATA
|
|
|
|
def install
|
|
args = %W[--prefix=#{prefix}]
|
|
|
|
if build.with? "emacs"
|
|
ENV.deparallelize # Emacs and parallel builds aren't friends
|
|
args << "--with-emacs" << "--emacslispdir=#{elisp}" << "--emacsetcdir=#{elisp}"
|
|
else
|
|
args << "--without-emacs"
|
|
end
|
|
|
|
args << "--without-ruby" if build.without? "ruby"
|
|
|
|
system "./configure", *args
|
|
system "make", "V=1", "install"
|
|
|
|
Language::Python.each_python(build) do |python, _version|
|
|
cd "bindings/python" do
|
|
system python, *Language::Python.setup_install_args(prefix)
|
|
end
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/".notmuch-config").write "[database]\npath=#{testpath}/Mail"
|
|
(testpath/"Mail").mkpath
|
|
assert_match "0 total", shell_output("#{bin}/notmuch new")
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py
|
|
index b1eec2c..bce5190 100644
|
|
--- a/bindings/python/notmuch/globals.py
|
|
+++ b/bindings/python/notmuch/globals.py
|
|
@@ -25,7 +25,7 @@ from notmuch.version import SOVERSION
|
|
try:
|
|
from os import uname
|
|
if uname()[0] == 'Darwin':
|
|
- nmlib = CDLL("libnotmuch.{0:s}.dylib".format(SOVERSION))
|
|
+ nmlib = CDLL("HOMEBREW_PREFIX/lib/libnotmuch.{0:s}.dylib".format(SOVERSION))
|
|
else:
|
|
nmlib = CDLL("libnotmuch.so.{0:s}".format(SOVERSION))
|
|
except:
|