/[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.17 Revision 1.18
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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.17 2013/07/30 02:08:54 mattst88 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.18 2013/08/08 10:20:15 mgorny Exp $
4 4
5# @ECLASS: multilib-build.eclass 5# @ECLASS: multilib-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: flags and utility functions for building multilib packages 8# @BLURB: flags and utility functions for building multilib packages
265 fi 265 fi
266 # and then usr/include 266 # and then usr/include
267 f=${f#usr/include} 267 f=${f#usr/include}
268 268
269 local dir=${f%/*} 269 local dir=${f%/*}
270
271 # $CHOST shall be set by multilib_toolchain_setup
272 dodir "/tmp/multilib-include/${CHOST}${dir}"
273 mv "${root}/usr/include${f}" "${ED}/tmp/multilib-include/${CHOST}${dir}/" || die
274 270
275 if [[ ! -f ${ED}/tmp/multilib-include${f} ]]; then 271 if [[ ! -f ${ED}/tmp/multilib-include${f} ]]; then
276 dodir "/tmp/multilib-include${dir}" 272 dodir "/tmp/multilib-include${dir}"
277 # a generic template 273 # a generic template
278 cat > "${ED}/tmp/multilib-include${f}" <<_EOF_ 274 cat > "${ED}/tmp/multilib-include${f}" <<_EOF_
301# error "No ABI matched, please report a bug to bugs.gentoo.org" 297# error "No ABI matched, please report a bug to bugs.gentoo.org"
302#endif 298#endif
303_EOF_ 299_EOF_
304 fi 300 fi
305 301
302 # Some ABIs may have install less files than others.
303 if [[ -f ${root}/usr/include${f} ]]; then
304 # $CHOST shall be set by multilib_toolchain_setup
305 dodir "/tmp/multilib-include/${CHOST}${dir}"
306 mv "${root}/usr/include${f}" "${ED}/tmp/multilib-include/${CHOST}${dir}/" || die
307
306 # XXX: get abi_* directly 308 # XXX: get abi_* directly
307 local abi_flag 309 local abi_flag
308 case "${ABI}" in 310 case "${ABI}" in
309 amd64|amd64_fbsd) 311 amd64|amd64_fbsd)
310 abi_flag=abi_x86_64;; 312 abi_flag=abi_x86_64;;
311 x86|x86_fbsd) 313 x86|x86_fbsd)
312 abi_flag=abi_x86_32;; 314 abi_flag=abi_x86_32;;
313 x32) 315 x32)
314 abi_flag=abi_x86_x32;; 316 abi_flag=abi_x86_x32;;
315 n32) 317 n32)
316 abi_flag=abi_mips_n32;; 318 abi_flag=abi_mips_n32;;
317 n64) 319 n64)
318 abi_flag=abi_mips_n64;; 320 abi_flag=abi_mips_n64;;
319 o32) 321 o32)
320 abi_flag=abi_mips_o32;; 322 abi_flag=abi_mips_o32;;
321 *) 323 *)
322 die "Header wrapping for ${ABI} not supported yet";; 324 die "Header wrapping for ${ABI} not supported yet";;
323 esac 325 esac
324 326
325 # Note: match a space afterwards to avoid collision potential. 327 # Note: match a space afterwards to avoid collision potential.
326 sed -e "/${abi_flag} /s&error.*&include <${CHOST}${f}>&" \ 328 sed -e "/${abi_flag} /s&error.*&include <${CHOST}${f}>&" \
327 -i "${ED}/tmp/multilib-include${f}" || die 329 -i "${ED}/tmp/multilib-include${f}" || die
330 fi
328 done 331 done
329} 332}
330 333
331# @FUNCTION: multilib_install_wrappers 334# @FUNCTION: multilib_install_wrappers
332# @USAGE: [<install-root>] 335# @USAGE: [<install-root>]

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20