diff --git a/templates/glibc32.tmpl b/templates/glibc32.tmpl index ae567e3583d..1765b805092 100644 --- a/templates/glibc32.tmpl +++ b/templates/glibc32.tmpl @@ -24,6 +24,8 @@ long_desc=" This version is only for 64 bits systems." +# This package doesn't make sense on 32bit systems. +only_for_archs=x86_64 cross_compiler=yes base_package=yes build_depends="perl-5.10.0" diff --git a/xbps.sh b/xbps.sh index 0fdd9d25525..b81c9c8a14a 100755 --- a/xbps.sh +++ b/xbps.sh @@ -237,6 +237,7 @@ reset_tmpl_vars() tar_override_cmd xml_entries sgml_entries \ build_depends libtool_fixup_la_stage no_fixup_libtool \ disable_parallel_build run_depends cross_compiler \ + only_for_archs \ XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \ XBPS_BUILD_DONE XBPS_INSTALL_DONE" @@ -272,6 +273,7 @@ setup_tmpl() prepare_tmpl() { local i= + local found= # # There's nothing of interest if we are a meta template. @@ -288,6 +290,13 @@ prepare_tmpl() fi done + for i in ${only_for_archs}; do + [ "$i" = "$xbps_machine" ] && found=si && break + done + if [ -n ${only_for_archs} -a -z $found ]; then + msg_error "this package is only for: ${only_for_archs}." + fi + unset XBPS_EXTRACT_DONE XBPS_APPLYPATCHES_DONE unset XBPS_CONFIGURE_DONE XBPS_BUILD_DONE XBPS_INSTALL_DONE @@ -1386,18 +1395,9 @@ unstow_pkg() # while getopts "Cc:" opt; do case $opt in - C) - dontrm_builddir=yes - ;; - c) - config_file_specified=yes - XBPS_CONFIG_FILE="$OPTARG" - shift - ;; - --) - shift - break - ;; + C) dontrm_builddir=yes;; + c) config_file_specified=yes; XBPS_CONFIG_FILE="$OPTARG";; + --) shift; break;; esac done shift $(($OPTIND - 1))