xbps-src: added support to append additional shlibs to shlib-{provides,requires}.

This commit is contained in:
Juan RP 2014-09-10 11:23:33 +02:00
parent 75673c89a4
commit 289bc58776
4 changed files with 14 additions and 2 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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