From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 59F78158020 for ; Mon, 12 Dec 2022 21:50:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 67763E0893; Mon, 12 Dec 2022 21:50:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2FD3AE087E for ; Mon, 12 Dec 2022 21:50:34 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: Apache project , James Le Cuirot 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 Message-Id: <20221212215004.7445-2-chewi@gentoo.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221212215004.7445-1-chewi@gentoo.org> References: <20221212215004.7445-1-chewi@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: e5c87d7c-cf1b-4866-88bb-0aa8292b5fb1 X-Archives-Hash: 9552d1c5d2bc8d60da4b99409e97c5bb 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 --- 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