dev-db/phpmyadmin: ppc64 stable wrt bug #714014
[gentoo.git] / dev-db / oracle-instantclient-jdbc / oracle-instantclient-jdbc-11.2.0.4.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="4"
5
6 inherit eutils multilib-minimal
7
8 MY_PLAT_x86="Linux x86"
9 MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
10
11 MY_PLAT_amd64="Linux x86-64"
12 MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip"
13
14 DESCRIPTION="Oracle 11g Instant Client: JDBC supplement"
15 HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
16 SRC_URI="
17         abi_x86_32? ( ${MY_A_x86}   )
18         abi_x86_64? ( ${MY_A_amd64} )
19 "
20
21 LICENSE="OTN"
22 SLOT="0"
23 KEYWORDS="amd64 x86"
24 RESTRICT="fetch splitdebug"
25 IUSE=""
26
27 DEPEND="app-arch/unzip"
28 RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
29
30 S="${WORKDIR}"
31
32 QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
33
34 set_my_abivars() {
35         MY_PLAT=MY_PLAT_${ABI}; MY_PLAT=${!MY_PLAT} # platform name
36         MY_A=MY_A_${ABI}      ; MY_A=${!MY_A}       # runtime distfile
37         # ABI sourcedir
38         MY_S="${S}/${ABI}/instantclient_11_2"
39
40         [[ -n ${MY_PLAT} ]]
41 }
42
43 pkg_nofetch() {
44         eerror "Please go to"
45         eerror "  ${HOMEPAGE%/*}/index-097480.html"
46         eerror "  and download"
47         local ABI
48         for ABI in $(multilib_get_enabled_abis)
49         do
50                 set_my_abivars || continue
51                 eerror "Instant Client for ${MY_PLAT}"
52                 eerror "    JDBC: ${MY_A}"
53         done
54         eerror "After downloading, put them in:"
55         eerror "    ${DISTDIR}/"
56 }
57
58 src_unpack() {
59         local ABI
60         for ABI in $(multilib_get_enabled_abis)
61         do
62                 set_my_abivars || continue
63                 mkdir -p "${MY_S%/*}" || die
64                 cd "${MY_S%/*}" || die
65                 unpack ${MY_A}
66         done
67 }
68
69 src_install() {
70         # all binaries go here
71         local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
72         into "${oracle_home}"
73
74         local ABI
75         for ABI in $(multilib_get_enabled_abis)
76         do
77                 if ! set_my_abivars; then
78                         elog "Skipping unsupported ABI ${ABI}."
79                         continue
80                 fi
81                 einfo "Installing runtime for ${MY_PLAT} ..."
82
83                 cd "${MY_S}" || die
84
85                 dolib.so lib*$(get_libname)*
86
87                 insinto "${oracle_home}"/$(get_libdir)
88                 doins *.jar
89
90                 eend $?
91         done
92 }