aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-05-09 20:49:37 -0500
committerJack Nagel2014-05-09 20:49:37 -0500
commit586cdc30bf9b30054d24edfa93e47287b9196ec6 (patch)
treef0cf18b881b735e264d471a70d359354f8f45871
parentb4489af33e1af04ebea22b99a37522596b2b4dec (diff)
downloadhomebrew-586cdc30bf9b30054d24edfa93e47287b9196ec6.tar.bz2
mysql-connector-odbc 5.3.2
-rw-r--r--Library/Formula/mysql-connector-odbc.rb43
1 files changed, 15 insertions, 28 deletions
diff --git a/Library/Formula/mysql-connector-odbc.rb b/Library/Formula/mysql-connector-odbc.rb
index aa5314cb8..8bc7363b6 100644
--- a/Library/Formula/mysql-connector-odbc.rb
+++ b/Library/Formula/mysql-connector-odbc.rb
@@ -1,39 +1,26 @@
-require 'formula'
+require "formula"
class MysqlConnectorOdbc < Formula
- homepage 'http://dev.mysql.com/doc/refman/5.1/en/connector-odbc.html'
- url 'http://mysql.mirror.iweb.ca/Connector-ODBC/5.1/mysql-connector-odbc-5.1.12-src.tar.gz'
- sha1 '6ee162de8a277cdb017c5c8eee6284601837e7da'
+ homepage "http://dev.mysql.com/doc/refman/5.1/en/connector-odbc.html"
+ url "http://cdn.mysql.com/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.2-src.tar.gz"
+ sha1 "5507903fb14aadf6b7c14f7142eef2c9fff1250c"
- # Won't compile against mysql-connector-c, as the C connector exports an API version
- # that causes issues with how "my_free" is declared
- depends_on MysqlDependency
- depends_on 'cmake' => :build
+ depends_on "cmake" => :build
+ depends_on "mysql"
+ depends_on "unixodbc"
option :universal
def install
- args = ["-DCMAKE_INSTALL_PREFIX=#{prefix}"]
- args << "-DCMAKE_OSX_ARCHITECTURES='#{Hardware::CPU.universal_archs.as_cmake_arch_flags}'" if build.universal?
- args << "-DMYSQL_LIB:FILEPATH=#{HOMEBREW_PREFIX}/lib/libmysqlclient_r.a"
- ENV['MYSQL_DIR'] = HOMEBREW_PREFIX
- system 'cmake', ".", *args
- fix_goofy_link_file_error
- system 'make install'
- end
+ args = std_cmake_args
+ args << "-DWITH_UNIXODBC=1"
- def fix_goofy_link_file_error
- # fixes linker error on linking up libmyodbc5.so on lion
- # I have no idea why the -L/usr/local/lib -lmysqlclient_r doesn't do the
- # trick. Can't use homebrew's patch system since it applies before link.txt
- # exists; it gets generated by cmake.
- #
- # see http://bugs.mysql.com/bug.php?id=63302
- #
- link_file_name = "driver/CMakeFiles/myodbc5.dir/link.txt"
- old_link = File.read link_file_name
- File.open link_file_name, 'w' do |f|
- f.puts "#{old_link.strip} #{HOMEBREW_PREFIX}/lib/libmysqlclient_r.a"
+ if build.universal?
+ ENV.universal_binary
+ args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
end
+
+ system 'cmake', ".", *args
+ system 'make install'
end
end