2009-11-05 02:43:32 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Freetds < Formula
|
|
|
|
homepage 'http://www.freetds.org/'
|
2012-05-25 15:58:52 +00:00
|
|
|
url 'http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-0.91.tar.gz'
|
|
|
|
sha1 '3ab06c8e208e82197dc25d09ae353d9f3be7db52'
|
|
|
|
|
|
|
|
depends_on "unixodbc" if ARGV.include? "--with-unixodbc"
|
|
|
|
|
|
|
|
def options
|
|
|
|
[['--with-unixodbc', "Compile against unixODBC."]]
|
|
|
|
end
|
2009-11-05 02:43:32 +00:00
|
|
|
|
|
|
|
def install
|
2012-05-25 15:58:52 +00:00
|
|
|
args = ["--prefix=#{prefix}",
|
|
|
|
"--with-tdsver=7.1",
|
|
|
|
"--mandir=#{man}"]
|
|
|
|
|
|
|
|
if ARGV.include? "--with-unixodbc"
|
|
|
|
args << "--with-unixodbc=#{Formula.factory('unixodbc').prefix}"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2009-11-05 02:43:32 +00:00
|
|
|
system 'make'
|
2011-08-24 21:23:36 +00:00
|
|
|
ENV.j1 # Or fails to install on multi-core machines
|
2009-11-05 02:43:32 +00:00
|
|
|
system 'make install'
|
|
|
|
end
|
|
|
|
end
|