public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: db-use.eclass ChangeLog
@ 2014-08-08 17:57 Christoph Junghans (ottxor)
  0 siblings, 0 replies; only message in thread
From: Christoph Junghans (ottxor) @ 2014-08-08 17:57 UTC (permalink / raw
  To: gentoo-commits

ottxor      14/08/08 17:57:28

  Modified:             db-use.eclass ChangeLog
  Log:
  added prefix support

Revision  Changes    Path
1.12                 eclass/db-use.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/db-use.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/db-use.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/db-use.eclass?r1=1.11&r2=1.12

Index: db-use.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- db-use.eclass	21 Jul 2013 09:23:45 -0000	1.11
+++ db-use.eclass	8 Aug 2014 17:57:28 -0000	1.12
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v 1.11 2013/07/21 09:23:45 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/db-use.eclass,v 1.12 2014/08/08 17:57:28 ottxor Exp $
 # This is a common location for functions that aid the use of sys-libs/db
 #
 # Bugs: maintainer-needed@gentoo.org
@@ -27,6 +27,7 @@
 
 #Find the version that correspond to the given atom
 db_findver() {
+	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
 	if [ $# -ne 1 ]; then
 		eerror "Function db_findver needs one argument" >&2
 		eerror "args given:" >&2
@@ -39,7 +40,7 @@
 
 	PKG="$(best_version $1)"
 	VER="$(get_version_component_range 1-2 "${PKG/*db-/}")"
-	if [ -d /usr/include/db$(db_ver_to_slot "$VER") ]; then
+	if [ -d "${EPREFIX}"/usr/include/db$(db_ver_to_slot "$VER") ]; then
 		#einfo "Found db version ${VER}" >&2
 		echo -n "$VER"
 		return 0
@@ -54,12 +55,13 @@
 # to test for, it will aim to find the library corresponding to it.
 
 db_includedir() {
+	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
 	if [ $# -eq 0 ]; then
 		VER="$(db_findver sys-libs/db)" || return 1
 		VER="$(db_ver_to_slot "$VER")"
 		echo "include version ${VER}" >&2
-		if [ -d "/usr/include/db${VER}" ]; then
-			echo -n "/usr/include/db${VER}"
+		if [ -d "${EPREFIX}/usr/include/db${VER}" ]; then
+			echo -n "${EPREFIX}/usr/include/db${VER}"
 			return 0
 		else
 			eerror "sys-libs/db package requested, but headers not found" >&2
@@ -70,8 +72,8 @@
 		for x in $@
 		do
 			if VER=$(db_findver "=sys-libs/db-${x}*") &&
-			   [ -d "/usr/include/db$(db_ver_to_slot $VER)" ]; then
-				echo -n "/usr/include/db$(db_ver_to_slot $VER)"
+			   [ -d "${EPREFIX}/usr/include/db$(db_ver_to_slot $VER)" ]; then
+				echo -n "${EPREFIX}/usr/include/db$(db_ver_to_slot $VER)"
 				return 0
 			fi
 		done
@@ -87,9 +89,10 @@
 # packages to test for, it will aim to find the library corresponding to it.
 
 db_libname() {
+	has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
 	if [ $# -eq 0 ]; then
 		VER="$(db_findver sys-libs/db)" || return 1
-		if [ -e "/usr/$(get_libdir)/libdb-${VER}.so" ]; then
+		if [ -e "${EPREFIX}/usr/$(get_libdir)/libdb-${VER}$(get_libname)" ]; then
 			echo -n "db-${VER}"
 			return 0
 		else
@@ -101,7 +104,7 @@
 		for x in $@
 		do
 			if VER=$(db_findver "=sys-libs/db-${x}*"); then
-				if [ -e "/usr/$(get_libdir)/libdb-${VER}.so" ]; then
+				if [ -e "${EPREFIX}/usr/$(get_libdir)/libdb-${VER}$(get_libname)" ]; then
 					echo -n "db-${VER}"
 					return 0
 				fi



1.1345               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1345&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1345&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1344&r2=1.1345

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1344
retrieving revision 1.1345
diff -u -r1.1344 -r1.1345
--- ChangeLog	7 Aug 2014 07:37:54 -0000	1.1344
+++ ChangeLog	8 Aug 2014 17:57:28 -0000	1.1345
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1344 2014/08/07 07:37:54 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1345 2014/08/08 17:57:28 ottxor Exp $
+
+  08 Aug 2014; Christoph Junghans <ottxor@gentoo.org> db-use.eclass:
+  added prefix support
 
   07 Aug 2014; Lars Wendler <polynomial-c@gentoo.org> apache-2.eclass:
   Fixed numerous misquotings by introducing arrays. Removed some useless "die"





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-08 17:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08 17:57 [gentoo-commits] gentoo-x86 commit in eclass: db-use.eclass ChangeLog Christoph Junghans (ottxor)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox