From cf1a13a656d08100c15637b350c77a03eba6f93e Mon Sep 17 00:00:00 2001 From: Le Wang Date: Wed, 29 Feb 2012 13:24:56 +0800 Subject: [PATCH] update mdbtools to use author's github repo, and make change to compile with Lion. Signed-off-by: Adam Vandenberg --- Formula/mdbtools.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Formula/mdbtools.rb b/Formula/mdbtools.rb index cca638c140..bf57e0d340 100644 --- a/Formula/mdbtools.rb +++ b/Formula/mdbtools.rb @@ -1,9 +1,10 @@ require 'formula' class Mdbtools < Formula + url "https://github.com/brianb/mdbtools/tarball/0.7_rc1" homepage 'http://sourceforge.net/projects/mdbtools/' - # Last stable release won't build on OS X, but HEAD from CVS does. - head "cvs://:pserver:anonymous@mdbtools.cvs.sourceforge.net:/cvsroot/mdbtools:mdbtools" + # Use the github repo of the author instead of project CVS + head "https://github.com/brianb/mdbtools.git" depends_on 'pkg-config' => :build depends_on 'glib' @@ -17,8 +18,14 @@ class Mdbtools < Formula def install inreplace 'autogen.sh', 'libtool', 'glibtool' - system "NOCONFIGURE='yes' ./autogen.sh" - system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" + %w{src/libmdb/Makefile.am src/libmdb/Makefile.am src/sql/Makefile.am}.each do |f| + inreplace f, /,?\s*--version-script=.*?(?:[ \t,]|$)/, '' + end + + inreplace 'configure.in', /\s*--as-needed/, '' + + system "NOCONFIGURE='yes' ACLOCAL_FLAGS='-I#{HOMEBREW_PREFIX}/share/aclocal' ./autogen.sh" + system "./configure", "--prefix=#{prefix}", "--mandir=#{man}", "--disable-glibtest" system "make install" end end