diff options
| author | Danie Roux | 2015-02-21 20:18:33 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2015-03-02 18:57:01 +0000 |
| commit | 3f91fb10150b5cb6f6f7495e90b7b1a80f5377a2 (patch) | |
| tree | 405fa6660cb7b373d01b1132a009cbd09a31d4e1 /Library | |
| parent | 756da4a5a1f9c6fc42f8708503297eb9ff55b9be (diff) | |
| download | homebrew-3f91fb10150b5cb6f6f7495e90b7b1a80f5377a2.tar.bz2 | |
mu: fix --include-related option for 10.9
- Compile with -O0 on >= mavericks
- Add a test for mu
- https://github.com/djcb/mu/issues/380
- Remove MACOSX_DEPLOYMENT_TARGET hack
https://github.com/djcb/mu/issues/332 is the same root cause as
https://github.com/djcb/mu/issues/380 which is fixed by
https://github.com/Homebrew/homebrew/pull/37020
Closes #37020.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mu.rb | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/Library/Formula/mu.rb b/Library/Formula/mu.rb index 0471fb656..b086bb985 100644 --- a/Library/Formula/mu.rb +++ b/Library/Formula/mu.rb @@ -43,17 +43,15 @@ class Mu < Formula # shipped by default with Mac OS X is too old. ENV["EMACS"] = "no" if build.without? "emacs" - # I dunno. + # https://github.com/djcb/mu/issues/380 # https://github.com/djcb/mu/issues/332 - # https://github.com/Homebrew/homebrew/issues/25524 - ENV.delete "MACOSX_DEPLOYMENT_TARGET" + ENV.O0 if MacOS.version >= :mavericks && ENV.compiler == :clang system "autoreconf", "-ivf" system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--with-gui=none" system "make" - system "make test" system "make install" end @@ -63,4 +61,40 @@ class Mu < Formula mu index --rebuild EOS end + + test do + mkdir (testpath/"cur") + + (testpath/"cur/1234567890.11111_1.host1!2,S").write <<-EOS.undent + From: "Road Runner" <fasterthanyou@example.com> + To: "Wile E. Coyote" <wile@example.com> + Date: Mon, 4 Aug 2008 11:40:49 +0200 + Message-id: <1111111111@example.com> + + Beep beep! + EOS + + (testpath/"cur/0987654321.22222_2.host2!2,S").write <<-EOS.undent + From: "Wile E. Coyote" <wile@example.com> + To: "Road Runner" <fasterthanyou@example.com> + Date: Mon, 4 Aug 2008 12:40:49 +0200 + Message-id: <2222222222@example.com> + References: <1111111111@example.com> + + This used to happen outdoors. It was more fun then. + EOS + + system "#{bin}/mu", "index", + "--muhome", + testpath, + "--maildir=#{testpath}" + + mu_find = "#{bin}/mu find --muhome #{testpath} " + find_message = "#{mu_find} msgid:2222222222@example.com" + find_message_and_related = "#{mu_find} --include-related msgid:2222222222@example.com" + + assert_equal 1, shell_output(find_message).lines.count + assert_equal 2, shell_output(find_message_and_related).lines.count, + "You tripped over https://github.com/djcb/mu/issues/380\n\t--related doesn't work. Everything else should" + end end |
