From 289bc58776abfea2bd4528f41a2af8302e40256d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 10 Sep 2014 11:23:33 +0200 Subject: [PATCH] xbps-src: added support to append additional shlibs to shlib-{provides,requires}. --- Manual.md | 6 ++++++ common/environment/setup-subpkg/subpkg.sh | 4 ++-- common/hooks/post-install/03-strip-and-debug-pkgs.sh | 3 +++ common/hooks/post-install/04-generate-runtime-deps.sh | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Manual.md b/Manual.md index 57b448877b6..735bbbe0114 100644 --- a/Manual.md +++ b/Manual.md @@ -413,6 +413,12 @@ otherwise the default would work in most cases. - `broken` If set, building the package won't be allowed because its state is currently broken. +- `shlib_provides` A white space separated list of additional sonames the package provides on. +This appends to the generated file rather than replacing it. + +- `shlib_requires` A white space separated list of additional sonames the package requires. +This appends to the generated file rather than replacing it. + ### build style scripts The `build_style` variable specifies the build method to build and install a diff --git a/common/environment/setup-subpkg/subpkg.sh b/common/environment/setup-subpkg/subpkg.sh index 91c5ec7c12e..96ec00e2579 100644 --- a/common/environment/setup-subpkg/subpkg.sh +++ b/common/environment/setup-subpkg/subpkg.sh @@ -6,10 +6,10 @@ unset -v noarch conf_files mutable_files preserve triggers unset -v depends run_depends replaces provides conflicts tags # hooks/post-install/03-strip-and-debug-pkgs -unset -v nostrip nostrip_files +unset -v nostrip nostrip_files shlib_requires # hooks/post-install/04-generate-runtime-deps -unset -v noverifyrdeps allow_unknown_shlibs +unset -v noverifyrdeps allow_unknown_shlibs shlib_provides # hooks/post-install/06-prepare-32bit unset -v lib32depends lib32disabled lib32files lib32mode diff --git a/common/hooks/post-install/03-strip-and-debug-pkgs.sh b/common/hooks/post-install/03-strip-and-debug-pkgs.sh index 6b35f5521f6..866ecb19da8 100644 --- a/common/hooks/post-install/03-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/03-strip-and-debug-pkgs.sh @@ -125,6 +125,9 @@ hook() { esac done + for f in ${shlib_provides}; do + echo "$f" >> ${PKGDESTDIR}/.shlib-provides + done if [ -s "$PKGDESTDIR/.shlib-provides" ]; then cat $PKGDESTDIR/.shlib-provides | tr '\n' ' ' > $PKGDESTDIR/shlib-provides echo >> $PKGDESTDIR/shlib-provides diff --git a/common/hooks/post-install/04-generate-runtime-deps.sh b/common/hooks/post-install/04-generate-runtime-deps.sh index 60f600f3919..9a6cc592e4c 100644 --- a/common/hooks/post-install/04-generate-runtime-deps.sh +++ b/common/hooks/post-install/04-generate-runtime-deps.sh @@ -161,6 +161,9 @@ hook() { if [ -s ${PKGDESTDIR}/rdeps ]; then sed 's,virtual?,,g' -i ${PKGDESTDIR}/rdeps fi + for f in ${shlib_requires}; do + sorequires+="${f} " + done if [ -n "${sorequires}" ]; then echo "${sorequires}" > ${PKGDESTDIR}/shlib-requires fi