/[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.25 Revision 1.26
1# Copyright 1999-2013 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.25 2013/12/31 18:31:47 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib-build.eclass,v 1.26 2014/01/16 18:53:41 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
235# MULTILIB_WRAPPED_HEADERS=( 235# MULTILIB_WRAPPED_HEADERS=(
236# /usr/include/foobar/config.h 236# /usr/include/foobar/config.h
237# ) 237# )
238# @CODE 238# @CODE
239 239
240# @ECLASS-VARIABLE: MULTILIB_CHOST_TOOLS
241# @DESCRIPTION:
242# A list of tool executables to preserve for each multilib ABI.
243# The listed executables will be renamed to ${CHOST}-${basename},
244# and the native variant will be symlinked to the generic name.
245#
246# This variable has to be a bash array. Paths shall be relative to
247# installation root (${ED}), and name regular files. Recursive wrapping
248# is not supported.
249#
250# Please note that tool wrapping is *discouraged*. It is preferred to
251# install pkg-config files for each ABI, and require reverse
252# dependencies to use that.
253#
254# Packages that search for tools properly (e.g. using AC_PATH_TOOL
255# macro) will find the wrapper executables automatically. Other packages
256# will need explicit override of tool paths.
257#
258# Example:
259# @CODE
260# MULTILIB_CHOST_TOOLS=(
261# /usr/bin/foo-config
262# )
263
264# @CODE
240# @FUNCTION: multilib_prepare_wrappers 265# @FUNCTION: multilib_prepare_wrappers
241# @USAGE: [<install-root>] 266# @USAGE: [<install-root>]
242# @DESCRIPTION: 267# @DESCRIPTION:
243# Perform the preparation of all kinds of wrappers for the current ABI. 268# Perform the preparation of all kinds of wrappers for the current ABI.
244# This function shall be called once per each ABI, after installing 269# This function shall be called once per each ABI, after installing
333 # Note: match a space afterwards to avoid collision potential. 358 # Note: match a space afterwards to avoid collision potential.
334 sed -e "/${abi_flag} /s&error.*&include <${CHOST}${f}>&" \ 359 sed -e "/${abi_flag} /s&error.*&include <${CHOST}${f}>&" \
335 -i "${ED}/tmp/multilib-include${f}" || die 360 -i "${ED}/tmp/multilib-include${f}" || die
336 fi 361 fi
337 done 362 done
363
364 for f in "${MULTILIB_CHOST_TOOLS[@]}"; do
365 # drop leading slash if it's there
366 f=${f#/}
367
368 local dir=${f%/*}
369 local fn=${f##*/}
370
371 mv "${root}/${f}" "${root}/${dir}/${CHOST}-${fn}" || die
372
373 # symlink the native one back
374 if multilib_build_binaries; then
375 ln -s "${CHOST}-${fn}" "${root}/${f}" || die
376 fi
377 done
338} 378}
339 379
340# @FUNCTION: multilib_install_wrappers 380# @FUNCTION: multilib_install_wrappers
341# @USAGE: [<install-root>] 381# @USAGE: [<install-root>]
342# @DESCRIPTION: 382# @DESCRIPTION:

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20