homebrew-core/Formula/freetds.rb

41 lines
917 B
Ruby
Raw Normal View History

2009-11-05 02:43:32 +00:00
require 'formula'
class Freetds < Formula
homepage 'http://www.freetds.org/'
url 'http://mirrors.ibiblio.org/freetds/stable/freetds-0.91.tar.gz'
sha1 '3ab06c8e208e82197dc25d09ae353d9f3be7db52'
head 'https://git.gitorious.org/freetds/freetds.git'
2012-08-28 05:04:48 +00:00
depends_on "pkg-config" => :build
depends_on "unixodbc" => :optional
2009-11-05 02:43:32 +00:00
if build.head?
depends_on :automake
depends_on :libtool
end
2009-11-05 02:43:32 +00:00
def install
system "autoreconf -i" if build.head?
args = %W[--prefix=#{prefix}
--with-openssl=/usr/bin
--with-tdsver=7.1
--mandir=#{man}
]
2012-08-28 05:04:48 +00:00
if build.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
def test
system "#{bin}/tsql", "-C"
end
2009-11-05 02:43:32 +00:00
end