From 466d788dd6fea71ca6528cff33f6bfa5a12e82b7 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 15 Nov 2013 16:37:22 -0600 Subject: mysql: modernize style, add compilation comment --- Library/Formula/mysql.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3