homebrew-core/Formula/freetds.rb

60 lines
1.5 KiB
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'
2013-09-20 15:15:54 +00:00
head do
url 'https://git.gitorious.org/freetds/freetds.git'
2013-11-13 16:52:55 +00:00
depends_on :autoconf
depends_on :automake
depends_on :libtool
end
option :universal
option "enable-msdblib", "Enable Microsoft behavior in the DB-Library API where it diverges from Sybase's"
option "enable-sybase-compat", "Enable close compatibility with Sybase's ABI, at the expense of other features"
option "enable-odbc-wide", "Enable odbc wide, prevent unicode - MemoryError's"
2013-09-20 15:15:54 +00:00
depends_on "pkg-config" => :build
depends_on "unixodbc" => :optional
2009-11-05 02:43:32 +00:00
def install
system "autoreconf -i" if build.head?
args = %W[--prefix=#{prefix}
--with-openssl=#{MacOS.sdk_path}/usr
--with-tdsver=7.1
--mandir=#{man}
]
if build.with? "unixodbc"
2014-02-25 05:47:27 +00:00
args << "--with-unixodbc=#{Formula['unixodbc'].prefix}"
end
if build.include? "enable-msdblib"
args << "--enable-msdblib"
end
if build.include? "enable-sybase-compat"
args << "--enable-sybase-compat"
end
if build.include? "enable-odbc-wide"
args << "--enable-odbc-wide"
end
ENV.universal_binary if build.universal?
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
test do
system "#{bin}/tsql", "-C"
end
2009-11-05 02:43:32 +00:00
end