Skip to content

Commit

Permalink
xbps-src: add back support for 32bit dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncaen committed Sep 29, 2019
1 parent 97b2771 commit a61b247
Showing 1 changed file with 47 additions and 12 deletions.
59 changes: 47 additions & 12 deletions common/xbps-src/shutils/build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,20 @@ install_pkg_deps() {
# Host build dependencies.
#
if [[ ${hostmakedepends} ]]; then
local _hostmakedepends=""
# check validity
for f in ${hostmakedepends}; do
if [ ! -f $XBPS_SRCPKGDIR/$f/template ]; then
msg_error "$pkgver: host dependency '$f' does not exist!\n"
if [ -f $XBPS_SRCPKGDIR/$f/template ]; then
_hostmakedepends+=" $f"
continue
fi
local _repourl=$($XBPS_QUERY_CMD -R -prepository "$f" 2>/dev/null)
if [ "$_repourl" ]; then
echo " [host] ${f}: found (${_repourl})"
host_binpkg_deps+=("$f")
continue
fi
msg_error "$pkgver: host dependency '$f' does not exist!\n"
done
while read -r _depname _deprepover _depver _subpkg _repourl; do
_vpkg=${_subpkg}-${_depver}
Expand Down Expand Up @@ -179,18 +188,27 @@ install_pkg_deps() {
echo " [host] ${_vpkg}: not found"
host_missing_deps+=("$_vpkg")
fi
done < <($XBPS_CHECKVERS_CMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm ${hostmakedepends})
done < <($XBPS_CHECKVERS_CMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm $_hostmakedepends)
fi

#
# Host check dependencies.
#
if [[ ${checkdepends} ]] && [[ $XBPS_CHECK_PKGS ]]; then
local _checkdepends=""
# check validity
for f in ${checkdepends}; do
if [ ! -f $XBPS_SRCPKGDIR/$f/template ]; then
msg_error "$pkgver: check dependency '$f' does not exist!\n"
if [ -f $XBPS_SRCPKGDIR/$f/template ]; then
_hostmakedepends+=" $f"
continue
fi
local _repourl=$($XBPS_QUERY_CMD -R -prepository "$f" 2>/dev/null)
if [ "$_repourl" ]; then
echo " [host] ${f}: found (${_repourl})"
host_binpkg_deps+=("$f")
continue
fi
msg_error "$pkgver: check dependency '$f' does not exist!\n"
done
while read -r _depname _deprepover _depver _subpkg _repourl; do
_vpkg=${_subpkg}-${_depver}
Expand Down Expand Up @@ -220,18 +238,27 @@ install_pkg_deps() {
echo " [check] ${_vpkg}: not found"
host_missing_deps+=("$_vpkg")
fi
done < <($XBPS_CHECKVERS_CMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm ${checkdepends})
done < <($XBPS_CHECKVERS_CMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm ${_checkdepends})
fi

#
# Target build dependencies.
#
if [[ ${makedepends} ]]; then
local _makedepends=""
# check validity
for f in ${makedepends}; do
if [ ! -f $XBPS_SRCPKGDIR/$f/template ]; then
msg_error "$pkgver: target dependency '$f' does not exist!\n"
if [ -f $XBPS_SRCPKGDIR/$f/template ]; then
_makedepends+=" $f"
continue;
fi
local _repourl=$($XBPS_QUERY_CMD -R -prepository "$f" 2>/dev/null)
if [ "$_repourl" ]; then
echo " [target] ${f}: found (${_repourl})"
binpkg_deps+=("$f")
continue
fi
msg_error "$pkgver: target dependency '$f' does not exist!\n"
done
while read -r _depname _deprepover _depver _subpkg _repourl; do
_vpkg=${_subpkg}-${_depver}
Expand Down Expand Up @@ -261,18 +288,26 @@ install_pkg_deps() {
echo " [target] ${_vpkg}: not found"
missing_deps+=("$_vpkg")
fi
done < <($XBPS_CHECKVERS_XCMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm ${makedepends})
done < <($XBPS_CHECKVERS_XCMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm ${_makedepends})
fi

#
# Target run time dependencies
#
if [[ ${depends} ]]; then
local __deps=""
_deps=$(setup_pkg_depends "" 1) || exit 1
for f in ${_deps}; do
if [ ! -f $XBPS_SRCPKGDIR/$f/template ]; then
msg_error "$pkgver: runtime dependency '$f' does not exist!\n"
if [ -f $XBPS_SRCPKGDIR/$f/template ]; then
__deps+=" $f"
continue
fi
local _repourl=$($XBPS_QUERY_CMD -R -prepository "$f" 2>/dev/null)
if [ "$_repourl" ]; then
echo " [target] ${f}: found (${_repourl})"
continue
fi
msg_error "$pkgver: target dependency '$f' does not exist!\n"
done
while read -r _depname _deprepover _depver _subpkg _repourl; do
_vpkg=${_subpkg}-${_depver}
Expand Down Expand Up @@ -301,7 +336,7 @@ install_pkg_deps() {
echo " [runtime] ${_vpkg}: not found"
missing_rdeps+=("$_vpkg")
fi
done < <($XBPS_CHECKVERS_XCMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm $_deps)
done < <($XBPS_CHECKVERS_XCMD ${XBPS_SKIP_REMOTEREPOS:+-i} -D $XBPS_DISTDIR -sm $__deps)
unset _deps
fi

Expand Down

0 comments on commit a61b247

Please sign in to comment.