aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2016-09-08 22:12:58 +0800
committermat <mat@FreeBSD.org>2016-09-08 22:12:58 +0800
commit1c4f9b4ac496cf89456d465f0d4af48813c40dbb (patch)
tree17b67249c47d6db815a1a188f89136f6b2e309d4 /Mk
parentb290bbd9ed4de7d873418bd8e01103170a97818c (diff)
downloadfreebsd-ports-gnome-1c4f9b4ac496cf89456d465f0d4af48813c40dbb.tar.gz
freebsd-ports-gnome-1c4f9b4ac496cf89456d465f0d4af48813c40dbb.tar.zst
freebsd-ports-gnome-1c4f9b4ac496cf89456d465f0d4af48813c40dbb.zip
Provide a standard way to look up for executables and shared libraries.
PR: 211146 Submitted by: yuri rawbw com Sponsored by: Absolight
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Scripts/qa.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh
index bdcdb9c98b9d..d0107a60db57 100644
--- a/Mk/Scripts/qa.sh
+++ b/Mk/Scripts/qa.sh
@@ -20,6 +20,10 @@ err() {
echo "Error: $@" >&2
}
+list_stagedir_elfs() {
+ cd ${STAGEDIR} && find -s . -type f \( -perm +111 -o -name '*.so*' \) "$@"
+}
+
shebangonefile() {
local f interp rc
@@ -115,9 +119,7 @@ baselibs() {
;;
esac
done <<-EOF
- $(find ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/sbin \
- ${STAGEDIR}${PREFIX}/lib ${STAGEDIR}${PREFIX}/libexec \
- -type f -exec readelf -d {} + 2>/dev/null)
+ $(list_stagedir_elfs -exec readelf -d {} + 2>/dev/null)
EOF
if [ -z "${USESSSL}" -a -n "${found_openssl}" ]; then
warn "you need USES=ssl"
@@ -660,7 +662,7 @@ proxydeps() {
!/^\// && section<=1 && ($3 ~ "^'${PREFIX}'" || $3 ~ "^'${LOCALBASE}'") {print $3}')
EOT
done <<-EOT
- $(cd ${STAGEDIR} && find -s . -type f \( -perm +111 -o -name '*.so*' \) | \
+ $(list_stagedir_elfs | \
file -F $'\1' -f - | \
grep -a 'ELF.*FreeBSD.*dynamically linked' | \
cut -f 1 -d $'\1'| \