summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-21 06:24:50 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-21 06:24:50 -0700
commit47dbb75626df75439209981d9aa8bdbdce375b35 (patch)
tree0d0db088443329b3f5bcc72fccd891493319c8da
parent860167c12d29701b6eccc68854fb39ef1d4ad016 (diff)
downloadportage-47dbb75626df75439209981d9aa8bdbdce375b35.tar.gz
portage-47dbb75626df75439209981d9aa8bdbdce375b35.tar.bz2
portage-47dbb75626df75439209981d9aa8bdbdce375b35.zip
Add support for a QA_PREBUILT variable should contain a list of
pre-built binaries. Paths listed here will be appended to each of the other QA_* variables. Thanks to Diego Pettenò <flameeyes@g.o> for the suggestion.
-rwxr-xr-xbin/ebuild.sh20
-rw-r--r--man/ebuild.510
2 files changed, 30 insertions, 0 deletions
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.