aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-11-15 16:37:22 -0600
committerJack Nagel2013-11-15 16:37:22 -0600
commit466d788dd6fea71ca6528cff33f6bfa5a12e82b7 (patch)
tree5f1264cf18acae6b9cb16fd2e2fe1af2e1bd1eb4 /Library
parentbf9a1c334aaf6d2b62d0e72f970c2849d8c42f54 (diff)
downloadhomebrew-466d788dd6fea71ca6528cff33f6bfa5a12e82b7.tar.bz2
mysql: modernize style, add compilation comment
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mysql.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb
index fde08a458..6ec1f95a3 100644
--- a/Library/Formula/mysql.rb
+++ b/Library/Formula/mysql.rb
@@ -61,31 +61,32 @@ class Mysql < Formula
-DINSTALL_MANDIR=share/man
-DINSTALL_DOCDIR=share/doc/#{name}
-DINSTALL_INFODIR=share/info
- -DINSTALL_MYSQLSHAREDIR=share/#{name}
+ -DINSTALL_MYSQLSHAREDIR=share/mysql
-DWITH_SSL=yes
-DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci
-DSYSCONFDIR=#{etc}
+ -DCOMPILATION_COMMENT=Homebrew
]
# To enable unit testing at build, we need to download the unit testing suite
- if build.include? 'with-tests'
+ if build.with? 'tests'
args << "-DENABLE_DOWNLOADS=ON"
else
args << "-DWITH_UNIT_TESTS=OFF"
end
# Build the embedded server
- args << "-DWITH_EMBEDDED_SERVER=ON" if build.include? 'with-embedded'
+ args << "-DWITH_EMBEDDED_SERVER=ON" if build.with? 'embedded'
# Compile with readline unless libedit is explicitly chosen
- args << "-DWITH_READLINE=yes" unless build.include? 'with-libedit'
+ args << "-DWITH_READLINE=yes" unless build.with? 'libedit'
# Compile with ARCHIVE engine enabled if chosen
- args << "-DWITH_ARCHIVE_STORAGE_ENGINE=1" if build.include? 'with-archive-storage-engine'
+ args << "-DWITH_ARCHIVE_STORAGE_ENGINE=1" if build.with? 'archive-storage-engine'
# Compile with BLACKHOLE engine enabled if chosen
- args << "-DWITH_BLACKHOLE_STORAGE_ENGINE=1" if build.include? 'with-blackhole-storage-engine'
+ args << "-DWITH_BLACKHOLE_STORAGE_ENGINE=1" if build.with? 'blackhole-storage-engine'
# Make universal for binding to universal applications
args << "-DCMAKE_OSX_ARCHITECTURES='#{Hardware::CPU.universal_archs.as_cmake_arch_flags}'" if build.universal?
@@ -112,12 +113,14 @@ class Mysql < Formula
# Link the setup script into bin
ln_s prefix+'scripts/mysql_install_db', bin+'mysql_install_db'
+
# Fix up the control script and link into bin
inreplace "#{prefix}/support-files/mysql.server" do |s|
s.gsub!(/^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2")
# pidof can be replaced with pgrep from proctools on Mountain Lion
s.gsub!(/pidof/, 'pgrep') if MacOS.version >= :mountain_lion
end
+
ln_s "#{prefix}/support-files/mysql.server", bin
# Move mysqlaccess to libexec