class Freetds < Formula desc "Libraries to talk to Microsoft SQL Server and Sybase databases" homepage "http://www.freetds.org/" url "http://www.freetds.org/files/stable/freetds-1.00.104.tar.gz" sha256 "c4f51525f2dd722fe3651913d4ea194798211293f195c38fc3933cc6db1dae42" bottle do sha256 "90914c82e7bcc6dd60a71a380e77ddd32a8d87dcbbee8de7b749fbe0eb025906" => :mojave sha256 "da0b1d22579cf3e949ab1b9692a0cc8a9860fa264c9fc523324440705072de7b" => :high_sierra sha256 "5eb80bcc14d56d4c7aa389f5883bcc0b852f3cd087144dee361c5453c464820f" => :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 option "with-msdblib", "Enable Microsoft behavior in the DB-Library API where it diverges from Sybase's" depends_on "pkg-config" => :build depends_on "openssl" depends_on "unixodbc" def install args = %W[ --prefix=#{prefix} --with-tdsver=7.3 --mandir=#{man} --sysconfdir=#{etc} --with-unixodbc=#{Formula["unixodbc"].opt_prefix} --with-openssl=#{Formula["openssl"].opt_prefix} --enable-sybase-compat --enable-krb5 --enable-odbc-wide ] if build.with? "msdblib" args << "--enable-msdblib" end 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