aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libxml2.rb
diff options
context:
space:
mode:
authorJustin Clift2010-11-02 17:01:25 +1100
committerAdam Vandenberg2010-11-02 07:32:53 -0700
commit04d0d8f398f27bfd61c947973df15087d2e83820 (patch)
tree8df0742149fbef05c964fa590acfee6f24e294cc /Library/Formula/libxml2.rb
parent7fa3251feeb64bd7424673b52a6d1afdeb93c2bf (diff)
downloadhomebrew-04d0d8f398f27bfd61c947973df15087d2e83820.tar.bz2
Updated formula: libxml2
Adds a --with-python option, addressing Homebrew issue #2303: http://github.com/mxcl/homebrew/issues/issue/2303/ Signed-off-by: Adam Vandenberg <flangy@gmail.com> Fixes #2303 Fixes #3025
Diffstat (limited to 'Library/Formula/libxml2.rb')
-rw-r--r--Library/Formula/libxml2.rb16
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"