/[gentoo-x86]/eclass/multilib-build.eclass
Gentoo

Diff of /eclass/multilib-build.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.43 Revision 1.44
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.43 2014/04/29 20:57:28 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.44 2014/04/29 20:59:00 mgorny Exp $
4 4
5# @ECLASS: multilib-build.eclass 5# @ECLASS: multilib-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# gx86-multilib team <multilib@gentoo.org> 7# gx86-multilib team <multilib@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
312 ln -s "${fn}" "${root}/${dir}/${CHOST}-${fn}" || die 312 ln -s "${fn}" "${root}/${dir}/${CHOST}-${fn}" || die
313 done 313 done
314 314
315 return 315 return
316 fi 316 fi
317
318 for f in "${MULTILIB_CHOST_TOOLS[@]}"; do
319 # drop leading slash if it's there
320 f=${f#/}
321
322 local dir=${f%/*}
323 local fn=${f##*/}
324
325 if [[ -L ${root}/${f} ]]; then
326 # rewrite the symlink target
327 local target=$(readlink "${root}/${f}")
328 local target_dir
329 local target_fn=${target##*/}
330
331 [[ ${target} == */* ]] && target_dir=${target%/*}
332
333 ln -f -s "${target_dir+${target_dir}/}${CHOST}-${target_fn}" \
334 "${root}/${f}" || die
335 fi
336
337 mv "${root}/${f}" "${root}/${dir}/${CHOST}-${fn}" || die
338
339 # symlink the native one back
340 if multilib_is_native_abi; then
341 ln -s "${CHOST}-${fn}" "${root}/${f}" || die
342 fi
343 done
317 344
318 for f in "${MULTILIB_WRAPPED_HEADERS[@]}"; do 345 for f in "${MULTILIB_WRAPPED_HEADERS[@]}"; do
319 # drop leading slash if it's there 346 # drop leading slash if it's there
320 f=${f#/} 347 f=${f#/}
321 348
386 # Note: match a space afterwards to avoid collision potential. 413 # Note: match a space afterwards to avoid collision potential.
387 sed -e "/${abi_flag} /s&error.*&include <${CHOST}${f}>&" \ 414 sed -e "/${abi_flag} /s&error.*&include <${CHOST}${f}>&" \
388 -i "${ED}/tmp/multilib-include${f}" || die 415 -i "${ED}/tmp/multilib-include${f}" || die
389 fi 416 fi
390 done 417 done
391
392 for f in "${MULTILIB_CHOST_TOOLS[@]}"; do
393 # drop leading slash if it's there
394 f=${f#/}
395
396 local dir=${f%/*}
397 local fn=${f##*/}
398
399 if [[ -L ${root}/${f} ]]; then
400 # rewrite the symlink target
401 local target=$(readlink "${root}/${f}")
402 local target_dir
403 local target_fn=${target##*/}
404
405 [[ ${target} == */* ]] && target_dir=${target%/*}
406
407 ln -f -s "${target_dir+${target_dir}/}${CHOST}-${target_fn}" \
408 "${root}/${f}" || die
409 fi
410
411 mv "${root}/${f}" "${root}/${dir}/${CHOST}-${fn}" || die
412
413 # symlink the native one back
414 if multilib_is_native_abi; then
415 ln -s "${CHOST}-${fn}" "${root}/${f}" || die
416 fi
417 done
418} 418}
419 419
420# @FUNCTION: multilib_install_wrappers 420# @FUNCTION: multilib_install_wrappers
421# @USAGE: [<install-root>] 421# @USAGE: [<install-root>]
422# @DESCRIPTION: 422# @DESCRIPTION:

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

  ViewVC Help
Powered by ViewVC 1.1.20