63 lines
1.6 KiB
Ruby
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.4.tar.gz"
|
|
sha256 "e04de1411bb0459eb4a2514b0d3272898d84684edac9c2f702c0844f802ffa85"
|
|
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 "7c5ceaed73b0bbed23cf1925db1da5ccc2e44f32c8d38302052d4f6babdc2e45" => :catalina
|
|
sha256 "01bcc33082f624dddac2c413d1e44812579efef6ce5ba64d5df32ac299377e3a" => :mojave
|
|
sha256 "d5f6663aec665c2affb70eab7ece25a0e10b2170e5ea27f72cd675fc99dfbfe7" => :high_sierra
|
|
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
|