27 lines
802 B
Ruby
27 lines
802 B
Ruby
|
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
|