diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/libxml2.rb | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/Library/Formula/libxml2.rb b/Library/Formula/libxml2.rb index 1b0b1b29e..f30967f11 100644 --- a/Library/Formula/libxml2.rb +++ b/Library/Formula/libxml2.rb @@ -6,11 +6,21 @@ class Libxml2 < Formula mirror 'http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz' sha256 'fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb' + head 'https://git.gnome.org/browse/libxml2', :using => :git + keg_only :provided_by_osx option :universal - depends_on :python => :recommended + if build.head? + depends_on :python => :recommended # satisfied by Python 2.6+ + depends_on :autoconf + depends_on :automake + depends_on :libtool + else + # 2.9.1 cannot build with Python 2.6: https://github.com/mxcl/homebrew/issues/20249 + depends_on PythonInstalled.new("2.7") => :recommended + end fails_with :llvm do build 2326 @@ -19,6 +29,10 @@ class Libxml2 < Formula def install ENV.universal_binary if build.universal? + if build.head? + inreplace 'autogen.sh', 'libtoolize', 'glibtoolize' + system './autogen.sh' + end system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", @@ -47,13 +61,15 @@ class Libxml2 < Formula end def caveats - <<-EOS.undent - Even if this formula is keg_only, the python bindings have been linked - into the global site-packages for your convenience. - #{python.global_site_packages} + if build.with? 'python' + <<-EOS.undent + Even if this formula is keg_only, the python bindings have been linked + into the global site-packages for your convenience. + #{python.global_site_packages} EOS - end if build.with? 'python' + end + end def test if build.with? 'python' |
