aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorSteven G. Harms2012-03-26 13:34:29 -0700
committerAdam Vandenberg2012-04-01 09:39:33 -0700
commitf81ce4f871275f437ad3d06df4274e9dfe03185b (patch)
treec6f3dbbba6a82b3ead35cfb17264b9b9ac30b204 /Library/Formula
parentaf1d9f18bb14cdecf17427f655bab0dbe42b249b (diff)
downloadhomebrew-f81ce4f871275f437ad3d06df4274e9dfe03185b.tar.bz2
Sphinx 2.0.4
Also adds a workaround for clang/llvm Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/sphinx.rb36
1 files changed, 34 insertions, 2 deletions
diff --git a/Library/Formula/sphinx.rb b/Library/Formula/sphinx.rb
index e39f5102e..26ea99411 100644
--- a/Library/Formula/sphinx.rb
+++ b/Library/Formula/sphinx.rb
@@ -10,14 +10,23 @@ end
class Sphinx < Formula
homepage 'http://www.sphinxsearch.com'
- url 'http://sphinxsearch.com/files/sphinx-2.0.3-release.tar.gz'
- md5 'a1293aecd5034aa797811610beb7ba89'
+ url 'http://sphinxsearch.com/files/sphinx-2.0.4-release.tar.gz'
+ md5 '7da4df3df3decb24d8c6fb8f47de1d3d'
head 'http://sphinxsearch.googlecode.com/svn/trunk/'
fails_with_llvm "ld: rel32 out of range in _GetPrivateProfileString from /usr/lib/libodbc.a(SQLGetPrivateProfileString.o)",
:build => 2334
+ # Patch the configure script to run under clang, preventing the error:
+ # configure: error: Gcc version error. Minspec is 3.4
+ # Reported upstream:
+ # * http://sphinxsearch.com/bugs/view.php?id=1123
+ # Discussion:
+ # * https://github.com/mxcl/homebrew/issues/10016
+ # * https://github.com/mxcl/homebrew/pull/10698
+ def patches; DATA; end
+
def install
lstem = Pathname.pwd+'libstemmer_c'
Libstemmer.new.brew { lstem.install Dir['*'] }
@@ -34,6 +43,14 @@ class Sphinx < Formula
args << "--with-pgsql" if which 'pg_config'
args << "--without-mysql" unless which 'mysql'
+ # Sphinx 2.0.3 does not build under clang 3.1. It fails with:
+ # sphinxexpr.cpp:1799:11: error: use of undeclared identifier 'ExprEval'
+ # Discussion:
+ # * https://github.com/mxcl/homebrew/issues/10016
+ # * https://github.com/mxcl/homebrew/pull/10698
+ # FIXME This should be replaced with fails_with_clang once available
+ ENV.llvm if ENV.compiler == :clang
+
system "./configure", *args
system "make install"
end
@@ -58,3 +75,18 @@ class Sphinx < Formula
EOS
end
end
+
+__END__
+diff --git a/configure b/configure
+index aebac75..82d6d05 100755
+--- a/configure
++++ b/configure
+@@ -4361,7 +4361,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ #ifdef __GNUC__
+ #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 3)
+-void main() {}
++int main() {}
+ #else
+ syntax error
+ #endif