• [gentoo-dev] [PATCH 1/3] db-use.eclass: Drop support for EAPI 5 and 6

    From James Le Cuirot@21:1/5 to All on Mon Dec 12 23:00:02 2022
    The last consumers have been dropped from the gentoo repo.

    Signed-off-by: James Le Cuirot <chewi@gentoo.org>
    ---
    eclass/db-use.eclass | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass
    index 55e72286fda4..3e5d6f63fa2e 100644
    --- a/eclass/db-use.eclass
    +++ b/eclass/db-use.eclass
    @@ -8,7 +8,7 @@
    # maintainer-needed@gentoo.org
    # @AUTHOR:
    # Paul de Vrieze <pauldv@gentoo.org>
    -# @SUPPORTED_EAPIS: 5 6 7 8
    +# @SUPPORTED_EAPIS: 7 8
    # @BLURB: This is a common location for functions that aid the use of sys-libs/db
    # @DESCRIPTION:
    # This eclass is designed to provide helpful functions for depending on
    @@ -16,7 +16,6 @@

    # multilib is used for get_libname in all EAPI
    case ${EAPI} in
    - 5|6) inherit eapi7-ver ;& # fallthrough
    7|8) inherit multilib ;;
    *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
    esac
    --
    2.38.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Le Cuirot@21:1/5 to All on Mon Dec 12 23:00:02 2022
    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"