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 Homebrew/homebrew#37020. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
ad3df1dcf6
commit
5fe1e98e3a
1 changed files with 38 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue