xbps-src: new func dependency_version() to return pkg+a[pb]i_depends.
This commit is contained in:
parent
a962644f9a
commit
9bda824de0
@ -188,6 +188,33 @@ check_rundep_dup()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependency_version()
|
||||||
|
{
|
||||||
|
local type="$1" pkgn="$2"
|
||||||
|
|
||||||
|
if [ -f $XBPS_SRCPKGDIR/${pkgn}/${pkgn}.depends ]; then
|
||||||
|
. $XBPS_SRCPKGDIR/${pkgn}/${pkgn}.depends
|
||||||
|
elif [ -f $XBPS_SRCPKGDIR/${pkgn}/depends ]; then
|
||||||
|
. $XBPS_SRCPKGDIR/${pkgn}/depends
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$type" = "build" ]; then
|
||||||
|
if [ -z "$api_depends" ]; then
|
||||||
|
echo "${pkgn}>=0"
|
||||||
|
else
|
||||||
|
echo "${pkgn}${api_depends}"
|
||||||
|
fi
|
||||||
|
elif [ "$type" = "run" ]; then
|
||||||
|
if [ -z "$abi_depends" ]; then
|
||||||
|
echo "${pkgn}>=0"
|
||||||
|
else
|
||||||
|
echo "${pkgn}${abi_depends}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset abi_depends api_depends
|
||||||
|
}
|
||||||
|
|
||||||
Add_dependency()
|
Add_dependency()
|
||||||
{
|
{
|
||||||
local type="$1" pkgn="$2" ver="$3"
|
local type="$1" pkgn="$2" ver="$3"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user