From 47dbb75626df75439209981d9aa8bdbdce375b35 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 21 Aug 2010 06:24:50 -0700 Subject: =?UTF-8?q?Add=20support=20for=20a=20QA=5FPREBUILT=20variable=20sh?= =?UTF-8?q?ould=20contain=20a=20list=20of=20pre-built=20binaries.=20Paths?= =?UTF-8?q?=20listed=20here=20will=20be=20appended=20to=20each=20of=20the?= =?UTF-8?q?=20other=20QA=5F*=20variables.=20Thanks=20to=20Diego=20Petten?= =?UTF-8?q?=C3=B2=20=20for=20the=20suggestion.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/ebuild.sh | 20 ++++++++++++++++++++ man/ebuild.5 | 10 ++++++++++ 2 files changed, 30 insertions(+) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index de3c80bef..2fbd612bd 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1995,6 +1995,26 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then fi fi + if [[ -n $QA_PREBUILT ]] ; then + + # these ones support fnmatch patterns + QA_EXECSTAC+=" $QA_PREBUILT" + QA_TEXTRELS+=" $QA_PREBUILT" + QA_WX_LOAD+=" $QA_PREBUILT" + + # these ones support regular expressions, so translate + # fnmatch patterns to regular expressions + for x in QA_DT_HASH QA_DT_NEEDED QA_PRESTRIPPED QA_SONAME ; do + if [[ $(declare -p $x 2>/dev/null) = declare\ -a* ]] ; then + eval "$x=(\${$x[@]} ${QA_PREBUILT//\*/.*})" + else + eval "$x+=\" ${QA_PREBUILT//\*/.*}\"" + fi + done + + unset x + fi + # This needs to be exported since prepstrip is a separate shell script. [[ -n $QA_PRESTRIPPED ]] && export QA_PRESTRIPPED eval "[[ -n \$QA_PRESTRIPPED_${ARCH/-/_} ]] && export QA_PRESTRIPPED_${ARCH/-/_}" diff --git a/man/ebuild.5 b/man/ebuild.5 index 8fa32e23f..d9d394309 100644 --- a/man/ebuild.5 +++ b/man/ebuild.5 @@ -496,6 +496,16 @@ binary objects that cannot be altered. .br Note that objects that violate these rules may fail on some architectures. .TP +\fBQA_PREBUILT\fR +This should contain a list of file paths, relative to the image +directory, of files that are pre\-built binaries. Paths +listed here will be appended to each of the QA_* variables +listed below. The paths may contain fnmatch\-like patterns +which will be internally translated to regular expressions for +the QA_* variables that support regular expressions instead +of fnmatch patterns. The translation mechanism simply replaces +'*' with '.*'. +.TP \fBQA_TEXTRELS\fR This variable can be set to a list of file paths, relative to the image directory, of files that contain text relocations that cannot be eliminated. -- cgit v1.2.3-1-g7c22