aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authornibbles 2bits2012-05-09 08:25:33 -0700
committerJack Nagel2012-05-12 23:10:23 -0500
commitd14836132bcc96b31a89d454ebbe597549dc99a4 (patch)
tree3cbe14e62a341d080c601097f0a271de9f604a1a /Library
parentbb21ff5b6189dca067a00bd281ff3dd0bbcdf5e0 (diff)
downloadhomebrew-d14836132bcc96b31a89d454ebbe597549dc99a4.tar.bz2
mu 0.9.8.4, adjust head, fix for xapian + emacs
* Upgrade mu to 0.9.8.4 * Use the new head url at GitHub * Add conditional deps on automake+libtool for autoreconf * Add `autoreconf -ivf` for building head * Add a Requirement for emacs >= version 23 * Patch configure error when using Xapian-1.2.10 The mu developers moved their repo from Gitorious to GitHub. The previous version of mu compiled without problems using the Lion system `emacs`. This version uses a command that is not available in the system emacs-22.1.1, and the compile will fail using clang or llvm with many errors like this: In toplevel form: mu4e-actions.el:30:1:Error: Unknown keyword :safe So this commit adds a Requirement for emacs >= version 23. For building head add conditional deps on automake and libtool. Also add the `autoreconf -ivf` system command for head. Stable fails to configure against xapian-1.2.10 because it only tests for version 1.2.[0-9]. Patch configure to support the latest xapian. Add comments referring to the upstream bug report, patch, and removal version. The issue has been fixed in HEAD. Tested against the new xapian-1.2.10 on Lion 10.7.4 using clang and llvm from XCode-4.3.2, both stable and HEAD. Closes #12167. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mu.rb53
1 files changed, 50 insertions, 3 deletions
diff --git a/Library/Formula/mu.rb b/Library/Formula/mu.rb
index db1ffb118..6dc138e5e 100644
--- a/Library/Formula/mu.rb
+++ b/Library/Formula/mu.rb
@@ -1,17 +1,51 @@
require 'formula'
+class Emacs23Installed < Requirement
+ def message; <<-EOS.undent
+ Emacs 23 or greater is required to build this software.
+
+ You can install this with Homebrew:
+ brew install emacs
+
+ Or you can use any other Emacs distribution
+ that provides version 23 or greater.
+ EOS
+ end
+ def satisfied?
+ `emacs --version 2>/dev/null` =~ /^GNU Emacs (\d{2})/
+ $1.to_i >= 23
+ end
+ def fatal?
+ true
+ end
+end
+
class Mu < Formula
- url 'http://mu0.googlecode.com/files/mu-0.9.8.3.tar.gz'
- sha1 'e66396783b9424cb7bf740bc309bd1361f399d16'
homepage 'http://www.djcbsoftware.nl/code/mu/'
- head 'git://gitorious.org/mu/old.git'
+ url 'http://mu0.googlecode.com/files/mu-0.9.8.4.tar.gz'
+ sha1 'd586dddcc5b2f73e0bc1c835c199644a65c0f5b5'
+ head 'https://github.com/djcb/mu.git'
depends_on 'gettext'
depends_on 'glib'
depends_on 'gmime'
depends_on 'xapian'
+ depends_on Emacs23Installed.new
+
+ if ARGV.build_head? and MacOS.xcode_version >= "4.3"
+ depends_on "automake" => :build
+ depends_on "libtool" => :build
+ end
+
+ # Fixes configure error using Xapian-1.2.10, where it thinks 1.2.10 < 1.2
+ # Patch submitted upstream: https://github.com/djcb/mu/issues/19
+ # Fixed in head. Remove at 0.9.8.5
+ def patches
+ DATA unless ARGV.build_head?
+ end
def install
+ system 'autoreconf', '-ivf' if ARGV.build_head?
system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking", "--with-gui=none"
system "make"
@@ -25,3 +59,16 @@ class Mu < Formula
EOS
end
end
+
+__END__
+--- a/configure 2012-05-08 04:26:10.000000000 -0700
++++ b/configure 2012-05-11 23:20:57.000000000 -0700
+@@ -17640,7 +17640,7 @@
+ xapian_version=$($XAPIAN_CONFIG --version | sed -e 's/.* //')
+ fi
+ case $xapian_version in #(
+- 1.[2-9].[0-9]) :
++ 1.[2-9].[0-9]*) :
+ ;; #(
+ *) :
+ as_fn_error $? "*** xapian version >= 1.2 needed, but version $xapian_version found." "$LINENO" 5 ;;