homebrew-core/Formula/freetds.rb

77 lines
2.4 KiB
Ruby
Raw Normal View History

2009-11-05 02:43:32 +00:00
class Freetds < Formula
desc "Libraries to talk to Microsoft SQL Server and Sybase databases"
homepage "http://www.freetds.org/"
url "ftp://ftp.freetds.org/pub/freetds/stable/freetds-0.95.21.tar.gz"
mirror "https://fossies.org/linux/privat/freetds-0.95.21.tar.gz"
sha256 "249ab1018642b12d0a2cf6d75d89c1ed89115a4717113e9b753d2dacb93392f8"
2014-08-22 18:04:04 +00:00
bottle do
2015-10-21 15:23:21 +00:00
sha256 "2b3112d6bd67a01fbc720350f38b110cbe833e5d5c7e0b91454a89e3dd6e3403" => :el_capitan
sha256 "8eead470f4dd7f3583ffc823b67ca064fb0507ca030fced68cf71b9e28c832ac" => :yosemite
sha256 "9d59f6a472e58dfa3cc56cff9709138647ea578281bdc3b0fea1ca930d77c075" => :mavericks
2014-08-22 18:04:04 +00:00
end
2013-09-20 15:15:54 +00:00
head do
url "https://github.com/FreeTDS/freetds.git"
2014-12-04 17:01:21 +00:00
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "gettext" => :build
2014-12-04 17:01:21 +00:00
depends_on "libtool" => :build
end
option :universal
option "with-msdblib", "Enable Microsoft behavior in the DB-Library API where it diverges from Sybase's"
option "with-sybase-compat", "Enable close compatibility with Sybase's ABI, at the expense of other features"
option "with-odbc-wide", "Enable odbc wide, prevent unicode - MemoryError's"
option "with-krb5", "Enable Kerberos support"
deprecated_option "enable-msdblib" => "with-msdblib"
deprecated_option "enable-sybase-compat" => "with-sybase-compat"
deprecated_option "enable-odbc-wide" => "with-odbc-wide"
deprecated_option "enable-krb" => "with-krb5"
2013-09-20 15:15:54 +00:00
depends_on "pkg-config" => :build
depends_on "unixodbc" => :optional
depends_on "openssl" => :recommended
2013-09-20 15:15:54 +00:00
2009-11-05 02:43:32 +00:00
def install
2014-04-22 22:04:44 +00:00
args = %W[
--prefix=#{prefix}
--with-tdsver=7.1
--mandir=#{man}
]
if build.with? "openssl"
args << "--with-openssl=#{Formula["openssl"].opt_prefix}"
end
if build.with? "unixodbc"
args << "--with-unixodbc=#{Formula["unixodbc"].opt_prefix}"
end
# Translate formula's "--with" options to configuration script's "--enable"
# options
%w[msdblib sybase-compat odbc-wide krb5].each do |option|
if build.with? option
args << "--enable-#{option}"
end
end
ENV.universal_binary if build.universal?
if build.head?
system "./autogen.sh", *args
else
system "./configure", *args
end
system "make"
2011-08-24 21:23:36 +00:00
ENV.j1 # Or fails to install on multi-core machines
system "make", "install"
2009-11-05 02:43:32 +00:00
end
test do
system "#{bin}/tsql", "-C"
end
2009-11-05 02:43:32 +00:00
end