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:
parent
b4483f25c7
commit
9d50c2fb05
|
@ -156,6 +156,7 @@ hook() {
|
|||
|
||||
if [ -n "$run_depends" ]; then
|
||||
echo "$run_depends" > ${PKGDESTDIR}/rdeps
|
||||
sed 's,virtual?,,g' -i ${PKGDESTDIR}/rdeps
|
||||
fi
|
||||
if [ -n "${sorequires}" ]; then
|
||||
echo "${sorequires}" > ${PKGDESTDIR}/shlib-requires
|
||||
|
|
|
@ -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}")
|
||||
|
|
|
@ -391,7 +391,7 @@ setup_pkg() {
|
|||
}
|
||||
|
||||
setup_pkg_depends() {
|
||||
local pkg="$1" j _pkgdepname _pkgdep _depname
|
||||
local pkg="$1" j _pkgdepname _pkgdep _rpkgname _depname
|
||||
|
||||
if [ -n "$pkg" ]; then
|
||||
# subpkg
|
||||
|
@ -401,6 +401,7 @@ setup_pkg_depends() {
|
|||
fi
|
||||
|
||||
for j in ${depends}; do
|
||||
_rpkgname="${j%\?*}"
|
||||
_depname="${j#*\?}"
|
||||
_pkgdepname="$($XBPS_UHELPER_CMD getpkgdepname ${_depname} 2>/dev/null)"
|
||||
if [ -z "${_pkgdepname}" ]; then
|
||||
|
@ -412,7 +413,11 @@ setup_pkg_depends() {
|
|||
else
|
||||
_pkgdep="${_depname}"
|
||||
fi
|
||||
run_depends+=" ${_pkgdep}"
|
||||
if [ "${_rpkgname}" = "virtual" ]; then
|
||||
run_depends+=" virtual?${_pkgdep}"
|
||||
else
|
||||
run_depends+=" ${_pkgdep}"
|
||||
fi
|
||||
done
|
||||
for j in ${hostmakedepends}; do
|
||||
_depname="${j%\?*}"
|
||||
|
|
Loading…
Reference in New Issue