Skip to content

Instantly share code, notes, and snippets.

@bigeasy
Created April 10, 2011 15:59
Show Gist options
  • Select an option

  • Save bigeasy/912462 to your computer and use it in GitHub Desktop.

Select an option

Save bigeasy/912462 to your computer and use it in GitHub Desktop.
the libxml2 Homebrew brew with "--with-mem-debug" added
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
fails_with_llvm "Undefined symbols when linking", :build => "2326"
def options
# Works with the Python 2 formula
[['--with-python', 'Compile the libxml2 Python 2.x modules']]
end
def install
args = ["--disable-dependency-tracking", "--prefix=#{prefix}", "--with-mem-debug"]
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment