homebrew-core/Formula/mariadb-connector-c.rb

42 lines
1.4 KiB
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-3.1.11/mariadb-connector-c-3.1.11-src.tar.gz"
sha256 "3e6f6c399493fe90efdc21a3fe70c30434b7480e8195642a959f1dd7a0fa5b0f"
license "LGPL-2.1-or-later"
head "https://github.com/mariadb-corporation/mariadb-connector-c.git"
livecheck do
url "https://downloads.mariadb.org/connector-c/+releases/"
regex(%r{href=.*?connector-c/v?(\d+(?:\.\d+)+)/?["' >]}i)
end
bottle do
sha256 "0f98987f94fd7026a9d7b18ccfd417fca2eef6b3b5e795f5642edc1590250b19" => :big_sur
sha256 "a6c670fce92617a9d00943243b33a72b70477cad277d120c0662fb603d5165ab" => :catalina
sha256 "d49661c28ad85799cc966b04fff2722084ee307115c77028a93521eaa6e28643" => :mojave
sha256 "40eae30f00cb94eabe4ba08ae280d2075ab9a721409267e0932cb219b40eb19d" => :high_sierra
end
depends_on "cmake" => :build
depends_on "openssl@1.1"
uses_from_macos "curl"
conflicts_with "mariadb", because: "both install `mariadb_config`"
def install
args = std_cmake_args
args << "-DWITH_OPENSSL=On"
args << "-DOPENSSL_INCLUDE_DIR=#{Formula["openssl@1.1"].opt_include}"
args << "-DCOMPILATION_COMMENT=Homebrew"
system "cmake", ".", *args
system "make", "install"
end
test do
system "#{bin}/mariadb_config", "--cflags"
end
end