2010-06-22 16:36:10 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mdbtools < Formula
|
2012-06-27 16:29:39 +00:00
|
|
|
homepage 'https://github.com/brianb/mdbtools/'
|
2013-10-19 14:06:00 +00:00
|
|
|
url "https://github.com/brianb/mdbtools/archive/0.7.1.tar.gz"
|
|
|
|
sha1 '33b746f29c1308909a1e82546ec24e8f835d461a'
|
|
|
|
|
|
|
|
option 'with-man-pages', 'Build manual pages'
|
2010-06-22 16:36:10 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2013-10-19 14:06:00 +00:00
|
|
|
depends_on 'txt2man' => :build if build.include? 'with-man-pages'
|
2010-06-22 16:36:10 +00:00
|
|
|
depends_on 'glib'
|
2012-11-11 03:12:26 +00:00
|
|
|
depends_on 'readline'
|
2010-06-22 16:36:10 +00:00
|
|
|
|
2012-07-07 18:08:22 +00:00
|
|
|
depends_on :automake
|
|
|
|
depends_on :libtool
|
2012-02-27 03:44:55 +00:00
|
|
|
|
2012-06-27 16:29:39 +00:00
|
|
|
def install
|
2013-04-18 19:09:56 +00:00
|
|
|
ENV.deparallelize
|
2013-10-19 14:06:00 +00:00
|
|
|
|
|
|
|
args = ["--prefix=#{prefix}"]
|
|
|
|
args << "--disable-man" unless build.include? 'with-man-pages'
|
|
|
|
|
|
|
|
if MacOS.version == :snow_leopard
|
|
|
|
# aclocal does not respect ACLOCAL_PATH on 10.6
|
|
|
|
ENV['ACLOCAL'] = 'aclocal ' + ENV['ACLOCAL_PATH'].split(':').map {|p| '-I' + p}.join(' ')
|
|
|
|
mkdir "build-aux"
|
|
|
|
touch "build-aux/config.rpath"
|
|
|
|
# AM_PROG_AR does not exist in 10.6 automake
|
|
|
|
inreplace 'configure.ac', 'AM_PROG_AR', 'm4_ifdef([AM_PROG_AR], [AM_PROG_AR])'
|
|
|
|
end
|
|
|
|
|
|
|
|
system "autoreconf", "-i", "-f"
|
|
|
|
system "./configure", *args
|
2010-06-22 16:36:10 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|