From e442d30b62b26853b1dfa8d95c71e58dcd384b76 Mon Sep 17 00:00:00 2001 From: Krzysztof Wilczynski Date: Tue, 30 Jul 2013 04:32:07 +0100 Subject: libmagic: add upstream patch to fix macro Add patch that removes extra bitwise OR in MAGIC_NO_CHECK_BUILTIN macro definition. This corrects quite incorrect code and will make some more stricter versions of cpp (C preprocessor) reporting an error during parsing. I will also address possible problem with Go's cgo breaking on OS X (Darwin). Signed-off-by: Krzysztof Wilczynski Signed-off-by: Misty De Meo --- Library/Formula/libmagic.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Library/Formula') diff --git a/Library/Formula/libmagic.rb b/Library/Formula/libmagic.rb index 46bbc709e..777ffc9bb 100644 --- a/Library/Formula/libmagic.rb +++ b/Library/Formula/libmagic.rb @@ -12,7 +12,13 @@ class Libmagic < Formula # Fixed upstream, should be in next release # See http://bugs.gw.com/view.php?id=230 - def patches; DATA; end if MacOS.version < :lion + def patches + p = [] + p << DATA if MacOS.version < :lion + # Fixes generaly incorrect code, plus issues with certain + # versions of cpp. + p << 'https://gist.github.com/kwilczynski/6108866/raw/15d1f0a2dba5da23e820b503e8551346a4d235eb/file-5.14.diff' + end def install ENV.universal_binary if build.universal? -- cgit v1.2.3