summaryrefslogtreecommitdiff
path: root/dev-db/oracle-instantclient
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-10-27 12:48:57 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-10-27 12:48:57 +0100
commit70b82ae359a5538711e103b0e8dfb92654296644 (patch)
tree8412b84ff9ce02a22be5251052b00feefe1d5b70 /dev-db/oracle-instantclient
parent64e107b9b6058580ff0432107eb37cefb0b2a7d8 (diff)
gentoo resync : 27.10.2018
Diffstat (limited to 'dev-db/oracle-instantclient')
-rw-r--r--dev-db/oracle-instantclient/Manifest5
-rw-r--r--dev-db/oracle-instantclient/files/18.3.0.0-makefile.patch2
-rw-r--r--dev-db/oracle-instantclient/files/18.3.0.0-proc-makefile.patch27
-rw-r--r--dev-db/oracle-instantclient/oracle-instantclient-18.3.0.0-r1.ebuild375
-rw-r--r--dev-db/oracle-instantclient/oracle-instantclient-18.3.0.0-r2.ebuild378
5 files changed, 785 insertions, 2 deletions
diff --git a/dev-db/oracle-instantclient/Manifest b/dev-db/oracle-instantclient/Manifest
index a88bda360680..836f47d7cc76 100644
--- a/dev-db/oracle-instantclient/Manifest
+++ b/dev-db/oracle-instantclient/Manifest
@@ -1,5 +1,6 @@
AUX 12.1.0.2-makefile.patch 2211 BLAKE2B 404433299397601d40d168c4ca7530fffdb9d5a39de630b04d51d3a9de70bae8859bfe047e7ac09318fa6b561ff9d94775ee08ba384c92908569855b9b42a209 SHA512 b42672e4c46f3f8a9e9bbb5bda935e20516a72ac71c9a7ba561f29fa7ff654da7abb7e6ddf3e4e236a29d29c1b7b35e469bbe60af62c5ff9065f7d8aa867b758
-AUX 18.3.0.0-makefile.patch 990 BLAKE2B c910fe75ffe32fe9b10a209670c28328492c9ce6a6fd51c6fb0a267b6c09b89eccab9ea40e8c923d181012c1b15e927f28b65d57f816f2b4eaf619a1a08655cb SHA512 907829ddbd58e98f5d07077cd14e3db54dc16f09e84a74b21f073305b5f39c38ae9d59dad5494241f985a125c24ec98223a88425fed65e838584c8b17e6611b7
+AUX 18.3.0.0-makefile.patch 986 BLAKE2B 3cad2bb7e508f7ca4f25d67ba12b5f9221f739ba450ae45cb4988a700cd0c87b7a1e0fd90ff66c379b85b159f05e715f0450681a6b070f45d807ae6072208537 SHA512 7f9523738f51ade5fefa5e3d2b014fcfaee01fbf9653e12f2ca6eca20a8e7e04df07065209f6dbf7795ff452ce7926e1289f9bd715220a64e85c1a80aebc00eb
+AUX 18.3.0.0-proc-makefile.patch 564 BLAKE2B fe06fa4e6df8bd2f563ffec9b0e2d1f22179a879b5e068b0480409eb6a531bf50b092a0abefd77804e5f0bb571c6a9a59b14afee6b157551b4bae833cb10f159 SHA512 8bbcd7a110f41842f1e40b037720f283a7ae763a77f4cceda19061ab114eb4d428bf0dfa2c45782bc6ea8c9daf3a185faa42e8cdc9c765f93107f23a32344f69
AUX tnsnames.ora.sample 2939 BLAKE2B d02d4be5eae8c8da346f8b0ddd2b6808e59f8e77f805b22154a77d22db325d415ecaf811323de3c7a6764a9167fb7f9a9708d1cf2de891858bc43bd5e050954d SHA512 25bb734bf4b7ea1d2ce2bddfd241204e796cad0d1d49036e567237d7ca92d158ab7bf69ff3abe210050c8ee0a0630f9217ced22dc31770814d822f93b2af5845
DIST instantclient-basic-linux-12.1.0.2.0.zip 59727331 BLAKE2B 8a4beb891fd6693b74be4f575bff3af7f70cb751a9fbfab80aa145737008cc745f83f2ec349a5959fcaac9aa789210ecd6da88e0eea63d23ce62fcb402274ea8 SHA512 5d93c72c43ba2ca765209f4c1d518b9e93c80ff33625bf0bc33b974413e2b91ab22681e0922d2148fbfa6b6043fe84eee5334aa398e1ee7b1c2663ff2b3bb235
DIST instantclient-basic-linux-12.2.0.1.0.zip 64594237 BLAKE2B bd74522486ec6be857ed83e23a1a64a2794dc14ac184ef9dd4324fc4b9d0d61be8b6b70e32cfe814c6c8972bc7c9aef1d48a60180b8310d861fa66179027c391 SHA512 35cdd84765f1e020cd1e7fe3a765449bcad1c3b09189ab64f6a969da27d7ff2932bad319037ec066615e672d2b3105d4c36b42ec30ab60d6c577a2796908d22b
@@ -41,5 +42,7 @@ DIST instantclient-tools-linux.x64-12.2.0.1.0.zip 1132671 BLAKE2B a9ae6d2cd4e566
DIST instantclient-tools-linux.x64-18.3.0.0.0dbru.zip 1142609 BLAKE2B 5c915bd940b7bfaa42429710685cfafc5f0189607da2d789f4aaada2bc9d3365ad8e9ee31cc209830fa54b406ffe4b9b2fc2b5e0b6819ff176f7dbb566117a79 SHA512 2c198d9e723b39f7b512217eb08557dfa3c9ae32858acd882df8b9b24beecffe6b44eb089b50341edf01d7e4c0514d4b3de4aa06fa9185aa0538855963c174a4
EBUILD oracle-instantclient-12.1.0.2.ebuild 8668 BLAKE2B 9f26688a731756debbc5ab9181e2c51289c7ba17cff45f018356c7fce4f17ef0429490a2f768c6e7d1e0b96d75ad722fa6343b5dec55bbc05eb7971465cc62af SHA512 6b395cc48970d9ee0401947a70306732688c2b8fc6c15b11139c395a31ba82cc66bcee8e16ea200468759709ad9bb0f1f270afda4507cf9d6c4fb698aa685706
EBUILD oracle-instantclient-12.2.0.1_p2.ebuild 9015 BLAKE2B 25c9c2d664b7a8938f2dea9c2a1ade5be23cc56b753c028efd5b82f2c4462462772dccaa319ecf9694ec73f8d23c9bfe029d1d7d91c10446752bc3ce6bc99bf3 SHA512 a7d154e698de828593be605f5e47ad33251e7bad643d34ee667d531b1348053ff0ce2e06cc0e3b22f77a0732fd815ab6da2f4c33cfb8c713f2816a797cce286f
+EBUILD oracle-instantclient-18.3.0.0-r1.ebuild 11895 BLAKE2B 5fa88cdbb2ef7b5e725baab176ca82c243ca38b5e3e36af5f10d0e18aafb4e9995b064016a56d968e1f523396158536339b50006717fa9f8111ce10f8cb4d84f SHA512 0a080979ec70752702597f4d5e3f9e2f2c087d07fdcb27c2066742115c3b550d4df06ab03cb55034eaf8b55ec13755f47570c02f205d0966fb43ba64502d768d
+EBUILD oracle-instantclient-18.3.0.0-r2.ebuild 12167 BLAKE2B 40c852da52c88e48aad4b36a10bd391b92295fd7ed45a6bb054c6e2766e70e1ca9c2aeb78768c724f4a191130aa32421ab1d946c2a9b0d700f46afb9ae9877d9 SHA512 fedd20c039cd8d8dfc0b0b10ddfa0939177fa5e393cced2b713642a1b74710e265221b7eb4b0c1436407bc4ba84362f766aca54c7b5bda0d6445c8e7426a5a6b
EBUILD oracle-instantclient-18.3.0.0.ebuild 10426 BLAKE2B c5ea6700fe03721d9b587134e281c8e234061d83d48b377dda3d097279a02debb13328f72f8cf426ff13d48eb0d9885cc79208e1eecc9c6e46edadf3948e54ce SHA512 9b6ff606dfdefb5629fef92f532ab072c98e1f7c7dd2e394e975994a4b3483706e541bd5124dd2c0ec562fd53c64705840ae861d9e50c849b2ff2671c8d593b9
MISC metadata.xml 957 BLAKE2B dfe01a80765d0ec1afac4a5045e2081e39ee9060a17f278b6eb7cfae7670ec102a504397d037b2b8d8ad82d242a9fa3ed1d4309b25158b934f8674a062dec53e SHA512 dd8c982f1ce276e7701e6b82b71e2464eaa21e413115c2a4d3bbd49053539ff3a9bcfc84252ef7aa9c39d36054fee119002716de5d525a20bb1f2da0d44b3c89
diff --git a/dev-db/oracle-instantclient/files/18.3.0.0-makefile.patch b/dev-db/oracle-instantclient/files/18.3.0.0-makefile.patch
index eb6fc025d78b..bc4445fe354e 100644
--- a/dev-db/oracle-instantclient/files/18.3.0.0-makefile.patch
+++ b/dev-db/oracle-instantclient/files/18.3.0.0-makefile.patch
@@ -14,7 +14,7 @@ This provides absolute paths for headers and libraries.
+else
+LIBDIR=lib
+endif
-+ICINCHOME=$(ORACLE_HOME)/sdk/include
++ICINCHOME=$(ORACLE_HOME)/include
+ICLIBHOME=$(ORACLE_HOME)/$(LIBDIR)
ICLIBPATH=-L$(ICLIBHOME)
THREADLIBS=-lthread
diff --git a/dev-db/oracle-instantclient/files/18.3.0.0-proc-makefile.patch b/dev-db/oracle-instantclient/files/18.3.0.0-proc-makefile.patch
new file mode 100644
index 000000000000..a197c2c7236f
--- /dev/null
+++ b/dev-db/oracle-instantclient/files/18.3.0.0-proc-makefile.patch
@@ -0,0 +1,27 @@
+--- instantclient_18_3/sdk/demo/demo_proc_ic.mk.orig 2018-10-22 13:34:44.302293002 +0200
++++ instantclient_18_3/sdk/demo/demo_proc_ic.mk 2018-10-22 13:38:55.015321571 +0200
+@@ -37,8 +37,13 @@
+ cc=/usr/bin/gcc
+
+ # InstantClient Directories.
+-ICSDKHOME=../
+-ICLIBHOME=../../
++ifeq ($(BUILD32),T)
++LIBDIR=lib32
++else
++LIBDIR=lib
++endif
++ICSDKHOME=$(ORACLE_HOME)/
++ICLIBHOME=$(ORACLE_HOME)/$(LIBDIR)
+
+ MKLINK=ln
+ REMOVE=rm -rf
+@@ -48,7 +53,7 @@
+ MAKEFILE=demo_proc_ic.mk
+ PROCDEMO=procdemo
+
+-PROC=$(ICSDKHOME)proc
++PROC=$(ICSDKHOME)bin/proc
+ SO_EXT=.so
+ I_SYM=-I
+
diff --git a/dev-db/oracle-instantclient/oracle-instantclient-18.3.0.0-r1.ebuild b/dev-db/oracle-instantclient/oracle-instantclient-18.3.0.0-r1.ebuild
new file mode 100644
index 000000000000..160831003b57
--- /dev/null
+++ b/dev-db/oracle-instantclient/oracle-instantclient-18.3.0.0-r1.ebuild
@@ -0,0 +1,375 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit eutils pax-utils multilib-minimal
+
+DESCRIPTION="Oracle 18c Instant Client with SDK"
+HOMEPAGE="https://www.oracle.com/technetwork/database/database-technologies/instant-client/overview/index.html"
+
+MY_SOVER=18.1 # the library soname found in the zip files
+
+IUSE="jdbc odbc precomp +sdk +sqlplus tools"
+REQUIRED_USE="precomp? ( sdk )"
+
+MY_PVM=$(ver_cut 1-2)
+MY_P="instantclient_$(ver_rs 1 _ ${MY_PVM})"
+
+MY_PV=$(ver_cut 1-4)
+MY_PVP=$(ver_cut 5) # p2
+
+MY_PLAT_x86="Linux x86"
+MY_BITS_x86=32
+MY_A_x86="${PN/oracle-/}-basic-linux-${MY_PV}.0dbru.zip"
+MY_A_x86_jdbc="${MY_A_x86/basic/jdbc}"
+MY_A_x86_odbc="${MY_A_x86/basic/odbc}"
+MY_A_x86_precomp="${MY_A_x86/basic/precomp}"
+MY_A_x86_sdk="${MY_A_x86/basic/sdk}"
+MY_A_x86_sqlplus="${MY_A_x86/basic/sqlplus}"
+MY_A_x86_tools="${MY_A_x86/basic/tools}"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_BITS_amd64=64
+MY_A_amd64="${PN/oracle-}-basic-linux.x64-${MY_PV}.0dbru.zip"
+MY_A_amd64_jdbc="${MY_A_amd64/basic/jdbc}"
+MY_A_amd64_odbc="${MY_A_amd64/basic/odbc}"
+MY_A_amd64_precomp="${MY_A_amd64/basic/precomp}"
+MY_A_amd64_sdk="${MY_A_amd64/basic/sdk}"
+MY_A_amd64_sqlplus="${MY_A_amd64/basic/sqlplus}"
+MY_A_amd64_tools="${MY_A_amd64/basic/tools}"
+
+if [[ ${MY_PVP} == p* ]]
+then
+ MY_PVP=-${MY_PVP#p}
+ # Updated 9/22/2017: instantclient-odbc-linux-12.2.0.1.0-2.zip
+ MY_A_x86_odbc="${MY_A_x86_odbc%.zip}${MY_PVP}.zip"
+ MY_A_amd64_odbc="${MY_A_amd64_odbc%.zip}${MY_PVP}.zip"
+fi
+
+SRC_URI="
+ abi_x86_32? (
+ ${MY_A_x86}
+ jdbc? ( ${MY_A_x86_jdbc} )
+ odbc? ( ${MY_A_x86_odbc} )
+ precomp? ( ${MY_A_x86_precomp} )
+ !abi_x86_64? (
+ sdk? ( ${MY_A_x86_sdk} )
+ sqlplus? ( ${MY_A_x86_sqlplus} )
+ tools? ( ${MY_A_x86_tools} )
+ ) )
+ abi_x86_64? (
+ ${MY_A_amd64}
+ jdbc? ( ${MY_A_amd64_jdbc} )
+ odbc? ( ${MY_A_amd64_odbc} )
+ precomp? ( ${MY_A_amd64_precomp} )
+ sdk? ( ${MY_A_amd64_sdk} )
+ sqlplus? ( ${MY_A_amd64_sqlplus} )
+ tools? ( ${MY_A_amd64_tools} )
+ )
+"
+
+LICENSE="OTN"
+SLOT="0/${MY_SOVER}"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="fetch splitdebug"
+
+DEPEND="app-arch/unzip"
+RDEPEND="
+ >=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]
+ !<dev-db/oracle-instantclient-basic-12
+ !<dev-db/oracle-instantclient-odbc-12
+ !<dev-db/oracle-instantclient-jdbc-12
+ !<dev-db/oracle-instantclient-sqlplus-12
+"
+
+S="${WORKDIR}/${MY_P}"
+
+QA_PREBUILT="usr/lib*/oracle/client/*/*"
+
+set_my_abivars() {
+ if multilib_is_native_abi; then
+ MY_WORKDIR="${WORKDIR}"
+ MY_S="${S}"
+ else
+ MY_WORKDIR="${WORKDIR}/${ABI}"
+ MY_S="${MY_WORKDIR}/${MY_P}"
+ fi
+
+ local abi=${ABI}
+ [[ ${abi} == 'default' ]] && abi=${ARCH}
+ MY_PLAT=MY_PLAT_${abi} ; MY_PLAT=${!MY_PLAT} # platform name
+ MY_BITS=MY_BITS_${abi} ; MY_BITS=${!MY_BITS} # platform bitwidth
+ MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile
+ MY_A_jdbc=MY_A_${abi}_jdbc ; MY_A_jdbc=${!MY_A_jdbc} # jdbc distfile
+ MY_A_odbc=MY_A_${abi}_odbc ; MY_A_odbc=${!MY_A_odbc} # odbc distfile
+ MY_A_precomp=MY_A_${abi}_precomp; MY_A_precomp=${!MY_A_precomp} # precomp distfile
+ MY_A_sdk=MY_A_${abi}_sdk ; MY_A_sdk=${!MY_A_sdk} # sdk distfile
+ MY_A_sqlplus=MY_A_${abi}_sqlplus; MY_A_sqlplus=${!MY_A_sqlplus} # sqlplus distfile
+ MY_A_tools=MY_A_${abi}_tools ; MY_A_tools=${!MY_A_tools} # tools distfile
+
+ [[ -n ${MY_PLAT} ]]
+}
+
+oic_distfile_status() {
+ : # We must not access DISTDIR in pkg_* phase, bug#612966.
+# Not removing this lines yet, we may eventually specify this feature.
+# if [[ -r ${DISTDIR}/${1} ]]; then
+# echo "already here"
+# else
+# echo "still absent"
+# fi
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE//overview/downloads}"
+ eerror " and download"
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ eerror "Instant Client for ${MY_PLAT}"
+ # convenient ordering like Linux x86-64 download site
+ eerror " Basic: $(oic_distfile_status ${MY_A}) ${MY_A}"
+ use sqlplus && multilib_is_native_abi &&
+ eerror " SQL*Plus: $(oic_distfile_status ${MY_A_sqlplus}) ${MY_A_sqlplus}"
+ use tools && multilib_is_native_abi &&
+ eerror " Tools: $(oic_distfile_status ${MY_A_tools}) ${MY_A_tools}"
+ use sdk && multilib_is_native_abi &&
+ eerror " SDK: $(oic_distfile_status ${MY_A_sdk}) ${MY_A_sdk}"
+ use jdbc &&
+ eerror " JDBC: $(oic_distfile_status ${MY_A_jdbc}) ${MY_A_jdbc}"
+ use odbc &&
+ eerror " ODBC: $(oic_distfile_status ${MY_A_odbc}) ${MY_A_odbc}"
+ use precomp &&
+ eerror " Precompiler: $(oic_distfile_status ${MY_A_precomp}) ${MY_A_precomp}"
+ done
+ eerror "After downloading these files (for *all* shown architectures),"
+ eerror "put them in your DISTDIR filesystem directory."
+}
+
+src_unpack() {
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ mkdir -p "${MY_WORKDIR}" || die
+ cd "${MY_WORKDIR}" || die
+ unpack ${MY_A}
+ use jdbc && unpack ${MY_A_jdbc}
+ use odbc && unpack ${MY_A_odbc}
+ use precomp && unpack ${MY_A_precomp}
+ if multilib_is_native_abi; then
+ use sdk && unpack ${MY_A_sdk}
+ use sqlplus && unpack ${MY_A_sqlplus}
+ use tools && unpack ${MY_A_tools}
+ fi
+ done
+}
+
+src_prepare() {
+ local PATCHES=()
+ if use precomp; then
+ PATCHES+=( "${FILESDIR}"/18.3.0.0-proc-makefile.patch )
+ # Not supporting COBOL for now
+ rm -f sdk/demo/*procob*
+ fi
+ if use sdk; then
+ PATCHES+=( "${FILESDIR}"/18.3.0.0-makefile.patch )
+ rm sdk/include/ldap.h || die #299562
+ fi
+ default
+}
+
+# silence configure&compile messages from multilib-minimal
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # all content goes here without version number, bug#578402
+ local oracle_home=/usr/$(get_libdir)/oracle/client
+ local oracle_home_to_root=../../../.. # for dosym
+ local ldpath=
+
+ local ABI
+ for ABI in $(multilib_get_enabled_abis) # last iteration is final ABI
+ do
+ if ! set_my_abivars; then
+ elog "Skipping unsupported ABI ${ABI}."
+ continue
+ fi
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${MY_S}" || die
+
+ # shared libraries
+ into "${oracle_home}"
+ dolib.so lib*$(get_libname)*
+ use precomp && dolib.a cobsqlintf.o
+
+ # ensure to be linkable
+ [[ -e libocci$(get_libname) ]] ||
+ dosym libocci$(get_libname ${MY_SOVER}) \
+ "${oracle_home}"/$(get_libdir)/libocci$(get_libname)
+ [[ -e libclntsh$(get_libname) ]] ||
+ dosym libclntsh$(get_libname ${MY_SOVER}) \
+ "${oracle_home}"/$(get_libdir)/libclntsh$(get_libname)
+
+ # java archives
+ insinto "${oracle_home}"/$(get_libdir)
+ doins *.jar
+
+ # runtime library path
+ ldpath+=${ldpath:+:}${oracle_home}/$(get_libdir)
+
+ # Vanilla filesystem layout does not support multilib
+ # installation, so we need to move the libs into the
+ # ABI specific libdir. However, ruby-oci8 build system
+ # detects an instantclient along the libraries, and
+ # does expect the sdk right there.
+ use sdk && dosym ../sdk "${oracle_home}"/$(get_libdir)/sdk
+
+ eend $?
+ done
+
+ local DOCS=( BASIC_README )
+ local HTML_DOCS=()
+ local paxbins=( adrci genezi uidrvci )
+ local scripts=()
+
+ if use jdbc; then
+ DOCS+=( JDBC_README )
+ fi
+ if use odbc; then
+ DOCS+=( ODBC_README )
+ HTML_DOCS+=( help )
+ scripts+=( odbc_update_ini.sh )
+ fi
+ if use precomp; then
+ DOCS+=( PRECOMP_README )
+ paxbins+=( sdk/proc )
+ # Install pcscfg.cfg into /etc/oracle, as the user probably
+ # wants to add the include path for the compiler headers
+ # here and we do not want this to be overwritten.
+ insinto /etc/oracle
+ doins precomp/admin/pcscfg.cfg
+ sed -i -e "s%^sys_include=.*%sys_include=(${oracle_home}/include,${EPREFIX}/usr/include)%" \
+ "${ED}"/etc/oracle/pcscfg.cfg || die
+ dosym ../../${oracle_home_to_root}/etc/oracle/pcscfg.cfg "${oracle_home}/precomp/admin/pcscfg.cfg"
+ dosym ../.."${oracle_home}"/bin/proc /usr/bin/proc
+ # Not supporting COBOL for now
+ # paxbins+=( sdk/{procob,rtsora} )
+ # doins precomp/admin/pcbcfg.cfg
+ fi
+ if use sdk; then
+ einfo "Installing SDK ..."
+ DOCS+=( sdk/SDK_README )
+ scripts+=( sdk/ott )
+ insinto "${oracle_home}"/$(get_libdir)
+ doins sdk/ottclasses.zip
+ insinto "${oracle_home}"/sdk
+ doins -r sdk/{admin,demo,include}
+ dosym sdk/include "${oracle_home}"/include
+
+ # The build system in DBD::Oracle perl module would detect
+ # an instantclient along the sharedlibs in ORACLE_HOME, which
+ # we cannot provide. But it also knows Oracle eXpress Edition's
+ # layout - which we emulate enough here to let DBD::Oracle work.
+ dosym ../../sdk/demo/demo.mk "${oracle_home}"/rdbms/demo/demo_xe.mk
+
+ # some build systems expect the headers here, also see bug#652096
+ dosym ../../../.."${oracle_home}"/sdk/include /usr/include/oracle/${MY_PVM}/client
+
+ eend $?
+ fi
+ if use sqlplus; then
+ DOCS+=( SQLPLUS_README )
+ paxbins+=( sqlplus )
+ insinto "${oracle_home}"/sqlplus/admin
+ doins glogin.sql
+ dosym ../.."${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
+ fi
+ if use tools; then
+ DOCS+=( TOOLS_README )
+ paxbins+=( exp expdp imp impdp sqlldr wrc )
+ fi
+
+ einfo "Installing binaries for ${MY_PLAT} ..."
+ into "${oracle_home}"
+ dobin ${paxbins[*]} ${scripts[*]}
+ pushd "${ED}${oracle_home}/bin" >/dev/null || die
+ pax-mark -c ${paxbins[*]#*/} || die
+ popd >/dev/null || die
+ eend $?
+
+ einstalldocs
+
+ # create path for tnsnames.ora
+ insinto /etc/oracle
+ doins "${FILESDIR}"/tnsnames.ora.sample
+
+ # Add OCI libs to library path
+ {
+ echo "# ${EPREFIX}/etc/env.d/50${PN}"
+ echo "# Do not edit this file, but 99${PN} instead"
+ echo
+ echo "ORACLE_HOME=${EPREFIX}${oracle_home}"
+ echo "LDPATH=${ldpath}"
+ echo "TNS_ADMIN=${EPREFIX}/etc/oracle/"
+ } > "${T}"/50${PN}
+
+ doenvd "${T}"/50${PN}
+
+ # ensure ORACLE_HOME/lib exists
+ [[ -e ${ED}${oracle_home}/lib/. ]] ||
+ dosym $(get_libdir) "${oracle_home#/}"/lib
+}
+
+pkg_preinst() {
+ if [[ -r ${EROOT}/etc/env.d/99${PN} ]]; then
+ cp "${EROOT}/etc/env.d/99${PN}" "${ED}/etc/env.d/" || die
+ else
+ {
+ echo "# ${EPREFIX}/etc/env.d/99${PN}"
+ echo "# Configure system-wide defaults for your Oracle Instant Client here"
+ echo
+ echo "#$(grep '^ORACLE_HOME=' "${ED}/etc/env.d/50${PN}")"
+ echo "#$(grep '^TNS_ADMIN=' "${ED}/etc/env.d/50${PN}")"
+ echo "#NLS_LANG="
+ } > "${ED}/etc/env.d/99${PN}"
+ fi
+}
+
+pkg_postinst() {
+ elog "${P} does not provide an sqlnet.ora"
+ elog "configuration file, redirecting oracle diagnostics for database-"
+ elog "and network-issues into ~USER/oradiag_USER/ instead."
+ elog "It should be safe to ignore this message in sqlnet.log there:"
+ elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []"
+ elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference."
+ elog "If you want to directly analyse low-level debug info or don't want"
+ elog "to see it at all, so you really need an sqlnet.ora file, please"
+ elog "consult http://search.oracle.com/search/search?q=sqlnet.ora"
+ elog ""
+ elog "TNS_ADMIN has been set to ${EPREFIX}/etc/oracle by default,"
+ elog "put your tnsnames.ora there or configure TNS_ADMIN"
+ elog "to point to your user specific configuration."
+ if use precomp; then
+ elog ""
+ elog "The proc precompiler uses the system library headers, which in"
+ elog "turn include the headers of the used compiler."
+ elog "To make proc work, please add the compiler header path of your"
+ elog "preferred compiler to sys_include in:"
+ elog " ${EPREFIX}/etc/oracle/pcscfg.cfg"
+ elog "Remember to update this setting when you switch or update the"
+ elog "compiler."
+ elog "For gcc, the headers are usually found in a path matching the"
+ elog "following pattern:"
+ elog " ${EPREFIX}/usr/lib/gcc/*/*/include"
+ elog "The exact details depend on the architecture and the version of"
+ elog "the compiler to be used."
+ fi
+ ewarn "Please re-source your shell settings for ORACLE_HOME"
+ ewarn " changes, such as: source ${EPREFIX}/etc/profile"
+}
diff --git a/dev-db/oracle-instantclient/oracle-instantclient-18.3.0.0-r2.ebuild b/dev-db/oracle-instantclient/oracle-instantclient-18.3.0.0-r2.ebuild
new file mode 100644
index 000000000000..8bfa48ed93d7
--- /dev/null
+++ b/dev-db/oracle-instantclient/oracle-instantclient-18.3.0.0-r2.ebuild
@@ -0,0 +1,378 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit eutils pax-utils multilib-minimal
+
+DESCRIPTION="Oracle 18c Instant Client with SDK"
+HOMEPAGE="https://www.oracle.com/technetwork/database/database-technologies/instant-client/overview/index.html"
+
+MY_SOVER=18.1 # the library soname found in the zip files
+
+IUSE="jdbc odbc precomp +sdk +sqlplus tools"
+REQUIRED_USE="precomp? ( sdk )"
+
+MY_PVM=$(ver_cut 1-2)
+MY_P="instantclient_$(ver_rs 1 _ ${MY_PVM})"
+
+MY_PV=$(ver_cut 1-4)
+MY_PVP=$(ver_cut 5) # p2
+
+MY_PLAT_x86="Linux x86"
+MY_BITS_x86=32
+MY_A_x86="${PN/oracle-/}-basic-linux-${MY_PV}.0dbru.zip"
+MY_A_x86_jdbc="${MY_A_x86/basic/jdbc}"
+MY_A_x86_odbc="${MY_A_x86/basic/odbc}"
+MY_A_x86_precomp="${MY_A_x86/basic/precomp}"
+MY_A_x86_sdk="${MY_A_x86/basic/sdk}"
+MY_A_x86_sqlplus="${MY_A_x86/basic/sqlplus}"
+MY_A_x86_tools="${MY_A_x86/basic/tools}"
+
+MY_PLAT_amd64="Linux x86-64"
+MY_BITS_amd64=64
+MY_A_amd64="${PN/oracle-}-basic-linux.x64-${MY_PV}.0dbru.zip"
+MY_A_amd64_jdbc="${MY_A_amd64/basic/jdbc}"
+MY_A_amd64_odbc="${MY_A_amd64/basic/odbc}"
+MY_A_amd64_precomp="${MY_A_amd64/basic/precomp}"
+MY_A_amd64_sdk="${MY_A_amd64/basic/sdk}"
+MY_A_amd64_sqlplus="${MY_A_amd64/basic/sqlplus}"
+MY_A_amd64_tools="${MY_A_amd64/basic/tools}"
+
+if [[ ${MY_PVP} == p* ]]
+then
+ MY_PVP=-${MY_PVP#p}
+ # Updated 9/22/2017: instantclient-odbc-linux-12.2.0.1.0-2.zip
+ MY_A_x86_odbc="${MY_A_x86_odbc%.zip}${MY_PVP}.zip"
+ MY_A_amd64_odbc="${MY_A_amd64_odbc%.zip}${MY_PVP}.zip"
+fi
+
+SRC_URI="
+ abi_x86_32? (
+ ${MY_A_x86}
+ jdbc? ( ${MY_A_x86_jdbc} )
+ odbc? ( ${MY_A_x86_odbc} )
+ precomp? ( ${MY_A_x86_precomp} )
+ !abi_x86_64? (
+ sdk? ( ${MY_A_x86_sdk} )
+ sqlplus? ( ${MY_A_x86_sqlplus} )
+ tools? ( ${MY_A_x86_tools} )
+ ) )
+ abi_x86_64? (
+ ${MY_A_amd64}
+ jdbc? ( ${MY_A_amd64_jdbc} )
+ odbc? ( ${MY_A_amd64_odbc} )
+ precomp? ( ${MY_A_amd64_precomp} )
+ sdk? ( ${MY_A_amd64_sdk} )
+ sqlplus? ( ${MY_A_amd64_sqlplus} )
+ tools? ( ${MY_A_amd64_tools} )
+ )
+"
+
+LICENSE="OTN"
+SLOT="0/${MY_SOVER}"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="fetch splitdebug"
+
+DEPEND="app-arch/unzip"
+RDEPEND="
+ >=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]
+ !<dev-db/oracle-instantclient-basic-12
+ !<dev-db/oracle-instantclient-odbc-12
+ !<dev-db/oracle-instantclient-jdbc-12
+ !<dev-db/oracle-instantclient-sqlplus-12
+"
+
+S="${WORKDIR}/${MY_P}"
+
+QA_PREBUILT="usr/lib*/oracle/client/*/*"
+
+set_my_abivars() {
+ if multilib_is_native_abi; then
+ MY_WORKDIR="${WORKDIR}"
+ MY_S="${S}"
+ else
+ MY_WORKDIR="${WORKDIR}/${ABI}"
+ MY_S="${MY_WORKDIR}/${MY_P}"
+ fi
+
+ local abi=${ABI}
+ [[ ${abi} == 'default' ]] && abi=${ARCH}
+ MY_PLAT=MY_PLAT_${abi} ; MY_PLAT=${!MY_PLAT} # platform name
+ MY_BITS=MY_BITS_${abi} ; MY_BITS=${!MY_BITS} # platform bitwidth
+ MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile
+ MY_A_jdbc=MY_A_${abi}_jdbc ; MY_A_jdbc=${!MY_A_jdbc} # jdbc distfile
+ MY_A_odbc=MY_A_${abi}_odbc ; MY_A_odbc=${!MY_A_odbc} # odbc distfile
+ MY_A_precomp=MY_A_${abi}_precomp; MY_A_precomp=${!MY_A_precomp} # precomp distfile
+ MY_A_sdk=MY_A_${abi}_sdk ; MY_A_sdk=${!MY_A_sdk} # sdk distfile
+ MY_A_sqlplus=MY_A_${abi}_sqlplus; MY_A_sqlplus=${!MY_A_sqlplus} # sqlplus distfile
+ MY_A_tools=MY_A_${abi}_tools ; MY_A_tools=${!MY_A_tools} # tools distfile
+
+ [[ -n ${MY_PLAT} ]]
+}
+
+oic_distfile_status() {
+ : # We must not access DISTDIR in pkg_* phase, bug#612966.
+# Not removing this lines yet, we may eventually specify this feature.
+# if [[ -r ${DISTDIR}/${1} ]]; then
+# echo "already here"
+# else
+# echo "still absent"
+# fi
+}
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE//overview/downloads}"
+ eerror " and download"
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ eerror "Instant Client for ${MY_PLAT}"
+ # convenient ordering like Linux x86-64 download site
+ eerror " Basic: $(oic_distfile_status ${MY_A}) ${MY_A}"
+ use sqlplus && multilib_is_native_abi &&
+ eerror " SQL*Plus: $(oic_distfile_status ${MY_A_sqlplus}) ${MY_A_sqlplus}"
+ use tools && multilib_is_native_abi &&
+ eerror " Tools: $(oic_distfile_status ${MY_A_tools}) ${MY_A_tools}"
+ use sdk && multilib_is_native_abi &&
+ eerror " SDK: $(oic_distfile_status ${MY_A_sdk}) ${MY_A_sdk}"
+ use jdbc &&
+ eerror " JDBC: $(oic_distfile_status ${MY_A_jdbc}) ${MY_A_jdbc}"
+ use odbc &&
+ eerror " ODBC: $(oic_distfile_status ${MY_A_odbc}) ${MY_A_odbc}"
+ use precomp &&
+ eerror " Precompiler: $(oic_distfile_status ${MY_A_precomp}) ${MY_A_precomp}"
+ done
+ eerror "After downloading these files (for *all* shown architectures),"
+ eerror "put them in your DISTDIR filesystem directory."
+}
+
+src_unpack() {
+ local ABI
+ for ABI in $(multilib_get_enabled_abis)
+ do
+ set_my_abivars || continue
+ mkdir -p "${MY_WORKDIR}" || die
+ cd "${MY_WORKDIR}" || die
+ unpack ${MY_A}
+ use jdbc && unpack ${MY_A_jdbc}
+ use odbc && unpack ${MY_A_odbc}
+ use precomp && unpack ${MY_A_precomp}
+ if multilib_is_native_abi; then
+ use sdk && unpack ${MY_A_sdk}
+ use sqlplus && unpack ${MY_A_sqlplus}
+ use tools && unpack ${MY_A_tools}
+ fi
+ done
+}
+
+src_prepare() {
+ local PATCHES=()
+ if use precomp; then
+ PATCHES+=( "${FILESDIR}"/18.3.0.0-proc-makefile.patch )
+ # Not supporting COBOL for now
+ rm -f sdk/demo/*procob*
+ fi
+ if use sdk; then
+ PATCHES+=( "${FILESDIR}"/18.3.0.0-makefile.patch )
+ rm sdk/include/ldap.h || die #299562
+ fi
+ default
+}
+
+# silence configure&compile messages from multilib-minimal
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # all content goes here without version number, bug#578402
+ local oracle_home=/usr/$(get_libdir)/oracle/client
+ local oracle_home_to_root=../../../.. # for dosym
+ local ldpath=
+
+ local ABI
+ for ABI in $(multilib_get_enabled_abis) # last iteration is final ABI
+ do
+ if ! set_my_abivars; then
+ elog "Skipping unsupported ABI ${ABI}."
+ continue
+ fi
+ einfo "Installing runtime for ${MY_PLAT} ..."
+
+ cd "${MY_S}" || die
+
+ # shared libraries
+ into "${oracle_home}"
+ dolib.so lib*$(get_libname)*
+ use precomp && dolib.a cobsqlintf.o
+
+ # ensure to be linkable
+ [[ -e libocci$(get_libname) ]] ||
+ dosym libocci$(get_libname ${MY_SOVER}) \
+ "${oracle_home}"/$(get_libdir)/libocci$(get_libname)
+ [[ -e libclntsh$(get_libname) ]] ||
+ dosym libclntsh$(get_libname ${MY_SOVER}) \
+ "${oracle_home}"/$(get_libdir)/libclntsh$(get_libname)
+
+ # java archives
+ insinto "${oracle_home}"/$(get_libdir)
+ doins *.jar
+
+ # runtime library path
+ ldpath+=${ldpath:+:}${oracle_home}/$(get_libdir)
+
+ # Vanilla filesystem layout does not support multilib
+ # installation, so we need to move the libs into the
+ # ABI specific libdir. However, ruby-oci8 build system
+ # detects an instantclient along the shared libraries,
+ # and does expect the sdk right there.
+ use sdk && dosym ../sdk "${oracle_home}"/$(get_libdir)/sdk
+
+ eend $?
+ done
+
+ local DOCS=( BASIC_README )
+ local HTML_DOCS=()
+ local paxbins=( adrci genezi uidrvci )
+ local scripts=()
+
+ if use jdbc; then
+ DOCS+=( JDBC_README )
+ fi
+ if use odbc; then
+ DOCS+=( ODBC_README )
+ HTML_DOCS+=( help )
+ scripts+=( odbc_update_ini.sh )
+ fi
+ if use precomp; then
+ DOCS+=( PRECOMP_README )
+ paxbins+=( sdk/proc )
+ # Install pcscfg.cfg into /etc/oracle, as the user probably
+ # wants to add the include path for the compiler headers
+ # here and we do not want this to be overwritten.
+ insinto /etc/oracle
+ doins precomp/admin/pcscfg.cfg
+ sed -i -e "s%^sys_include=.*%sys_include=(${oracle_home}/include,${EPREFIX}/usr/include)%" \
+ "${ED}"/etc/oracle/pcscfg.cfg || die
+ dosym ../../${oracle_home_to_root}/etc/oracle/pcscfg.cfg "${oracle_home}/precomp/admin/pcscfg.cfg"
+ dosym ../.."${oracle_home}"/bin/proc /usr/bin/proc
+ # Not supporting COBOL for now
+ # paxbins+=( sdk/{procob,rtsora} )
+ # doins precomp/admin/pcbcfg.cfg
+ fi
+ if use sdk; then
+ einfo "Installing SDK ..."
+ DOCS+=( sdk/SDK_README )
+ scripts+=( sdk/ott )
+ insinto "${oracle_home}"/$(get_libdir)
+ doins sdk/ottclasses.zip
+ insinto "${oracle_home}"/sdk
+ doins -r sdk/{admin,demo,include}
+ # Some build systems simply expect ORACLE_HOME/include.
+ dosym sdk/include "${oracle_home}"/include
+ # Some build systems do not know the instant client,
+ # expecting headers in rdbms/public, see bug#669316.
+ # Additionally, some (probably older ruby-oci8) do
+ # require rdbms/public to be a real directory.
+ insinto "${oracle_home}"/rdbms/public
+ doins -r sdk/include/*
+ # Others (like the DBD::Oracle perl module) know the Oracle
+ # eXpress Edition's client, parsing an rdbms/demo/demo_xe.mk.
+ dosym ../../sdk/demo/demo.mk "${oracle_home}"/rdbms/demo/demo_xe.mk
+ # And some do expect /usr/include/oracle/<ver>/client/include,
+ # querying 'sqlplus' for the version number, also see bug#652096.
+ dosym ../../../.."${oracle_home}"/sdk/include /usr/include/oracle/${MY_PVM}/client
+ eend $?
+ fi
+ if use sqlplus; then
+ DOCS+=( SQLPLUS_README )
+ paxbins+=( sqlplus )
+ insinto "${oracle_home}"/sqlplus/admin
+ doins glogin.sql
+ dosym ../.."${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
+ fi
+ if use tools; then
+ DOCS+=( TOOLS_README )
+ paxbins+=( exp expdp imp impdp sqlldr wrc )
+ fi
+
+ einfo "Installing binaries for ${MY_PLAT} ..."
+ into "${oracle_home}"
+ dobin ${paxbins[*]} ${scripts[*]}
+ pushd "${ED}${oracle_home}/bin" >/dev/null || die
+ pax-mark -c ${paxbins[*]#*/} || die
+ popd >/dev/null || die
+ eend $?
+
+ einstalldocs
+
+ # create path for tnsnames.ora
+ insinto /etc/oracle
+ doins "${FILESDIR}"/tnsnames.ora.sample
+
+ # Add OCI libs to library path
+ {
+ echo "# ${EPREFIX}/etc/env.d/50${PN}"
+ echo "# Do not edit this file, but 99${PN} instead"
+ echo
+ echo "ORACLE_HOME=${EPREFIX}${oracle_home}"
+ echo "LDPATH=${ldpath}"
+ echo "TNS_ADMIN=${EPREFIX}/etc/oracle/"
+ } > "${T}"/50${PN}
+
+ doenvd "${T}"/50${PN}
+
+ # ensure ORACLE_HOME/lib exists
+ [[ -e ${ED}${oracle_home}/lib/. ]] ||
+ dosym $(get_libdir) "${oracle_home#/}"/lib
+}
+
+pkg_preinst() {
+ if [[ -r ${EROOT}/etc/env.d/99${PN} ]]; then
+ cp "${EROOT}/etc/env.d/99${PN}" "${ED}/etc/env.d/" || die
+ else
+ {
+ echo "# ${EPREFIX}/etc/env.d/99${PN}"
+ echo "# Configure system-wide defaults for your Oracle Instant Client here"
+ echo
+ echo "#$(grep '^ORACLE_HOME=' "${ED}/etc/env.d/50${PN}")"
+ echo "#$(grep '^TNS_ADMIN=' "${ED}/etc/env.d/50${PN}")"
+ echo "#NLS_LANG="
+ } > "${ED}/etc/env.d/99${PN}"
+ fi
+}
+
+pkg_postinst() {
+ elog "${P} does not provide an sqlnet.ora"
+ elog "configuration file, redirecting oracle diagnostics for database-"
+ elog "and network-issues into ~USER/oradiag_USER/ instead."
+ elog "It should be safe to ignore this message in sqlnet.log there:"
+ elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []"
+ elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference."
+ elog "If you want to directly analyse low-level debug info or don't want"
+ elog "to see it at all, so you really need an sqlnet.ora file, please"
+ elog "consult http://search.oracle.com/search/search?q=sqlnet.ora"
+ elog ""
+ elog "TNS_ADMIN has been set to ${EPREFIX}/etc/oracle by default,"
+ elog "put your tnsnames.ora there or configure TNS_ADMIN"
+ elog "to point to your user specific configuration."
+ if use precomp; then
+ elog ""
+ elog "The proc precompiler uses the system library headers, which in"
+ elog "turn include the headers of the used compiler."
+ elog "To make proc work, please add the compiler header path of your"
+ elog "preferred compiler to sys_include in:"
+ elog " ${EPREFIX}/etc/oracle/pcscfg.cfg"
+ elog "Remember to update this setting when you switch or update the"
+ elog "compiler."
+ elog "For gcc, the headers are usually found in a path matching the"
+ elog "following pattern:"
+ elog " ${EPREFIX}/usr/lib/gcc/*/*/include"
+ elog "The exact details depend on the architecture and the version of"
+ elog "the compiler to be used."
+ fi
+ ewarn "Please re-source your shell settings for ORACLE_HOME"
+ ewarn " changes, such as: source ${EPREFIX}/etc/profile"
+}