2014-05-10 01:49:37 +00:00
|
|
|
require "formula"
|
2012-05-24 17:43:25 +00:00
|
|
|
|
|
|
|
class MysqlConnectorOdbc < Formula
|
2014-05-10 01:49:37 +00:00
|
|
|
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"
|
2012-05-24 17:43:25 +00:00
|
|
|
|
2014-05-10 01:49:37 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "mysql"
|
|
|
|
depends_on "unixodbc"
|
2012-05-24 17:43:25 +00:00
|
|
|
|
2012-08-12 17:57:31 +00:00
|
|
|
option :universal
|
2012-05-24 17:43:25 +00:00
|
|
|
|
|
|
|
def install
|
2014-05-10 01:49:37 +00:00
|
|
|
args = std_cmake_args
|
|
|
|
args << "-DWITH_UNIXODBC=1"
|
2012-05-24 17:43:25 +00:00
|
|
|
|
2014-05-10 01:49:37 +00:00
|
|
|
if build.universal?
|
|
|
|
ENV.universal_binary
|
|
|
|
args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
|
2012-05-24 17:43:25 +00:00
|
|
|
end
|
2014-05-10 01:49:37 +00:00
|
|
|
|
|
|
|
system 'cmake', ".", *args
|
|
|
|
system 'make install'
|
2012-05-24 17:43:25 +00:00
|
|
|
end
|
|
|
|
end
|