2014-04-09 16:40:27 +02:00
|
|
|
# vim: set ts=4 sw=4 et:
|
2014-03-22 12:31:42 +01:00
|
|
|
#
|
2014-09-05 11:10:07 +02:00
|
|
|
setup_pkg_depends() {
|
2015-04-30 08:26:12 +02:00
|
|
|
local pkg="$1" j _pkgdepname _pkgdep _rpkgname _depname _depver _replacement
|
2014-09-05 11:10:07 +02:00
|
|
|
|
|
|
|
if [ -n "$pkg" ]; then
|
|
|
|
# subpkg
|
|
|
|
if declare -f ${pkg}_package >/dev/null; then
|
|
|
|
${pkg}_package
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
for j in ${depends}; do
|
|
|
|
_rpkgname="${j%\?*}"
|
|
|
|
_depname="${j#*\?}"
|
|
|
|
_pkgdepname="$($XBPS_UHELPER_CMD getpkgdepname ${_depname} 2>/dev/null)"
|
|
|
|
if [ -z "${_pkgdepname}" ]; then
|
|
|
|
_pkgdepname="$($XBPS_UHELPER_CMD getpkgname ${_depname} 2>/dev/null)"
|
|
|
|
fi
|
2016-04-27 20:16:59 +02:00
|
|
|
if [ -s ${XBPS_DISTDIR}/etc/virtual ]; then
|
|
|
|
_replacement=$(egrep "^${_pkgdepname:-${_depname}}[[:blank:]]" ${XBPS_DISTDIR}/etc/virtual|cut -d ' ' -f2)
|
|
|
|
elif [ -s ${XBPS_DISTDIR}/etc/defaults.virtual ]; then
|
|
|
|
_replacement=$(egrep "^${_pkgdepname:-${_depname}}[[:blank:]]" ${XBPS_DISTDIR}/etc/defaults.virtual|cut -d ' ' -f2)
|
2014-09-05 11:10:07 +02:00
|
|
|
fi
|
|
|
|
if [ "${_rpkgname}" = "virtual" ]; then
|
2016-04-27 20:16:59 +02:00
|
|
|
if [ -z "${_replacement}" ]; then
|
|
|
|
msg_error "$pkgver: failed to resolve virtual dependency for '$j' (missing from etc/virtual)\n"
|
|
|
|
fi
|
|
|
|
_pkgdepname="$($XBPS_UHELPER_CMD getpkgdepname ${_replacement} 2>/dev/null)"
|
|
|
|
if [ -z "${_pkgdepname}" ]; then
|
|
|
|
_pkgdepname="$($XBPS_UHELPER_CMD getpkgname ${_replacement} 2>/dev/null)"
|
|
|
|
fi
|
|
|
|
if [ -z "${_pkgdepname}" ]; then
|
|
|
|
_pkgdepname="${_replacement}>=0"
|
|
|
|
fi
|
|
|
|
run_depends+=" ${_depname}?${_pkgdepname}"
|
|
|
|
#echo "Adding dependency virtual: ${_depname}?${_pkgdepname}"
|
2014-09-05 11:10:07 +02:00
|
|
|
else
|
2016-04-27 20:16:59 +02:00
|
|
|
if [ -z "${_pkgdepname}" ]; then
|
|
|
|
_pkgdep="${_depname}>=0"
|
|
|
|
else
|
|
|
|
_pkgdep="${_depname}"
|
|
|
|
fi
|
2014-09-05 11:10:07 +02:00
|
|
|
run_depends+=" ${_pkgdep}"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
for j in ${hostmakedepends}; do
|
|
|
|
_depname="${j%\?*}"
|
2015-04-30 08:26:12 +02:00
|
|
|
_depver=$(srcpkg_get_version ${_depname}) || exit $?
|
|
|
|
host_build_depends+=" ${_depname}-${_depver}"
|
2014-09-05 11:10:07 +02:00
|
|
|
done
|
2017-11-20 15:17:34 +01:00
|
|
|
if [ -n "$XBPS_CHECK_PKGS" ]; then
|
2017-02-23 22:03:31 +01:00
|
|
|
for j in ${checkdepends}; do
|
|
|
|
_depname="${j%\?*}"
|
|
|
|
_depver=$(srcpkg_get_version ${_depname}) || exit $?
|
|
|
|
host_check_depends+=" ${_depname}-${_depver}"
|
|
|
|
done
|
|
|
|
fi
|
2014-09-05 11:10:07 +02:00
|
|
|
for j in ${makedepends}; do
|
|
|
|
_depname="${j%\?*}"
|
2015-04-30 08:26:12 +02:00
|
|
|
_depver=$(srcpkg_get_version ${_depname}) || exit $?
|
|
|
|
build_depends+=" ${_depname}-${_depver}"
|
2014-09-05 11:10:07 +02:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2014-03-22 12:31:42 +01:00
|
|
|
# Install a required package dependency, like:
|
|
|
|
#
|
|
|
|
# xbps-install -Ay <pkgname>
|
|
|
|
#
|
|
|
|
# Returns 0 if package already installed or installed successfully.
|
|
|
|
# Any other error number otherwise.
|
|
|
|
#
|
|
|
|
install_pkg_from_repos() {
|
2014-04-09 16:40:27 +02:00
|
|
|
local pkg="$1" cross="$2" rval= tmplogf=
|
|
|
|
|
2015-03-28 04:49:18 +01:00
|
|
|
mkdir -p $XBPS_STATEDIR
|
2015-03-03 10:45:34 +01:00
|
|
|
tmplogf=${XBPS_STATEDIR}/xbps_${XBPS_TARGET_MACHINE}_bdep_${pkg}.log
|
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
if [ -n "$cross" ]; then
|
2015-06-07 17:02:20 +02:00
|
|
|
$XBPS_INSTALL_XCMD -Ayd "$pkg" >$tmplogf 2>&1
|
2014-04-09 16:40:27 +02:00
|
|
|
else
|
2015-06-07 17:02:20 +02:00
|
|
|
$XBPS_INSTALL_CMD -Ayd "$pkg" >$tmplogf 2>&1
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
|
|
|
rval=$?
|
|
|
|
if [ $rval -ne 0 -a $rval -ne 17 ]; then
|
|
|
|
# xbps-install can return:
|
|
|
|
#
|
2014-07-02 11:09:41 +02:00
|
|
|
# SUCCESS (0): package installed successfully.
|
|
|
|
# ENOENT (2): package missing in repositories.
|
|
|
|
# ENXIO (6): package depends on invalid dependencies.
|
2015-10-29 08:48:38 +01:00
|
|
|
# EAGAIN (11): package conflicts.
|
2014-07-02 11:09:41 +02:00
|
|
|
# EEXIST (17): package already installed.
|
|
|
|
# ENODEV (19): package depends on missing dependencies.
|
|
|
|
# ENOTSUP (95): no repositories registered.
|
2014-04-09 16:40:27 +02:00
|
|
|
#
|
|
|
|
[ -z "$XBPS_KEEP_ALL" ] && remove_pkg_autodeps
|
|
|
|
msg_red "$pkgver: failed to install '$1' dependency! (error $rval)\n"
|
2015-03-03 10:45:34 +01:00
|
|
|
cat $tmplogf
|
2014-04-09 16:40:27 +02:00
|
|
|
msg_error "Please see above for the real error, exiting...\n"
|
|
|
|
fi
|
|
|
|
[ $rval -eq 17 ] && rval=0
|
|
|
|
return $rval
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Returns 0 if pkgpattern in $1 is matched against current installed
|
|
|
|
# package, 1 if no match and 2 if not installed.
|
|
|
|
#
|
|
|
|
check_pkgdep_matched() {
|
2014-09-21 11:44:45 +02:00
|
|
|
local pkg="$1" checkver="$2" cross="$3" uhelper= pkgn= iver=
|
2014-04-09 16:40:27 +02:00
|
|
|
|
|
|
|
[ "$build_style" = "meta" ] && return 2
|
|
|
|
[ -z "$pkg" ] && return 255
|
|
|
|
|
2015-03-27 10:50:40 +01:00
|
|
|
pkgn="$($XBPS_UHELPER_CMD getpkgdepname ${pkg} 2>/dev/null)"
|
2014-04-09 16:40:27 +02:00
|
|
|
if [ -z "$pkgn" ]; then
|
2015-03-27 10:50:40 +01:00
|
|
|
pkgn="$($XBPS_UHELPER_CMD getpkgname ${pkg} 2>/dev/null)"
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
|
|
|
[ -z "$pkgn" ] && return 255
|
|
|
|
|
|
|
|
if [ -n "$cross" ]; then
|
|
|
|
uhelper="$XBPS_UHELPER_XCMD"
|
|
|
|
else
|
|
|
|
uhelper="$XBPS_UHELPER_CMD"
|
|
|
|
fi
|
|
|
|
|
2014-09-21 11:44:45 +02:00
|
|
|
iver="$($uhelper $checkver $pkgn)"
|
2014-04-09 16:40:27 +02:00
|
|
|
if [ $? -eq 0 -a -n "$iver" ]; then
|
|
|
|
$XBPS_UHELPER_CMD pkgmatch "${pkgn}-${iver}" "${pkg}"
|
|
|
|
[ $? -eq 1 ] && return 0
|
|
|
|
else
|
|
|
|
return 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
return 1
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
2014-04-10 11:58:06 +02:00
|
|
|
#
|
|
|
|
# Returns 0 if pkgpattern in $1 is installed and greater than current
|
|
|
|
# installed package, otherwise 1.
|
|
|
|
#
|
|
|
|
check_installed_pkg() {
|
|
|
|
local pkg="$1" cross="$2" uhelper= pkgn= iver=
|
|
|
|
|
|
|
|
[ -z "$pkg" ] && return 2
|
|
|
|
|
|
|
|
pkgn="$($XBPS_UHELPER_CMD getpkgname ${pkg})"
|
|
|
|
[ -z "$pkgn" ] && return 2
|
|
|
|
|
|
|
|
if [ -n "$cross" ]; then
|
|
|
|
uhelper="$XBPS_UHELPER_XCMD"
|
|
|
|
else
|
|
|
|
uhelper="$XBPS_UHELPER_CMD"
|
|
|
|
fi
|
|
|
|
|
|
|
|
iver="$($uhelper version $pkgn)"
|
|
|
|
if [ $? -eq 0 -a -n "$iver" ]; then
|
|
|
|
$XBPS_CMPVER_CMD "${pkgn}-${iver}" "${pkg}"
|
|
|
|
[ $? -eq 0 -o $? -eq 1 ] && return 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
return 1
|
|
|
|
}
|
|
|
|
|
2015-03-27 10:50:40 +01:00
|
|
|
srcpkg_get_version() {
|
|
|
|
local pkg="$1"
|
|
|
|
# Run this in a sub-shell to avoid polluting our env.
|
|
|
|
(
|
2016-04-27 20:16:59 +02:00
|
|
|
unset XBPS_BINPKG_EXISTS
|
|
|
|
setup_pkg $pkg || exit $?
|
|
|
|
echo "${version}_${revision}"
|
2015-04-30 09:09:03 +02:00
|
|
|
) || msg_error "$pkgver: failed to transform dependency $pkg\n"
|
2015-03-27 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
srcpkg_get_pkgver() {
|
|
|
|
local pkg="$1"
|
|
|
|
# Run this in a sub-shell to avoid polluting our env.
|
|
|
|
(
|
2016-04-27 20:16:59 +02:00
|
|
|
unset XBPS_BINPKG_EXISTS
|
|
|
|
setup_pkg $pkg || exit $?
|
|
|
|
echo "${sourcepkg}-${version}_${revision}"
|
2015-04-30 09:09:03 +02:00
|
|
|
) || msg_error "$pkgver: failed to transform dependency $pkg\n"
|
2015-03-27 10:50:40 +01:00
|
|
|
}
|
|
|
|
|
2014-03-22 12:31:42 +01:00
|
|
|
#
|
|
|
|
# Installs all dependencies required by a package.
|
|
|
|
#
|
|
|
|
install_pkg_deps() {
|
2015-03-23 12:42:35 +01:00
|
|
|
local pkg="$1" targetpkg="$2" target="$3" cross="$4" cross_prepare="$5"
|
2016-04-27 20:16:59 +02:00
|
|
|
local rval _realpkg _vpkg _curpkg curpkgdepname pkgn iver
|
2018-01-16 05:31:32 +01:00
|
|
|
local i j found rundep repo style
|
2014-04-09 16:40:27 +02:00
|
|
|
|
2017-02-23 22:03:31 +01:00
|
|
|
local -a host_binpkg_deps check_binpkg_deps binpkg_deps
|
|
|
|
local -a host_missing_deps check_missing_deps missing_deps missing_rdeps
|
2014-04-09 16:40:27 +02:00
|
|
|
|
|
|
|
[ -z "$pkgname" ] && return 2
|
|
|
|
|
|
|
|
setup_pkg_depends
|
|
|
|
|
2018-01-16 05:31:32 +01:00
|
|
|
[ -n "$build_style" ] && style=" [$build_style]"
|
|
|
|
|
2015-03-14 07:50:05 +01:00
|
|
|
if [ "$pkg" != "$targetpkg" ]; then
|
2018-01-16 05:31:32 +01:00
|
|
|
msg_normal "$pkgver: building${style} (dependency of $targetpkg) ...\n"
|
2015-03-14 07:50:05 +01:00
|
|
|
else
|
2018-01-16 05:31:32 +01:00
|
|
|
msg_normal "$pkgver: building${style} ...\n"
|
2015-03-14 07:50:05 +01:00
|
|
|
fi
|
|
|
|
|
2017-02-23 22:03:31 +01:00
|
|
|
if [ -z "$build_depends" -a -z "$host_build_depends" -a -z "$host_check_depends" -a -z "$run_depends" ]; then
|
2014-04-09 16:40:27 +02:00
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Host build dependencies.
|
|
|
|
#
|
|
|
|
for i in ${host_build_depends}; do
|
2015-03-27 10:50:40 +01:00
|
|
|
check_pkgdep_matched "$i" version
|
2014-04-09 16:40:27 +02:00
|
|
|
local rval=$?
|
|
|
|
if [ $rval -eq 0 ]; then
|
2015-03-27 10:50:40 +01:00
|
|
|
echo " [host] ${i}: installed."
|
|
|
|
continue
|
2014-04-09 16:40:27 +02:00
|
|
|
elif [ $rval -eq 1 ]; then
|
2015-03-28 03:22:07 +01:00
|
|
|
_realpkg="$($XBPS_UHELPER_CMD getpkgname $i 2>/dev/null)"
|
|
|
|
iver=$($XBPS_UHELPER_CMD version ${_realpkg})
|
|
|
|
if [ $? -eq 0 -a -n "$iver" ]; then
|
|
|
|
echo " [host] ${i}: installed $iver (virtualpkg)."
|
|
|
|
continue
|
|
|
|
else
|
|
|
|
echo " [host] ${i}: unresolved build dependency!"
|
|
|
|
return 1
|
|
|
|
fi
|
2014-04-09 16:40:27 +02:00
|
|
|
else
|
2015-03-27 10:50:40 +01:00
|
|
|
repo=$($XBPS_QUERY_CMD -R -prepository ${i} 2>/dev/null)
|
|
|
|
if [ -n "${repo}" ]; then
|
|
|
|
echo " [host] ${i}: found ($repo)"
|
|
|
|
host_binpkg_deps+=("${i}")
|
|
|
|
continue
|
2014-04-09 16:40:27 +02:00
|
|
|
else
|
2015-03-27 10:50:40 +01:00
|
|
|
echo " [host] ${i}: not found."
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
|
|
|
fi
|
2015-03-27 10:50:40 +01:00
|
|
|
host_missing_deps+=("${i}")
|
2014-04-09 16:40:27 +02:00
|
|
|
done
|
|
|
|
|
2017-02-23 22:03:31 +01:00
|
|
|
#
|
|
|
|
# Host check dependencies.
|
|
|
|
#
|
|
|
|
for i in ${host_check_depends}; do
|
|
|
|
check_pkgdep_matched "$i" version
|
|
|
|
local rval=$?
|
|
|
|
if [ $rval -eq 0 ]; then
|
|
|
|
echo " [check] ${i}: installed."
|
|
|
|
continue
|
|
|
|
elif [ $rval -eq 1 ]; then
|
|
|
|
_realpkg="$($XBPS_UHELPER_CMD getpkgname $i 2>/dev/null)"
|
|
|
|
iver=$($XBPS_UHELPER_CMD version ${_realpkg})
|
|
|
|
if [ $? -eq 0 -a -n "$iver" ]; then
|
|
|
|
echo " [check] ${i}: installed $iver (virtualpkg)."
|
|
|
|
continue
|
|
|
|
else
|
|
|
|
echo " [check] ${i}: unresolved check dependency!"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
repo=$($XBPS_QUERY_CMD -R -prepository ${i} 2>/dev/null)
|
|
|
|
if [ -n "${repo}" ]; then
|
|
|
|
echo " [check] ${i}: found ($repo)"
|
|
|
|
check_binpkg_deps+=("${i}")
|
|
|
|
continue
|
|
|
|
else
|
|
|
|
echo " [check] ${i}: not found."
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
check_missing_deps+=("${i}")
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
#
|
|
|
|
# Target build dependencies.
|
|
|
|
#
|
2015-03-27 10:50:40 +01:00
|
|
|
for i in ${build_depends}; do
|
|
|
|
_realpkg="$($XBPS_UHELPER_CMD getpkgname $i 2>/dev/null)"
|
|
|
|
# Check if dependency is a subpkg, if it is, ignore it.
|
|
|
|
unset found
|
|
|
|
for j in ${subpackages}; do
|
|
|
|
[ "$j" = "${_realpkg}" ] && found=1 && break
|
|
|
|
done
|
|
|
|
[ -n "$found" ] && continue
|
|
|
|
check_pkgdep_matched "${i}" version $cross
|
|
|
|
local rval=$?
|
|
|
|
if [ $rval -eq 0 ]; then
|
2015-03-28 03:22:07 +01:00
|
|
|
echo " [target] ${i}: installed."
|
2014-09-21 11:44:45 +02:00
|
|
|
continue
|
2015-03-27 10:50:40 +01:00
|
|
|
elif [ $rval -eq 1 ]; then
|
2015-03-28 03:22:07 +01:00
|
|
|
iver=$($XBPS_UHELPER_XCMD version ${_realpkg})
|
|
|
|
if [ $? -eq 0 -a -n "$iver" ]; then
|
|
|
|
echo " [target] ${i}: installed $iver (virtualpkg)."
|
|
|
|
continue
|
|
|
|
else
|
|
|
|
echo " [target] ${i}: unresolved build dependency!"
|
|
|
|
return 1
|
|
|
|
fi
|
2015-03-27 10:50:40 +01:00
|
|
|
else
|
|
|
|
repo=$($XBPS_QUERY_XCMD -R -prepository ${i} 2>/dev/null)
|
|
|
|
if [ -n "${repo}" ]; then
|
2015-03-28 03:22:07 +01:00
|
|
|
echo " [target] ${i}: found ($repo)"
|
2015-03-27 10:50:40 +01:00
|
|
|
binpkg_deps+=("${i}")
|
|
|
|
continue
|
|
|
|
else
|
2015-03-28 03:22:07 +01:00
|
|
|
echo " [target] ${i}: not found."
|
2015-03-27 10:50:40 +01:00
|
|
|
fi
|
2014-09-21 11:44:45 +02:00
|
|
|
fi
|
2015-03-27 10:50:40 +01:00
|
|
|
missing_deps+=("${i}")
|
|
|
|
done
|
|
|
|
|
|
|
|
#
|
|
|
|
# Target run time dependencies
|
|
|
|
#
|
|
|
|
for i in ${run_depends}; do
|
2014-04-09 16:40:27 +02:00
|
|
|
_realpkg="${i%\?*}"
|
2016-04-27 20:16:59 +02:00
|
|
|
_curpkg="${_realpkg}"
|
|
|
|
_vpkg="${i#*\?}"
|
|
|
|
if [ "${_realpkg}" != "${_vpkg}" ]; then
|
|
|
|
_realpkg="${_vpkg}"
|
|
|
|
else
|
|
|
|
unset _curpkg
|
2014-08-17 19:21:25 +02:00
|
|
|
fi
|
2014-04-09 16:40:27 +02:00
|
|
|
pkgn=$($XBPS_UHELPER_CMD getpkgdepname "${_realpkg}")
|
|
|
|
if [ -z "$pkgn" ]; then
|
|
|
|
pkgn=$($XBPS_UHELPER_CMD getpkgname "${_realpkg}")
|
|
|
|
if [ -z "$pkgn" ]; then
|
2015-03-27 10:50:40 +01:00
|
|
|
msg_error "$pkgver: invalid runtime dependency: ${_realpkg}\n"
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
|
|
|
fi
|
2014-07-30 17:58:17 +02:00
|
|
|
# Check if dependency is a subpkg, if it is, ignore it.
|
|
|
|
unset found
|
|
|
|
for j in ${subpackages}; do
|
2015-03-27 10:50:40 +01:00
|
|
|
[ "$j" = "${pkgn}" ] && found=1 && break
|
2014-07-30 17:58:17 +02:00
|
|
|
done
|
|
|
|
[ -n "$found" ] && continue
|
2015-03-27 10:50:40 +01:00
|
|
|
_props=$($XBPS_QUERY_XCMD -R -ppkgver,repository ${_realpkg} 2>/dev/null)
|
|
|
|
if [ -n "${_props}" ]; then
|
|
|
|
set -- ${_props}
|
|
|
|
$XBPS_UHELPER_CMD pkgmatch ${1} "${_realpkg}"
|
|
|
|
if [ $? -eq 1 ]; then
|
2016-04-27 20:16:59 +02:00
|
|
|
if [ -n "${_curpkg}" ]; then
|
|
|
|
echo " [runtime] ${_curpkg}:${_realpkg} (virtual dependency): found $1 ($2)"
|
|
|
|
else
|
|
|
|
echo " [runtime] ${_realpkg}: found $1 ($2)"
|
|
|
|
fi
|
2014-04-09 16:40:27 +02:00
|
|
|
shift 2
|
2015-03-27 10:50:40 +01:00
|
|
|
continue
|
2014-04-09 16:40:27 +02:00
|
|
|
else
|
2016-04-27 20:16:59 +02:00
|
|
|
if [ -n "${_curpkg}" ]; then
|
|
|
|
echo " [runtime] ${_curpkg}:${_realpkg} (virtual dependency): not found."
|
|
|
|
else
|
|
|
|
echo " [runtime] ${_realpkg}: not found."
|
|
|
|
fi
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
2015-03-27 10:50:40 +01:00
|
|
|
shift 2
|
|
|
|
else
|
2016-04-27 20:16:59 +02:00
|
|
|
if [ -n "${_curpkg}" ]; then
|
|
|
|
echo " [runtime] ${_curpkg}:${_realpkg} (virtual dependency): not found."
|
|
|
|
else
|
|
|
|
echo " [runtime] ${_realpkg}: not found."
|
|
|
|
fi
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
2015-03-27 10:50:40 +01:00
|
|
|
missing_rdeps+=("${_realpkg}")
|
2014-04-09 16:40:27 +02:00
|
|
|
done
|
|
|
|
|
2017-11-20 15:17:34 +01:00
|
|
|
if [ -n "$XBPS_BUILD_ONLY_ONE_PKG" ]; then
|
2017-09-04 04:08:25 +02:00
|
|
|
for i in ${host_missing_deps[@]}; do
|
|
|
|
msg_error "dep ${i} not found: -1 passed: instructed not to build\n"
|
|
|
|
done
|
|
|
|
for i in ${check_missing_deps[@]}; do
|
|
|
|
msg_error "dep ${i} not found: -1 passed: instructed not to build\n"
|
|
|
|
done
|
|
|
|
for i in ${missing_rdeps[@]}; do
|
|
|
|
msg_error "dep ${i} not found: -1 passed: instructed not to build\n"
|
|
|
|
done
|
|
|
|
for i in ${missing_deps[@]}; do
|
|
|
|
msg_error "dep ${i} not found: -1 passed: instructed not to build\n"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2017-02-23 22:03:31 +01:00
|
|
|
# Missing host dependencies, build from srcpkgs.
|
2014-04-09 16:40:27 +02:00
|
|
|
for i in ${host_missing_deps[@]}; do
|
2015-03-14 07:50:05 +01:00
|
|
|
# packages not found in repos, install from source.
|
|
|
|
(
|
2015-03-27 10:50:40 +01:00
|
|
|
curpkgdepname=$($XBPS_UHELPER_CMD getpkgname "$i" 2>/dev/null)
|
2014-04-09 16:40:27 +02:00
|
|
|
setup_pkg $curpkgdepname
|
2015-05-23 08:54:14 +02:00
|
|
|
exec env XBPS_DEPENDENCY=1 XBPS_BINPKG_EXISTS=1 \
|
|
|
|
$XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target || exit $?
|
2015-03-19 10:08:02 +01:00
|
|
|
) || exit $?
|
2015-03-14 07:50:05 +01:00
|
|
|
host_binpkg_deps+=("$i")
|
2014-04-09 16:40:27 +02:00
|
|
|
done
|
|
|
|
|
2017-02-23 22:03:31 +01:00
|
|
|
# Missing check dependencies, build from srcpkgs.
|
|
|
|
for i in ${check_missing_deps[@]}; do
|
|
|
|
# packages not found in repos, install from source.
|
|
|
|
(
|
|
|
|
curpkgdepname=$($XBPS_UHELPER_CMD getpkgname "$i" 2>/dev/null)
|
|
|
|
setup_pkg $curpkgdepname
|
|
|
|
exec env XBPS_DEPENDENCY=1 XBPS_BINPKG_EXISTS=1 \
|
|
|
|
$XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target || exit $?
|
|
|
|
) || exit $?
|
|
|
|
check_binpkg_deps+=("$i")
|
|
|
|
done
|
|
|
|
|
|
|
|
# Missing target dependencies, build from srcpkgs.
|
2014-04-09 16:40:27 +02:00
|
|
|
for i in ${missing_deps[@]}; do
|
|
|
|
# packages not found in repos, install from source.
|
2015-03-14 07:50:05 +01:00
|
|
|
(
|
2015-03-27 10:50:40 +01:00
|
|
|
curpkgdepname=$($XBPS_UHELPER_CMD getpkgname "$i" 2>/dev/null)
|
2014-04-09 16:40:27 +02:00
|
|
|
setup_pkg $curpkgdepname $cross
|
2015-05-02 03:40:52 +02:00
|
|
|
exec env XBPS_DEPENDENCY=1 XBPS_BINPKG_EXISTS=1 \
|
|
|
|
$XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target $cross $cross_prepare || exit $?
|
2015-03-19 10:08:02 +01:00
|
|
|
) || exit $?
|
2015-03-14 07:50:05 +01:00
|
|
|
binpkg_deps+=("$i")
|
2014-04-09 16:40:27 +02:00
|
|
|
done
|
|
|
|
|
2015-03-27 10:50:40 +01:00
|
|
|
# Target runtime missing dependencies, build from srcpkgs.
|
|
|
|
for i in ${missing_rdeps[@]}; do
|
|
|
|
# packages not found in repos, install from source.
|
|
|
|
(
|
|
|
|
curpkgdepname=$($XBPS_UHELPER_CMD getpkgdepname "$i" 2>/dev/null)
|
|
|
|
if [ -z "$curpkgdepname" ]; then
|
|
|
|
curpkgdepname=$($XBPS_UHELPER_CMD getpkgname "$i" 2>/dev/null)
|
|
|
|
if [ -z "$curpkgdepname" ]; then
|
|
|
|
curpkgdepname="$i"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
setup_pkg $curpkgdepname $cross
|
2015-05-02 03:40:52 +02:00
|
|
|
exec env XBPS_DEPENDENCY=1 XBPS_BINPKG_EXISTS=1 \
|
|
|
|
$XBPS_LIBEXECDIR/build.sh $sourcepkg $pkg $target $cross $cross_prepare || exit $?
|
2015-03-27 10:50:40 +01:00
|
|
|
) || exit $?
|
|
|
|
done
|
|
|
|
|
2015-03-14 07:50:05 +01:00
|
|
|
if [ "$pkg" != "$targetpkg" ]; then
|
2018-01-16 05:31:32 +01:00
|
|
|
msg_normal "$pkg: building${style} (dependency of $targetpkg) ...\n"
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
for i in ${host_binpkg_deps[@]}; do
|
|
|
|
msg_normal "$pkgver: installing host dependency '$i' ...\n"
|
|
|
|
install_pkg_from_repos "${i}"
|
|
|
|
done
|
|
|
|
|
2017-02-23 22:03:31 +01:00
|
|
|
for i in ${check_binpkg_deps[@]}; do
|
|
|
|
msg_normal "$pkgver: installing check dependency '$i' ...\n"
|
|
|
|
install_pkg_from_repos "${i}"
|
|
|
|
done
|
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
for i in ${binpkg_deps[@]}; do
|
|
|
|
msg_normal "$pkgver: installing target dependency '$i' ...\n"
|
|
|
|
install_pkg_from_repos "$i" $cross
|
|
|
|
done
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|