Added a new var for templates: only_for_archs.
This accepts a list of archs where the package makes sense. Use this in the glibc32 pkg and restrict it to x86_64. --HG-- extra : convert_revision : 4d64b281e1f2ab6b104d43a1f37def1ec767b0a1
This commit is contained in:
parent
ebb7cc3fcd
commit
cc27b1a54a
|
@ -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"
|
||||
|
|
24
xbps.sh
24
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))
|
||||
|
|
Loading…
Reference in New Issue