aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJannis Leidel2011-08-01 13:28:09 +0200
committerAdam Vandenberg2011-08-01 08:10:10 -0700
commit1b464d10ffd353fec80017d9823048e06e567f97 (patch)
tree76474c1ff6fbc1659d960369371d101a8d93d9ff /Library/Formula
parentd8c8097237a2fc31bde3bf744bae7781ac5c434e (diff)
downloadhomebrew-1b464d10ffd353fec80017d9823048e06e567f97.tar.bz2
Xapian 1.2.6
Also, changed the way the Python bindings are installed. The latter change is needed because `/Library/Python` is owned by root in Lion and would prevent the installation of the compiled Python module. Instead this is following the technique used in other formulas -- installing to lib/python and having to add that directory to `PYTHONPATH`. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/xapian.rb31
1 files changed, 25 insertions, 6 deletions
diff --git a/Library/Formula/xapian.rb b/Library/Formula/xapian.rb
index b74f4b639..46dcbc730 100644
--- a/Library/Formula/xapian.rb
+++ b/Library/Formula/xapian.rb
@@ -1,15 +1,15 @@
require 'formula'
class XapianBindings < Formula
- url 'http://oligarchy.co.uk/xapian/1.2.4/xapian-bindings-1.2.4.tar.gz'
+ url 'http://oligarchy.co.uk/xapian/1.2.6/xapian-bindings-1.2.6.tar.gz'
homepage 'http://xapian.org'
- sha1 '13611f09cdbca8424c871c79d14c8e75b6547a9c'
+ sha1 'd42d418c1873c607427c7cfb293477aa35428e4c'
end
class Xapian < Formula
- url 'http://oligarchy.co.uk/xapian/1.2.4/xapian-core-1.2.4.tar.gz'
+ url 'http://oligarchy.co.uk/xapian/1.2.6/xapian-core-1.2.6.tar.gz'
homepage 'http://xapian.org'
- sha1 'c269e0f711ff4c9423d6301c3f7b949cc85a01b4'
+ sha1 '342c140af6c4cc18f1922f79e3f2fb855127e9ff'
def options
[
@@ -51,9 +51,18 @@ class Xapian < Formula
]
args << arg_for_lang('ruby')
- args << arg_for_lang('python')
args << arg_for_lang('java')
- args << "MACOX_DEPLOYMENT_TARGET=10.4" if ARGV.include? '--python'
+
+ if ARGV.include? '--python'
+ python_lib = lib + "python"
+ ENV.append 'PYTHONPATH', python_lib
+ python_lib.mkpath
+ ENV['OVERRIDE_MACOSX_DEPLOYMENT_TARGET'] = '10.4'
+ ENV['PYTHON_LIB'] = "#{python_lib}"
+ args << "--with-python"
+ else
+ args << "--without-python"
+ end
if ARGV.include? '--php'
extension_dir = lib+'php/extensions'
@@ -68,4 +77,14 @@ class Xapian < Formula
end
end
end
+
+ def caveats
+ s = ""
+ if ARGV.include? "--python"
+ s += <<-EOS.undent
+ The Python bindings won't function until you amend your PYTHONPATH like so:
+ export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/python:$PYTHONPATH
+ EOS
+ end
+ end
end