1 |
To support multilib-portage abi-wrapper properly, we need to install |
2 |
executables non-prefixed on all ABIs. However, we can safely create |
3 |
prefixed symlinks to the executable to improve compatibility with |
4 |
non-multilib-portage systems. |
5 |
|
6 |
All of the symlinks point to the same executable but since it is wrapped |
7 |
by abi-wrapper, it will work correctly in portage context. |
8 |
--- |
9 |
eclass/multilib-build.eclass | 19 +++++++++++++++++-- |
10 |
1 file changed, 17 insertions(+), 2 deletions(-) |
11 |
|
12 |
diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass |
13 |
index 4b6a953..755d774 100644 |
14 |
--- a/eclass/multilib-build.eclass |
15 |
+++ b/eclass/multilib-build.eclass |
16 |
@@ -295,11 +295,26 @@ multilib_prepare_wrappers() { |
17 |
|
18 |
[[ ${#} -le 1 ]] || die "${FUNCNAME}: too many arguments" |
19 |
|
20 |
- [[ ${COMPLETE_MULTILIB} == yes ]] && return |
21 |
- |
22 |
local root=${1:-${ED}} |
23 |
local f |
24 |
|
25 |
+ if [[ ${COMPLETE_MULTILIB} == yes ]]; then |
26 |
+ # symlink '${CHOST}-foo -> foo' to support abi-wrapper while |
27 |
+ # keeping ${CHOST}-foo calls correct. |
28 |
+ |
29 |
+ for f in "${MULTILIB_CHOST_TOOLS[@]}"; do |
30 |
+ # drop leading slash if it's there |
31 |
+ f=${f#/} |
32 |
+ |
33 |
+ local dir=${f%/*} |
34 |
+ local fn=${f##*/} |
35 |
+ |
36 |
+ ln -s "${fn}" "${root}/${dir}/${CHOST}-${fn}" || die |
37 |
+ done |
38 |
+ |
39 |
+ return |
40 |
+ fi |
41 |
+ |
42 |
for f in "${MULTILIB_WRAPPED_HEADERS[@]}"; do |
43 |
# drop leading slash if it's there |
44 |
f=${f#/} |
45 |
-- |
46 |
1.9.2 |