EPREFIX would be appropriate for values used at runtime.
db_findver and db_libname check for the presence of files or directories
at build time.
db_includedir returns a header directory, which would almost certainly
only be used at build time.
Signed-off-by: James Le Cuirot <
chewi@gentoo.org>
---
eclass/db-use.eclass | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass
index 3e5d6f63fa2e..99f31a17a738 100644
--- a/eclass/db-use.eclass
+++ b/eclass/db-use.eclass
@@ -52,7 +52,7 @@ db_findver() {
PKG="$(best_version $1)"
VER="$(ver_cut 1-2 "${PKG/*db-/}")"
- if [ -d "${EPREFIX}"/usr/include/db$(db_ver_to_slot "$VER") ]; then
+ if [ -d "${ESYSROOT}"/usr/include/db$(db_ver_to_slot "$VER") ]; then
#einfo "Found db version ${VER}" >&2
echo -n "$VER"
return 0
@@ -71,8 +71,8 @@ db_includedir() {
VER="$(db_findver sys-libs/db)" || return 1
VER="$(db_ver_to_slot "$VER")"
echo "include version ${VER}" >&2
- if [ -d "${EPREFIX}/usr/include/db${VER}" ]; then
- echo -n "${EPREFIX}/usr/include/db${VER}"
+ if [ -d "${ESYSROOT}/usr/include/db${VER}" ]; then
+ echo -n "${ESYSROOT}/usr/include/db${VER}"
return 0
else
eerror "sys-libs/db package requested, but headers not found"