mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Build iODBC library as universal binary on macOS 11+
As per instructions here: https://github.com/openlink/iODBC/blob/develop/README_MACOSX.md Task-number: QTBUG-93204 Pick-to: 6.2 6.2.2 Change-Id: Ica8d0f8c8d1d497bf0172a5762ae2d419b0ffc95 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
class Libiodbc < Formula
|
||||
desc "Database connectivity layer based on ODBC. (alternative to unixodbc)"
|
||||
homepage "http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/"
|
||||
url "https://github.com/openlink/iODBC/archive/v3.52.12.tar.gz"
|
||||
sha256 "b2cab4f8fbd5388344d7ee0deb1a32310795b1e631c3505a5b515d90186e2516"
|
||||
url "https://github.com/openlink/iODBC/archive/v3.52.15.tar.gz"
|
||||
sha256 "f6b376b6dffb4807343d6d612ed527089f99869ed91bab0bbbb47fdea5ed6ace"
|
||||
|
||||
option "with-universal", "Build as universal binary"
|
||||
|
||||
if build.with? "universal"
|
||||
version "3.52.15-universal"
|
||||
env :std
|
||||
end
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
@@ -11,8 +18,11 @@ class Libiodbc < Formula
|
||||
conflicts_with "unixodbc", :because => "both install 'odbcinst.h' header"
|
||||
|
||||
def install
|
||||
if build.with? "universal"
|
||||
ENV['CFLAGS'] = '-O -arch arm64 -arch x86_64 -mmacosx-version-min=10.9'
|
||||
end
|
||||
system "./autogen.sh"
|
||||
system "./configure", "--prefix=#{prefix}"
|
||||
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ set -ex
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
||||
|
||||
brew install ${BASH_SOURCE%/*}/libiodbc.rb
|
||||
brew install ${BASH_SOURCE%/*}/libiodbc.rb $*
|
||||
|
||||
# CPLUS_INCLUDE_PATH is set so clang and configure can find libiodbc
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
set -ex
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
"$BASEDIR/../common/macos/libiodbc.sh"
|
||||
"$BASEDIR/../common/macos/libiodbc.sh" --with-universal
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
set -ex
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
"$BASEDIR/../common/macos/libiodbc.sh"
|
||||
"$BASEDIR/../common/macos/libiodbc.sh" --with-universal
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
set -ex
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
"$BASEDIR/../common/macos/libiodbc.sh"
|
||||
"$BASEDIR/../common/macos/libiodbc.sh" --with-universal
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
set -ex
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
"$BASEDIR/../common/macos/libiodbc.sh"
|
||||
"$BASEDIR/../common/macos/libiodbc.sh" --with-universal
|
||||
|
||||
Reference in New Issue
Block a user