commit:     f76b5b4746403b8e673f440ef70c2031696694ef
Author:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 12 09:02:42 2019 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Fri Apr 23 06:45:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f76b5b47

dev-db/opendbx: properly locate oracle sdk

Closes: https://bugs.gentoo.org/505346
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>

 dev-db/opendbx/opendbx-1.4.5-r1.ebuild | 16 +++++++++++++++-
 dev-db/opendbx/opendbx-1.4.6-r2.ebuild | 16 +++++++++++++++-
 dev-db/opendbx/opendbx-1.4.6-r3.ebuild | 16 +++++++++++++++-
 dev-db/opendbx/opendbx-1.5.0-r2.ebuild | 16 +++++++++++++++-
 4 files changed, 60 insertions(+), 4 deletions(-)

diff --git a/dev-db/opendbx/opendbx-1.4.5-r1.ebuild 
b/dev-db/opendbx/opendbx-1.4.5-r1.ebuild
index 6def19a1ee0..222716f22f7 100644
--- a/dev-db/opendbx/opendbx-1.4.5-r1.ebuild
+++ b/dev-db/opendbx/opendbx-1.4.5-r1.ebuild
@@ -44,7 +44,21 @@ src_configure() {
 
        use mysql && append-cppflags -I/usr/include/mysql
        use firebird && append-cppflags -I/opt/firebird/include
-       use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
+
+       if use oracle ; then
+               # Traditionally, OCI header files are provided in:
+               append-cppflags -I"${ORACLE_HOME}"/rdbms/public
+               # But newer versions merged them with additional SDKs:
+               append-cppflags -I"${ORACLE_HOME}"/sdk/include
+               # Depending on the client package ORACLE_HOME refers to,
+               # we need to find the libraries in varying locations:
+               # - gentoo instantclient has multilib 
(dev-db/oracle-instantclient)
+               append-ldflags -L"${ORACLE_HOME}"/$(get_libdir)
+               # - vanilla full client lacks multilib 
(LINUX*_client{,_home}.zip)
+               append-ldflags -L"${ORACLE_HOME}"/lib
+               # - vanilla instantclient lacks libdir (instantclient-*.zip)
+               append-ldflags -L"${ORACLE_HOME}"
+       fi
 
        econf --with-backends="${backends}"
 }

diff --git a/dev-db/opendbx/opendbx-1.4.6-r2.ebuild 
b/dev-db/opendbx/opendbx-1.4.6-r2.ebuild
index f3c0607e740..5c3009011be 100644
--- a/dev-db/opendbx/opendbx-1.4.6-r2.ebuild
+++ b/dev-db/opendbx/opendbx-1.4.6-r2.ebuild
@@ -44,7 +44,21 @@ src_configure() {
 
        use mysql && append-cppflags -I/usr/include/mysql
        use firebird && append-cppflags -I/opt/firebird/include
-       use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
+
+       if use oracle ; then
+               # Traditionally, OCI header files are provided in:
+               append-cppflags -I"${ORACLE_HOME}"/rdbms/public
+               # But newer versions merged them with additional SDKs:
+               append-cppflags -I"${ORACLE_HOME}"/sdk/include
+               # Depending on the client package ORACLE_HOME refers to,
+               # we need to find the libraries in varying locations:
+               # - gentoo instantclient has multilib 
(dev-db/oracle-instantclient)
+               append-ldflags -L"${ORACLE_HOME}"/$(get_libdir)
+               # - vanilla full client lacks multilib 
(LINUX*_client{,_home}.zip)
+               append-ldflags -L"${ORACLE_HOME}"/lib
+               # - vanilla instantclient lacks libdir (instantclient-*.zip)
+               append-ldflags -L"${ORACLE_HOME}"
+       fi
 
        econf --with-backends="${backends}"
 }

diff --git a/dev-db/opendbx/opendbx-1.4.6-r3.ebuild 
b/dev-db/opendbx/opendbx-1.4.6-r3.ebuild
index daae3dd90bd..7bdd9b3e613 100644
--- a/dev-db/opendbx/opendbx-1.4.6-r3.ebuild
+++ b/dev-db/opendbx/opendbx-1.4.6-r3.ebuild
@@ -52,7 +52,21 @@ src_configure() {
 
        use mysql && append-cppflags -I/usr/include/mysql
        use firebird && append-cppflags -I/opt/firebird/include
-       use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
+
+       if use oracle ; then
+               # Traditionally, OCI header files are provided in:
+               append-cppflags -I"${ORACLE_HOME}"/rdbms/public
+               # But newer versions merged them with additional SDKs:
+               append-cppflags -I"${ORACLE_HOME}"/sdk/include
+               # Depending on the client package ORACLE_HOME refers to,
+               # we need to find the libraries in varying locations:
+               # - gentoo instantclient has multilib 
(dev-db/oracle-instantclient)
+               append-ldflags -L"${ORACLE_HOME}"/$(get_libdir)
+               # - vanilla full client lacks multilib 
(LINUX*_client{,_home}.zip)
+               append-ldflags -L"${ORACLE_HOME}"/lib
+               # - vanilla instantclient lacks libdir (instantclient-*.zip)
+               append-ldflags -L"${ORACLE_HOME}"
+       fi
 
        econf --with-backends="${backends}" --enable-manpages="$(usex man yes 
no)"
 }

diff --git a/dev-db/opendbx/opendbx-1.5.0-r2.ebuild 
b/dev-db/opendbx/opendbx-1.5.0-r2.ebuild
index 9f23d103a95..75d65ca1fe3 100644
--- a/dev-db/opendbx/opendbx-1.5.0-r2.ebuild
+++ b/dev-db/opendbx/opendbx-1.5.0-r2.ebuild
@@ -49,7 +49,21 @@ src_configure() {
 
        use mysql && append-cppflags -I/usr/include/mysql
        use firebird && append-cppflags -I/opt/firebird/include
-       use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
+
+       if use oracle ; then
+               # Traditionally, OCI header files are provided in:
+               append-cppflags -I"${ORACLE_HOME}"/rdbms/public
+               # But newer versions merged them with additional SDKs:
+               append-cppflags -I"${ORACLE_HOME}"/sdk/include
+               # Depending on the client package ORACLE_HOME refers to,
+               # we need to find the libraries in varying locations:
+               # - gentoo instantclient has multilib 
(dev-db/oracle-instantclient)
+               append-ldflags -L"${ORACLE_HOME}"/$(get_libdir)
+               # - vanilla full client lacks multilib 
(LINUX*_client{,_home}.zip)
+               append-ldflags -L"${ORACLE_HOME}"/lib
+               # - vanilla instantclient lacks libdir (instantclient-*.zip)
+               append-ldflags -L"${ORACLE_HOME}"
+       fi
 
        econf --with-backends="${backends}"
 }

Reply via email to