xbps-src: new func dependency_version() to return pkg+a[pb]i_depends.
This commit is contained in:
parent
a962644f9a
commit
9bda824de0
1 changed files with 27 additions and 0 deletions
|
@ -188,6 +188,33 @@ check_rundep_dup()
|
|||
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()
|
||||
{
|
||||
local type="$1" pkgn="$2" ver="$3"
|
||||
|
|
Loading…
Reference in a new issue