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.28.tar.gz" sha256 "f16399315212117c08f9bdf8a0d682728b2ce82d691bcfbf25a770f413b6f2da" bottle do sha256 "8004b19b71ab02e1424f1641744d4b9cce92c2d30149bc6b6b0eb94350e24f32" => :catalina sha256 "8d878f87dcef2a2bbf5c5b6a3dfa9b275dd5473261f7c9c6d5aa15f48f12dee2" => :mojave sha256 "97a2d7da651e0b6fb762a39acc2586783444da6911efec3f858972165f32cda7" => :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