Lines 244-251
Link Here
|
244 |
# and the native variant will be symlinked to the generic name. |
244 |
# and the native variant will be symlinked to the generic name. |
245 |
# |
245 |
# |
246 |
# This variable has to be a bash array. Paths shall be relative to |
246 |
# This variable has to be a bash array. Paths shall be relative to |
247 |
# installation root (${ED}), and name regular files. Recursive wrapping |
247 |
# installation root (${ED}), and name regular files or symbolic |
248 |
# is not supported. |
248 |
# links to regular files. Recursive wrapping is not supported. |
|
|
249 |
# |
250 |
# If symbolic link is passed, both symlink path and symlink target |
251 |
# will be changed. As a result, the symlink target is expected |
252 |
# to be wrapped as well (either by listing in MULTILIB_CHOST_TOOLS |
253 |
# or externally). |
249 |
# |
254 |
# |
250 |
# Please note that tool wrapping is *discouraged*. It is preferred to |
255 |
# Please note that tool wrapping is *discouraged*. It is preferred to |
251 |
# install pkg-config files for each ABI, and require reverse |
256 |
# install pkg-config files for each ABI, and require reverse |
Lines 368-373
Link Here
|
368 |
local dir=${f%/*} |
373 |
local dir=${f%/*} |
369 |
local fn=${f##*/} |
374 |
local fn=${f##*/} |
370 |
|
375 |
|
|
|
376 |
if [[ -L ${root}/${f} ]]; then |
377 |
# rewrite the symlink target |
378 |
local target=$(readlink "${root}/${f}") |
379 |
local target_dir |
380 |
local target_fn=${target##*/} |
381 |
|
382 |
[[ ${target} == */* ]] && target_dir=${target%/*} |
383 |
|
384 |
ln -f -s "${target_dir+${target_dir}/}${CHOST}-${target_fn}" \ |
385 |
"${root}/${f}" || die |
386 |
fi |
387 |
|
371 |
mv "${root}/${f}" "${root}/${dir}/${CHOST}-${fn}" || die |
388 |
mv "${root}/${f}" "${root}/${dir}/${CHOST}-${fn}" || die |
372 |
|
389 |
|
373 |
# symlink the native one back |
390 |
# symlink the native one back |