From 09036f8958c92b1f964721def962566ed4ca9907 Mon Sep 17 00:00:00 2001 From: Vinyl Darkscratch Date: Fri, 26 Jan 2018 23:54:28 -0800 Subject: [PATCH] mariadb-connector-odbc 3.0.2 (new formula) Closes #23342. Signed-off-by: ilovezfs --- Formula/mariadb-connector-odbc.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Formula/mariadb-connector-odbc.rb diff --git a/Formula/mariadb-connector-odbc.rb b/Formula/mariadb-connector-odbc.rb new file mode 100644 index 0000000000..4528604832 --- /dev/null +++ b/Formula/mariadb-connector-odbc.rb @@ -0,0 +1,24 @@ +class MariadbConnectorOdbc < Formula + desc "Database driver using the industry standard ODBC API" + homepage "https://downloads.mariadb.org/connector-odbc/" + url "https://downloads.mariadb.org/f/connector-odbc-3.0.2/mariadb-connector-odbc-3.0.2-ga-src.tar.gz" + sha256 "eba4fbda21ae9d50c94d2cd152f0ec14dde3989522f41ef7d22aa0948882ff93" + + depends_on "cmake" => :build + depends_on "mariadb-connector-c" + depends_on "openssl" + depends_on "unixodbc" + + def install + system "cmake", ".", "-DMARIADB_FOUND=1", + "-DWITH_OPENSSL=1", + "-DOPENSSL_INCLUDE_DIR=#{Formula["openssl"].opt_include}", + *std_cmake_args + system "make", "install" + end + + test do + output = shell_output("#{Formula["unixodbc"].opt_bin}/dltest #{lib}/libmaodbc.dylib") + assert_equal "SUCCESS: Loaded #{lib}/libmaodbc.dylib", output.chomp + end +end