xbps-src: use "virtual?" keyword to declare virtual runtime dependencies.

The syntax "pkg?vpkg" can be used in hostmakedepends, makedepends and depends;
but the "virtual" keyword can be declared specifically for runtime dependencies
(depends).
This commit is contained in:
Juan RP 2014-08-17 19:21:25 +02:00
parent b4483f25c7
commit 9d50c2fb05
3 changed files with 13 additions and 2 deletions

View file

@ -180,6 +180,11 @@ install_pkg_deps() {
for i in ${build_depends} "RDEPS" ${run_depends}; do
[ "$i" = "RDEPS" ] && rundep="runtime" && continue
_realpkg="${i%\?*}"
if [ "${_realpkg}" = "virtual" ]; then
# ignore virtual dependencies
echo " [${rundep:-target}] ${i#*\?}: virtual dependency."
continue
fi
pkgn=$($XBPS_UHELPER_CMD getpkgdepname "${_realpkg}")
if [ -z "$pkgn" ]; then
pkgn=$($XBPS_UHELPER_CMD getpkgname "${_realpkg}")