aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Nixon2015-02-22 01:45:43 -0800
committerMike McQuaid2015-02-24 09:05:36 +0000
commita62b8cd3f6c061074c5a21cacc3030dd5709e154 (patch)
tree801e89e65aeac265ebc4e3059766bc4cf2c47a47
parent94ceed52226483f5bd5cf69c8fc1e915bb6d9403 (diff)
downloadhomebrew-a62b8cd3f6c061074c5a21cacc3030dd5709e154.tar.bz2
mysql-cluster: fix 404.
Closes #37065. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/mysql-cluster.rb64
1 files changed, 33 insertions, 31 deletions
diff --git a/Library/Formula/mysql-cluster.rb b/Library/Formula/mysql-cluster.rb
index 7b1fe0782..419aedeba 100644
--- a/Library/Formula/mysql-cluster.rb
+++ b/Library/Formula/mysql-cluster.rb
@@ -1,24 +1,26 @@
-require 'formula'
-
class MysqlCluster < Formula
- homepage 'http://www.mysql.com/cluster/'
- url 'http://mysql.llarian.net/Downloads/MySQL-Cluster-7.3/mysql-cluster-gpl-7.3.4.tar.gz'
- sha1 '01003903da6802885bc98565ebe07f76714488fe'
+ homepage "https://www.mysql.com/products/cluster/"
+ url "https://dev.mysql.com/get/Downloads/MySQL-Cluster-7.3/mysql-cluster-gpl-7.3.8.tar.gz"
+ sha1 "f70ac7955343765146c556576c8b13dbedf9c593"
+
+ # Fix me: if you can get this to build on Yosemite, send a pull request!
+ depends_on MaximumMacOSRequirement => :mavericks
- depends_on 'cmake' => :build
- depends_on 'pidof' unless MacOS.version >= :mountain_lion
+ depends_on :java => "1.7+"
+ depends_on "cmake" => :build
+ depends_on "pidof" unless MacOS.version >= :mountain_lion
option :universal
- option 'with-tests', 'Build with unit tests'
- option 'with-embedded', 'Build the embedded server'
- option 'with-libedit', 'Compile with editline wrapper instead of readline'
- option 'with-archive-storage-engine', 'Compile with the ARCHIVE storage engine enabled'
- option 'with-blackhole-storage-engine', 'Compile with the BLACKHOLE storage engine enabled'
- option 'enable-local-infile', 'Build with local infile loading support'
- option 'enable-debug', 'Build with debug support'
-
- conflicts_with 'memcached', :because => 'both install `bin/memcached`'
- conflicts_with 'mysql', 'mariadb', 'percona-server',
+ option "with-tests", "Build with unit tests"
+ option "with-embedded", "Build the embedded server"
+ option "with-libedit", "Compile with editline wrapper instead of readline"
+ option "with-archive-storage-engine", "Compile with the ARCHIVE storage engine enabled"
+ option "with-blackhole-storage-engine", "Compile with the BLACKHOLE storage engine enabled"
+ option "enable-local-infile", "Build with local infile loading support"
+ option "enable-debug", "Build with debug support"
+
+ conflicts_with "memcached", :because => "both install `bin/memcached`"
+ conflicts_with "mysql", "mariadb", "percona-server",
:because => "mysql, mariadb, and percona install the same binaries."
fails_with :clang do
@@ -73,14 +75,14 @@ class MysqlCluster < Formula
end
# Build with local infile loading support
- args << "-DENABLED_LOCAL_INFILE=1" if build.include? 'enable-local-infile'
+ args << "-DENABLED_LOCAL_INFILE=1" if build.include? "enable-local-infile"
# Build with debug support
- args << "-DWITH_DEBUG=1" if build.include? 'enable-debug'
+ args << "-DWITH_DEBUG=1" if build.include? "enable-debug"
system "cmake", *args
system "make"
- system "make install"
+ system "make", "install"
# Create default directories and configuration files
(var+"mysql-cluster/ndb_data").mkpath
@@ -89,16 +91,16 @@ class MysqlCluster < Formula
(var+"mysql-cluster/conf/my.cnf").write my_cnf unless File.exist? var+"mysql-cluster/conf/my.cnf"
(var+"mysql-cluster/conf/config.ini").write config_ini unless File.exist? var+"mysql-cluster/conf/config.ini"
- plist_path('ndb_mgmd').write ndb_mgmd_startup_plist('ndb_mgmd')
- plist_path('ndb_mgmd').chmod 0644
- plist_path('ndbd').write ndbd_startup_plist('ndbd')
- plist_path('ndbd').chmod 0644
- plist_path('mysqld').write mysqld_startup_plist('mysqld')
- plist_path('mysqld').chmod 0644
+ plist_path("ndb_mgmd").write ndb_mgmd_startup_plist("ndb_mgmd")
+ plist_path("ndb_mgmd").chmod 0644
+ plist_path("ndbd").write ndbd_startup_plist("ndbd")
+ plist_path("ndbd").chmod 0644
+ plist_path("mysqld").write mysqld_startup_plist("mysqld")
+ plist_path("mysqld").chmod 0644
- # Don't create databases inside of the prefix!
+ # Don"t create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
- rm_rf prefix+'data'
+ rm_rf prefix+"data"
# Link the setup script into bin
bin.install_symlink prefix/"scripts/mysql_install_db"
@@ -106,7 +108,7 @@ class MysqlCluster < Formula
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
+ s.gsub!(/pidof/, "pgrep") if MacOS.version >= :mountain_lion
end
bin.install_symlink prefix/"support-files/mysql.server"
@@ -185,12 +187,12 @@ class MysqlCluster < Formula
# Override Formula#plist_name
def plist_name(extra = nil)
- (extra) ? super()+'-'+extra : super()+'-ndb_mgmd'
+ (extra) ? super()+"-"+extra : super()+"-ndb_mgmd"
end
# Override Formula#plist_path
def plist_path(extra = nil)
- (extra) ? super().dirname+(plist_name(extra)+'.plist') : super()
+ (extra) ? super().dirname+(plist_name(extra)+".plist") : super()
end
def mysqld_startup_plist(name); <<-EOS.undent