homebrew-core/Formula/freetds.rb

63 lines
1.6 KiB
Ruby

class Freetds < Formula
desc "Libraries to talk to Microsoft SQL Server and Sybase databases"
homepage "https://www.freetds.org/"
url "https://www.freetds.org/files/stable/freetds-1.2.12.tar.gz"
sha256 "d0a3c96b9c706067a3f820ae603fa95e18114bb15730869351a90b4877fb15ee"
license "LGPL-2.0-or-later"
livecheck do
url "https://www.freetds.org/files/stable/"
regex(/href=.*?freetds[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
sha256 "4c27a482502a2fd43c0ba87e80fdb2d20c6dc4591a66f42bfd8783cbb4baa843" => :big_sur
sha256 "302555d485ec482552c205d10107cdaa16ad35c130f6255eccfc339841189504" => :catalina
sha256 "281afe402e9ca399b04a8e4d17ecf342af6a85b9f75c8ee74ea6259b6536872d" => :mojave
end
head do
url "https://github.com/FreeTDS/freetds.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "gettext" => :build
depends_on "libtool" => :build
end
depends_on "pkg-config" => :build
depends_on "openssl@1.1"
depends_on "unixodbc"
on_linux do
depends_on "readline"
end
def install
args = %W[
--prefix=#{prefix}
--with-tdsver=7.3
--mandir=#{man}
--sysconfdir=#{etc}
--with-unixodbc=#{Formula["unixodbc"].opt_prefix}
--with-openssl=#{Formula["openssl@1.1"].opt_prefix}
--enable-sybase-compat
--enable-krb5
--enable-odbc-wide
]
if build.head?
system "./autogen.sh", *args
else
system "./configure", *args
end
system "make"
ENV.deparallelize # Or fails to install on multi-core machines
system "make", "install"
end
test do
system "#{bin}/tsql", "-C"
end
end