mysql: modernize style, add compilation comment
This commit is contained in:
parent
3447f0447e
commit
a5d3b67607
1 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue