aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJannis Leidel2009-10-21 21:52:59 +0200
committerMax Howell2009-12-02 12:53:00 +0000
commit32060a875a07ead8ddc001470d0de0ffb4b041f3 (patch)
treedb0e25a4232cae2cf1f9ab623dc30eb2dec90d89 /Library/Formula
parentd0af1505bd0afa67d8fb10aab43474b1b42713b2 (diff)
downloadhomebrew-32060a875a07ead8ddc001470d0de0ffb4b041f3.tar.bz2
Added xapian formula
Xapian is a highly adaptable toolkit which allows developers to easily add advanced indexing and search facilities to their own applications. It supports the Probabilistic Information Retrieval model and also supports a rich set of boolean query operators. This includes the xapian bindings for PHP, Ruby, Java and Python.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/xapian.rb71
1 files changed, 71 insertions, 0 deletions
diff --git a/Library/Formula/xapian.rb b/Library/Formula/xapian.rb
new file mode 100644
index 000000000..2a2a4ff2a
--- /dev/null
+++ b/Library/Formula/xapian.rb
@@ -0,0 +1,71 @@
+require 'formula'
+
+class XapianBindings <Formula
+ url 'http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.0.16.tar.gz'
+ homepage 'http://xapian.org'
+ md5 'c330b2ccc451c890916c44446e148f07'
+end
+
+class Xapian <Formula
+ url 'http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.0.16.tar.gz'
+ homepage 'http://xapian.org'
+ md5 '19756e128d804faa6e7975a629ca3b70'
+
+ def options
+ [
+ ["--ruby", "Ruby bindings"],
+ ["--python", "Python bindings"],
+ ["--php", "PHP bindings"],
+ ["--java", "Java bindings"],
+ ]
+ end
+
+ def skip_clean? path
+ path.extname == '.la'
+ end
+
+ def install
+ ENV.O3 # takes forever otherwise
+
+ system "./configure", "--prefix=#{prefix}", "--disable-assertions",
+ "--disable-dependency-tracking"
+ system "make install"
+
+ XapianBindings.new.brew do
+ if ARGV.include? '--ruby' or ARGV.include? '--python' or ARGV.include? '--java' or ARGV.include? '--php'
+ args = [
+ "--prefix=#{prefix}",
+ "--disable-debug",
+ "--disable-dependency-tracking",
+ "--without-csharp",
+ "--without-tcl"
+ ]
+ if ARGV.include? '--ruby'
+ args << "--with-ruby"
+ else
+ args << "--without-ruby"
+ end
+ if ARGV.include? '--python'
+ args << "--with-python"
+ else
+ args << "--without-python"
+ end
+ if ARGV.include? '--php'
+ lib.mkdir
+ extension_dir = (lib+'php'+'extensions')
+ extension_dir.mkdir
+ args << "--with-php PHP_EXTENSION_DIR=#{extension_dir}"
+ else
+ args << "--without-php"
+ end
+ if ARGV.include? '--java'
+ args << "--with-java"
+ else
+ args << "--without-java"
+ end
+ system "./configure", *args
+ system "make install"
+ end
+ end
+ end
+end \ No newline at end of file