sys-devel/autoconf: Sync with Gentoo

It's from Gentoo commit a5aee1e81619d954275235c75bfd639529c29dce.
This commit is contained in:
Flatcar Buildbot 2023-08-07 07:14:35 +00:00 committed by Krzesimir Nowak
parent d50cfcd621
commit 4d7a16a2b6
4 changed files with 187 additions and 1 deletions

View File

@ -10,7 +10,7 @@ else
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.xz ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.xz
https://dev.gentoo.org/~polynomial-c/dist/${P}-runstatedir_patches.tar.xz" https://dev.gentoo.org/~polynomial-c/dist/${P}-runstatedir_patches.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ~ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi fi
inherit toolchain-autoconf inherit toolchain-autoconf

View File

@ -0,0 +1,90 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
inherit git-r3
else
# For _beta handling replace with real version number
MY_PV="${PV}"
MY_P="${PN}-${MY_PV}"
#PATCH_TARBALL_NAME="${PN}-2.70-patches-01"
SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
#SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${PATCH_TARBALL_NAME}.tar.xz"
if ! [[ ${PV} == *_beta* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
S="${WORKDIR}"/${MY_P}
fi
inherit toolchain-autoconf
DESCRIPTION="Used to create autoconfiguration files"
HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html"
LICENSE="GPL-3+"
SLOT="${PV/_*}"
IUSE="emacs"
# for 2.71, our Perl time resolution patch changes our min Perl from 5.6
# (vanilla upstream for 2.71) to 5.8.
BDEPEND=">=sys-devel/m4-1.4.16
>=dev-lang/perl-5.8"
RDEPEND="${BDEPEND}
>=sys-devel/autoconf-wrapper-15
sys-devel/gnuconfig
!~sys-devel/${P}:2.5"
[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
PDEPEND="emacs? ( app-emacs/autoconf-mode )"
PATCHES=(
"${FILESDIR}"/${P}-AC_LANG_CALL_C_cxx.patch
"${FILESDIR}"/${P}-time.patch
"${FILESDIR}"/${P}-AC_C_BIGENDIAN-lto.patch
"${FILESDIR}"/${P}-K-R-decls-clang.patch
"${FILESDIR}"/${P}-make-4.4.patch
"${FILESDIR}"/${P}-K-R-decls-clang-deux.patch
"${FILESDIR}"/${P}-cxx11typo.patch
"${FILESDIR}"/${P}-bash52.patch
)
src_prepare() {
# usr/bin/libtool is provided by binutils-apple, need gnu libtool
if [[ ${CHOST} == *-darwin* ]] ; then
PATCHES+=( "${FILESDIR}"/${PN}-2.71-darwin.patch )
fi
# Save timestamp to avoid later makeinfo call
touch -r doc/{,old_}autoconf.texi || die
local pdir
for pdir in "${WORKDIR}"/{upstream_,}patches ; do
if [[ -d "${pdir}" ]] ; then
eapply ${pdir}
fi
done
toolchain-autoconf_src_prepare
# Restore timestamp to avoid makeinfo call
# We already have an up to date autoconf.info page at this point.
touch -r doc/{old_,}autoconf.texi || die
}
src_test() {
emake check
}
src_install() {
toolchain-autoconf_src_install
local f
for f in config.{guess,sub} ; do
ln -fs ../../gnuconfig/${f} \
"${ED}"/usr/share/autoconf-*/build-aux/${f} || die
done
}

View File

@ -0,0 +1,65 @@
From 412166e185c00d6eacbe67dfcb0326f622ec4020 Mon Sep 17 00:00:00 2001
From: Xi Ruoyao <xry111@xry111.site>
Date: Fri, 30 Sep 2022 11:36:03 -0400
Subject: [PATCH] Fix testsuite failures with bash 5.2.
Bash v5.2 includes several new optimizations to the number of
subshells used for various constructs; as a side effect, the value of
SHLVL is less stable than it used to be. Add SHLVL to the list of
built-in shell variables with unstable values, to be ignored when
checking for inappropriate differences to the shell environment
before and after a macro invocation / between two configure runs.
Problem and solution reported by Xi Ruoyao in
https://lists.gnu.org/archive/html/autoconf/2022-09/msg00015.html
Problem also reported by Bruce Dubbs in
https://lists.gnu.org/archive/html/bug-autoconf/2022-09/msg00010.html
* tests/local.at (_AT_CHECK_ENV, AT_CONFIG_CMP): Ignore changes in
value of SHLVL.
Copyright-paperwork-exempt: yes
---
tests/local.at | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/local.at b/tests/local.at
index 193fd118..a9cf4050 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -352,7 +352,7 @@ m4_define([AT_CHECK_CONFIGURE],
# - AC_SUBST'ed variables
# (FIXME: Generate a list of these automatically.)
# - _|@|.[*#?$].|argv|ARGC|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS
-# |START_TIME|ToD|_AST_FEATURES
+# |SHLVL|START_TIME|ToD|_AST_FEATURES
# Some variables some shells use and change.
# '.[*#?$].' catches '$#' etc. which are displayed like this:
# | '!'=18186
@@ -404,7 +404,7 @@ if test -f state-env.before && test -f state-env.after; then
[GREP|[EF]GREP|SED],
[[_@]|.[*@%:@?$].],
[argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM],
- [SECONDS|START_TIME|ToD|_AST_FEATURES]))=' \
+ [SECONDS|SHLVL|START_TIME|ToD|_AST_FEATURES]))=' \
$act_file ||
test $? -eq 1 || echo failed >&2
) 2>stderr-$act_file |
@@ -435,6 +435,7 @@ fi
# - PPID [bash, zsh]
# - RANDOM [bash, zsh]
# - SECONDS [bash, zsh]
+# - SHLVL [bash]
# - START_TIME [NetBSD sh]
# - ToD [NetBSD sh]
# - '$' [zsh]
@@ -483,6 +484,7 @@ do
/^PPID=/ d
/^RANDOM=/ d
/^SECONDS=/ d
+ /^SHLVL=/ d
/^START_TIME=/ d
/^ToD=/ d
/'\'\\\$\''=/ d
--
2.39.3

View File

@ -0,0 +1,31 @@
From f460883035ef849a2248b1713f711292ec19f4f0 Mon Sep 17 00:00:00 2001
From: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date: Fri, 14 May 2021 09:06:20 +0300
Subject: [PATCH] _AC_PROG_CXX_STDCXX_EDITION_TRY: fix typo in variable name
The typo causes "ac_prog_cxx_stdcxx" to be always set to "cxx11",
regardless of whether the C++ compiler supports C++11.
Message-Id: <YJ4TXAeJcvU0oSec@FSAPPLE2215.fi.f-secure.com>
(tiny change)
---
lib/autoconf/c.m4 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 9f881f0b..47434c89 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -2749,8 +2749,8 @@ AC_DEFUN([_AC_PROG_CXX_STDCXX_EDITION_TRY],
[AC_REQUIRE([_AC_CXX_CXX$1_TEST_PROGRAM])]dnl
[AS_IF([test x$ac_prog_cxx_stdcxx = xno],
[AC_MSG_CHECKING([for $CXX option to enable C++$1 features])
-AC_CACHE_VAL(ac_cv_prog_cxx_$1,
-[ac_cv_prog_cxx_$1=no
+AC_CACHE_VAL(ac_cv_prog_cxx_cxx$1,
+[ac_cv_prog_cxx_cxx$1=no
ac_save_CXX=$CXX
AC_LANG_CONFTEST([AC_LANG_DEFINES_PROVIDED][$][ac_cxx_conftest_cxx$1_program])
for ac_arg in '' m4_normalize(m4_defn([_AC_CXX_CXX$1_OPTIONS]))
--
2.39.3