xbps-src: install required deps if necessary in the configure/build target.
This commit is contained in:
parent
d1791dad60
commit
8a9c6d1033
1 changed files with 14 additions and 3 deletions
|
@ -194,6 +194,8 @@ if [ "$(id -u)" -eq 0 ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
[ -z "$dontrm_builddir" ] && dontrm_builddir=no
|
||||
|
||||
# Main switch
|
||||
case "$target" in
|
||||
bootstrap)
|
||||
|
@ -202,7 +204,6 @@ bootstrap)
|
|||
[ ! -d $XBPS_SRCPKGDIR/xbps-base-chroot ] && \
|
||||
msg_error "Cannot find $XBPS_SRCPKGDIR/xbps-base-chroot directory!"
|
||||
cd $XBPS_SRCPKGDIR/xbps-base-chroot && setup_tmpl $(basename_cwd)
|
||||
[ -z "$dontrm_builddir" ] && dontrm_builddir=no
|
||||
install_pkg $pkgname
|
||||
;;
|
||||
build|configure)
|
||||
|
@ -214,7 +215,18 @@ build|configure)
|
|||
. $XBPS_SHUTILSDIR/chroot.sh
|
||||
xbps_chroot_handler $target $(basename_cwd)
|
||||
else
|
||||
setup_tmpl $(basename_cwd)
|
||||
originpkg="$(basename_cwd)"
|
||||
setup_tmpl $originpkg
|
||||
# If pkg has dependencies, install them first.
|
||||
. $XBPS_SHUTILSDIR/pkgtarget_funcs.sh
|
||||
. $XBPS_SHUTILSDIR/builddep_funcs.sh
|
||||
install_dependencies_pkg "$pkgname-$version"
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "cannot install required deps for $pkgname."
|
||||
exit 1
|
||||
fi
|
||||
# All deps were installed, continue with the origin pkg...
|
||||
setup_tmpl $originpkg
|
||||
. $XBPS_SHUTILSDIR/fetch_funcs.sh
|
||||
fetch_distfiles
|
||||
if [ ! -f "$XBPS_EXTRACT_DONE" ]; then
|
||||
|
@ -280,7 +292,6 @@ install|install-destdir)
|
|||
|
||||
install_destdir_target=no
|
||||
[ "$target" = "install-destdir" ] && install_destdir_target=yes
|
||||
[ -z "$dontrm_builddir" ] && dontrm_builddir=no
|
||||
|
||||
if [ -z "$in_chroot" -a -z "$base_chroot" ]; then
|
||||
. $XBPS_SHUTILSDIR/chroot.sh
|
||||
|
|
Loading…
Reference in a new issue