diff options
Diffstat (limited to 'Library/Formula/libxml2.rb')
| -rw-r--r-- | Library/Formula/libxml2.rb | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Library/Formula/libxml2.rb b/Library/Formula/libxml2.rb index 7b7d0ee92..b1b99879c 100644 --- a/Library/Formula/libxml2.rb +++ b/Library/Formula/libxml2.rb @@ -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" |
