Updated formula: libxml2

Adds a --with-python option, addressing Homebrew issue Homebrew/homebrew#2303:

  http://github.com/mxcl/homebrew/issues/issue/2303/

Signed-off-by: Adam Vandenberg <flangy@gmail.com>

Fixes Homebrew/homebrew#2303
Fixes Homebrew/homebrew#3025
This commit is contained in:
Justin Clift 2010-11-02 17:01:25 +11:00 committed by Adam Vandenberg
parent ec7821ba56
commit 2f55416cb2

View file

@ -7,9 +7,23 @@ class Libxml2 <Formula
keg_only :provided_by_osx
def options
# Works with the Python 2 formula
[['--with-python', 'Compile the libxml2 Python 2.x modules']]
end
def install
fails_with_llvm "Undefined symbols when linking", :build => "2326"
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
if ARGV.include? '--with-python'
python_prefix=`python-config --prefix`
ohai "Installing Python module to #{python_prefix}"
args << "--with-python=#{python_prefix}"
end
system "./configure", *args
system "make"
ENV.j1
system "make install"