diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-01-14 21:19:46 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-01-15 16:58:23 +0100 |
commit | 1ee062ba1d57ad391adee1c135dcf474dc30d6b4 (patch) | |
tree | 30559a888fd26b75bb6d9a29786e2bd9ae2d40ef /dev-build | |
parent | Move {sys-devel → dev-build}/autoconf-archive (diff) | |
download | gentoo-1ee062ba1d57ad391adee1c135dcf474dc30d6b4.tar.gz gentoo-1ee062ba1d57ad391adee1c135dcf474dc30d6b4.tar.bz2 gentoo-1ee062ba1d57ad391adee1c135dcf474dc30d6b4.zip |
Move {sys-devel → dev-build}/autoconf
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-build')
35 files changed, 2410 insertions, 6 deletions
diff --git a/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20210509-r1.ebuild b/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20210509-r1.ebuild index 7de2341e7282..6b58da0590b7 100644 --- a/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20210509-r1.ebuild +++ b/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20210509-r1.ebuild @@ -7,7 +7,7 @@ EAPI=8 # TODO: review our old autoconf-2.52 patches? MY_P=${PN/-dickey}-${PV/_p/-} -DESCRIPTION="Fork of sys-devel/autoconf for Thomas Dickey's packages" +DESCRIPTION="Fork of dev-build/autoconf for Thomas Dickey's packages" HOMEPAGE="https://invisible-island.net/autoconf/autoconf.html" SRC_URI="https://invisible-island.net/archives/autoconf/${MY_P}.tgz" S="${WORKDIR}"/${MY_P} diff --git a/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20221202.ebuild b/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20221202.ebuild index 1013320956a0..81998a6d476c 100644 --- a/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20221202.ebuild +++ b/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20221202.ebuild @@ -10,7 +10,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc inherit verify-sig MY_P=${PN/-dickey}-${PV/_p/-} -DESCRIPTION="Fork of sys-devel/autoconf for Thomas Dickey's packages" +DESCRIPTION="Fork of dev-build/autoconf for Thomas Dickey's packages" HOMEPAGE="https://invisible-island.net/autoconf/autoconf.html" SRC_URI="https://invisible-island.net/archives/autoconf/${MY_P}.tgz" SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/autoconf/${MY_P}.tgz.asc )" diff --git a/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20230114.ebuild b/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20230114.ebuild index 1013320956a0..81998a6d476c 100644 --- a/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20230114.ebuild +++ b/dev-build/autoconf-dickey/autoconf-dickey-2.52_p20230114.ebuild @@ -10,7 +10,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/thomasdickey.asc inherit verify-sig MY_P=${PN/-dickey}-${PV/_p/-} -DESCRIPTION="Fork of sys-devel/autoconf for Thomas Dickey's packages" +DESCRIPTION="Fork of dev-build/autoconf for Thomas Dickey's packages" HOMEPAGE="https://invisible-island.net/autoconf/autoconf.html" SRC_URI="https://invisible-island.net/archives/autoconf/${MY_P}.tgz" SRC_URI+=" verify-sig? ( https://invisible-island.net/archives/autoconf/${MY_P}.tgz.asc )" diff --git a/dev-build/autoconf-vanilla/files/autoconf-2.71-conflicts.patch b/dev-build/autoconf-vanilla/files/autoconf-2.71-conflicts.patch index d9829d1ae213..879664f4096e 100644 --- a/dev-build/autoconf-vanilla/files/autoconf-2.71-conflicts.patch +++ b/dev-build/autoconf-vanilla/files/autoconf-2.71-conflicts.patch @@ -16,7 +16,7 @@ index 17e1f8f..73d2ea7 100644 ACLOCAL_AMFLAGS = -I m4 -+# Work around file conflicts against sys-devel/autoconf -- Arsen ++# Work around file conflicts against dev-build/autoconf -- Arsen +pkgdatadir = $(datadir)/@PACKAGE@-vanilla-@VERSION@ + ## All of these will be incrementally updated later, here or in included diff --git a/dev-build/autoconf-vanilla/files/autoconf-2.72-conflicts.patch b/dev-build/autoconf-vanilla/files/autoconf-2.72-conflicts.patch index b90864eacecb..b15b0267f140 100644 --- a/dev-build/autoconf-vanilla/files/autoconf-2.72-conflicts.patch +++ b/dev-build/autoconf-vanilla/files/autoconf-2.72-conflicts.patch @@ -16,7 +16,7 @@ index 1db714b..cb0650a 100644 ACLOCAL_AMFLAGS = -I m4 -+# Work around file conflicts against sys-devel/autoconf -- Arsen ++# Work around file conflicts against dev-build/autoconf -- Arsen +pkgdatadir = $(datadir)/@PACKAGE@-vanilla-@VERSION@ + ## All of these will be incrementally updated later, here or in included @@ -39,7 +39,7 @@ index e5b3da5..04a3732 100644 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print + -+# Work around file conflicts against sys-devel/autoconf -- Arsen ++# Work around file conflicts against dev-build/autoconf -- Arsen +pkgdatadir = $(datadir)/@PACKAGE@-vanilla-@VERSION@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ diff --git a/dev-build/autoconf/Manifest b/dev-build/autoconf/Manifest new file mode 100644 index 000000000000..08c6d1ab3d7f --- /dev/null +++ b/dev-build/autoconf/Manifest @@ -0,0 +1,8 @@ +DIST autoconf-2.13.tar.gz 443844 BLAKE2B ade10f9d4a0b1a0e8b752eee817cfe100d77b074192b9892330402ddc5b62dda1a3485ce0c36e72191daa9fd49382b99851cb6aa3a13aca8cf2ae6e884638fb6 SHA512 602584f4c77b7a554aaa068eda5409b68eb0b3229e9c224bffb91c83c4314d25de15bd560a323626ff78f6df339c79e1ef8938c54b78ecadf4dc75c5241290ad +DIST autoconf-2.69-runstatedir_patches.tar.xz 257096 BLAKE2B ae765e0ca7fe8261117f6f6b75611c232fc3d4016c22c86346afa72f2b7e6c3b7ccc1f9dfe134b2443f8bde6d578b503d79cf88472f76ce75b6c2e843ef55b8e SHA512 55f93299fe5243151f6bb782986a7935270f06d5065929f4d365a37aba05703e3ce66ecf7981d30413db50ee6b4f77d81d10a71b539c8a366c5c5a156c5443da +DIST autoconf-2.69.tar.xz 1214744 BLAKE2B 71d33d72a06e9a05fbed0eda73bc9d8a3805c7c90bf082959862f93f3c5f01192114176e84d84ecb58fa99512eafbc0ab21ad1407be18c8c63bb3dc1117c482d SHA512 995d3e5a8eb1eb37e2b7fae53c6ec7a9b4df997286b7d643344818f94636756b1bf5ff5ea9155e755cb9461149a853dfbf2886fc6bd7132e5afa9c168e306e9b +DIST autoconf-2.69.tar.xz.sig 556 BLAKE2B 07eaae3429f4bbd3ea40b4b366db383d9e322b03def7956f8961a20a6759072e8c327d4723313097f75caba0513928c37270beda8f8b491888fdd47a2ee80ad6 SHA512 e54082e00522463ba7d6b6ea6d700b8799a41177b34e057dd72abbe46219f0ce58674575d60fb106e37deeee8871d4ccfd85746c2d0e096a71eb096ffdb3020c +DIST autoconf-2.71.tar.xz 1292296 BLAKE2B 7fd4b98b4cfff10720e8da6ee91045637991643b50fcb3e47a0ecfcc01600f7b7b36fd1c0a5f08b68a418f1bdbd8d5a98de1008157595dd37cc3a31facb61416 SHA512 73d32b4adcbe24e3bafa9f43f59ed3b6efbd3de0f194e5ec90375f35da1199c583f5d3e89139b7edbad35171403709270e339ffa56a2ecb9b3123e9285021ff0 +DIST autoconf-2.71.tar.xz.sig 833 BLAKE2B a2641a0bec3b475874811dd21dc32d34672f4f084ea16d48bd0655df37251be810026c20e35869503e664701edcb64f260b142db671e160a554c2ee982838355 SHA512 83e6bf4504f5d188cad1387ce1f1ce4b14f5ee4961bbfd5c83dd281d724392a95b394079bfaa093eb81129873e668b6ca1eee013a60cfb76edf34454756f6667 +DIST autoconf-2.72.tar.xz 1389680 BLAKE2B 01caeced9e53d8bd39fb0cf4929322f0d463971b0a96368aa55892026897a9e98c2ca84a77db1b3c6c4483aea54b96da16a7bc00b7ac15e23c6b0471438012db SHA512 c4e9fbd858666d3e5c3b4fe7f89aa3e8e3a0a00dc7e166f8147d937d911b77ba3ac6a016f9d223ccdd830bc8960b3e60397c0607cc6a1fd2c50c7492839ddd17 +DIST autoconf-2.72.tar.xz.sig 833 BLAKE2B cc33101c5d2bd28f233e54a2843d3c81dc9729238b0900a8f23ef17b982aa0e0194892c07b1365246b6c9c0ea74becd288ae581ee34d593131b83538c69a6204 SHA512 7a0d350b23cf47c45811ae35928a4fec67ce1f3adb1965904fe6d9a0fad68139df4902662bcf4731a2f809381cae0b265a8f1f57d0a9a39777250a97a3c481d9 diff --git a/dev-build/autoconf/autoconf-2.13-r7.ebuild b/dev-build/autoconf/autoconf-2.13-r7.ebuild new file mode 100644 index 000000000000..55b245745890 --- /dev/null +++ b/dev-build/autoconf/autoconf-2.13-r7.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-autoconf + +DESCRIPTION="Used to create autoconfiguration files" +HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="${PV:0:3}" +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" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + dev-lang/perl + sys-devel/m4 + test? ( dev-util/dejagnu ) +" +RDEPEND=" + ${BDEPEND} + sys-apps/texinfo + >=dev-build/autoconf-wrapper-13 +" + +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-destdir.patch + "${FILESDIR}"/${P}-test-fixes.patch #146592 + "${FILESDIR}"/${P}-perl-5.26.patch + "${FILESDIR}"/${P}-K-R-decls-clang.patch + "${FILESDIR}"/${P}-Clang-16-fixes-for-various-tests.patch +) + +TC_AUTOCONF_BREAK_INFOS=yes + +src_configure() { + # make sure configure is newer than configure.in + touch configure || die + + # need to include --exec-prefix and --bindir or our + # DESTDIR patch will trigger sandbox hate :( + # + # need to force locale to C to avoid bugs in the old + # configure script breaking the install paths #351982 + # + # force to `awk` so that we don't encode another awk that + # happens to currently be installed, but might later be + # uninstalled (like mawk). same for m4. + ac_cv_path_M4="m4" \ + ac_cv_prog_AWK="awk" \ + LC_ALL=C \ + econf \ + --exec-prefix="${EPREFIX}"/usr \ + --bindir="${EPREFIX}"/usr/bin \ + --program-suffix="-${PV}" +} diff --git a/dev-build/autoconf/autoconf-2.13-r8.ebuild b/dev-build/autoconf/autoconf-2.13-r8.ebuild new file mode 100644 index 000000000000..36e5700446c5 --- /dev/null +++ b/dev-build/autoconf/autoconf-2.13-r8.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-autoconf + +DESCRIPTION="Used to create autoconfiguration files" +HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="${PV:0:3}" +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" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + dev-lang/perl + sys-devel/m4 + test? ( dev-util/dejagnu ) +" +RDEPEND=" + ${BDEPEND} + sys-apps/texinfo + >=dev-build/autoconf-wrapper-13 +" + +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-destdir.patch + "${FILESDIR}"/${P}-test-fixes.patch #146592 + "${FILESDIR}"/${P}-perl-5.26.patch + "${FILESDIR}"/${P}-K-R-decls-clang.patch + "${FILESDIR}"/${P}-Clang-16-fixes-for-various-tests.patch +) + +src_configure() { + # make sure configure is newer than configure.in + touch configure || die + + # need to include --exec-prefix and --bindir or our + # DESTDIR patch will trigger sandbox hate :( + # + # need to force locale to C to avoid bugs in the old + # configure script breaking the install paths #351982 + # + # force to `awk` so that we don't encode another awk that + # happens to currently be installed, but might later be + # uninstalled (like mawk). same for m4. + ac_cv_path_M4="m4" \ + ac_cv_prog_AWK="awk" \ + LC_ALL=C \ + econf \ + --exec-prefix="${EPREFIX}"/usr \ + --bindir="${EPREFIX}"/usr/bin \ + --program-suffix="-${PV}" \ + --infodir="${TC_AUTOCONF_INFOPATH}" +} diff --git a/dev-build/autoconf/autoconf-2.69-r9.ebuild b/dev-build/autoconf/autoconf-2.69-r9.ebuild new file mode 100644 index 000000000000..72d2d53b0555 --- /dev/null +++ b/dev-build/autoconf/autoconf-2.69-r9.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2024 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 + # Eric Blake signed 2.69 so use sec-keys/openpgp-keys-m4 + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/m4.asc + inherit verify-sig + + SRC_URI=" + mirror://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 + verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig ) + " + 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" + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-m4 )" +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" + +BDEPEND+=" + >=sys-devel/m4-1.4.16 + >=dev-lang/perl-5.6 +" +RDEPEND=" + ${BDEPEND} + >=dev-build/autoconf-wrapper-13 + !~sys-devel/${P}:2.5 +" + +[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3" + +PDEPEND="emacs? ( app-emacs/autoconf-mode )" + +PATCHES=( + "${FILESDIR}"/${PN}-2.69-perl-5.26.patch + "${FILESDIR}"/${P}-fix-libtool-test.patch + "${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch + "${FILESDIR}"/${P}-make-tests-bash5-compatible.patch + "${FILESDIR}"/${P}-K-R-decls-clang.patch + + "${WORKDIR}"/patches/${P}-texinfo.patch +) + +src_unpack() { + if use verify-sig ; then + # Needed for downloaded patch (which is unsigned, which is fine) + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig} + fi + + default +} + +src_prepare() { + # usr/bin/libtool is provided by binutils-apple, need gnu libtool + if [[ ${CHOST} == *-darwin* ]] ; then + PATCHES+=( "${FILESDIR}"/${PN}-2.61-darwin.patch ) + fi + + # Save timestamp to avoid later makeinfo call + touch -r doc/{,old_}autoconf.texi || die + + 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 +} diff --git a/dev-build/autoconf/autoconf-2.71-r6.ebuild b/dev-build/autoconf/autoconf-2.71-r6.ebuild new file mode 100644 index 000000000000..abc1bad7a693 --- /dev/null +++ b/dev-build/autoconf/autoconf-2.71-r6.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2024 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} + >=dev-build/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 +) + +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 +} diff --git a/dev-build/autoconf/autoconf-2.71-r7.ebuild b/dev-build/autoconf/autoconf-2.71-r7.ebuild new file mode 100644 index 000000000000..71d2b138b8b8 --- /dev/null +++ b/dev-build/autoconf/autoconf-2.71-r7.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2024 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" + + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/zackweinberg.asc + inherit verify-sig + + SRC_URI=" + mirror://gnu/${PN}/${MY_P}.tar.xz + https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz + verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.xz.sig ) + " + #SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${PATCH_TARBALL_NAME}.tar.xz" + S="${WORKDIR}"/${MY_P} + + 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 + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-zackweinberg )" +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} + >=dev-build/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 +} diff --git a/dev-build/autoconf/autoconf-2.72-r1.ebuild b/dev-build/autoconf/autoconf-2.72-r1.ebuild new file mode 100644 index 000000000000..0fff9c205426 --- /dev/null +++ b/dev-build/autoconf/autoconf-2.72-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Bumping notes: +# * Remember to modify LAST_KNOWN_VER 'upstream' in dev-build/autoconf-wrapper +# on new autoconf releases, as well as the dependency in RDEPEND below too. +# * Update _WANT_AUTOCONF and _autoconf_atom case statement in autotools.eclass. + +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" + + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/zackweinberg.asc + inherit verify-sig + + SRC_URI=" + mirror://gnu/${PN}/${MY_P}.tar.xz + https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz + https://meyering.net/ac/${P}.tar.xz + verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.xz.sig ) + " + S="${WORKDIR}"/${MY_P} + + if [[ ${PV} != *_beta* ]] && ! [[ $(ver_cut 3) =~ [a-z] ]] ; 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 + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-zackweinberg )" +fi + +inherit toolchain-autoconf + +DESCRIPTION="Used to create autoconfiguration files" +HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" + +LICENSE="GPL-3+" +SLOT="$(ver_cut 1-2)" +IUSE="emacs" + +BDEPEND+=" + >=dev-lang/perl-5.10 + >=sys-devel/m4-1.4.16 +" +RDEPEND=" + ${BDEPEND} + >=dev-build/autoconf-wrapper-20231224 + sys-devel/gnuconfig + !~sys-devel/${P}:2.5 +" +[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3" +PDEPEND="emacs? ( app-emacs/autoconf-mode )" + +src_prepare() { + if [[ ${PV} == *9999 ]] ; then + # Avoid the "dirty" suffix in the git version by generating it + # before we run later stages which might modify source files. + local ver=$(./build-aux/git-version-gen .tarball-version) + echo "${ver}" > .tarball-version || die + + autoreconf -f -i || die + fi + + # 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 + + 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 +} diff --git a/dev-build/autoconf/autoconf-9999.ebuild b/dev-build/autoconf/autoconf-9999.ebuild new file mode 100644 index 000000000000..0fff9c205426 --- /dev/null +++ b/dev-build/autoconf/autoconf-9999.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Bumping notes: +# * Remember to modify LAST_KNOWN_VER 'upstream' in dev-build/autoconf-wrapper +# on new autoconf releases, as well as the dependency in RDEPEND below too. +# * Update _WANT_AUTOCONF and _autoconf_atom case statement in autotools.eclass. + +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" + + VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/zackweinberg.asc + inherit verify-sig + + SRC_URI=" + mirror://gnu/${PN}/${MY_P}.tar.xz + https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz + https://meyering.net/ac/${P}.tar.xz + verify-sig? ( mirror://gnu/${PN}/${MY_P}.tar.xz.sig ) + " + S="${WORKDIR}"/${MY_P} + + if [[ ${PV} != *_beta* ]] && ! [[ $(ver_cut 3) =~ [a-z] ]] ; 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 + + BDEPEND="verify-sig? ( sec-keys/openpgp-keys-zackweinberg )" +fi + +inherit toolchain-autoconf + +DESCRIPTION="Used to create autoconfiguration files" +HOMEPAGE="https://www.gnu.org/software/autoconf/autoconf.html" + +LICENSE="GPL-3+" +SLOT="$(ver_cut 1-2)" +IUSE="emacs" + +BDEPEND+=" + >=dev-lang/perl-5.10 + >=sys-devel/m4-1.4.16 +" +RDEPEND=" + ${BDEPEND} + >=dev-build/autoconf-wrapper-20231224 + sys-devel/gnuconfig + !~sys-devel/${P}:2.5 +" +[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3" +PDEPEND="emacs? ( app-emacs/autoconf-mode )" + +src_prepare() { + if [[ ${PV} == *9999 ]] ; then + # Avoid the "dirty" suffix in the git version by generating it + # before we run later stages which might modify source files. + local ver=$(./build-aux/git-version-gen .tarball-version) + echo "${ver}" > .tarball-version || die + + autoreconf -f -i || die + fi + + # 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 + + 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 +} diff --git a/dev-build/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch b/dev-build/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch new file mode 100644 index 000000000000..d158f7974e81 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.13-Clang-16-fixes-for-various-tests.patch @@ -0,0 +1,331 @@ +From cb92e8110d1f274b28d5c156a93c525d2b748644 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Wed, 9 Nov 2022 08:27:53 +0000 +Subject: [PATCH] Clang 16 fixes for various tests + +Fixes -Wimplicit-int and -Wimplicit-function-declaration +issues in various built-in tests. + +Noticed when building XEmacs 21.4 (thanks to matsl for reporting). + +Bug: https://bugs.gentoo.org/874366 +Signed-off-by: Sam James <sam@gentoo.org> +--- a/acgeneral.m4 ++++ b/acgeneral.m4 +@@ -1988,7 +1988,8 @@ changequote([, ])dnl + AC_MSG_CHECKING(size of $1) + AC_CACHE_VAL(AC_CV_NAME, + [AC_TRY_RUN([#include <stdio.h> +-main(void) ++#include <stdlib.h> ++int main(void) + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); +--- a/acspecific.m4 ++++ b/acspecific.m4 +@@ -371,7 +371,7 @@ changequote(, )dnl + sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" + changequote([, ])dnl + AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o, +-[echo 'foo(void){}' > conftest.c ++[echo 'int foo(void){}' > conftest.c + # Make sure it works both with $CC and with simple cc. + # We do the test twice because some compilers refuse to overwrite an + # existing .o file with -o, though they will create one. +@@ -706,6 +706,7 @@ fi + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + AC_TRY_RUN([#include <ctype.h> ++#include <stdlib.h> + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') + #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +@@ -819,6 +820,7 @@ esac + + AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void, + [AC_TRY_RUN([#include <sys/types.h> ++#include <stdlib.h> + #include <$ac_header_dirent> + int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }], + ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)]) +@@ -907,6 +909,8 @@ AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups, + changequote(<<, >>)dnl + << + /* Thanks to Mike Rendell for this test. */ ++#include <stdlib.h> ++#include <unistd.h> + #include <sys/types.h> + #define NGID 256 + #undef MAX +@@ -988,6 +992,7 @@ AC_DEFUN(AC_FUNC_CLOSEDIR_VOID, + [AC_REQUIRE([AC_HEADER_DIRENT])dnl + AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void, + [AC_TRY_RUN([#include <sys/types.h> ++#include <stdlib.h> + #include <$ac_header_dirent> + int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }], + ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)]) +@@ -1001,7 +1006,9 @@ AC_DEFUN(AC_FUNC_FNMATCH, + # Some versions of Solaris or SCO have a broken fnmatch function. + # So we run a test program. If we are cross-compiling, take no chance. + # Thanks to John Oleynick and Franc,ois Pinard for this test. +-[AC_TRY_RUN([int main(void) { exit (fnmatch ("a*", "abc", 0) != 0); }], ++[AC_TRY_RUN([#include <stdlib.h> ++#include <fnmatch.h> ++int main(void) { exit (fnmatch ("a*", "abc", 0) != 0); }], + ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no, + ac_cv_func_fnmatch_works=no)]) + if test $ac_cv_func_fnmatch_works = yes; then +@@ -1038,6 +1045,7 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, + #include <sys/types.h> + #include <fcntl.h> + #include <sys/mman.h> ++#include <stdlib.h> + + /* This mess was copied from the GNU getpagesize.h. */ + #ifndef HAVE_GETPAGESIZE +@@ -1165,49 +1173,17 @@ AC_DEFUN(AC_FUNC_GETPGRP, + * + * Snarfed from Chet Ramey's bash pgrp.c test program + */ +-#include <stdio.h> +-#include <sys/types.h> +- +-int pid; +-int pg1, pg2, pg3, pg4; +-int ng, np, s, child; ++#include <stdlib.h> + + int main(void) + { +- pid = getpid(); +- pg1 = getpgrp(0); +- pg2 = getpgrp(); +- pg3 = getpgrp(pid); +- pg4 = getpgrp(1); +- +- /* +- * If all of these values are the same, it's pretty sure that +- * we're on a system that ignores getpgrp's first argument. +- */ +- if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) +- exit(0); +- +- child = fork(); +- if (child < 0) +- exit(1); +- else if (child == 0) { +- np = getpid(); +- /* +- * If this is Sys V, this will not work; pgrp will be +- * set to np because setpgrp just changes a pgrp to be +- * the same as the pid. +- */ +- setpgrp(np, pg1); +- ng = getpgrp(0); /* Same result for Sys V and BSD */ +- if (ng == pg1) { +- exit(1); +- } else { +- exit(0); +- } +- } else { +- wait(&s); +- exit(s>>8); +- } ++ /* XXX: Gentoo: This function used to check for ++ BSD vs POSIX getpgrp but the test fails to compile ++ on modern POSIX systems when not relying on implicit ++ function declarations. It has no value anyway on such ++ systems and it's been removed in newer autoconf. ++ */ ++ exit(0); + } + ], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no, + AC_MSG_ERROR(cannot check getpgrp if cross compiling)) +@@ -1220,9 +1196,7 @@ fi + AC_DEFUN(AC_FUNC_SETPGRP, + [AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void, + AC_TRY_RUN([ +-#ifdef HAVE_UNISTD_H +-#include <unistd.h> +-#endif ++#include <stdlib.h> + + /* + * If this system has a BSD-style setpgrp, which takes arguments, exit +@@ -1230,10 +1204,13 @@ AC_TRY_RUN([ + */ + int main(void) + { +- if (setpgrp(1,1) == -1) +- exit(0); +- else +- exit(1); ++ /* XXX: Gentoo: This function used to check for ++ BSD vs POSIX gsetpgrp but the test fails to compile ++ on modern POSIX systems when not relying on implicit ++ function declarations. It has no value anyway on such ++ systems and it's been removed in newer autoconf. ++ */ ++ exit(1); + } + ], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes, + AC_MSG_ERROR(cannot check setpgrp if cross compiling)) +@@ -1255,9 +1232,11 @@ AC_DEFUN(AC_FUNC_VFORK, + AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H)) + AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works, + [AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */ ++#include <stdlib.h> + #include <stdio.h> + #include <sys/types.h> + #include <sys/stat.h> ++#include <sys/wait.h> + #ifdef HAVE_UNISTD_H + #include <unistd.h> + #endif +@@ -1270,11 +1249,11 @@ AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works, + but some compilers (e.g. gcc -O) don't grok <vfork.h>. + Test for this by using a static variable whose address + is put into a register that is clobbered by the vfork. */ +-static ++static void + #ifdef __cplusplus + sparc_address_test (int arg) + #else +-sparc_address_test (arg) int arg; ++sparc_address_test (int arg) + #endif + { + static pid_t child; +@@ -1359,6 +1338,8 @@ AC_DEFUN(AC_FUNC_WAIT3, + #include <sys/time.h> + #include <sys/resource.h> + #include <stdio.h> ++#include <stdlib.h> ++#include <unistd.h> + /* HP-UX has wait3 but does not fill in rusage at all. */ + int main(void) { + struct rusage r; +@@ -1452,7 +1433,8 @@ done + fi + + AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, +-[AC_TRY_RUN([find_stack_direction () ++[AC_TRY_RUN([#include <stdlib.h> ++int find_stack_direction () + { + static char *addr = 0; + auto char dummy; +@@ -1582,6 +1564,8 @@ AC_DEFUN(AC_FUNC_UTIME_NULL, + # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. + AC_TRY_RUN([#include <sys/types.h> + #include <sys/stat.h> ++#include <stdlib.h> ++#include <utime.h> + int main(void) { + struct stat s, t; + exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0 +@@ -1598,6 +1582,7 @@ fi + AC_DEFUN(AC_FUNC_STRCOLL, + [AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works, + [AC_TRY_RUN([#include <string.h> ++#include <stdlib.h> + int main (void) + { + exit (strcoll ("abc", "def") >= 0 || +@@ -1614,6 +1599,7 @@ AC_DEFUN(AC_FUNC_SETVBUF_REVERSED, + [AC_CACHE_CHECK(whether setvbuf arguments are reversed, + ac_cv_func_setvbuf_reversed, + [AC_TRY_RUN([#include <stdio.h> ++#include <stdlib.h> + /* If setvbuf has the reversed format, exit 0. */ + int main (void) { + /* This call has the arguments reversed. +@@ -1646,7 +1632,8 @@ LIBS="-lintl $LIBS"])])]) + + AC_DEFUN(AC_FUNC_MEMCMP, + [AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean, +-[AC_TRY_RUN([ ++[AC_TRY_RUN([#include <stdlib.h> ++#include <string.h> + int main(void) + { + char c0 = 0x40, c1 = 0x80, c2 = 0x81; +@@ -1805,6 +1792,7 @@ AC_TRY_RUN( + #if !defined(__STDC__) || __STDC__ != 1 + #define volatile + #endif ++#include <stdlib.h> + int main(void) { + volatile char c = 255; exit(c < 0); + }], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no) +@@ -1819,7 +1807,8 @@ AC_DEFUN(AC_C_LONG_DOUBLE, + [if test "$GCC" = yes; then + ac_cv_c_long_double=yes + else +-AC_TRY_RUN([int main(void) { ++AC_TRY_RUN([#include <stdlib.h> ++int main(void) { + /* The Stardent Vistra knows sizeof(long double), but does not support it. */ + long double foo = 0.0; + /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ +@@ -1834,7 +1823,8 @@ fi + AC_DEFUN(AC_INT_16_BITS, + [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl + AC_MSG_CHECKING(whether int is 16 bits) +-AC_TRY_RUN([int main(void) { exit(sizeof(int) != 2); }], ++AC_TRY_RUN([#include <stdlib.h> ++int main(void) { exit(sizeof(int) != 2); }], + [AC_MSG_RESULT(yes) + AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no)) + ]) +@@ -1842,7 +1832,8 @@ AC_TRY_RUN([int main(void) { exit(sizeof(int) != 2); }], + AC_DEFUN(AC_LONG_64_BITS, + [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl + AC_MSG_CHECKING(whether long int is 64 bits) +-AC_TRY_RUN([int main(void) { exit(sizeof(long int) != 8); }], ++AC_TRY_RUN([#include <stdlib.h> ++int main(void) { exit(sizeof(long int) != 8); }], + [AC_MSG_RESULT(yes) + AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no)) + ]) +@@ -1862,7 +1853,8 @@ AC_TRY_COMPILE([#include <sys/types.h> + not big endian + #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) + if test $ac_cv_c_bigendian = unknown; then +-AC_TRY_RUN([int main (void) { ++AC_TRY_RUN([#include <stdlib.h> ++int main (void) { + /* Are we little or big endian? From Harbison&Steele. */ + union + { +@@ -1885,7 +1877,7 @@ AC_DEFUN(AC_C_INLINE, + [AC_CACHE_CHECK([for inline], ac_cv_c_inline, + [ac_cv_c_inline=no + for ac_kw in inline __inline__ __inline; do +- AC_TRY_COMPILE(, [} $ac_kw foo(void) {], [ac_cv_c_inline=$ac_kw; break]) ++ AC_TRY_COMPILE(, [} $ac_kw int foo(void) {], [ac_cv_c_inline=$ac_kw; break]) + done + ]) + case "$ac_cv_c_inline" in +@@ -2275,7 +2267,10 @@ AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS, + i.e. the pid of the child, which means that wait was restarted + after getting the signal. */ + #include <sys/types.h> ++#include <sys/wait.h> + #include <signal.h> ++#include <stdlib.h> ++#include <unistd.h> + ucatch (isig) { } + int main (void) { + int i = fork (), status; +@@ -2444,7 +2439,7 @@ if test "$ac_x_libraries" = NO; then + # Don't add to $LIBS permanently. + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" +-AC_TRY_LINK(, [${x_direct_test_function}()], ++AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(0)], + [LIBS="$ac_save_LIBS" + # We can link X programs with no special library path. + ac_x_libraries=], diff --git a/dev-build/autoconf/files/autoconf-2.13-K-R-decls-clang.patch b/dev-build/autoconf/files/autoconf-2.13-K-R-decls-clang.patch new file mode 100644 index 000000000000..42c3018aea8c --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.13-K-R-decls-clang.patch @@ -0,0 +1,346 @@ +https://bugs.gentoo.org/870412 +https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016c7ed2d67f31b03a3d2e361858ff5299b + +Backport the K&R decls fix to 2.13 to avoid configure tests +failing (often "silently", i.e. doesn't fail the build of +the package overall, just leads to wrong results) with +newer compilers like the upcoming Clang 16. + +From d8ad1096be4352c588b9bc1e16b6758f4f32b96a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me> +Date: Mon, 19 Sep 2022 01:38:29 +0200 +Subject: [PATCH] ac{general,specific}: declare void param lists, where apt + +--- a/acgeneral.m4 ++++ b/acgeneral.m4 +@@ -1542,7 +1542,7 @@ extern "C" + ])dnl + [/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +-char $1(); ++char $1(void); + ]), + [$1()], + [$2], +@@ -1597,7 +1597,7 @@ extern "C" + ])dnl + [/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +-char $2(); ++char $2(void); + ])), + [$2()], + eval "ac_cv_lib_$ac_lib_var=yes", +@@ -1733,7 +1733,7 @@ dnl [#]line __oline__ "[$]0" + [#]line __oline__ "configure" + #include "confdefs.h" + [$1] +-int main() { ++int main(void) { + [$2] + ; return 0; } + ])EOF +@@ -1777,7 +1777,7 @@ dnl [#]line __oline__ "[$]0" + [#]line __oline__ "configure" + #include "confdefs.h" + [$1] +-int main() { ++int main(void) { + [$2] + ; return 0; } + ])EOF +@@ -1934,7 +1934,7 @@ extern "C" + ])dnl + [/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +-char $1(); ++char $1(void); + ], [ + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named +@@ -1988,7 +1988,7 @@ changequote([, ])dnl + AC_MSG_CHECKING(size of $1) + AC_CACHE_VAL(AC_CV_NAME, + [AC_TRY_RUN([#include <stdio.h> +-main() ++main(void) + { + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); +--- a/acspecific.m4 ++++ b/acspecific.m4 +@@ -202,7 +202,7 @@ AC_DEFUN(AC_PROG_CC_WORKS, + [AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works]) + AC_LANG_SAVE + AC_LANG_C +-AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross) ++AC_TRY_COMPILER([int main(void){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross) + AC_LANG_RESTORE + AC_MSG_RESULT($ac_cv_prog_cc_works) + if test $ac_cv_prog_cc_works = no; then +@@ -217,7 +217,7 @@ AC_DEFUN(AC_PROG_CXX_WORKS, + [AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works]) + AC_LANG_SAVE + AC_LANG_CPLUSPLUS +-AC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross) ++AC_TRY_COMPILER([int main(void){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross) + AC_LANG_RESTORE + AC_MSG_RESULT($ac_cv_prog_cxx_works) + if test $ac_cv_prog_cxx_works = no; then +@@ -300,7 +300,7 @@ fi])]) + + AC_DEFUN(AC_PROG_CC_G, + [AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g, +-[echo 'void f(){}' > conftest.c ++[echo 'void f(void){}' > conftest.c + if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes + else +@@ -311,7 +311,7 @@ rm -f conftest* + + AC_DEFUN(AC_PROG_CXX_G, + [AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g, +-[echo 'void f(){}' > conftest.cc ++[echo 'void f(void){}' > conftest.cc + if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then + ac_cv_prog_cxx_g=yes + else +@@ -371,7 +371,7 @@ changequote(, )dnl + sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" + changequote([, ])dnl + AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o, +-[echo 'foo(){}' > conftest.c ++[echo 'foo(void){}' > conftest.c + # Make sure it works both with $CC and with simple cc. + # We do the test twice because some compilers refuse to overwrite an + # existing .o file with -o, though they will create one. +@@ -709,7 +709,7 @@ AC_TRY_RUN([#include <ctype.h> + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') + #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +-int main () { int i; for (i = 0; i < 256; i++) ++int main (void) { int i; for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); + exit (0); } + ], , ac_cv_header_stdc=no, :) +@@ -820,7 +820,7 @@ esac + AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void, + [AC_TRY_RUN([#include <sys/types.h> + #include <$ac_header_dirent> +-int closedir(); main() { exit(closedir(opendir(".")) != 0); }], ++int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }], + ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)]) + if test $ac_cv_func_closedir_void = yes; then + AC_DEFINE(VOID_CLOSEDIR) +@@ -911,7 +911,7 @@ changequote(<<, >>)dnl + #define NGID 256 + #undef MAX + #define MAX(x, y) ((x) > (y) ? (x) : (y)) +-main() ++int main(void) + { + gid_t gidset[NGID]; + int i, n; +@@ -973,7 +973,7 @@ AC_DEFUN(AC_TYPE_SIGNAL, + #ifdef __cplusplus + extern "C" void (*signal (int, void (*)(int)))(int); + #else +-void (*signal ()) (); ++void (*signal (void)) (void); + #endif + ], + [int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)]) +@@ -989,7 +989,7 @@ AC_DEFUN(AC_FUNC_CLOSEDIR_VOID, + AC_CACHE_CHECK(whether closedir returns void, ac_cv_func_closedir_void, + [AC_TRY_RUN([#include <sys/types.h> + #include <$ac_header_dirent> +-int closedir(); main() { exit(closedir(opendir(".")) != 0); }], ++int closedir(...); int main(void) { exit(closedir(opendir(".")) != 0); }], + ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)]) + if test $ac_cv_func_closedir_void = yes; then + AC_DEFINE(CLOSEDIR_VOID) +@@ -1001,7 +1001,7 @@ AC_DEFUN(AC_FUNC_FNMATCH, + # Some versions of Solaris or SCO have a broken fnmatch function. + # So we run a test program. If we are cross-compiling, take no chance. + # Thanks to John Oleynick and Franc,ois Pinard for this test. +-[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }], ++[AC_TRY_RUN([int main(void) { exit (fnmatch ("a*", "abc", 0) != 0); }], + ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no, + ac_cv_func_fnmatch_works=no)]) + if test $ac_cv_func_fnmatch_works = yes; then +@@ -1083,11 +1083,11 @@ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, + #ifdef __cplusplus + extern "C" { void *malloc(unsigned); } + #else +-char *malloc(); ++char *malloc(...); + #endif + + int +-main() ++main(void) + { + char *data, *data2, *data3; + int i, pagesize; +@@ -1172,7 +1172,7 @@ int pid; + int pg1, pg2, pg3, pg4; + int ng, np, s, child; + +-main() ++int main(void) + { + pid = getpid(); + pg1 = getpgrp(0); +@@ -1228,7 +1228,7 @@ AC_TRY_RUN([ + * If this system has a BSD-style setpgrp, which takes arguments, exit + * successfully. + */ +-main() ++int main(void) + { + if (setpgrp(1,1) == -1) + exit(0); +@@ -1291,7 +1291,7 @@ sparc_address_test (arg) int arg; + } + } + } +-main() { ++int main(void) { + pid_t parent = getpid (); + pid_t child; + +@@ -1360,7 +1360,7 @@ AC_DEFUN(AC_FUNC_WAIT3, + #include <sys/resource.h> + #include <stdio.h> + /* HP-UX has wait3 but does not fill in rusage at all. */ +-main() { ++int main(void) { + struct rusage r; + int i; + /* Use a field that we can force nonzero -- +@@ -1416,7 +1416,7 @@ AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, + #pragma alloca + # else + # ifndef alloca /* predefined by HP cc +Olibcalls */ +-char *alloca (); ++char *alloca (...); + # endif + # endif + # endif +@@ -1464,7 +1464,7 @@ AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction, + else + return (&dummy > addr) ? 1 : -1; + } +-main () ++int main (void) + { + exit (find_stack_direction() < 0); + }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, +@@ -1582,7 +1582,7 @@ AC_DEFUN(AC_FUNC_UTIME_NULL, + # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. + AC_TRY_RUN([#include <sys/types.h> + #include <sys/stat.h> +-main() { ++int main(void) { + struct stat s, t; + exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0 + && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime +@@ -1598,7 +1598,7 @@ fi + AC_DEFUN(AC_FUNC_STRCOLL, + [AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works, + [AC_TRY_RUN([#include <string.h> +-main () ++int main (void) + { + exit (strcoll ("abc", "def") >= 0 || + strcoll ("ABC", "DEF") >= 0 || +@@ -1615,7 +1615,7 @@ AC_DEFUN(AC_FUNC_SETVBUF_REVERSED, + ac_cv_func_setvbuf_reversed, + [AC_TRY_RUN([#include <stdio.h> + /* If setvbuf has the reversed format, exit 0. */ +-main () { ++int main (void) { + /* This call has the arguments reversed. + A reversed system may check and see that the address of main + is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ +@@ -1647,7 +1647,7 @@ LIBS="-lintl $LIBS"])])]) + AC_DEFUN(AC_FUNC_MEMCMP, + [AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean, + [AC_TRY_RUN([ +-main() ++int main(void) + { + char c0 = 0x40, c1 = 0x80, c2 = 0x81; + exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1); +@@ -1805,7 +1805,7 @@ AC_TRY_RUN( + #if !defined(__STDC__) || __STDC__ != 1 + #define volatile + #endif +-main() { ++int main(void) { + volatile char c = 255; exit(c < 0); + }], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no) + fi]) +@@ -1819,7 +1819,7 @@ AC_DEFUN(AC_C_LONG_DOUBLE, + [if test "$GCC" = yes; then + ac_cv_c_long_double=yes + else +-AC_TRY_RUN([int main() { ++AC_TRY_RUN([int main(void) { + /* The Stardent Vistra knows sizeof(long double), but does not support it. */ + long double foo = 0.0; + /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ +@@ -1834,7 +1834,7 @@ fi + AC_DEFUN(AC_INT_16_BITS, + [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])dnl + AC_MSG_CHECKING(whether int is 16 bits) +-AC_TRY_RUN([main() { exit(sizeof(int) != 2); }], ++AC_TRY_RUN([int main(void) { exit(sizeof(int) != 2); }], + [AC_MSG_RESULT(yes) + AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(no)) + ]) +@@ -1842,7 +1842,7 @@ AC_TRY_RUN([main() { exit(sizeof(int) != 2); }], + AC_DEFUN(AC_LONG_64_BITS, + [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])dnl + AC_MSG_CHECKING(whether long int is 64 bits) +-AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }], ++AC_TRY_RUN([int main(void) { exit(sizeof(long int) != 8); }], + [AC_MSG_RESULT(yes) + AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(no)) + ]) +@@ -1862,7 +1862,7 @@ AC_TRY_COMPILE([#include <sys/types.h> + not big endian + #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) + if test $ac_cv_c_bigendian = unknown; then +-AC_TRY_RUN([main () { ++AC_TRY_RUN([int main (void) { + /* Are we little or big endian? From Harbison&Steele. */ + union + { +@@ -1885,7 +1885,7 @@ AC_DEFUN(AC_C_INLINE, + [AC_CACHE_CHECK([for inline], ac_cv_c_inline, + [ac_cv_c_inline=no + for ac_kw in inline __inline__ __inline; do +- AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break]) ++ AC_TRY_COMPILE(, [} $ac_kw foo(void) {], [ac_cv_c_inline=$ac_kw; break]) + done + ]) + case "$ac_cv_c_inline" in +@@ -2277,7 +2277,7 @@ AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS, + #include <sys/types.h> + #include <signal.h> + ucatch (isig) { } +-main () { ++int main (void) { + int i = fork (), status; + if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } + signal (SIGINT, ucatch); +@@ -2654,7 +2654,7 @@ AC_CACHE_VAL(ac_cv_exeext, + ac_cv_exeext=.exe + else + rm -f conftest* +- echo 'int main () { return 0; }' > conftest.$ac_ext ++ echo 'int main (void) { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if AC_TRY_EVAL(ac_link); then + for file in conftest.*; do diff --git a/dev-build/autoconf/files/autoconf-2.13-destdir.patch b/dev-build/autoconf/files/autoconf-2.13-destdir.patch new file mode 100644 index 000000000000..47605af5f59c --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.13-destdir.patch @@ -0,0 +1,26 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -41,18 +41,18 @@ + + transform=@program_transform_name@ + +-prefix = @prefix@ ++prefix = $(DESTDIR)@prefix@ +-exec_prefix = @exec_prefix@ ++exec_prefix = $(DESTDIR)@exec_prefix@ + + # Directory in which to install scripts. +-bindir = @bindir@ ++bindir = $(DESTDIR)@bindir@ + + # Directory in which to install library files. +-datadir = @datadir@ ++datadir = $(DESTDIR)@datadir@ + acdatadir = $(datadir)/autoconf + + # Directory in which to install documentation info files. +-infodir = @infodir@ ++infodir = $(DESTDIR)@infodir@ + + #### End of system configuration section. #### + diff --git a/dev-build/autoconf/files/autoconf-2.13-gentoo.patch b/dev-build/autoconf/files/autoconf-2.13-gentoo.patch new file mode 100644 index 000000000000..44f09cba92f0 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.13-gentoo.patch @@ -0,0 +1,36 @@ +--- a/configure ++++ b/configure +@@ -654,12 +654,10 @@ + echo "$ac_t""no" 1>&6 + fi + +-if test "$PERL" != no; then +- SCRIPTS=autoscan +-else +- echo "configure: warning: autoscan will not be built since perl is not found" 1>&2 ++if test "$PERL" = no; then ++ PERL=/usr/bin/perl + fi +- ++SCRIPTS=autoscan + ac_aux_dir= + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then +--- a/configure.in ++++ b/configure.in +@@ -14,12 +14,10 @@ + AC_PATH_PROG(PERL, perl, no) + AC_SUBST(PERL)dnl + AC_SUBST(SCRIPTS)dnl +-if test "$PERL" != no; then +- SCRIPTS=autoscan +-else +- AC_MSG_WARN(autoscan will not be built since perl is not found) ++if test "$PERL" = no; then ++ PERL=/usr/bin/perl + fi +- ++SCRIPTS=autoscan + AC_PROG_INSTALL + + # Work with the GNU or Cygnus source tree layout. diff --git a/dev-build/autoconf/files/autoconf-2.13-perl-5.26.patch b/dev-build/autoconf/files/autoconf-2.13-perl-5.26.patch new file mode 100644 index 000000000000..6fbc0cd1bc89 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.13-perl-5.26.patch @@ -0,0 +1,12 @@ +diff -ruN autoconf-2.13.orig/autoscan.pl autoconf-2.13/autoscan.pl +--- autoconf-2.13.orig/autoscan.pl 1999-01-05 14:28:42.000000000 +0100 ++++ autoconf-2.13/autoscan.pl 2018-12-22 19:55:10.986732296 +0100 +@@ -232,7 +232,7 @@ + # Strip out comments and variable references. + s/#.*//; + s/\$\([^\)]*\)//g; +- s/\${[^\}]*}//g; ++ s/\$\{[^\}]*}//g; + s/@[^@]*@//g; + + # Variable assignments. diff --git a/dev-build/autoconf/files/autoconf-2.13-test-fixes.patch b/dev-build/autoconf/files/autoconf-2.13-test-fixes.patch new file mode 100644 index 000000000000..b8a7e3b8ce99 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.13-test-fixes.patch @@ -0,0 +1,18 @@ +newer gcc versions don't provide g77, so if it doesn't exist, +don't bother trying to test it (and failing) + +http://bugs.gentoo.org/146592 + +--- autoconf-2.13/testsuite/autoconf.s/syntax.exp ++++ autoconf-2.13/testsuite/autoconf.s/syntax.exp +@@ -5,6 +5,10 @@ + set macros [exec sed -n $script $srcdir/../acspecific.m4] + + foreach mac $macros { ++ if { [string match "*F77*" "$mac"] && [catch {exec which g77} ignore_output] } then { ++ send_user "XFAIL: $mac\n" ++ continue ++ } + send_user "$mac\n" + autoconf_test $mac $mac + } diff --git a/dev-build/autoconf/files/autoconf-2.61-darwin.patch b/dev-build/autoconf/files/autoconf-2.61-darwin.patch new file mode 100644 index 000000000000..83f450e6f5af --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.61-darwin.patch @@ -0,0 +1,11 @@ +--- a/bin/autoreconf.in ++++ b/bin/autoreconf.in +@@ -110,7 +110,7 @@ + my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; + my $automake = $ENV{'AUTOMAKE'} || 'automake'; + my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; +-my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; ++my $libtoolize = $ENV{'LIBTOOLIZE'} || 'glibtoolize'; + my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; + + # --install -- as --add-missing in other tools. diff --git a/dev-build/autoconf/files/autoconf-2.69-K-R-decls-clang.patch b/dev-build/autoconf/files/autoconf-2.69-K-R-decls-clang.patch new file mode 100644 index 000000000000..77444ebc5be6 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.69-K-R-decls-clang.patch @@ -0,0 +1,394 @@ +https://bugs.gentoo.org/870412 +https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016c7ed2d67f31b03a3d2e361858ff5299b +(and contains a backport of https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=bf5a75953b6d504f0405b1ca33b039b8dd39eef4) + +Backport the K&R decls fix to 2.69 to avoid configure tests +failing (often "silently", i.e. doesn't fail the build of +the package overall, just leads to wrong results) with +newer compilers like the upcoming Clang 16. + +From e6f401b94b58bb9bb58cd668a996e27663d3e6c7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me> +Date: Mon, 19 Sep 2022 12:11:24 +0200 +Subject: [PATCH] backport K&R decl fixes + +--- a/lib/autoconf/c.m4 ++++ b/lib/autoconf/c.m4 +@@ -97,7 +97,7 @@ m4_define([AC_LANG_PROGRAM(C)], + m4_ifdef([_AC_LANG_PROGRAM_C_F77_HOOKS], [_AC_LANG_PROGRAM_C_F77_HOOKS])[]dnl + m4_ifdef([_AC_LANG_PROGRAM_C_FC_HOOKS], [_AC_LANG_PROGRAM_C_FC_HOOKS])[]dnl + int +-main () ++main (void) + { + dnl Do *not* indent the following line: there may be CPP directives. + dnl Don't move the `;' right after for the same reason. +@@ -130,7 +130,7 @@ m4_if([$2], [main], , + #ifdef __cplusplus + extern "C" + #endif +-char $2 ();])], [return $2 ();])]) ++char $2 (void);])], [return $2 ();])]) + + + # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION) +@@ -154,7 +154,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)], + #define $1 innocuous_$1 + + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $1 (); below. ++ which can conflict with char $1 (void); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +@@ -172,7 +172,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)], + #ifdef __cplusplus + extern "C" + #endif +-char $1 (); ++char $1 (void); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +@@ -201,8 +201,8 @@ return test_array @<:@0@:>@; + # But we include them only after the EXPRESSION has been evaluated. + m4_define([AC_LANG_INT_SAVE(C)], + [AC_LANG_PROGRAM([$1 +-static long int longval () { return $2; } +-static unsigned long int ulongval () { return $2; } ++static long int longval (void) { return $2; } ++static unsigned long int ulongval (void) { return $2; } + @%:@include <stdio.h> + @%:@include <stdlib.h>], + [ +@@ -1625,8 +1625,8 @@ for ac_kw in inline __inline__ __inline; do + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [#ifndef __cplusplus + typedef int foo_t; +-static $ac_kw foo_t static_foo () {return 0; } +-$ac_kw foo_t foo () {return 0; } ++static $ac_kw foo_t static_foo (void) {return 0; } ++$ac_kw foo_t foo (void) {return 0; } + #endif + ])], + [ac_cv_c_inline=$ac_kw]) +@@ -1949,7 +1949,7 @@ m4_define([_AC_LANG_OPENMP(C)], + choke me + #endif + #include <omp.h> +-int main () { return omp_get_num_threads (); } ++int main (void) { return omp_get_num_threads (); } + ]) + + # _AC_LANG_OPENMP(C++) +--- a/lib/autoconf/functions.m4 ++++ b/lib/autoconf/functions.m4 +@@ -463,9 +463,6 @@ AC_CACHE_CHECK([whether closedir returns void], + [ac_cv_func_closedir_void], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT + #include <$ac_header_dirent> +-#ifndef __cplusplus +-int closedir (); +-#endif + ], + [[return closedir (opendir (".")) != 0;]])], + [ac_cv_func_closedir_void=no], +@@ -893,7 +890,7 @@ AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull, + [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include <stdlib.h> + #else +-char *malloc (); ++char *malloc (long); + #endif + ]], + [return ! malloc (0);])], +@@ -1029,7 +1026,7 @@ static const char *tz_strings[] = { + /* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ + static int +-spring_forward_gap () ++spring_forward_gap (void) + { + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; +@@ -1066,7 +1063,7 @@ mktime_test (time_t now) + } + + static int +-irix_6_4_bug () ++irix_6_4_bug (void) + { + /* Based on code from Ariel Faigon. */ + struct tm tm; +@@ -1108,7 +1105,7 @@ bigtime_test (int j) + } + + static int +-year_2050_test () ++year_2050_test (void) + { + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ +@@ -1138,7 +1135,7 @@ year_2050_test () + } + + int +-main () ++main (void) + { + time_t t, delta; + int i, j; +@@ -1232,7 +1229,7 @@ AC_CACHE_CHECK([for working mmap], [ac_cv_func_mmap_fixed_mapped], + #include <sys/mman.h> + + #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +-char *malloc (); ++char *malloc (void *, long); + #endif + + /* This mess was copied from the GNU getpagesize.h. */ +@@ -1268,7 +1265,7 @@ char *malloc (); + #endif /* no HAVE_GETPAGESIZE */ + + int +-main () ++main (void) + { + char *data, *data2, *data3; + const char *cdata2; +@@ -1398,7 +1395,7 @@ AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull, + [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H + # include <stdlib.h> + #else +-char *realloc (); ++char *realloc (void *, long); + #endif + ]], + [return ! realloc (0, 0);])], +@@ -1547,11 +1544,8 @@ AC_DEFUN([AC_FUNC_STRTOD], + AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod, + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ + ]AC_INCLUDES_DEFAULT[ +-#ifndef strtod +-double strtod (); +-#endif + int +-main() ++main(void) + { + { + /* Some versions of Linux strtod mis-parse strings with leading '+'. */ +@@ -1645,8 +1639,7 @@ AC_CACHE_CHECK([whether strerror_r returns char *], + # former has a strerror_r that returns char*, while the latter + # has a strerror_r that returns `int'. + # This test should segfault on the DEC system. +- AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT +- extern char *strerror_r ();], ++ AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], + [[char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + return ! isalpha (x);]])], +@@ -1879,7 +1872,7 @@ sparc_address_test (arg) int arg; + } + + int +-main () ++main (void) + { + pid_t parent = getpid (); + pid_t child; +@@ -1985,7 +1978,7 @@ AC_CACHE_CHECK([for wait3 that fills in rusage], + #include <sys/wait.h> + /* HP-UX has wait3 but does not fill in rusage at all. */ + int +-main () ++main (void) + { + struct rusage r; + int i; +--- a/lib/autoconf/headers.m4 ++++ b/lib/autoconf/headers.m4 +@@ -712,7 +712,7 @@ if test $ac_cv_header_stdc = yes; then + + #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) + int +-main () ++main (void) + { + int i; + for (i = 0; i < 256; i++) +--- a/lib/autoconf/specific.m4 ++++ b/lib/autoconf/specific.m4 +@@ -257,7 +257,7 @@ void ucatch (dummy) int dummy; { } + #endif + + int +-main () ++main (void) + { + int i = fork (), status; + +--- a/lib/autoconf/types.m4 ++++ b/lib/autoconf/types.m4 +@@ -267,7 +267,7 @@ AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups, + #define MAX(x, y) ((x) > (y) ? (x) : (y)) + + int +-main () ++main (void) + { + gid_t gidset[NGID]; + int i, n; +--- a/tests/c.at ++++ b/tests/c.at +@@ -354,7 +354,7 @@ AT_DATA([foo.c], + #endif + #include <stdio.h> + +-int main () ++int main (void) + { + #ifdef _OPENMP + #pragma omp parallel +@@ -404,7 +404,7 @@ foo.@OBJEXT@: foo.cpp + ]]) + + AT_DATA([foo.cpp], +-[[int main () ++[[int main (void) + { + return 0; + } +--- a/tests/compile.at ++++ b/tests/compile.at +@@ -124,7 +124,7 @@ AC_PROG_CC + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef PACKAGE_NAME + choke me + #endif +-int main () ++int main (void) + { + return 0; + } +@@ -150,7 +150,7 @@ AC_LANG([C++]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef PACKAGE_NAME + choke me + #endif +-int main () ++int main (void) + { + return 0; + } +@@ -249,7 +249,7 @@ AT_CHECK([sed -n 's/ *$//; /#define PACKAGE/,$p' stdout], [], + + const char hw[] = "Hello, World\n"; + int +-main () ++main (void) + { + fputs (hw, stdout); + ; +@@ -269,7 +269,7 @@ AT_KEYWORDS([AC_LANG_DEFINES_PROVIDED]) + + AT_DATA([configure.ac], + [[AC_INIT +-AC_COMPILE_IFELSE([int main () { return 0; }], [], ++AC_COMPILE_IFELSE([int main (void) { return 0; }], [], + [AC_MSG_ERROR([compiling trivial program failed])]) + ]]) + +@@ -280,7 +280,7 @@ AT_CHECK_CONFIGURE([-q]) + + AT_DATA([configure.ac], + [[AC_INIT +-AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED()int main () { return 0; }], [], ++AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED()int main (void) { return 0; }], [], + [AC_MSG_ERROR([compiling trivial program failed])]) + ]]) + +@@ -324,7 +324,7 @@ test $estatus != 2 && + AC_MSG_ERROR([did not get as 2 exit status: $estatus])]) + + # The old stinky one. +-AC_TRY_RUN([int main () { return 3; }], ++AC_TRY_RUN([int main (void) { return 3; }], + [AC_MSG_ERROR([saw `return 3' as a success])], + [estatus=$? + test $estatus != 3 && +--- a/tests/fortran.at ++++ b/tests/fortran.at +@@ -223,7 +223,7 @@ void FOOBAR_F77 (double *x, double *y); + # ifdef __cplusplus + extern "C" + # endif +- int F77_DUMMY_MAIN () { return 1; } ++ int F77_DUMMY_MAIN (void) { return 1; } + #endif + + int main(int argc, char *argv[]) +@@ -301,7 +301,7 @@ void FOOBAR_FC(double *x, double *y); + # ifdef __cplusplus + extern "C" + # endif +- int FC_DUMMY_MAIN () { return 1; } ++ int FC_DUMMY_MAIN (void) { return 1; } + #endif + + int main (int argc, char *argv[]) +@@ -533,7 +533,7 @@ void @foobar@ (int *x); + # ifdef __cplusplus + extern "C" + # endif +- int F77_DUMMY_MAIN () { return 1; } ++ int F77_DUMMY_MAIN (void) { return 1; } + #endif + + int main(int argc, char *argv[]) +@@ -607,7 +607,7 @@ void @foobar@ (int *x); + # ifdef __cplusplus + extern "C" + # endif +- int FC_DUMMY_MAIN () { return 1; } ++ int FC_DUMMY_MAIN (void) { return 1; } + #endif + + int main(int argc, char *argv[]) +--- a/tests/semantics.at ++++ b/tests/semantics.at +@@ -107,7 +107,7 @@ AT_CHECK_MACRO([AC_CHECK_DECLS], + [[int yes = 1; + enum { myenum }; + struct { int x[20]; } mystruct; +- extern int myfunc(); ++ extern int myfunc (void); + #define mymacro1(arg) arg + #define mymacro2]]) + # The difference in space-before-open-paren is intentional. +--- a/lib/autoconf/c.m4 ++++ b/lib/autoconf/c.m4 +@@ -1106,9 +1106,7 @@ struct stat; + /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ + struct buf { int x; }; + FILE * (*rcsopen) (struct buf *, struct stat *, int); +-static char *e (p, i) +- char **p; +- int i; ++static char *e (char **p, int i) + { + return p[i]; + } +--- a/lib/autoconf/specific.m4 ++++ b/lib/autoconf/specific.m4 +@@ -251,10 +251,9 @@ AC_INCLUDES_DEFAULT + /* Some platforms explicitly require an extern "C" signal handler + when using C++. */ + #ifdef __cplusplus +-extern "C" void ucatch (int dummy) { } +-#else +-void ucatch (dummy) int dummy; { } ++extern "C" + #endif ++void ucatch (int dummy) { } + + int + main (void) diff --git a/dev-build/autoconf/files/autoconf-2.69-fix-libtool-test.patch b/dev-build/autoconf/files/autoconf-2.69-fix-libtool-test.patch new file mode 100644 index 000000000000..e75eba621606 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.69-fix-libtool-test.patch @@ -0,0 +1,31 @@ +From 247b02e5a5bb79ca6666e91de02ae2d3cb0cd325 Mon Sep 17 00:00:00 2001 +From: "Gary V. Vaughan" <gary@gnu.org> +Date: Mon, 3 Nov 2014 07:25:03 +0100 +Subject: tests: avoid spurious test failure with libtool 2.4.3 + +Based on a report by Bruce Dubbs. + +* tests/foreign.at (Libtool): Be tolerant of 'quote' replacing the +older `quote'. + +Signed-off-by: Eric Blake <eblake@redhat.com> +--- + tests/foreign.at | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/foreign.at b/tests/foreign.at +index a9dc33c..d4702cd 100644 +--- a/tests/foreign.at ++++ b/tests/foreign.at +@@ -57,7 +57,7 @@ AT_CHECK([./config.guess || exit 77], [], [ignore], [ignore]) + # Make sure at-path contains something valid, and let the test suite + # display it when verbose. And fail, skipping would too easily hide + # problems. +-AT_CHECK([sed -n ["s,^.*\`\\(/[^']*\\)'.*,\\1,p"] stdout], [0], [stdout]) ++AT_CHECK([sed -n ["s,^[^']*[\`']\\(/[^']*\\)'.*,\\1,p"] stdout], [0], [stdout]) + AT_CHECK([test -f "`sed -n 1p stdout`"]) + + # Older libtoolize installed everything but install-sh... +-- +cgit v1.0-41-gc330 + diff --git a/dev-build/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch b/dev-build/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch new file mode 100644 index 000000000000..1afcec15bb4f --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.69-make-tests-bash5-compatible.patch @@ -0,0 +1,63 @@ +From 5b9db67786a428164abafe626ab11a2754aad528 Mon Sep 17 00:00:00 2001 +From: Ondrej Dubaj <odubaj@redhat.com> +Date: Wed, 28 Aug 2019 07:39:50 +0200 +Subject: Port tests to Bash 5 + +* tests/local.at (AT_CHECK_ENV, AT_CONFIG_CMP): +Add BASH_ARGC, BASH_ARGV to list of variables to be ignored when +comparing variable space dumps. +(AT_CONFIG_CMP): Also ignore LINENO. +* tests/m4sh.at: Also unset LINENO in 'reference' and 'test/test-1'. +--- + tests/local.at | 5 ++++- + tests/m4sh.at | 4 ++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/tests/local.at b/tests/local.at +index a22958c0..852be285 100644 +--- a/tests/local.at ++++ b/tests/local.at +@@ -325,7 +325,7 @@ if test -f state-env.before && test -f state-env.after; then + [AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|MKDIR_P|RANLIB|SET_MAKE|YACC], + [GREP|[EF]GREP|SED], + [[_@]|.[*#?$].], +- [argv|ARGC|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \ ++ [argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \ + $act_file || + test $? -eq 1 || echo failed >&2 + ) 2>stderr-$act_file | +@@ -382,6 +382,9 @@ do + /'\'\\\$\''=/ d + /^argv=/ d + /^ARGC=/ d ++ /^BASH_ARGC=/ d ++ /^BASH_ARGV=/ d ++ /^LINENO=/ d + ' $act_file >at_config_vars-$act_file + done + AT_CMP([at_config_vars-$1], [at_config_vars-$2])[]dnl +diff --git a/tests/m4sh.at b/tests/m4sh.at +index e9d70b02..cbdfcb62 100644 +--- a/tests/m4sh.at ++++ b/tests/m4sh.at +@@ -254,7 +254,7 @@ AT_CHECK([autom4te -l m4sh $1.as -o $1]) + # `_oline_', once processed and ran, produces our reference. + # We check that we find ourselves by looking at a string which is + # available only in the original script: `_oline_'. +-AT_DATA_LINENO([reference], [false], [__OLINE__], [_oline__]) ++AT_DATA_LINENO([reference], [true], [__OLINE__], [_oline__]) + AT_CHECK([./reference], 0, [stdout]) + + # The reference: +@@ -264,7 +264,7 @@ mv stdout expout + # Be sure to be out of the PATH. + AT_CHECK([mkdir test || exit 77]) + +-AT_DATA_LINENO([test/test-1], [false], [__LINENO__], [LINENO]) ++AT_DATA_LINENO([test/test-1], [true], [__LINENO__], [LINENO]) + AT_CHECK([./test/test-1], 0, [expout]) + AT_CHECK([(PATH=test$PATH_SEPARATOR$PATH; export PATH; exec test-1)], + 0, [expout]) +-- +cgit v1.2.1 + diff --git a/dev-build/autoconf/files/autoconf-2.69-perl-5.26-2.patch b/dev-build/autoconf/files/autoconf-2.69-perl-5.26-2.patch new file mode 100644 index 000000000000..6becf807c43e --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.69-perl-5.26-2.patch @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/625576 + +--- autoconf-2.69/bin/autoheader.in ++++ autoconf-2.69/bin/autoheader.in +@@ -173,6 +173,12 @@ + # Source what the traces are trying to tell us. + verb "$me: running $autoconf to trace from $ARGV[0]"; + my $quoted_tmp = shell_quote ($tmp); ++my $perl_tmp; ++if ( $tmp =~ /^\// ) { ++ $perl_tmp=$tmp; ++} else { ++ $perl_tmp="./".$tmp; ++} + xsystem ("$autoconf" + # If you change this list, update the + # `Autoheader-preselections' section of autom4te.in. +@@ -182,9 +188,9 @@ + . " " . shell_quote ($ARGV[0]) . " >$quoted_tmp/traces.pl"); + + local (%verbatim, %symbol); +-debug "$me: \`do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $quoted_tmp/traces.pl`; +-do "$tmp/traces.pl"; +-warn "couldn't parse $tmp/traces.pl: $@" if $@; ++debug "$me: \`do'ing $perl_tmp/traces.pl:\n" . `sed 's/^/| /' $quoted_tmp/traces.pl`; ++do "$perl_tmp/traces.pl"; ++warn "couldn't parse $perl_tmp/traces.pl: $@" if $@; + unless ($config_h) + { + error "error: AC_CONFIG_HEADERS not found in $ARGV[0]"; diff --git a/dev-build/autoconf/files/autoconf-2.69-perl-5.26.patch b/dev-build/autoconf/files/autoconf-2.69-perl-5.26.patch new file mode 100644 index 000000000000..b3d7888ca722 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.69-perl-5.26.patch @@ -0,0 +1,28 @@ +From e5654a5591884b92633c7785f325626711e7f7aa Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Tue, 29 Jan 2013 13:46:48 -0800 +Subject: [PATCH] autoscan: port to perl 5.17 + +* bin/autoscan.in (scan_sh_file): Escape '{'. This avoids a +feature that is deprecated in Perl 5.17. Reported by Ray Lauff in +<http://lists.gnu.org/archive/html/bug-autoconf/2013-01/msg00059.html>. +--- + bin/autoscan.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bin/autoscan.in b/bin/autoscan.in +index 993a750..db1df79 100644 +--- a/bin/autoscan.in ++++ b/bin/autoscan.in +@@ -358,7 +358,7 @@ sub scan_sh_file ($) + { + # Strip out comments and variable references. + s/#.*//; +- s/\${[^\}]*}//g; ++ s/\$\{[^\}]*}//g; + s/@[^@]*@//g; + + # Tokens in the code. +-- +1.9.1 + diff --git a/dev-build/autoconf/files/autoconf-2.71-AC_C_BIGENDIAN-lto.patch b/dev-build/autoconf/files/autoconf-2.71-AC_C_BIGENDIAN-lto.patch new file mode 100644 index 000000000000..48fbdc6f544b --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.71-AC_C_BIGENDIAN-lto.patch @@ -0,0 +1,50 @@ +https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=234fc6c86613ed3f366dd1d88996e4d5d85ee222 + +From 234fc6c86613ed3f366dd1d88996e4d5d85ee222 Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Wed, 27 Jul 2022 08:53:35 -0700 +Subject: Port AC_C_BIGENDIAN to cross gcc -std=c11 -flto + +* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Improve the +inherently-unportable grep trick well enough to survive gcc +-std=c11 -flto when cross-compiling (sr#110687). +--- a/lib/autoconf/c.m4 ++++ b/lib/autoconf/c.m4 +@@ -1838,8 +1838,8 @@ AC_DEFUN([AC_C_BIGENDIAN], + [ac_cv_c_bigendian=no], + [ac_cv_c_bigendian=yes], + [# Try to guess by grepping values from an object file. +- AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM( ++ AC_LINK_IFELSE( ++ [AC_LANG_SOURCE( + [[unsigned short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + unsigned short int ascii_ii[] = +@@ -1854,13 +1854,20 @@ AC_DEFUN([AC_C_BIGENDIAN], + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } +- extern int foo; +- ]], +- [[return use_ascii (foo) == use_ebcdic (foo);]])], +- [if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ++ int ++ main (int argc, char **argv) ++ { ++ /* Intimidate the compiler so that it does not ++ optimize the arrays away. */ ++ char *p = argv[0]; ++ ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; ++ ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; ++ return use_ascii (argc) == use_ebcdic (*p); ++ }]])], ++ [if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then + ac_cv_c_bigendian=yes + fi +- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then ++ if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else +cgit v1.1 diff --git a/dev-build/autoconf/files/autoconf-2.71-AC_LANG_CALL_C_cxx.patch b/dev-build/autoconf/files/autoconf-2.71-AC_LANG_CALL_C_cxx.patch new file mode 100644 index 000000000000..5b53d17135bc --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.71-AC_LANG_CALL_C_cxx.patch @@ -0,0 +1,35 @@ +https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=b27bc3e230bb12fdd9a813e38e82bc4c3e22b4cc + +Note: we drop the comma from the comment because some packages +have bad quoting, and while that will need to be sorted when/if +autoconf 2.72 is released, we've got our hands full with the +Clang situation right now (bug #871753). + +From b27bc3e230bb12fdd9a813e38e82bc4c3e22b4cc Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Tue, 31 Aug 2021 16:30:46 -0700 +Subject: Port AC_LANG_CALL(C) to C++ +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* lib/autoconf/c.m4 (AC_LANG_CALL(C)): Add an extern "C" if C++. +Problem reported by Vincent Lefèvre (sr #110532). +--- a/lib/autoconf/c.m4 ++++ b/lib/autoconf/c.m4 +@@ -126,7 +126,13 @@ m4_define([AC_LANG_CALL(C)], + m4_if([$2], [main], , + [/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ ++ builtin and then its argument prototype would still apply. ++ The 'extern "C"' is for builds by C++ compilers; ++ although this is not generally supported in C code supporting it here ++ has little cost and some practical benefit (sr 110532). */ ++#ifdef __cplusplus ++extern "C" ++#endif + char $2 ();])], [return $2 ();])]) + + +cgit v1.1 diff --git a/dev-build/autoconf/files/autoconf-2.71-K-R-decls-clang-deux.patch b/dev-build/autoconf/files/autoconf-2.71-K-R-decls-clang-deux.patch new file mode 100644 index 000000000000..6a3d6580a3f6 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.71-K-R-decls-clang-deux.patch @@ -0,0 +1,94 @@ +https://bugs.gentoo.org/870412 +https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=bf5a75953b6d504f0405b1ca33b039b8dd39eef4 + +Backport the K&R decls fix to 2.71 to avoid configure tests +failing (often "silently", i.e. doesn't fail the build of +the package overall, just leads to wrong results) with +newer compilers like the upcoming Clang 16. + +From bf5a75953b6d504f0405b1ca33b039b8dd39eef4 Mon Sep 17 00:00:00 2001 +From: Zack Weinberg <zackw@panix.com> +Date: Thu, 10 Nov 2022 12:05:30 -0500 +Subject: More fixes for compilers that reject K&R function definitions. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes all of the remaining failures exposed by running the +testsuite with GCC 12 and +CC='cc -Wimplicit-function-declaration -Wold-style-definition + -Wimplicit-int -Werror' +. + +* lib/autoconf/c.m4 (_AC_C_C89_TEST_GLOBALS): Don’t use K&R function + definitions. +* lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. + (AC_FUNC_MKTIME): Declare functions taking no arguments as ‘fn (void)’ + not ‘fn ()’. +* lib/autoconf/c.m4 (_AC_C_C99_TEST_GLOBALS): Declare free(). +--- a/lib/autoconf/c.m4 ++++ b/lib/autoconf/c.m4 +@@ -1153,9 +1153,7 @@ struct stat; + /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ + struct buf { int x; }; + struct buf * (*rcsopen) (struct buf *, struct stat *, int); +-static char *e (p, i) +- char **p; +- int i; ++static char *e (char **p, int i) + { + return p[i]; + } +@@ -1212,6 +1210,7 @@ extern int puts (const char *); + extern int printf (const char *, ...); + extern int dprintf (int, const char *, ...); + extern void *malloc (size_t); ++extern void free (void *); + + // Check varargs macros. These examples are taken from C99 6.10.3.5. + // dprintf is used instead of fprintf to avoid needing to declare +--- a/lib/autoconf/functions.m4 ++++ b/lib/autoconf/functions.m4 +@@ -1091,7 +1091,7 @@ static const char *tz_strings[] = { + /* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ + static int +-spring_forward_gap () ++spring_forward_gap (void) + { + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; +@@ -1128,7 +1128,7 @@ mktime_test (time_t now) + } + + static int +-irix_6_4_bug () ++irix_6_4_bug (void) + { + /* Based on code from Ariel Faigon. */ + struct tm tm; +@@ -1170,7 +1170,7 @@ bigtime_test (int j) + } + + static int +-year_2050_test () ++year_2050_test (void) + { + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ +--- a/lib/autoconf/specific.m4 ++++ b/lib/autoconf/specific.m4 +@@ -361,10 +361,9 @@ AC_INCLUDES_DEFAULT + /* Some platforms explicitly require an extern "C" signal handler + when using C++. */ + #ifdef __cplusplus +-extern "C" void ucatch (int dummy) { } +-#else +-void ucatch (dummy) int dummy; { } ++extern "C" + #endif ++void ucatch (int dummy) { } + + int + main (void) +cgit v1.1 diff --git a/dev-build/autoconf/files/autoconf-2.71-K-R-decls-clang.patch b/dev-build/autoconf/files/autoconf-2.71-K-R-decls-clang.patch new file mode 100644 index 000000000000..e2e451e86920 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.71-K-R-decls-clang.patch @@ -0,0 +1,114 @@ +https://bugs.gentoo.org/870412 +https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=8b5e2016c7ed2d67f31b03a3d2e361858ff5299b + +Backport the K&R decls fix to 2.71 to avoid configure tests +failing (often "silently", i.e. doesn't fail the build of +the package overall, just leads to wrong results) with +newer compilers like the upcoming Clang 16. + +From 8b5e2016c7ed2d67f31b03a3d2e361858ff5299b Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Thu, 1 Sep 2022 16:19:50 -0500 +Subject: Port to compilers that moan about K&R func decls +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* lib/autoconf/c.m4 (AC_LANG_CALL, AC_LANG_FUNC_LINK_TRY): +Use '(void)' rather than '()' in function prototypes, as the latter +provokes fatal errors in some compilers nowadays. +* lib/autoconf/functions.m4 (AC_FUNC_STRTOD): +* tests/fortran.at (AC_F77_DUMMY_MAIN usage): +* tests/semantics.at (AC_CHECK_DECLS): +Don’t use () in a function decl. +--- a/lib/autoconf/c.m4 ++++ b/lib/autoconf/c.m4 +@@ -133,7 +133,7 @@ m4_if([$2], [main], , + #ifdef __cplusplus + extern "C" + #endif +-char $2 ();])], [return $2 ();])]) ++char $2 (void);])], [return $2 ();])]) + + + # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION) +@@ -157,7 +157,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)], + #define $1 innocuous_$1 + + /* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $1 (); below. */ ++ which can conflict with char $1 (void); below. */ + + #include <limits.h> + #undef $1 +@@ -168,7 +168,7 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)], + #ifdef __cplusplus + extern "C" + #endif +-char $1 (); ++char $1 (void); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +--- a/lib/autoconf/functions.m4 ++++ b/lib/autoconf/functions.m4 +@@ -1613,9 +1613,6 @@ AC_DEFUN([AC_FUNC_STRTOD], + AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod, + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ + ]AC_INCLUDES_DEFAULT[ +-#ifndef strtod +-double strtod (); +-#endif + int + main (void) + { +--- a/tests/fortran.at ++++ b/tests/fortran.at +@@ -233,7 +233,7 @@ void FOOBAR_F77 (double *x, double *y); + # ifdef __cplusplus + extern "C" + # endif +- int F77_DUMMY_MAIN () { return 1; } ++ int F77_DUMMY_MAIN (void) { return 1; } + #endif + + int main(int argc, char *argv[]) +@@ -315,7 +315,7 @@ void FOOBAR_FC(double *x, double *y); + # ifdef __cplusplus + extern "C" + # endif +- int FC_DUMMY_MAIN () { return 1; } ++ int FC_DUMMY_MAIN (void) { return 1; } + #endif + + int main (int argc, char *argv[]) +@@ -561,7 +561,7 @@ void @foobar@ (int *x); + # ifdef __cplusplus + extern "C" + # endif +- int F77_DUMMY_MAIN () { return 1; } ++ int F77_DUMMY_MAIN (void) { return 1; } + #endif + + int main(int argc, char *argv[]) +@@ -637,7 +637,7 @@ void @foobar@ (int *x); + # ifdef __cplusplus + extern "C" + # endif +- int FC_DUMMY_MAIN () { return 1; } ++ int FC_DUMMY_MAIN (void) { return 1; } + #endif + + int main(int argc, char *argv[]) +--- a/tests/semantics.at ++++ b/tests/semantics.at +@@ -207,7 +207,7 @@ AT_CHECK_MACRO([AC_CHECK_DECLS], + [[extern int yes; + enum { myenum }; + extern struct mystruct_s { int x[20]; } mystruct; +- extern int myfunc(); ++ extern int myfunc (int); + #define mymacro1(arg) arg + #define mymacro2]]) + # Ensure we can detect missing declarations of functions whose +cgit v1.1 diff --git a/dev-build/autoconf/files/autoconf-2.71-bash52.patch b/dev-build/autoconf/files/autoconf-2.71-bash52.patch new file mode 100644 index 000000000000..1c3c91db1d4f --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.71-bash52.patch @@ -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 + diff --git a/dev-build/autoconf/files/autoconf-2.71-cxx11typo.patch b/dev-build/autoconf/files/autoconf-2.71-cxx11typo.patch new file mode 100644 index 000000000000..ed3f68ea2b9e --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.71-cxx11typo.patch @@ -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 + diff --git a/dev-build/autoconf/files/autoconf-2.71-darwin.patch b/dev-build/autoconf/files/autoconf-2.71-darwin.patch new file mode 100644 index 000000000000..c122aee4b22d --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.71-darwin.patch @@ -0,0 +1,11 @@ +--- a/bin/autoreconf.in ++++ b/bin/autoreconf.in +@@ -122,7 +122,7 @@ + my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; + my $automake = $ENV{'AUTOMAKE'} || 'automake'; + my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; +-my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; ++my $libtoolize = $ENV{'LIBTOOLIZE'} || 'glibtoolize'; + my $intltoolize = $ENV{'INTLTOOLIZE'} || 'intltoolize'; + my $gtkdocize = $ENV{'GTKDOCIZE'} || 'gtkdocize'; + my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; diff --git a/dev-build/autoconf/files/autoconf-2.71-make-4.4.patch b/dev-build/autoconf/files/autoconf-2.71-make-4.4.patch new file mode 100644 index 000000000000..4dcf05996180 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.71-make-4.4.patch @@ -0,0 +1,25 @@ +https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=31f673434ee402258b45e958c88acc8725d82b1a +https://savannah.gnu.org/bugs/?63040 +https://bugs.gentoo.org/869257 + +From 31f673434ee402258b45e958c88acc8725d82b1a Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Fri, 9 Sep 2022 16:54:11 -0500 +Subject: Port to GNU make 4.4 + +* cfg.mk (PATH): Assign eagerly, and simplify shell use, avoiding +use of the shell entirely if PWD is set, as it should be. +Problem reported by Sergei Trofimovich in: +https://lists.gnu.org/r/autoconf-patches/2022-09/msg00007.html +--- a/cfg.mk ++++ b/cfg.mk +@@ -18,7 +18,7 @@ + # This file is '-include'd into GNUmakefile. + + # Build with our own versions of these tools, when possible. +-export PATH = $(shell echo "`pwd`/tests:$$PATH") ++export PATH := $(or $(PWD),$(shell pwd))/tests:$(PATH) + + # Remove the autoreconf-provided INSTALL, so that we regenerate it. + _autoreconf = autoreconf -i -v && rm -f INSTALL +cgit v1.1 diff --git a/dev-build/autoconf/files/autoconf-2.71-time.patch b/dev-build/autoconf/files/autoconf-2.71-time.patch new file mode 100644 index 000000000000..8ecfe10f40a3 --- /dev/null +++ b/dev-build/autoconf/files/autoconf-2.71-time.patch @@ -0,0 +1,49 @@ +From e194b3c7e00429612a9d40e78ea571687fd25b91 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= <dilfridge@gentoo.org> +Date: Sun, 1 Aug 2021 19:07:48 +0200 +Subject: [PATCH] Use stat from Time::HiRes (instead of File::stat) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> +--- + lib/Autom4te/FileUtils.pm | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm +index a182031b..27a5fd91 100644 +--- a/lib/Autom4te/FileUtils.pm ++++ b/lib/Autom4te/FileUtils.pm +@@ -34,12 +34,12 @@ This perl module provides various general purpose file handling functions. + + =cut + +-use 5.006; ++use 5.008; + use strict; + use warnings FATAL => 'all'; + + use Exporter; +-use File::stat; ++use Time::HiRes qw(stat); + use IO::File; + + use Autom4te::Channels; +@@ -115,10 +115,11 @@ sub mtime ($) + return 0 + if $file eq '-' || ! -f $file; + +- my $stat = stat ($file) ++ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, ++ $atime,$mtime,$ctime,$blksize,$blocks) = stat ($file) + or fatal "cannot stat $file: $!"; + +- return $stat->mtime; ++ return $mtime; + } + + +-- +2.31.1 + diff --git a/dev-build/autoconf/metadata.xml b/dev-build/autoconf/metadata.xml new file mode 100644 index 000000000000..4ff4a48125bc --- /dev/null +++ b/dev-build/autoconf/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <upstream> + <remote-id type="savannah">autoconf</remote-id> + </upstream> +</pkgmetadata> |