From 6cef6db7ea77731f10b91617d1dc7c8bc02e8c61 Mon Sep 17 00:00:00 2001 From: Michael Haubenwallner Date: Thu, 12 Sep 2019 11:02:42 +0200 Subject: [PATCH] dev-db/opendbx: properly locate oracle sdk Closes: https://bugs.gentoo.org/505346 Package-Manager: Portage-2.3.69, Repoman-2.3.16 --- 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 425a43a399a..dcd91571ed0 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}" } -- 2.21.0