From: Brian Evans <grknight@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [PATCH] eclass: db-use - Update to eapi7-ver
Date: Fri, 24 Aug 2018 13:28:59 -0400 [thread overview]
Message-ID: <20180824172859.31231-1-grknight@gentoo.org> (raw)
This is a very simple eclass which only calls these functions from eclasses:
ver_cut (EAPI 0-6)
get_libdir (EAPI 0-5)
get_libname (ALL EAPI)
I see no little reason to place die statements for unknown EAPIs.
Just changing the eclasses to better suit the latest EAPI should be OK.
Signed-off-by: Brian Evans <grknight@gentoo.org>
---
eclass/db-use.eclass | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/eclass/db-use.eclass b/eclass/db-use.eclass
index 35f11df034a..83ae94799ca 100644
--- a/eclass/db-use.eclass
+++ b/eclass/db-use.eclass
@@ -1,10 +1,14 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# This is a common location for functions that aid the use of sys-libs/db
#
# Bugs: maintainer-needed@gentoo.org
-inherit versionator multilib
+# multilib is used for get_libname in all EAPI
+case "${EAPI:-0}" in
+ 0|1|2|3|4|5|6) inherit eapi7-ver multilib ;;
+ *) inherit multilib ;;
+esac
#Convert a version to a db slot
db_ver_to_slot() {
@@ -38,7 +42,7 @@ db_findver() {
fi
PKG="$(best_version $1)"
- VER="$(get_version_component_range 1-2 "${PKG/*db-/}")"
+ VER="$(ver_cut 1-2 "${PKG/*db-/}")"
if [ -d "${EPREFIX}"/usr/include/db$(db_ver_to_slot "$VER") ]; then
#einfo "Found db version ${VER}" >&2
echo -n "$VER"
--
2.18.0
next reply other threads:[~2018-08-24 17:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-24 17:28 Brian Evans [this message]
2018-08-24 17:38 ` [gentoo-dev] [PATCH] eclass: db-use - Update to eapi7-ver Mart Raudsepp
2018-08-27 13:14 ` Brian Evans
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=20180824172859.31231-1-grknight@gentoo.org \
--to=grknight@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