1 |
Add get_libdir() function to obtain the basename of libdir using |
2 |
the same algorithm that econf uses. |
3 |
--- |
4 |
bin/eapi.sh | 4 ++++ |
5 |
bin/phase-helpers.sh | 11 +++++++++++ |
6 |
2 files changed, 15 insertions(+) |
7 |
|
8 |
diff --git a/bin/eapi.sh b/bin/eapi.sh |
9 |
index 5f96c3b..6ace20d 100644 |
10 |
--- a/bin/eapi.sh |
11 |
+++ b/bin/eapi.sh |
12 |
@@ -64,6 +64,10 @@ ___eapi_has_usex() { |
13 |
[[ ! ${1-${EAPI}} =~ ^(0|1|2|3|4|4-python|4-slot-abi)$ ]] |
14 |
} |
15 |
|
16 |
+___eapi_has_get_libdir() { |
17 |
+ [[ ! ${1-${EAPI}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-hdepend|5-progress)$ ]] |
18 |
+} |
19 |
+ |
20 |
___eapi_has_master_repositories() { |
21 |
[[ ${1-${EAPI}} =~ ^(5-progress)$ ]] |
22 |
} |
23 |
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh |
24 |
index c2161f6..8edbc07 100644 |
25 |
--- a/bin/phase-helpers.sh |
26 |
+++ b/bin/phase-helpers.sh |
27 |
@@ -842,6 +842,17 @@ best_version() { |
28 |
esac |
29 |
} |
30 |
|
31 |
+if ___eapi_has_get_libdir; then |
32 |
+ get_libdir() { |
33 |
+ local libdir_var="LIBDIR_${ABI}" |
34 |
+ local libdir="lib" |
35 |
+ |
36 |
+ [[ -n ${ABI} && -n ${!libdir_var} ]] && libdir=${!libdir_var} |
37 |
+ |
38 |
+ echo "${libdir}" |
39 |
+ } |
40 |
+fi |
41 |
+ |
42 |
if ___eapi_has_master_repositories; then |
43 |
master_repositories() { |
44 |
local output repository=$1 retval |
45 |
-- |
46 |
2.0.4 |