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 <flangy@gmail.com>
This commit is contained in:
conscell 2013-11-14 10:51:31 +09:00 committed by Adam Vandenberg
parent e5f3e71d14
commit c95b794125

View file

@ -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"