Split pkgs required by xbps-base-chroot, as it was made in Fedora.
- Added an additional shell func to add full (build/run), build or run time dependencies to packages. An optional third parameter can be used to specify other version than the one set in the depends file. - Use a "depends" file in package directory to specify minimum required ABI/API version for a package, so that there's no need to set the version all the time in pkgs. - Updated bash to 4.0. --HG-- extra : convert_revision : 1aa0ce32d4bdc2cd371eac19ae7bcff2c986b6b3
This commit is contained in:
parent
97821bf458
commit
e0030bc0fe
220 changed files with 719 additions and 1304 deletions
|
@ -69,6 +69,7 @@ reset_tmpl_vars()
|
|||
disable_parallel_build run_depends cross_compiler \
|
||||
only_for_archs patch_args conf_files keep_dirs \
|
||||
install_priority noarch subpackages sourcepkg \
|
||||
abi_depends api_depends \
|
||||
XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \
|
||||
XBPS_BUILD_DONE XBPS_INSTALL_DONE"
|
||||
|
||||
|
@ -104,6 +105,46 @@ setup_tmpl()
|
|||
|
||||
}
|
||||
|
||||
Add_dependency()
|
||||
{
|
||||
local type="$1"
|
||||
local pkgname="$2"
|
||||
local minver="$3"
|
||||
|
||||
case "$type" in
|
||||
build|full|run) ;;
|
||||
*) msg_error "Unknown dependency type for $pkgname." ;;
|
||||
esac
|
||||
|
||||
if [ -f $XBPS_TEMPLATESDIR/$pkgname/$pkgname.depends ]; then
|
||||
. $XBPS_TEMPLATESDIR/$pkgname/$pkgname.depends
|
||||
elif [ -f $XBPS_TEMPLATESDIR/$pkgname/depends ]; then
|
||||
. $XBPS_TEMPLATESDIR/$pkgname/depends
|
||||
fi
|
||||
|
||||
if [ "$type" = "full" -o "$type" = "build" ]; then
|
||||
if [ -z "$minver" -a -z "$api_depends" ]; then
|
||||
build_depends="${build_depends} $pkgname-0"
|
||||
elif [ -z "$minver" -a -n "$api_depends" ]; then
|
||||
build_depends="${build_depends} $pkgname-$api_depends"
|
||||
else
|
||||
build_depends="${build_depends} $pkgname-$minver"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$type" = "full" -o "$type" = "run" ]; then
|
||||
if [ -z "$minver" -a -z "$abi_depends" ]; then
|
||||
run_depends="${run_depends} $pkgname-0"
|
||||
elif [ -z "$minver" -a -n "$abi_depends" ]; then
|
||||
run_depends="${run_depends} $pkgname-$abi_depends"
|
||||
else
|
||||
run_depends="${run_depends} $pkgname-$minver"
|
||||
fi
|
||||
fi
|
||||
|
||||
unset abi_depends api_depends
|
||||
}
|
||||
|
||||
#
|
||||
# Checks some vars used in templates and sets some of them required.
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue