Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 6869E429E25 for ; Sun, 2 Oct 2011 14:30:33 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KWyO60eTRO7Z for ; Sun, 2 Oct 2011 14:30:32 -0700 (PDT) Received: from mail.forlackofawittyname.com (forlackofawittyname.com [173.203.194.240]) by olra.theworths.org (Postfix) with ESMTP id 08512431FB6 for ; Sun, 2 Oct 2011 14:30:32 -0700 (PDT) Received: from localhost (cpe-071-070-245-238.nc.res.rr.com [71.70.245.238]) by mail.forlackofawittyname.com (Postfix) with ESMTPSA id E322312801C for ; Sun, 2 Oct 2011 14:30:20 -0700 (PDT) Date: Sun, 2 Oct 2011 17:29:55 -0400 From: Toni Janz To: notmuch@notmuchmail.org Subject: notmuch 0.9~rc1 install on OS X Lion using homebrew Message-ID: <20111002212955.GB70670@argentum> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: Cthulhu Caos Club FNORD!! User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Toni Janz List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2011 21:30:33 -0000 tldr; I got notmuch running on OS X 10.7.1 (Lion) and have posted the homebrew formulas below. If you are on OS X and don't know what Homebrew is then http://mxcl.github.com/homebrew/ may be worth your time. I thought I'd post on this list in the hopes that some other people find it useful and ends up saving them time. Short Dependency Version Summary: talloc: 2.0.7 gmime: 2.4.24 xapian: 1.2.7 notmuch: 0.9~rc1 The Homebrew formulas for these are below Talloc caused my problems because OS X can't deal with relative pathing so I changed the formula to include an "--disable-rpath" to configure. Gmime caused me problems with homebrew because the current formula in homebrew git compiles it with "--disable-dependancy-checking" which leads to the error below. dyld: Symbol not found: _url_addrspec_end Referenced from: /usr/local/Cellar/gmime/2.4.24/lib/libgmime-2.4.2.dylib Expected in: flat namespace in /usr/local/Cellar/gmime/2.4.24/lib/libgmime-2.4.2.dylib [1] 66350 trace trap ./notmuch-shared The formulas begin below. (I may go ahead and submit them to the homebrew repo as well, but I figure having this in the mailing archive shouldn't hurt). Now, I'm posting it here because "It Works For Me", and "It *might* work for you"--but, again, YMMV. ## begin homebrew formula for 0.9~rc1 (current Head and subject to change) require 'formula' class Notmuch < Formula head 'git://notmuchmail.org/git/notmuch' homepage 'http://notmuchmail.org' md5 '983cd907a7bf5ee0d12ebfb54cff784f' depends_on 'xapian' depends_on 'talloc' depends_on 'gmime' def install system "./configure", "--prefix=#{prefix}" # notmuch requires a newer emacs than macosx provides. So we either # disable the emacs bindings or make notmuch depend on the homebrew # emacs package. # And there is a race condition in the makefile, so we have to either # deparallelize the process or run make and make install separately. system "make HAVE_EMACS=0" system "make install HAVE_EMACS=0" end end ## Begin homebrew formula for gmime 2.4.24 require 'formula' class Gmime < Formula homepage 'http://spruce.sourceforge.net/gmime/' url 'ftp://ftp.gnome.org/pub/GNOME/sources/gmime/2.4/gmime-2.4.24.tar.bz2' sha256 'e1255dc565416b65e6f8e7b207074b86d955897169eb19a975e90b34ae660c14' depends_on 'pkg-config' => :build depends_on 'glib' def install system "./configure", "--prefix=#{prefix}", "--enable-largefile", "--disable-mono" system "make install" end end ## Begin Homebrew formula for talloc require 'formula' class Talloc < Formula url 'http://www.samba.org/ftp/talloc/talloc-2.0.7.tar.gz' homepage 'http://talloc.samba.org/' md5 'dbfb3146f4cc47054e13b8a2988299f9' def install system "./configure", "--prefix=#{prefix}", "--disable-rpath" # See https://bugzilla.samba.org/show_bug.cgi?id=7000 # It seems that the patch included there is not enough inreplace 'Makefile', 'SONAMEFLAG = #', 'SONAMEFLAG = -install_name' system "make install" end end ## Begin homebrew formula for Xapian require 'formula' class XapianBindings < Formula url 'http://oligarchy.co.uk/xapian/1.2.7/xapian-bindings-1.2.7.tar.gz' homepage 'http://xapian.org' md5 '44b83efe4b025c3b5ea3eff4e0f17a9a' end class Xapian < Formula url 'http://oligarchy.co.uk/xapian/1.2.7/xapian-core-1.2.7.tar.gz' homepage 'http://xapian.org' md5 '6684eb7a990b9cedf4257f41bfddb584' def options [ ["--ruby", "Ruby bindings"], ["--python", "Python bindings"], ["--php", "PHP bindings"], ["--java", "Java bindings"], ] end def skip_clean? path path.extname == '.la' end def build_any_bindings? ARGV.include? '--ruby' or ARGV.include? '--python' or ARGV.include? '--java' or ARGV.include? '--php' end def arg_for_lang lang (ARGV.include? "--#{lang}") ? "--with-#{lang}" : "--without-#{lang}" end def install ENV.O3 # takes forever otherwise system "./configure", "--prefix=#{prefix}", "--disable-assertions", "--disable-dependency-tracking" system "make install" if build_any_bindings? XapianBindings.new.brew do args = [ "XAPIAN_CONFIG=#{bin}/xapian-config", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking", "--without-csharp", "--without-tcl" ] args << arg_for_lang('ruby') args << arg_for_lang('java') if ARGV.include? '--python' python_lib = lib + "python" ENV.append 'PYTHONPATH', python_lib python_lib.mkpath ENV['OVERRIDE_MACOSX_DEPLOYMENT_TARGET'] = '10.4' ENV['PYTHON_LIB'] = "#{python_lib}" args << "--with-python" else args << "--without-python" end if ARGV.include? '--php' extension_dir = lib+'php/extensions' extension_dir.mkpath args << "--with-php PHP_EXTENSION_DIR=#{extension_dir}" else args << "--without-php" end system "./configure", *args system "make install" end end end def caveats s = "" if ARGV.include? "--python" s += <<-EOS.undent The Python bindings won't function until you amend your PYTHONPATH like so: export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/python:$PYTHONPATH EOS end end end -- __ (oO) /||\... Toni