Last active
September 24, 2020 14:57
-
-
Save dasoran/d25c565c8a4ed4bf27d81b0a47e3e219 to your computer and use it in GitHub Desktop.
mysql-client@8.0.16.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MysqlClient < Formula | |
desc "Open source relational database management system" | |
homepage "https://dev.mysql.com/doc/refman/8.0/en/" | |
# Pinned at `8.0.*` | |
url "https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-8.0.16.tar.gz" | |
sha256 "7c936aa7bc9f4c462b24bade2e9abe1b3a6869ea19c46e78ec0a9b2a87a3d17f" | |
bottle do | |
sha256 "39470cf4e34f770eebda0c89249f90c18a84e6ef03d33ee464db90c0049d74aa" => :mojave | |
sha256 "8b73614068a82ed9f82f19e52fdd621adcd4d017fc3767703f216cbf7b00e60e" => :high_sierra | |
sha256 "8e3637ada6ee42d7e224809eab698e814befde0f164e276f7f91f1664f7460b2" => :sierra | |
sha256 "84a90d2d3f24f9270bf4d41eef99741a1ba16c65148672411e9ee9a676551c21" => :el_capitan | |
end | |
keg_only "conflicts with mysql" | |
depends_on "cmake" => :build | |
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 | |
-DFORCE_INSOURCE_BUILD=1 | |
] | |
system "cmake", ".", *std_cmake_args, *args | |
system "make", "install" | |
end | |
test do | |
assert_match version.to_s, shell_output("#{bin}/mysql --version") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment