notmuch: fix build with clang and on 10.9

Fixes Homebrew/homebrew#23555.
This commit is contained in:
Jack Nagel 2013-11-06 21:13:36 -06:00
parent ba2cb20bad
commit e297414b36

View file

@ -27,8 +27,12 @@ class Notmuch < Formula
depends_on 'talloc'
depends_on 'gmime'
fails_with :clang do
cause "./lib/notmuch-private.h:478:8: error: visibility does not match previous declaration"
def patches
p = []
# Fix for mkdir behavior change in 10.9: http://notmuchmail.org/pipermail/notmuch/2013/016388.html
p << DATA
# Fix for building with clang: http://git.notmuchmail.org/git/notmuch/commit/db465e443f3cd5ef3ba52304ab8b5dc6e0d7e620
p << "http://git.notmuchmail.org/git/notmuch/patch/db465e443f3cd5ef3ba52304ab8b5dc6e0d7e620"
end
def install
@ -40,10 +44,28 @@ class Notmuch < Formula
end
system "./configure", *args
if ARGV.verbose?
system "make install V=1"
else
system "make install"
end
system "make", "V=1", "install"
end
end
__END__
diff --git a/Makefile.local b/Makefile.local
index 72524eb..c85e09c 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -236,11 +236,11 @@ endif
quiet ?= $($(shell echo $1 | sed -e s'/ .*//'))
%.o: %.cc $(global_deps)
- @mkdir -p .deps/$(@D)
+ @mkdir -p $(patsubst %/.,%,.deps/$(@D))
$(call quiet,CXX $(CPPFLAGS) $(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d
%.o: %.c $(global_deps)
- @mkdir -p .deps/$(@D)
+ @mkdir -p $(patsubst %/.,%,.deps/$(@D))
$(call quiet,CC $(CPPFLAGS) $(CFLAGS)) -c $(FINAL_CFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d
.PHONY : clean
--
1.8.4.2