public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:master commit in: eclass/
Date: Sat, 10 Apr 2021 07:15:12 +0000 (UTC)	[thread overview]
Message-ID: <1618038794.00e19f7ec43cd9d94d894f87114fbfab0b405df3.sam@gentoo> (raw)

commit:     00e19f7ec43cd9d94d894f87114fbfab0b405df3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 10 07:12:24 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 10 07:13:14 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=00e19f7e

autotools.eclass: sync with ::gentoo

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/autotools.eclass | 78 ++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 57 insertions(+), 21 deletions(-)

diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 5a59c8d2d5..ded5436a45 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: autotools.eclass
@@ -34,16 +34,19 @@ esac
 inherit libtool
 
 # @ECLASS-VARIABLE: WANT_AUTOCONF
+# @PRE_INHERIT
 # @DESCRIPTION:
 # The major version of autoconf your package needs
 : ${WANT_AUTOCONF:=latest}
 
 # @ECLASS-VARIABLE: WANT_AUTOMAKE
+# @PRE_INHERIT
 # @DESCRIPTION:
 # The major version of automake your package needs
 : ${WANT_AUTOMAKE:=latest}
 
 # @ECLASS-VARIABLE: WANT_LIBTOOL
+# @PRE_INHERIT
 # @DESCRIPTION:
 # Do you want libtool?  Valid values here are "latest" and "none".
 : ${WANT_LIBTOOL:=latest}
@@ -54,18 +57,20 @@ inherit libtool
 # CONSTANT!
 # The latest major unstable and stable version/slot of automake 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 465732 for further information and context.
-# 
+#
+# 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:  <PV>:<WANT_AUTOMAKE>
-_LATEST_AUTOMAKE=( 1.16.1:1.16 1.15.1:1.15 )
+_LATEST_AUTOMAKE=( 1.16.2-r1:1.16 )
 
 _automake_atom="sys-devel/automake"
 _autoconf_atom="sys-devel/autoconf"
@@ -73,7 +78,7 @@ 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.  #401605
+		# the autoreconf tool, so this requirement is correct, bug #401605.
 		none) ;;
 		latest)
 			# Use SLOT deps if we can.  For EAPI=0, we get pretty close.
@@ -118,6 +123,7 @@ AUTOTOOLS_DEPEND="!<sys-devel/gettext-0.18.1.1-r3
 RDEPEND=""
 
 # @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND
+# @PRE_INHERIT
 # @DESCRIPTION:
 # Set to 'no' to disable automatically adding to DEPEND.  This lets
 # ebuilds form conditional depends by using ${AUTOTOOLS_DEPEND} in
@@ -139,6 +145,12 @@ unset _automake_atom _autoconf_atom
 # Additional options to pass to automake during
 # eautoreconf call.
 
+# @ECLASS-VARIABLE: AT_NOEAUTOHEADER
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Don't run eautoheader command if set to 'yes'; only used to work around
+# packages that don't want their headers being modified.
+
 # @ECLASS-VARIABLE: AT_NOEAUTOMAKE
 # @DEFAULT_UNSET
 # @DESCRIPTION:
@@ -154,11 +166,13 @@ unset _automake_atom _autoconf_atom
 # particular options
 
 # @ECLASS-VARIABLE: AT_M4DIR
+# @DEFAULT_UNSET
 # @DESCRIPTION:
 # Additional director(y|ies) aclocal should search
 : ${AT_M4DIR:=}
 
 # @ECLASS-VARIABLE: AT_SYS_M4DIR
+# @DEFAULT_UNSET
 # @INTERNAL
 # @DESCRIPTION:
 # For system integrators, a list of additional aclocal search paths.
@@ -177,13 +191,13 @@ unset _automake_atom _autoconf_atom
 eautoreconf() {
 	local x g
 
-	# Subdirs often share a common build dir #529404.  If so, we can't safely
+	# Subdirs often share a common build dir, bug #529404.  If so, we can't safely
 	# run in parallel because many tools clobber the content in there.  Libtool
 	# and automake both `rm && cp` while aclocal reads the output.  We might be
 	# able to handle this if we split the steps and grab locks on the dirs the
 	# tools actually write to.  Then we'd run all the common tools that use
 	# those inputs.  Doing this in bash does not scale easily.
-	# If we do re-enable parallel support, make sure #426512 is handled.
+	# If we do re-enable parallel support, make sure bug #426512 is handled.
 	if [[ -z ${AT_NO_RECURSIVE} ]] ; then
 		# Take care of subdirs
 		for x in $(autotools_check_macro_val AC_CONFIG_SUBDIRS) ; do
@@ -239,7 +253,7 @@ eautoreconf() {
 	else
 		eautoconf --force
 	fi
-	eautoheader
+	[[ ${AT_NOEAUTOHEADER} != "yes" ]] && eautoheader
 	[[ ${AT_NOEAUTOMAKE} != "yes" ]] && FROM_EAUTORECONF="yes" eautomake ${AM_OPTS}
 
 	if [[ ${AT_NOELIBTOOLIZE} != "yes" ]] ; then
@@ -289,8 +303,8 @@ eaclocal_amflags() {
 		[[ -e ${amflags_file} ]] || continue
 		# setup the env in case the pkg does something crazy
 		# in their ACLOCAL_AMFLAGS.  like run a shell script
-		# which turns around and runs autotools. #365401
-		# or split across multiple lines. #383525
+		# which turns around and runs autotools (bug #365401)
+		# or split across multiple lines (bug #383525)
 		autotools_env_setup
 		aclocal_opts=$(sed -n \
 			"/^ACLOCAL_AMFLAGS[[:space:]]*=/{ \
@@ -312,7 +326,7 @@ eaclocal_amflags() {
 # specified parametes. The name of the tool run is the same of the function
 # without e prefix.
 # They also force installing the support files for safety.
-# Respects AT_M4DIR for additional directories to search for macro's.
+# Respects AT_M4DIR for additional directories to search for macros.
 eaclocal() {
 	[[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
 		autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags)
@@ -360,6 +374,19 @@ eautoconf() {
 		eqawarn "when it finds this file.  See https://bugs.gentoo.org/426262 for details."
 	fi
 
+	# Install config.guess and config.sub which are required by many macros
+	# in autoconf >=2.70.
+	local _gnuconfig
+	case ${EAPI:-0} in
+		0|1|2|3|4|5|6)
+			_gnuconfig="${EPREFIX}/usr/share/gnuconfig"
+		;;
+		*)
+			_gnuconfig="${BROOT}/usr/share/gnuconfig"
+		;;
+	esac
+	cp "${_gnuconfig}"/config.{guess,sub} . || die
+
 	autotools_run_tool --at-m4flags autoconf "$@"
 }
 
@@ -406,7 +433,7 @@ eautomake() {
 		|| extra_opts+=( --foreign )
 
 	# Older versions of automake do not support --force-missing.  But we want
-	# to use this whenever possible to update random bundled files #133489.
+	# to use this whenever possible to update random bundled files, bug #133489.
 	case $(_automake_version) in
 	1.4|1.4[.-]*) ;;
 	*) extra_opts+=( --force-missing ) ;;
@@ -429,7 +456,16 @@ eautopoint() {
 # use gettext directly.  So we have to copy it in manually since
 # we can't let `autopoint` do it for us.
 config_rpath_update() {
-	local dst src=$(type -P gettext | sed 's:bin/gettext:share/gettext/config.rpath:')
+	local dst src
+
+	case ${EAPI:-0} in
+		0|1|2|3|4|5|6)
+			src="${EPREFIX}/usr/share/gettext/config.rpath"
+			;;
+		*)
+			src="${BROOT}/usr/share/gettext/config.rpath"
+			;;
+	esac
 
 	[[ $# -eq 0 ]] && set -- $(find -name config.rpath)
 	[[ $# -eq 0 ]] && return 0
@@ -496,17 +532,17 @@ autotools_run_tool() {
 	done
 
 	if [[ ${EBUILD_PHASE} != "unpack" && ${EBUILD_PHASE} != "prepare" ]]; then
-		ewarn "QA Warning: running $1 in ${EBUILD_PHASE} phase"
+		ewarn "QA Warning: running '$1' in ${EBUILD_PHASE} phase"
 	fi
 
 	if ${missing_ok} && ! type -P ${1} >/dev/null ; then
-		einfo "Skipping '$*' due $1 not installed"
+		einfo "Skipping '$*' because '$1' not installed"
 		return 0
 	fi
 
 	autotools_env_setup
 
-	# Allow people to pass in full paths. #549268
+	# Allow people to pass in full paths, bug #549268
 	local STDERR_TARGET="${T}/${1##*/}.out"
 	# most of the time, there will only be one run, but if there are
 	# more, make sure we get unique log filenames
@@ -520,7 +556,7 @@ autotools_run_tool() {
 	fi
 
 	if ${m4flags} ; then
-		set -- "${1}" $(autotools_m4dir_include) "${@:2}" $(autotools_m4sysdir_include)
+		set -- "${1}" $(autotools_m4dir_include) $(autotools_m4sysdir_include) "${@:2}"
 	fi
 
 	# If the caller wants to probe something, then let them do it directly.
@@ -535,13 +571,13 @@ autotools_run_tool() {
 	"$@" >> "${STDERR_TARGET}" 2>&1
 	if ! eend $? && ${autofail} ; then
 		echo
-		eerror "Failed Running $1 !"
+		eerror "Failed running '$1'!"
 		eerror
-		eerror "Include in your bugreport the contents of:"
+		eerror "Include in your bug report the contents of:"
 		eerror
 		eerror "  ${STDERR_TARGET}"
 		echo
-		die "Failed Running $1 !"
+		die "Failed running '$1'!"
 	fi
 }
 


             reply	other threads:[~2021-04-10  7:15 UTC|newest]

Thread overview: 89+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10  7:15 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-30  9:08 [gentoo-commits] repo/proj/prefix:master commit in: eclass/ Fabian Groffen
2024-09-23 18:25 Fabian Groffen
2024-08-11 16:19 Fabian Groffen
2024-08-10 14:43 Fabian Groffen
2024-08-10 14:24 Fabian Groffen
2024-08-10 14:24 Fabian Groffen
2024-08-10 10:48 Fabian Groffen
2024-08-09  9:25 Fabian Groffen
2024-08-07 17:08 Fabian Groffen
2024-08-07 17:03 Fabian Groffen
2024-07-25  6:25 Fabian Groffen
2024-07-17 12:01 Fabian Groffen
2024-05-09  7:14 Fabian Groffen
2024-01-21 13:47 Fabian Groffen
2024-01-21 13:43 Fabian Groffen
2024-01-21 13:40 Fabian Groffen
2023-12-16 15:36 Fabian Groffen
2023-09-11 23:33 Sam James
2023-09-04  6:36 Fabian Groffen
2023-09-03 19:39 Fabian Groffen
2023-05-24  7:55 Fabian Groffen
2023-05-24  6:19 Fabian Groffen
2022-06-29 14:53 Sam James
2022-06-29 14:05 Sam James
2022-06-07 17:01 Fabian Groffen
2022-06-07 12:35 Fabian Groffen
2022-06-06 16:51 Fabian Groffen
2022-06-06  9:07 Fabian Groffen
2022-06-06  8:42 Fabian Groffen
2022-05-10  6:22 Fabian Groffen
2022-02-17  0:12 Sam James
2022-02-10  8:54 Fabian Groffen
2022-01-31  1:07 Sam James
2022-01-23  2:27 Sam James
2022-01-23  1:21 Sam James
2021-12-03 10:03 Fabian Groffen
2021-10-21  6:39 Fabian Groffen
2021-10-14  6:15 Sam James
2021-10-14  6:15 Sam James
2021-10-13  4:05 Sam James
2021-07-13  9:02 Fabian Groffen
2021-06-29  6:48 Fabian Groffen
2021-06-29  6:23 Fabian Groffen
2021-05-04 17:20 Fabian Groffen
2021-05-04 17:20 Fabian Groffen
2021-05-04 17:20 Fabian Groffen
2021-05-04 17:20 Fabian Groffen
2021-05-04 17:20 Fabian Groffen
2021-05-04 17:09 Fabian Groffen
2021-04-10  7:15 Sam James
2021-04-10  7:15 Sam James
2021-04-10  7:09 Sam James
2021-03-13  9:54 Fabian Groffen
2021-02-07 19:23 Fabian Groffen
2021-01-24  9:47 Fabian Groffen
2021-01-14  8:02 Fabian Groffen
2021-01-12 13:32 Fabian Groffen
2021-01-11 19:53 Fabian Groffen
2020-12-15  7:48 Fabian Groffen
2020-11-29 14:24 Fabian Groffen
2020-11-29 13:41 Fabian Groffen
2020-08-09  8:14 Fabian Groffen
2020-06-22 18:28 Fabian Groffen
2020-06-22 13:56 Fabian Groffen
2020-05-26  6:44 Fabian Groffen
2020-03-26  7:56 Fabian Groffen
2020-03-22  9:25 Fabian Groffen
2020-03-16 17:23 Michael Haubenwallner
2020-03-13  7:51 Fabian Groffen
2019-12-11  9:47 Fabian Groffen
2019-11-14  6:36 Fabian Groffen
2019-05-30  8:25 Fabian Groffen
2019-03-25 14:20 Michael Haubenwallner
2018-12-17  9:55 Fabian Groffen
2018-07-17  8:45 Fabian Groffen
2018-07-03  8:52 Michael Haubenwallner
2018-06-22 13:16 Michael Haubenwallner
2018-06-20  7:32 Fabian Groffen
2018-06-06 12:48 Fabian Groffen
2017-12-12 18:53 Fabian Groffen
2017-12-12 18:53 Fabian Groffen
2017-10-17  8:39 Fabian Groffen
2017-10-16 13:54 Fabian Groffen
2017-10-03  7:38 Michael Haubenwallner
2016-07-08 11:17 Fabian Groffen
2016-06-15 11:32 [gentoo-commits] repo/proj/prefix:rap0 " Benda XU
2016-06-15 11:05 ` [gentoo-commits] repo/proj/prefix:master " Benda XU
2016-04-18  8:07 Michael Haubenwallner
2016-03-20 18:22 Fabian Groffen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1618038794.00e19f7ec43cd9d94d894f87114fbfab0b405df3.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox