diff options
| author | Grzegorz Dzięgielewski | 2014-10-07 20:08:20 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2014-10-08 23:36:25 +0100 |
| commit | 052eed0a945bf75f472af3d429097141834b8e07 (patch) | |
| tree | 2f27ab4d7a2917b336bfabc01ee5544cf2884033 /Library/Formula | |
| parent | 943f2b1d7b8a2fbadb864ca0d0531ad93a6f3f07 (diff) | |
| download | homebrew-052eed0a945bf75f472af3d429097141834b8e07.tar.bz2 | |
qt5: add --with-oci option.
Closes #33004.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/qt5.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Library/Formula/qt5.rb b/Library/Formula/qt5.rb index 8d400e03a..aab65eecd 100644 --- a/Library/Formula/qt5.rb +++ b/Library/Formula/qt5.rb @@ -12,6 +12,17 @@ class Qt5HeadDownloadStrategy < GitDownloadStrategy end end +class OracleHomeVar < Requirement + fatal true + satisfy ENV["ORACLE_HOME"] + + def message; <<-EOS.undent + To use --with-oci you have to set the ORACLE_HOME environment variable. + Check Oracle Instant Client documentation for more information. + EOS + end +end + class Qt5 < Formula homepage "http://qt-project.org/" url "http://qtmirror.ics.com/pub/qtproject/official_releases/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz" @@ -37,12 +48,15 @@ class Qt5 < Formula option "with-docs", "Build documentation" option "with-examples", "Build examples" option "developer", "Build and link with developer options" + option "with-oci", "Build with Oracle OCI plugin" depends_on "pkg-config" => :build depends_on "d-bus" => :optional - depends_on "mysql" => :optional + depends_on :mysql => :optional depends_on :xcode => :build + depends_on OracleHomeVar if build.with? "oci" + def install ENV.universal_binary if build.universal? args = ["-prefix", prefix, @@ -76,6 +90,12 @@ class Qt5 < Formula args << "-arch" << "x86" end + if build.with? "oci" + args << "-I#{ENV['ORACLE_HOME']}/sdk/include" + args << "-L{ENV['ORACLE_HOME']}" + args << "-plugin-sql-oci" + end + args << "-developer-build" if build.include? "developer" system "./configure", *args |
