53 lines
1.8 KiB
Ruby
53 lines
1.8 KiB
Ruby
class MysqlClient < Formula
|
|
desc "Open source relational database management system"
|
|
homepage "https://dev.mysql.com/doc/refman/5.7/en/"
|
|
# Pinned at `5.7.*`
|
|
url "https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.23.tar.gz"
|
|
sha256 "d05700ec5c1c6dae9311059dc1713206c29597f09dbd237bf0679b3c6438e87a"
|
|
|
|
bottle do
|
|
sha256 "8b73614068a82ed9f82f19e52fdd621adcd4d017fc3767703f216cbf7b00e60e" => :high_sierra
|
|
sha256 "8e3637ada6ee42d7e224809eab698e814befde0f164e276f7f91f1664f7460b2" => :sierra
|
|
sha256 "84a90d2d3f24f9270bf4d41eef99741a1ba16c65148672411e9ee9a676551c21" => :el_capitan
|
|
end
|
|
|
|
keg_only "conflicts with mysql"
|
|
|
|
depends_on "cmake" => :build
|
|
# https://github.com/Homebrew/homebrew-core/issues/1475
|
|
# Needs at least Clang 3.3, which shipped alongside Lion.
|
|
# Note: MySQL themselves don't support anything below El Capitan.
|
|
depends_on :macos => :lion
|
|
depends_on "openssl"
|
|
|
|
def install
|
|
# https://bugs.mysql.com/bug.php?id=87348
|
|
# Fixes: "ADD_SUBDIRECTORY given source
|
|
# 'storage/ndb' which is not an existing"
|
|
inreplace "CMakeLists.txt", "ADD_SUBDIRECTORY(storage/ndb)", ""
|
|
|
|
# -DINSTALL_* are relative to `CMAKE_INSTALL_PREFIX` (`prefix`)
|
|
args = %W[
|
|
-DCOMPILATION_COMMENT=Homebrew
|
|
-DDEFAULT_CHARSET=utf8
|
|
-DDEFAULT_COLLATION=utf8_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_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
|