diff options
author | Gregory M. Tuner <gmt@be-evil.net> | 2013-12-23 16:06:56 -0800 |
---|---|---|
committer | Gregory M. Tuner <gmt@be-evil.net> | 2013-12-23 16:06:56 -0800 |
commit | becc085cdf2c16cb3d5f181bc54fa30ebb2e3f1b (patch) | |
tree | 6446ecd6c0c7d098dc3fca94a0fb6133c368d984 /eclass | |
parent | dev-lang/python: add upstream versions (diff) | |
download | gmt-becc085cdf2c16cb3d5f181bc54fa30ebb2e3f1b.tar.gz gmt-becc085cdf2c16cb3d5f181bc54fa30ebb2e3f1b.tar.bz2 gmt-becc085cdf2c16cb3d5f181bc54fa30ebb2e3f1b.zip |
eclass/multilib-build: add MULTILIB_UNCHECKED_HEADERS variable
This implements the per-header multilib_check_headers()
exclusion feature I discussed on -dev.
MULTILIB_UNCHECKED_HEADERS is in the same format as
MULTILIB_WRAPPED_HEADERS and prevents multilib_check_headers()
from tracking any header listed therein.
Except insofar as both provide a means to prevent
multilib_check_headers fatalities, the two variables
are orthogonal.
Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/multilib-build.eclass | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass index 1a5c08f..da34923 100644 --- a/eclass/multilib-build.eclass +++ b/eclass/multilib-build.eclass @@ -235,6 +235,28 @@ multilib_for_best_abi() { multibuild_for_best_variant _multilib_multibuild_wrapper "${@}" } +# @ECLASS-VARIABLE: MULTILIB_UNCHECKED_HEADERS +# @DESCRIPTION: +# A list of header files to ignore when checking for header conflicts. +# If an ebuild or eclass author has implemented their own solution +# to a possible header conflict, (if appropriate, that solution may +# simply be to ignore it, which would typically result in the +# best-ABI's header being installed (see: multilib_for_best_abi) +# +# This variable has to be a bash array. Paths shall be relative to +# installation root (${ED}), and name regular files. +# +# Note that if a header appears in MULTILIB_WRAPPED_HEADERS, adding +# it to this array, as well, will not prevent the header from being +# wrapped. +# +# Example: +# @CODE +# MULTILIB_UNCHECKED_HEADERS=( +# /usr/include/foobar/config.h +# ) +# @CODE + # @FUNCTION: multilib_check_headers # @DESCRIPTION: # Check whether the header files are consistent between ABIs. @@ -243,10 +265,24 @@ multilib_for_best_abi() { # It obtains the header file checksums and compares them with previous # runs (if any). Dies if header files differ. multilib_check_headers() { + _multilib_check_header_filter() + { + local exgrep="" hdr + for hdr in "${MULTILIB_UNCHECKED_HEADERS[@]}" ; do + exgrep="${exgrep}${exgrep:+|}\s${ED}${hdr#/}\$" + done + if [[ ${exgrep} ]]; then + egrep -v "${exgrep}" + else + tee /dev/null + fi + return 0 + } _multilib_header_cksum() { [[ -d ${ED}usr/include ]] && \ - find "${ED}"usr/include -type f \ - -exec cksum {} + | sort -k2 + find "${ED}"usr/include -type f -exec cksum {} + | \ + _multilib_check_header_filter | \ + sort -k2 } local cksum=$(_multilib_header_cksum) |