Skip to content

Commit

Permalink
mariadb: style nits
Browse files Browse the repository at this point in the history
  • Loading branch information
DomT4 committed Jul 2, 2016
1 parent 6709683 commit b5ad8f5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Formula/mariadb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ class Mariadb < Formula
sha256 "09ecb41f988d051bd3eb4f0ddb6823a60c37e33eaaf4a5830a0b7e658aac8993" => :mavericks
end

# upstream fix for compilation error, marked fixed for 10.1.16
# https://jira.mariadb.org/browse/MDEV-10322
patch :DATA

option :universal
option "with-test", "Keep test when installing"
option "with-bench", "Keep benchmark app when installing"
Expand All @@ -38,6 +34,10 @@ class Mariadb < Formula
conflicts_with "mariadb-connector-c",
:because => "both install plugins"

# upstream fix for compilation error, marked fixed for 10.1.16
# https://jira.mariadb.org/browse/MDEV-10322
patch :DATA

def install
# Don't hard-code the libtool path. See:
# https://github.com/Homebrew/homebrew/issues/20185
Expand Down Expand Up @@ -107,18 +107,18 @@ def install
system "make", "install"

# Fix my.cnf to point to #{etc} instead of /etc
(etc+"my.cnf.d").mkpath
(etc/"my.cnf.d").mkpath
inreplace "#{etc}/my.cnf" do |s|
s.gsub!("!includedir /etc/my.cnf.d", "!includedir #{etc}/my.cnf.d")
end
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"
rm_rf prefix/"data"

(prefix+"mysql-test").rmtree if build.without? "test" # save 121MB!
(prefix+"sql-bench").rmtree if build.without? "bench"
(prefix/"mysql-test").rmtree if build.without? "test" # save 121MB!
(prefix/"sql-bench").rmtree if build.without? "bench"

# Link the setup script into bin
bin.install_symlink prefix/"scripts/mysql_install_db"
Expand Down Expand Up @@ -150,7 +150,7 @@ def install

def post_install
# Make sure the var/mysql directory exists
(var+"mysql").mkpath
(var/"mysql").mkpath
unless File.exist? "#{var}/mysql/mysql/user.frm"
ENV["TMPDIR"] = nil
system "#{bin}/mysql_install_db", "--verbose", "--user=#{ENV["USER"]}",
Expand Down Expand Up @@ -195,7 +195,7 @@ def plist; <<-EOS.undent

test do
if build.with? "test"
(prefix+"mysql-test").cd do
(prefix/"mysql-test").cd do
system "./mysql-test-run.pl", "status"
end
else
Expand Down

0 comments on commit b5ad8f5

Please sign in to comment.