2011-02-14 01:18:20 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-05-09 15:25:33 +00:00
|
|
|
class Emacs23Installed < Requirement
|
2012-12-25 21:54:29 +00:00
|
|
|
fatal true
|
|
|
|
env :userpaths
|
2013-05-10 12:35:38 +00:00
|
|
|
default_formula 'emacs'
|
2012-12-25 21:54:29 +00:00
|
|
|
|
2013-01-20 02:45:59 +00:00
|
|
|
satisfy do
|
2012-12-25 21:54:29 +00:00
|
|
|
`emacs --version 2>/dev/null` =~ /^GNU Emacs (\d{2})/
|
|
|
|
$1.to_i >= 23
|
|
|
|
end
|
2012-05-09 15:25:33 +00:00
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mu < Formula
|
2011-02-14 01:18:20 +00:00
|
|
|
homepage 'http://www.djcbsoftware.nl/code/mu/'
|
2013-04-04 08:43:28 +00:00
|
|
|
url 'http://mu0.googlecode.com/files/mu-0.9.9.5.tar.gz'
|
|
|
|
sha1 '825e3096e0763a12b8fdf77bd41625ee15ed09eb'
|
2012-07-07 18:08:22 +00:00
|
|
|
|
2013-09-22 01:47:30 +00:00
|
|
|
head do
|
|
|
|
url 'https://github.com/djcb/mu.git'
|
|
|
|
|
|
|
|
depends_on 'automake' => :build
|
|
|
|
depends_on 'libtool' => :build
|
|
|
|
end
|
2011-02-14 01:18:20 +00:00
|
|
|
|
2012-08-26 06:39:35 +00:00
|
|
|
option 'with-emacs', 'Build with emacs support'
|
|
|
|
|
2013-02-10 06:28:14 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2011-02-14 01:18:20 +00:00
|
|
|
depends_on 'gettext'
|
|
|
|
depends_on 'glib'
|
|
|
|
depends_on 'gmime'
|
|
|
|
depends_on 'xapian'
|
2013-04-13 06:35:38 +00:00
|
|
|
depends_on Emacs23Installed if build.with? 'emacs'
|
2012-05-09 15:25:33 +00:00
|
|
|
|
2013-04-13 06:35:38 +00:00
|
|
|
env :std if build.with? 'emacs'
|
|
|
|
|
2011-02-14 01:18:20 +00:00
|
|
|
def install
|
2012-05-18 10:10:39 +00:00
|
|
|
# Explicitly tell the build not to include emacs support as the version
|
|
|
|
# shipped by default with Mac OS X is too old.
|
2013-04-13 06:35:38 +00:00
|
|
|
ENV['EMACS'] = 'no' unless build.with? 'emacs'
|
2012-05-18 10:10:39 +00:00
|
|
|
|
2012-08-26 06:39:35 +00:00
|
|
|
system 'autoreconf', '-ivf' if build.head?
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-gui=none"
|
2011-02-14 01:18:20 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
2012-04-25 18:39:49 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Existing mu users are recommended to run the following after upgrading:
|
|
|
|
|
|
|
|
mu index --rebuild
|
|
|
|
EOS
|
|
|
|
end
|
2011-02-14 01:18:20 +00:00
|
|
|
end
|