From: James Le Cuirot <chewi@gentoo.org>
To: gentoo-dev <gentoo-dev@lists.gentoo.org>
Cc: Apache project <apache-bugs@gentoo.org>,
James Le Cuirot <chewi@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/3] db-use.eclass: Use ESYSROOT rather than EPREFIX where appropriate
Date: Mon, 12 Dec 2022 21:50:03 +0000 [thread overview]
Message-ID: <20221212215004.7445-2-chewi@gentoo.org> (raw)
In-Reply-To: <20221212215004.7445-1-chewi@gentoo.org>
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" >&2
@@ -83,8 +83,8 @@ db_includedir() {
for x in $@
do
if VER=$(db_findver "=sys-libs/db-${x}*") &&
- [ -d "${EPREFIX}/usr/include/db$(db_ver_to_slot $VER)" ]; then
- echo -n "${EPREFIX}/usr/include/db$(db_ver_to_slot $VER)"
+ [ -d "${ESYSROOT}/usr/include/db$(db_ver_to_slot $VER)" ]; then
+ echo -n "${ESYSROOT}/usr/include/db$(db_ver_to_slot $VER)"
return 0
fi
done
@@ -102,7 +102,7 @@ db_includedir() {
db_libname() {
if [ $# -eq 0 ]; then
VER="$(db_findver sys-libs/db)" || return 1
- if [ -e "${EPREFIX}/usr/$(get_libdir)/libdb-${VER}$(get_libname)" ]; then
+ if [ -e "${ESYSROOT}/usr/$(get_libdir)/libdb-${VER}$(get_libname)" ]; then
echo -n "db-${VER}"
return 0
else
@@ -114,7 +114,7 @@ db_libname() {
for x in $@
do
if VER=$(db_findver "=sys-libs/db-${x}*"); then
- if [ -e "${EPREFIX}/usr/$(get_libdir)/libdb-${VER}$(get_libname)" ]; then
+ if [ -e "${ESYSROOT}/usr/$(get_libdir)/libdb-${VER}$(get_libname)" ]; then
echo -n "db-${VER}"
return 0
fi
--
2.38.1
next prev parent reply other threads:[~2022-12-12 21:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 21:50 [gentoo-dev] [PATCH 1/3] db-use.eclass: Drop support for EAPI 5 and 6 James Le Cuirot
2022-12-12 21:50 ` James Le Cuirot [this message]
2022-12-12 21:50 ` [gentoo-dev] [PATCH 3/3] dev-libs/apr-util: Don't prefix db_includedir with SYSROOT James Le Cuirot
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=20221212215004.7445-2-chewi@gentoo.org \
--to=chewi@gentoo.org \
--cc=apache-bugs@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