diff --git a/Formula/mariadb-connector-c.rb b/Formula/mariadb-connector-c.rb new file mode 100644 index 0000000000..1bf749f445 --- /dev/null +++ b/Formula/mariadb-connector-c.rb @@ -0,0 +1,26 @@ +class MariadbConnectorC < Formula + desc "MariaDB database connector for C applications" + homepage "https://downloads.mariadb.org/connector-c/" + url "https://downloads.mariadb.org/f/connector-c-2.2.2/mariadb-connector-c-2.2.2-src.tar.gz" + sha256 "93f56ad9f08bbaf0da8ef03bc96f7093c426ae40dede60575d485e1b99e6406b" + + depends_on "cmake" => :build + depends_on "openssl" + + conflicts_with "mysql", "mariadb", "percona-server", + :because => "both install plugins" + + def install + args = std_cmake_args + args << "-DWITH_OPENSSL=On" + args << "-DOPENSSL_INCLUDE_DIR=#{Formula["openssl"].opt_include}" + args << "-DCOMPILATION_COMMENT=Homebrew" + + system "cmake", ".", *args + system "make", "install" + end + + test do + system "#{bin}/mariadb_config", "--cflags" + end +end diff --git a/Formula/mariadb.rb b/Formula/mariadb.rb index 33f8abd546..fede594c18 100644 --- a/Formula/mariadb.rb +++ b/Formula/mariadb.rb @@ -30,6 +30,8 @@ class Mariadb < Formula conflicts_with "mysql-connector-c", :because => "both install MySQL client libraries" conflicts_with "mytop", :because => "both install `mytop` binaries" + conflicts_with "mariadb-connector-c", + :because => "both install plugins" patch do # fix compilation error https://mariadb.atlassian.net/browse/MDEV-9322 diff --git a/Formula/mysql.rb b/Formula/mysql.rb index f461f16a72..8f52b5c8d8 100644 --- a/Formula/mysql.rb +++ b/Formula/mysql.rb @@ -33,6 +33,8 @@ class Mysql < Formula :because => "mysql, mariadb, and percona install the same binaries." conflicts_with "mysql-connector-c", :because => "both install MySQL client libraries" + conflicts_with "mariadb-connector-c", + :because => "both install plugins" fails_with :llvm do build 2326 diff --git a/Formula/percona-server.rb b/Formula/percona-server.rb index a8b65e05d4..a89a4a705d 100644 --- a/Formula/percona-server.rb +++ b/Formula/percona-server.rb @@ -42,6 +42,8 @@ class PerconaServer < Formula :because => "percona, mariadb, and mysql install the same binaries." conflicts_with "mysql-connector-c", :because => "both install MySQL client libraries" + conflicts_with "mariadb-connector-c", + :because => "both install plugins" fails_with :llvm do build 2334