[pacman-dev] [PATCH 1/2] makepkg: Search/Add real library names libprovide link to
Mohammad Alsaleh
msal at tormail.org
Wed May 8 17:15:28 EDT 2013
If libprovide file's realpath is not of the scheme "$libprovide.ver",
add the real library name used to provides.
The real name is needed to find version/arch info. And it is the one
actually used by binaries as a dependency.
Signed-off-by: Mohammad Alsaleh <msal at tormail.org>
---
scripts/makepkg.sh.in | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index b85b87e..7f4ee25 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1744,6 +1744,23 @@ find_libdepends() {
printf '%s\n' "${libdepends[@]}"
}
+extra_libprovides() {
+ local p pfile extra_p extra_pfile
+
+ # If libprovide's realpath has a different library name, add that name to provides
+ for p in "${provides[@]}"; do
+ if [[ $p = *.so ]]; then
+ while read pfile; do
+ extra_pfile="$(basename "$(realpath "$pfile")")"
+ if [[ "$extra_pfile" =~ \.so && "${extra_pfile%.so*}.so" != "$p" ]]; then
+ extra_p="${extra_pfile%.so*}.so"
+ provides+=("$extra_p")
+ warning "$(gettext "Library %s added to %s")" "$extra_p" "'provides'"
+ fi
+ done < <(find "$pkgdir" -type l -name "$p" 2>/dev/null)
+ fi
+ done
+}
find_libprovides() {
local p libprovides missing
@@ -1829,6 +1846,7 @@ write_pkginfo() {
printf "size = %s\n" "$size"
printf "arch = %s\n" "$pkgarch"
+ extra_libprovides
mapfile -t provides < <(find_libprovides)
mapfile -t depends < <(find_libdepends)
--
1.8.2.2
More information about the pacman-dev
mailing list