homebrew-core/Formula/mysql-client@5.7.rb

50 lines
1.6 KiB
Ruby

class MysqlClientAT57 < Formula
desc "Open source relational database management system"
homepage "https://dev.mysql.com/doc/refman/5.7/en/"
url "https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-boost-5.7.29.tar.gz"
sha256 "00f514124de2bad1ba7b380cbbd46e316cae7fc7bc3a5621456cabf352f27978"
bottle do
sha256 "f6708680504eee30c923cd496380cd75e6e90b8b48c4b5fc76497e26d012d2b0" => :catalina
sha256 "a10197d6594410082510efcb27ab460265a1235ae9e7c8b8c3b604396cf9ef0c" => :mojave
sha256 "d1c843f81568ad49b6856d76b04d96069f9ddafcfe27162dee92ea0e7373cc97" => :high_sierra
end
keg_only :versioned_formula
depends_on "cmake" => :build
depends_on "openssl@1.1"
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