Skip to content

Instantly share code, notes, and snippets.

@kalbasit
Created May 26, 2014 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalbasit/ee5e43158d71cdd484b1 to your computer and use it in GitHub Desktop.
Save kalbasit/ee5e43158d71cdd484b1 to your computer and use it in GitHub Desktop.
Adding an extra env to inject liz.a
diff --git a/Library/Formula/notmuch.rb b/Library/Formula/notmuch.rb
index 4840475..019ce2a 100644
--- a/Library/Formula/notmuch.rb
+++ b/Library/Formula/notmuch.rb
@@ -12,9 +12,10 @@ class Notmuch < Formula
depends_on "gmime"
depends_on "zlib"
+ patch :DATA
+
def install
- ENV.append 'LDFLAGS', "-L#{Formula["zlib"].opt_lib}"
- ENV.append 'CPPFLAGS', "-I#{Formula["zlib"].opt_include}"
+ ENV.append 'ZLIBA', "#{Formula['zlib'].opt_lib}/libz.a"
args = ["--prefix=#{prefix}"]
if build.with? "emacs"
@@ -28,3 +29,21 @@ class Notmuch < Formula
system "make", "V=1", "install"
end
end
+
+__END__
+diff -Naur a/Makefile.local b/Makefile.local
+--- a/Makefile.local 2014-05-06 00:27:29.000000000 -0700
++++ b/Makefile.local 2014-05-26 11:00:41.000000000 -0700
+@@ -293,10 +293,10 @@
+ notmuch.o: version.stamp
+
+ notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libutil.a parse-time-string/libparse-time-string.a
+- $(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
++ $(call quiet,CXX $(CFLAGS)) $^ $(ZLIBA) $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
+
+ notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)
+- $(call quiet,$(FINAL_NOTMUCH_LINKER) $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@
++ $(call quiet,$(FINAL_NOTMUCH_LINKER) $(CFLAGS)) $(notmuch_client_modules) $(ZLIBA) $(FINAL_NOTMUCH_LDFLAGS) -o $@
+
+ .PHONY: install
+ install: all install-man
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment