homebrew-core/Formula/mysql-client.rb

72 lines
2.3 KiB
Ruby

class MysqlClient < Formula
desc "Open source relational database management system"
homepage "https://dev.mysql.com/doc/refman/8.0/en/"
url "https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-8.0.30.tar.gz"
sha256 "c331ac7a68099a2116097acbb14fd331423d486fe47ce0e346925111b44df69c"
license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" }
livecheck do
formula "mysql"
end
bottle do
sha256 arm64_monterey: "abccc4fa9808274f5bd66a1b9d02eabc114340738f2b1425eaff658365dddf47"
sha256 arm64_big_sur: "2a7d242c0bd023dd331ac079cc467e7d3f77477b78ab5110cdae68cb7aab17f3"
sha256 monterey: "a8b71724eb655a359756740ca25c755efd927700396935ca641c89de3822187b"
sha256 big_sur: "d9bf8ae6fb0548ee9bb981a88a3f09b9a3efffebc63ab14303979811cb59fee4"
sha256 catalina: "2ff83a77f27bf45216c66002dac0e7da45d11626099324f381ff49b2f323992a"
sha256 x86_64_linux: "6b0ae42f32c53f05cdf52c4fd1db04177e5a693dc748b8083d813a7eaf2a5875"
end
keg_only "it conflicts with mysql (which contains client libraries)"
depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "libevent"
depends_on "libfido2"
# GCC is not supported either, so exclude for El Capitan.
depends_on macos: :sierra if DevelopmentTools.clang_build_version < 900
depends_on "openssl@1.1"
depends_on "zlib" # Zlib 1.2.12+
depends_on "zstd"
uses_from_macos "libedit"
on_linux do
depends_on "gcc"
end
fails_with gcc: "5"
def install
# -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`)
args = %W[
-DFORCE_INSOURCE_BUILD=1
-DCOMPILATION_COMMENT=Homebrew
-DDEFAULT_CHARSET=utf8mb4
-DDEFAULT_COLLATION=utf8mb4_general_ci
-DINSTALL_DOCDIR=share/doc/#{name}
-DINSTALL_INCLUDEDIR=include/mysql
-DINSTALL_INFODIR=share/info
-DINSTALL_MANDIR=share/man
-DINSTALL_MYSQLSHAREDIR=share/mysql
-DWITH_BOOST=boost
-DWITH_EDITLINE=system
-DWITH_FIDO=system
-DWITH_LIBEVENT=system
-DWITH_ZLIB=system
-DWITH_ZSTD=system
-DWITH_SSL=yes
-DWITH_UNIT_TESTS=OFF
-DWITHOUT_SERVER=ON
]
system "cmake", ".", *std_cmake_args, *args
system "make", "install"
end
test do
assert_match version.to_s, shell_output("#{bin}/mysql --version")
end
end