From e67d5b4ba05349b3bf4229d0cf7d069809c4420e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 28 Dec 2023 01:37:43 +0000 Subject: gentoo auto-resync : 28:12:2023 - 01:37:43 --- eclass/Manifest.gz | Bin 38918 -> 38930 bytes eclass/autotools.eclass | 102 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 90 insertions(+), 12 deletions(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index 40f6f860486f..53a23941a68e 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index 77124e098aac..7f48c78739c7 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -53,6 +53,27 @@ inherit gnuconfig libtool # Do you want libtool? Valid values here are "latest" and "none". : "${WANT_LIBTOOL:=latest}" +# @ECLASS_VARIABLE: _LATEST_AUTOCONF +# @INTERNAL +# @DESCRIPTION: +# CONSTANT! +# The latest major unstable and stable version/slot of autoconf available +# on each arch. +# Only add unstable version if it is in a different slot than latest stable +# version. +# List latest unstable version first to boost testing adoption rate because +# most package manager dependency resolver will pick the first suitable +# version. +# If a newer slot is stable on any arch, and is NOT reflected in this list, +# then circular dependencies may arise during emerge @system bootstraps. +# +# See bug #312315 and bug #465732 for further information and context. +# +# Do NOT change this variable in your ebuilds! +# If you want to force a newer minor version, you can specify the correct +# WANT value by using a colon: : +_LATEST_AUTOCONF=( 2.72-r1:2.72 2.71-r6:2.71 ) + # @ECLASS_VARIABLE: _LATEST_AUTOMAKE # @INTERNAL # @DESCRIPTION: @@ -78,23 +99,52 @@ _automake_atom="sys-devel/automake" _autoconf_atom="sys-devel/autoconf" if [[ -n ${WANT_AUTOMAKE} ]] ; then case ${WANT_AUTOMAKE} in - # Even if the package doesn't use automake, we still need to depend - # on it because we run aclocal to process m4 macros. This matches - # the autoreconf tool, so this requirement is correct, bug #401605. - none) ;; - latest) _automake_atom="|| ( `printf '>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ }` )" ;; - *) _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*";; + none) + # Even if the package doesn't use automake, we still need to depend + # on it because we run aclocal to process m4 macros. This matches + # the autoreconf tool, so this requirement is correct, bug #401605. + ;; + latest) + printf -v _automake_atom_tmp '>=sys-devel/automake-%s:%s ' ${_LATEST_AUTOMAKE[@]/:/ } + _automake_atom="|| ( ${_automake_atom_tmp} )" + unset _automake_atom_tmp + ;; + *) + _automake_atom="=sys-devel/automake-${WANT_AUTOMAKE}*" + ;; esac export WANT_AUTOMAKE fi if [[ -n ${WANT_AUTOCONF} ]] ; then + # TODO: Fix the slot mess here and just have proper PV-as-SLOT? + # TODO: Make _LATEST_AUTOCONF an assoc. array and instead iterate over + # its keys. case ${WANT_AUTOCONF} in - none) _autoconf_atom="" ;; # some packages don't require autoconf at all - 2.1) _autoconf_atom=">=sys-devel/autoconf-2.13-r7:2.1" ;; - # if you change the "latest" version here, change also autotools_env_setup - latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.71-r5" ;; - *) die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'" ;; + none) + # some packages don't require autoconf at all + _autoconf_atom="" + ;; + 2.1) + _autoconf_atom=">=sys-devel/autoconf-2.13-r7:2.1" + ;; + 2.5) + _autoconf_atom=">=sys-devel/autoconf-2.71-r6:2.71" + ;; + 2.69) + _autoconf_atom=">=sys-devel/autoconf-2.69-r9:2.69" + ;; + 2.71) + _autoconf_atom=">=sys-devel/autoconf-2.71-r6:2.71" + ;; + latest) + printf -v _autoconf_atom_tmp '>=sys-devel/autoconf-%s:%s ' ${_LATEST_AUTOCONF[@]/:/ } + _autoconf_atom="|| ( ${_autoconf_atom_tmp} )" + unset _autoconf_atom_tmp + ;; + *) + die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'" + ;; esac export WANT_AUTOCONF fi @@ -535,7 +585,35 @@ autotools_env_setup() { [[ ${WANT_AUTOMAKE} == "latest" ]] && die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}" fi fi - [[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.71 + + if [[ ${WANT_AUTOCONF} == "latest" ]] ; then + local pv + for pv in ${_LATEST_AUTOCONF[@]/#*:} ; do + # Break on first hit to respect _LATEST_AUTOCONF order. + local hv_args="" + case ${EAPI} in + 6) + hv_args="--host-root" + ;; + *) + hv_args="-b" + ;; + esac + has_version ${hv_args} "=sys-devel/autoconf-${pv}*" && export WANT_AUTOCONF="${pv}" && break + done + + # During bootstrap in prefix there might be no autoconf merged yet + # due to --nodeps, but still available somewhere in PATH. + # For example, ncurses needs local libtool on aix and hpux. + # So, make the check non-fatal where autoconf doesn't yet + # exist within BROOT. (We could possibly do better here + # and inspect PATH, but I'm not sure there's much point.) + if use prefix && [[ ! -x "${BROOT}"/usr/bin/autoconf ]] ; then + [[ ${WANT_AUTOCONF} == "latest" ]] && ewarn "Ignoring missing autoconf during Prefix bootstrap! Tried ${_LATEST_AUTOCONF[*]}" + else + [[ ${WANT_AUTOCONF} == "latest" ]] && die "Cannot find the latest autoconf! Tried ${_LATEST_AUTOCONF[*]}" + fi + fi } # @FUNCTION: autotools_run_tool -- cgit v1.2.3