summaryrefslogtreecommitdiff
path: root/advertise-provided-libraries.PKGBUILDpatch
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-06-04 16:54:13 +0200
committerErich Eckner <git@eckner.net>2020-06-04 16:54:13 +0200
commit5a3413483f64669e16653ffdf047f5840ffde39c (patch)
treecc919f05b9d298db928a634a99770131e1decc04 /advertise-provided-libraries.PKGBUILDpatch
parentc8f81280db5d7de01f7c26607a071d6632bf8cc5 (diff)
downloadarchlinuxewe.git.save-5a3413483f64669e16653ffdf047f5840ffde39c.tar.xz
advertise-provided-libraries.PKGBUILDpatch: avoid duplicate provides
Diffstat (limited to 'advertise-provided-libraries.PKGBUILDpatch')
-rw-r--r--advertise-provided-libraries.PKGBUILDpatch32
1 files changed, 18 insertions, 14 deletions
diff --git a/advertise-provided-libraries.PKGBUILDpatch b/advertise-provided-libraries.PKGBUILDpatch
index 97bc59f4..300516f9 100644
--- a/advertise-provided-libraries.PKGBUILDpatch
+++ b/advertise-provided-libraries.PKGBUILDpatch
@@ -1,20 +1,24 @@
if printf '%s\n' "${arch[@]}" | grep -qvxF any; then
if [ -d "${pkgdir}/usr/lib" ]; then
- provides+=(
+ provides=(
$(
- find "${pkgdir}/usr/lib" \
- -name '*.so' -printf '%p\n' \
- | while read -r fn; do
- if ! LC_ALL=C readelf -h "$fn" 2>/dev/null | grep -q '.*Type:.*DYN (Shared object file).*'; then
- # no shared object
- continue
- fi
- if ! LC_ALL=C readelf -d "$fn" 2>/dev/null | grep -q '.*Library soname: \[.*\].*'; then
- # not versioned
- continue
- fi
- printf '%s\n' "${fn##*/}"
- done
+ {
+ printf '%s\n' "${provides[@]}"
+ find "${pkgdir}/usr/lib" \
+ -name '*.so' -printf '%p\n' \
+ | while read -r fn; do
+ if ! LC_ALL=C readelf -h "$fn" 2>/dev/null | grep -q '.*Type:.*DYN (Shared object file).*'; then
+ # no shared object
+ continue
+ fi
+ if ! LC_ALL=C readelf -d "$fn" 2>/dev/null | grep -q '.*Library soname: \[.*\].*'; then
+ # not versioned
+ continue
+ fi
+ printf '%s\n' "${fn##*/}"
+ done
+ } \
+ | sort -u
)
)
fi