aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libxml2.rb
blob: 76aef96b8f9f233f45cabf232ef7d0cd39bf3379 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'formula'

class Libxml2 < Formula
  url 'ftp://xmlsoft.org/libxml2/libxml2-2.7.7.tar.gz'
  homepage 'http://xmlsoft.org'
  md5 '9abc9959823ca9ff904f1fbcf21df066'

  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"

    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"
  end
end