public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Haubenwallner" <haubi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/oracle-instantclient/files/, dev-db/oracle-instantclient/
Date: Wed,  9 Mar 2016 17:48:15 +0000 (UTC)	[thread overview]
Message-ID: <1457545687.8cac1c515280ae4a4fcb3486646b67a2e16c247b.haubi@gentoo> (raw)

commit:     8cac1c515280ae4a4fcb3486646b67a2e16c247b
Author:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  9 17:46:59 2016 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Wed Mar  9 17:48:07 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cac1c51

dev-db/oracle-instantclient-12.1.0.2: really installs now, with EAPI 6

Package-Manager: portage-2.2.26

 .../files/12.1.0.2-makefile.patch                  |   4 +-
 .../oracle-instantclient/files/tnsnames.ora.sample |  93 +++++++++++++++++
 .../oracle-instantclient-12.1.0.2.ebuild           | 111 ++++++++++++++-------
 3 files changed, 171 insertions(+), 37 deletions(-)

diff --git a/dev-db/oracle-instantclient/files/12.1.0.2-makefile.patch b/dev-db/oracle-instantclient/files/12.1.0.2-makefile.patch
index 01d52b6..999d8c3 100644
--- a/dev-db/oracle-instantclient/files/12.1.0.2-makefile.patch
+++ b/dev-db/oracle-instantclient/files/12.1.0.2-makefile.patch
@@ -3,8 +3,8 @@ known by CPAN DBD::Oracle (bug#165834).
 This provides absolute paths for headers and libraries.
 
 Paranoia drops those REMOVE lines.
---- sdk/demo/demo.mk
-+++ sdk/demo/demo.mk
+--- instantclient_12_1/sdk/demo/demo.mk
++++ instantclient_12_1/sdk/demo/demo.mk
 @@ -28,8 +28,9 @@
  CC=/opt/SunProd/SUNWspro6.1/bin/CC
  cc=/opt/SunProd/SUNWspro6.1/bin/cc

diff --git a/dev-db/oracle-instantclient/files/tnsnames.ora.sample b/dev-db/oracle-instantclient/files/tnsnames.ora.sample
new file mode 100644
index 0000000..f0524f5
--- /dev/null
+++ b/dev-db/oracle-instantclient/files/tnsnames.ora.sample
@@ -0,0 +1,93 @@
+# This file contains the syntax information for 
+# the entries to be put in any tnsnames.ora file
+# The entries in this file are need based. 
+# There are no defaults for entries in this file
+# that Sqlnet/Net3 use that need to be overridden 
+#
+# Typically you could have two tnsnames.ora files
+# in the system, one that is set for the entire system
+# and is called the system tnsnames.ora file, and a
+# second file that is used by each user locally so that
+# he can override the definitions dictated by the system
+# tnsnames.ora file.
+
+# The entries in tnsnames.ora are an alternative to using
+# the names server with the onames adapter.
+# They are a collection of aliases for the addresses that 
+# the listener(s) is(are) listening for a database or 
+# several databases.
+
+# The following is the general syntax for any entry in 
+# a tnsnames.ora file. There could be several such entries 
+# tailored to the user's needs.
+
+<alias>= [ (DESCRIPTION_LIST =  # Optional depending on whether u have 
+				# one or more descriptions
+				# If there is just one description, unnecessary ]
+	  (DESCRIPTION=
+	    [ (SDU=2048) ]	# Optional, defaults to 2048
+				# Can take values between 512 and 32K
+	    [ (ADDRESS_LIST=    # Optional depending on whether u have
+				# one or more addresses
+				# If there is just one address, unnecessary ]
+	      (ADDRESS=
+		[ (COMMUNITY=<community_name>) ] 
+		(PROTOCOL=tcp)
+		(HOST=<hostname>)
+		(PORT=<portnumber (1521 is a standard port used)>)
+	      )
+	      [ (ADDRESS=
+		  (PROTOCOL=ipc)
+		  (KEY=<ipckey (PNPKEY is a standard key used)>)	
+		)
+	      ]
+	      [ (ADDRESS=
+		  [ (COMMUNITY=<community_name>) ]
+		  (PROTOCOL=decnet)
+		  (NODE=<nodename>)
+		  (OBJECT=<objectname>)
+		)
+	      ]
+              ... # More addresses
+	    [ ) ] # Optional depending on whether ADDRESS_LIST is used or not 
+	    [ (CONNECT_DATA=
+		(SID=<oracle_sid>)
+		[ (GLOBAL_NAME=<global_database_name>) ]
+	      )
+	    ]
+	    [ (SOURCE_ROUTE=yes) ]  
+	  )
+	  (DESCRIPTION=     
+	    [ (SDU=2048) ]	# Optional, defaults to 2048
+				# Can take values between 512 and 32K
+	    [ (ADDRESS_LIST= ]	# Optional depending on whether u have more
+				# than one address or not
+				# If there is just one address, unnecessary
+	      (ADDRESS
+		[ (COMMUNITY=<community_name>) ]
+		(PROTOCOL=tcp)
+		(HOST=<hostname>)
+		(PORT=<portnumber (1521 is a standard port used)>)
+	      )
+	      [ (ADDRESS=
+		  (PROTOCOL=ipc)
+		  (KEY=<ipckey (PNPKEY is a standard key used)>)
+	         )
+	      ]
+	      ... 		# More addresses
+	    [ ) ] 		# Optional depending on whether ADDRESS_LIST  
+				# is being used
+	    [ (CONNECT_DATA=
+		(SID=<oracle_sid>)
+		[ (GLOBAL_NAME=<global_database_name>) ]
+	      )
+	    ]
+	    [ (SOURCE_ROUTE=yes) ]
+	  )
+	  [ (CONNECT_DATA=
+	      (SID=<oracle_sid>)
+	      [ (GLOBAL_NAME=<global_database_name>) ]
+	    )
+	  ]
+	  ...   # More descriptions 
+	[ ) ]	# Optional depending on whether DESCRIPTION_LIST is used or not

diff --git a/dev-db/oracle-instantclient/oracle-instantclient-12.1.0.2.ebuild b/dev-db/oracle-instantclient/oracle-instantclient-12.1.0.2.ebuild
index d5d5abf..6ee9231 100644
--- a/dev-db/oracle-instantclient/oracle-instantclient-12.1.0.2.ebuild
+++ b/dev-db/oracle-instantclient/oracle-instantclient-12.1.0.2.ebuild
@@ -4,7 +4,7 @@
 
 EAPI="6"
 
-inherit eutils versionator multilib-minimal
+inherit eutils versionator pax-utils multilib-minimal
 
 MY_PVM=$(get_version_component_range 1-2)
 
@@ -67,10 +67,6 @@ S="${WORKDIR}"
 
 QA_PREBUILT="usr/lib*/oracle/*/client/lib*/lib*"
 
-DOCS=( "demo/*" )
-
-PATCHES=( "${FILESDIR}"/12.1.0.2-makefile.patch )
-
 set_my_abivars() {
 	S="${WORKDIR}/${ABI}/instantclient_$(
 		replace_version_separator 1 "_" "${MY_PVM}"
@@ -143,14 +139,19 @@ src_unpack() {
 	done
 }
 
+src_prepare() {
+	use sdk && PATCHES=( "${FILESDIR}"/12.1.0.2-makefile.patch )
+	default
+}
+
 # silence configure&compile messages from multilib-minimal
 src_configure() { :; }
 src_compile() { :; }
 
 src_install() {
-	# all binaries go here
-	local oracle_home=/usr/$(ABI= get_libdir)/oracle/${MY_PVM}/client
-	into "${oracle_home}"
+	# all content goes here
+	local oracle_home=usr/$(get_libdir)/oracle/${MY_PVM}/client
+	into "/${oracle_home}"
 
 	local ldpath= ABI
 	for ABI in $(multilib_get_enabled_abis) # last iteration is final ABI
@@ -169,47 +170,83 @@ src_install() {
 		# ensure to be linkable
 		[[ -e libocci$(get_libname) ]] ||
 		dosym libocci$(get_libname ${MY_PVM}) \
-			"${oracle_home}"/$(get_libdir)/libocci$(get_libname)
+			"/${oracle_home}"/$(get_libdir)/libocci$(get_libname)
 		[[ -e libclntsh$(get_libname) ]] ||
 		dosym libclntsh$(get_libname ${MY_PVM}) \
-			"${oracle_home}"/$(get_libdir)/libclntsh$(get_libname)
+			"/${oracle_home}"/$(get_libdir)/libclntsh$(get_libname)
 
 		# java archives
-		insinto "${oracle_home}"/$(get_libdir)
+		insinto "/${oracle_home}"/$(get_libdir)
 		doins *.jar
 
 		# runtime library path
-		ldpath+=${ldpath:+:}${oracle_home}/$(get_libdir)
+		ldpath+=${ldpath:+:}/${oracle_home}/$(get_libdir)
 
 		eend $?
 	done
 
-	# ensure ORACLE_HOME/lib exists
-	[[ -e ${ED}${oracle_home}/lib ]] ||
-	dosym $(get_libdir) "${oracle_home}"/lib
+	local DOCS=()
+	local HTML_DOCS=()
+	local paxbins=( adrci genezi uidrvci )
+	local scripts=()
+
+	use sqlplus && paxbins+=( sqlplus )
+	use tools   && paxbins+=( wrc )
 
-	einfo "Installing SDK ..."
-	cd "${S}"/sdk || die
-
-	# SDK makefile, for #165834
-	# As we change the relative filesystem layout compared
-	# to vanilla instantclient.zip content, it feels easier
-	# to fake the layout found in Oracle eXpress Edition.
-	# Both layouts are known to DBD::Oracle (cpan).
-	insinto "${oracle_home}"/rdbms/demo
-	newins demo/demo.mk demo_xe.mk
-
-	# Remove ldap.h, #299562
-	rm include/ldap.h || die
-	# DBD::Oracle needs rdbms/public as real directory
-	insinto "${oracle_home}"/rdbms/public
-	doins include/*.h
-	dosym rdbms/public "${oracle_home}"/include
-	# ruby-oci8 expects the headers here
-	dosym "${oracle_home}"/rdbms/public /usr/include/oracle/${MY_PVM}/client
+	if use odbc; then
+		scripts+=( odbc_update_ini.sh )
+		HTML_DOCS+=( ODBC_IC_Readme_Unix.html help )
+	fi
 
+	einfo "Installing binaries for ${MY_PLAT} ..."
+	dobin ${paxbins[@]} ${scripts}
+	cd "${ED}${oracle_home}"/bin || die
+	pax-mark -c ${paxbins[@]} || die
+	cd "${S}" || die
 	eend $?
 
+	if use sqlplus; then
+		insinto "/${oracle_home}"/sqlplus/admin
+		doins glogin.sql
+		dosym "/${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
+	fi
+
+	if use sdk; then
+		einfo "Installing SDK ..."
+
+		DOCS+=( sdk/demo )
+		cd "${S}"/sdk || die
+
+		# SDK makefile, for #165834
+		# As we change the relative filesystem layout compared
+		# to vanilla instantclient.zip content, it feels easier
+		# to fake the layout found in Oracle eXpress Edition.
+		# Both layouts are known to DBD::Oracle (cpan).
+		insinto "/${oracle_home}"/rdbms/demo
+		newins demo/demo.mk demo_xe.mk
+
+		# Remove ldap.h, #299562
+		rm include/ldap.h || die
+		# DBD::Oracle needs rdbms/public as real directory
+		insinto "/${oracle_home}"/rdbms/public
+		doins include/*.h
+		dosym rdbms/public "/${oracle_home}"/include
+		# ruby-oci8 expects the headers here
+		dosym "/${oracle_home}"/rdbms/public /usr/include/oracle/${MY_PVM}/client
+
+		# ott
+		insinto "/${oracle_home}"/$(get_libdir)
+		dobin ott
+		doins *.zip
+
+		# more files found in the zip
+		insinto "/${oracle_home}"/admin
+		doins admin/oraaccess.xsd
+
+		eend $?
+	fi
+
+	cd "${S}" || die
 	einstalldocs
 
 	# create path for tnsnames.ora
@@ -221,12 +258,16 @@ src_install() {
 		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 "ORACLE_HOME=${EPREFIX}/${oracle_home}"
 		echo "LDPATH=${ldpath}"
 		echo "TNS_ADMIN=/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() {


             reply	other threads:[~2016-03-09 17:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 17:48 Michael Haubenwallner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-08 19:56 [gentoo-commits] repo/gentoo:master commit in: dev-db/oracle-instantclient/files/, dev-db/oracle-instantclient/ Petr Vaněk
2016-03-09 15:51 Michael Haubenwallner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457545687.8cac1c515280ae4a4fcb3486646b67a2e16c247b.haubi@gentoo \
    --to=haubi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox