From c95b794125b252021183a2fb55dae1d6b8ab5640 Mon Sep 17 00:00:00 2001 From: conscell Date: Thu, 14 Nov 2013 10:51:31 +0900 Subject: [PATCH] erlang: fix problem with ODBC on 10.9 Even with installed unixODBC on Mavericks Erlang R16B02 continues to use the library iODBC: 1> odbc:start(). ok 2> odbc:connect("",[]). {error,"[iODBC][Driver Manager]No data source or driver specified, dialog prohibited SQLSTATE IS: IM007 Connection to database failed."} Closes Homebrew/homebrew#24283. Signed-off-by: Adam Vandenberg --- Formula/erlang.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Formula/erlang.rb b/Formula/erlang.rb index 094d5a78d9..2f904fb4c6 100644 --- a/Formula/erlang.rb +++ b/Formula/erlang.rb @@ -41,6 +41,12 @@ class Erlang < Formula fails_with :llvm + def patches + # Fixes problem with ODBC on Mavericks. Reported upstream: + # https://github.com/erlang/otp/pull/142 + DATA if MacOS.version >= :mavericks + end + def install ohai "Compilation takes a long time; use `brew install -v erlang` to see progress" unless ARGV.verbose? @@ -103,3 +109,17 @@ class Erlang < Formula end end end +__END__ +diff --git a/lib/odbc/configure.in b/lib/odbc/configure.in +index 83f7a47..fd711fe 100644 +--- a/lib/odbc/configure.in ++++ b/lib/odbc/configure.in +@@ -130,7 +130,7 @@ AC_SUBST(THR_LIBS) + odbc_lib_link_success=no + AC_SUBST(TARGET_FLAGS) + case $host_os in +- darwin*) ++ darwin1[[0-2]].*|darwin[[0-9]].*) + TARGET_FLAGS="-DUNIX" + if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then + ODBC_LIB= -L"/usr/lib"