diff options
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r-- | scripts/makepkg.sh.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index da1cec85..0dfbc5d5 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1376,6 +1376,21 @@ check_sanity() { fi fi + if (( ${#pkgname[@]} > 1 )); then + for i in ${pkgname[@]}; do + local arch_list="" + eval $(declare -f package_${i} | sed -n 's/\(^[[:space:]]*arch=\)/arch_list=/p') + if [[ ${arch_list[@]} && ${arch_list} != 'any' ]]; then + if ! in_array $CARCH ${arch_list[@]}; then + if (( ! IGNOREARCH )); then + error "$(gettext "%s is not available for the '%s' architecture.")" "$i" "$CARCH" + ret=1 + fi + fi + fi + done + fi + local provides_list=() eval $(awk '/^[[:space:]]*provides=/,/\)/' "$BUILDFILE" | \ sed -e "s/provides=/provides_list+=/" -e "s/#.*//" -e 's/\\$//') |