commit: 00d20f0ee71c59a0cdd75aa79705ed739990ff85
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 17 18:13:48 2014 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec 4 14:01:34 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=00d20f0e
Add tentative support for EAPI6 get_libdir()
Add get_libdir() function to obtain the basename of libdir using
the same algorithm that econf uses.
---
bin/eapi.sh | 4 ++++
bin/phase-helpers.sh | 11 +++++++++++
2 files changed, 15 insertions(+)
diff --git a/bin/eapi.sh b/bin/eapi.sh
index 5f96c3b..6ace20d 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -64,6 +64,10 @@ ___eapi_has_usex() {
[[ ! ${1-${EAPI}} =~ ^(0|1|2|3|4|4-python|4-slot-abi)$ ]]
}
+___eapi_has_get_libdir() {
+ [[ ! ${1-${EAPI}} =~
^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]]
+}
+
___eapi_has_master_repositories() {
[[ ${1-${EAPI}} =~ ^(5-progress)$ ]]
}
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 9738a3a..764b968 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -885,6 +885,17 @@ best_version() {
esac
}
+if ___eapi_has_get_libdir; then
+ get_libdir() {
+ local libdir_var="LIBDIR_${ABI}"
+ local libdir="lib"
+
+ [[ -n ${ABI} && -n ${!libdir_var} ]] && libdir=${!libdir_var}
+
+ echo "${libdir}"
+ }
+fi
+
if ___eapi_has_master_repositories; then
master_repositories() {
local output repository=$1 retval