diff --git a/Formula/mariadb@10.0.rb b/Formula/mariadb@10.0.rb deleted file mode 100644 index 9ecfc690a3..0000000000 --- a/Formula/mariadb@10.0.rb +++ /dev/null @@ -1,135 +0,0 @@ -class MariadbAT100 < Formula - desc "Drop-in replacement for MySQL" - homepage "https://mariadb.org/" - url "https://downloads.mariadb.org/f/mariadb-10.0.38/source/mariadb-10.0.38.tar.gz" - sha256 "022620ebeb4fb3744d101e72443ec55b4585e7d9a3d8c92aa846bc30e6808ac1" - revision 1 - - bottle do - sha256 "61dce8da7abdbbc2d7dd43374651d541a62a4df2c6a5439951a69726fcbc56f7" => :catalina - sha256 "f47bb89afee0eeff749247dc36c22a0755956b9aa3feb1d2b5050be516e7625a" => :mojave - sha256 "503f383f9a006ac25ea458b63e996c0fc5b25335fdcfe96ed76c4004ed4da30a" => :high_sierra - sha256 "e5a2cd7bd8c641d95ec73a8a02a5387d568d061ac2b09829ef651080a66cbc76" => :sierra - end - - keg_only :versioned_formula - - depends_on "cmake" => :build - depends_on "openssl@1.1" - - def install - # Set basedir and ldata so that mysql_install_db can find the server - # without needing an explicit path to be set. This can still - # be overridden by calling --basedir= when calling. - inreplace "scripts/mysql_install_db.sh" do |s| - s.change_make_var! "basedir", "\"#{prefix}\"" - s.change_make_var! "ldata", "\"#{var}/mysql\"" - end - - # -DINSTALL_* are relative to prefix - args = %W[ - -DMYSQL_DATADIR=#{var}/mysql - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_DOCDIR=share/doc/#{name} - -DINSTALL_INFODIR=share/info - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DWITH_PCRE=bundled - -DWITH_READLINE=yes - -DWITH_SSL=yes - -DWITH_UNIT_TESTS=OFF - -DDEFAULT_CHARSET=utf8mb4 - -DDEFAULT_COLLATION=utf8mb4_general_ci - -DINSTALL_SYSCONFDIR=#{etc} - -DCOMPILATION_COMMENT=Homebrew - ] - - # disable TokuDB, which is currently not supported on Mac OS X - args << "-DWITHOUT_TOKUDB=1" - - system "cmake", ".", *std_cmake_args, *args - system "make" - system "make", "install" - - # Fix my.cnf to point to #{etc} instead of /etc - (etc+"my.cnf.d").mkpath - inreplace "#{etc}/my.cnf", "!includedir /etc/my.cnf.d", - "!includedir #{etc}/my.cnf.d" - touch etc/"my.cnf.d/.homebrew_dont_prune_me" - - # Don't create databases inside of the prefix! - # See: https://github.com/Homebrew/homebrew/issues/4975 - rm_rf prefix+"data" - - # Save space - (prefix+"mysql-test").rmtree - (prefix+"sql-bench").rmtree - - # Link the setup script into bin - bin.install_symlink prefix/"scripts/mysql_install_db" - - # Fix up the control script and link into bin - inreplace "#{prefix}/support-files/mysql.server", /^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2" - - bin.install_symlink prefix/"support-files/mysql.server" - - # Install my.cnf that binds to 127.0.0.1 by default - (buildpath/"my.cnf").write <<~EOS - # Default Homebrew MySQL server config - [mysqld] - # Only allow connections from localhost - bind-address = 127.0.0.1 - EOS - etc.install "my.cnf" - end - - def post_install - # Make sure the var/mysql directory exists - (var+"mysql").mkpath - unless File.exist? "#{var}/mysql/mysql/user.frm" - ENV["TMPDIR"] = nil - system "#{bin}/mysql_install_db", "--verbose", "--user=#{ENV["USER"]}", - "--basedir=#{prefix}", "--datadir=#{var}/mysql", "--tmpdir=/tmp" - end - end - - def caveats; <<~EOS - A "/etc/my.cnf" from another install may interfere with a Homebrew-built - server starting up correctly. - - MySQL is configured to only allow connections from localhost by default - - To connect: - mysql -uroot - EOS - end - - plist_options :manual => "#{HOMEBREW_PREFIX}/opt/mariadb@10.0/bin/mysql.server start" - - def plist; <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/mysqld_safe - --datadir=#{var}/mysql - - RunAtLoad - - WorkingDirectory - #{var} - - - EOS - end - - test do - system "#{bin}/mysqld", "--version" - end -end diff --git a/formula_renames.json b/formula_renames.json index 14f112e9c0..9b2a957fea 100644 --- a/formula_renames.json +++ b/formula_renames.json @@ -120,7 +120,6 @@ "lua51": "lua@5.1", "lua@5.3": "lua", "mapnik2": "mapnik@2", - "mariadb100": "mariadb@10.0", "mat": "mat2", "maven31": "maven@3.1", "maven32": "maven@3.2",