diff --git a/sdk_container/src/third_party/portage-stable/app-arch/bzip2/Manifest b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/Manifest
index a4b18f5d5b..099151807c 100644
--- a/sdk_container/src/third_party/portage-stable/app-arch/bzip2/Manifest
+++ b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/Manifest
@@ -1 +1,2 @@
DIST bzip2-1.0.8.tar.gz 810029 BLAKE2B 22ab3acd84f4db8c3d6f59340c252faedfd4447cea00dafbd652e65b6cf8a20adf6835c22e58563004cfafdb15348c924996230b4b23cae42da5e25eeac4bdad SHA512 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3
+DIST bzip2-1.0.8.tar.gz.sig 310 BLAKE2B 0d702dcb19f7738da9f05ee9d719f5cd3653540365e78db143404e599ea54bc6f9d5e6a38cdf5cdd3c6550243d34266343467c6b1db9d5d3c134f9353b00f395 SHA512 4a4a3fa0ec1c10a704b9870e8e629fd007cca55184423c6bfc3049a702fb41e4aeb73bfe9ca7442c27d32d278f1f34f27523a6be67d35b37896acdded12bf40d
diff --git a/sdk_container/src/third_party/portage-stable/app-arch/bzip2/bzip2-1.0.8-r1.ebuild b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/bzip2-1.0.8-r1.ebuild
index 49d36f93d6..62a13959bf 100644
--- a/sdk_container/src/third_party/portage-stable/app-arch/bzip2/bzip2-1.0.8-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/app-arch/bzip2/bzip2-1.0.8-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
@@ -6,17 +6,25 @@
EAPI=7
-inherit toolchain-funcs multilib-minimal usr-ldscript
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bzip2.gpg
+inherit toolchain-funcs multilib-minimal usr-ldscript verify-sig
+
+if [[ ${PVR} != 1.0.8-r1 ]]; then
+ die "Please remove libbz2.so.1.0 logic from multilib_src_install"
+fi
DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
HOMEPAGE="https://sourceware.org/bzip2/"
SRC_URI="https://sourceware.org/pub/${PN}/${P}.tar.gz"
+SRC_URI+=" verify-sig? ( https://sourceware.org/pub/${PN}/${P}.tar.gz.sig )"
LICENSE="BZIP2"
SLOT="0/1" # subslot = SONAME
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="static static-libs"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-bzip2 )"
+
PATCHES=(
"${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
"${FILESDIR}"/${PN}-1.0.8-saneso.patch
@@ -59,6 +67,11 @@ multilib_src_compile() {
bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
}
+multilib_src_test() {
+ cp "${S}"/sample* "${BUILD_DIR}" || die
+ bemake -f "${S}"/Makefile check
+}
+
multilib_src_install() {
into /usr
diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/Manifest b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/Manifest
index af51126607..1d33a9a5a6 100644
--- a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/Manifest
+++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/Manifest
@@ -1,3 +1,5 @@
DIST portage-utils-0.90.1.tar.xz 1779252 BLAKE2B 27c94694cab84970c0c92e835b9039d9420fbfa20f9f2e03f4f53d118df4dc243cddce33994095a3e41bd1027a42c9c29cda65cb7cf4f45279a028b21555f4f8 SHA512 67290a69ad6ac40da3ce0f41d2630096690e69bb97a1428af921ccc582dcfbf903bbf98259f68afdbe9e96aef81672ea3352a9266a649e75f99acec7fa00cd8a
DIST portage-utils-0.90.tar.xz 1776636 BLAKE2B bbacc05aa97c77705ae4fbdb5efde5f1d49a99ac8ed259e026c9a997f43a86551b3a10a397e0c5f1da161d2c0d88afe88e22870705ca39d911c4a98ad13f4928 SHA512 2077061dd7dfd444d4ad38faf5a87aa44392d7747f71d7283b5e2775ce3d714773cd642ea085aea3dd34a715f2c446d42fd64ba42fa99e716e8d843aae3d9682
DIST portage-utils-0.92.tar.xz 1819676 BLAKE2B 01798e3984745140bca1bcc1eda5c2aea7c517bee2656acfe1bd810fc8088ddcb474f2c64fee6832c5e1699e2ec8ad5a9c6d5afba8a2e2b6f1861d49fbf7fcb7 SHA512 7d36263c9c242c8e82786fa12e171a3f396f65520acb8caa91516862615bd71241699ab6c2232122f7009875aa0a10b06b614a842d45afc86e599b39711e12b3
+DIST portage-utils-0.93.3.tar.xz 1796828 BLAKE2B cfad7ab27ff2d92f631f4e31012e8903c5fa6113485f727338812059379cdd4a9552d80dc3aef6bb91264c361c0554fe9054a12347e274c4c5c3db66fd36008b SHA512 c1245aa78d236263cd266fc8565312c2ac30cb992037a7b0f26da04ecf2dfeebc85bff653784e186cf2c7d7468e4772fb0bd93bcdb3a37d46e493d000933e5a1
+DIST portage-utils-0.94.1.tar.xz 1871688 BLAKE2B bec5ddd514b397c157c3b1bff70d61730f15804a6751f56eb69c4030a35fc6a6b11fa1e2bde94332772660f02bf9428623210733ae9e2f1290f29aa3b31a1813 SHA512 29fdb4093997eb95703d407da6b00305c949f0a00ae3aa5cfb2c47b66bddc59e034fae114663b40b611f906332066b648018aa4e5bc1b935e61a64f4b4bf1088
diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/metadata.xml b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/metadata.xml
index 6d218bbea7..33a5917b3e 100644
--- a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/metadata.xml
@@ -1,5 +1,5 @@
-
+
grobian@gentoo.org
diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.92.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.92.ebuild
index 85c3b587a2..d89e4d5e21 100644
--- a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.92.ebuild
+++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.92.ebuild
@@ -15,7 +15,7 @@ if [[ ${PV} == *9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
RDEPEND="
diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.93.3.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.93.3.ebuild
new file mode 100644
index 0000000000..294c81e741
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.93.3.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Small and fast Portage helper tools written in C"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="nls static openmp +qmanifest +qtegrity"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
+else
+ SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+RDEPEND="
+ qmanifest? (
+ openmp? (
+ || (
+ >=sys-devel/gcc-4.2:*[openmp]
+ sys-devel/clang-runtime:*[openmp]
+ )
+ )
+ static? (
+ app-crypt/libb2:=[static-libs]
+ dev-libs/openssl:0=[static-libs]
+ sys-libs/zlib:=[static-libs]
+ app-crypt/gpgme:=[static-libs]
+ )
+ !static? (
+ app-crypt/libb2:=
+ dev-libs/openssl:0=
+ sys-libs/zlib:=
+ app-crypt/gpgme:=
+ )
+ )
+ qtegrity? (
+ openmp? (
+ || (
+ >=sys-devel/gcc-4.2:*[openmp]
+ sys-devel/clang-runtime:*[openmp]
+ )
+ )
+ static? (
+ dev-libs/openssl:0=[static-libs]
+ )
+ !static? (
+ dev-libs/openssl:0=
+ )
+ )
+"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ econf \
+ --disable-maintainer-mode \
+ --with-eprefix="${EPREFIX}" \
+ $(use_enable qmanifest) \
+ $(use_enable qtegrity) \
+ $(use_enable openmp) \
+ $(use_enable static)
+}
diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.1.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.1.ebuild
new file mode 100644
index 0000000000..c1242cd92b
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-0.94.1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Small and fast Portage helper tools written in C"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="nls static openmp +qmanifest +qtegrity"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3 autotools
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
+else
+ SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+RDEPEND="
+ qmanifest? (
+ openmp? (
+ || (
+ >=sys-devel/gcc-4.2:*[openmp]
+ sys-devel/clang-runtime:*[openmp]
+ )
+ )
+ static? (
+ app-crypt/libb2:=[static-libs]
+ dev-libs/openssl:0=[static-libs]
+ sys-libs/zlib:=[static-libs]
+ app-crypt/gpgme:=[static-libs]
+ )
+ !static? (
+ app-crypt/libb2:=
+ dev-libs/openssl:0=
+ sys-libs/zlib:=
+ app-crypt/gpgme:=
+ )
+ )
+ qtegrity? (
+ openmp? (
+ || (
+ >=sys-devel/gcc-4.2:*[openmp]
+ sys-devel/clang-runtime:*[openmp]
+ )
+ )
+ static? (
+ dev-libs/openssl:0=[static-libs]
+ )
+ !static? (
+ dev-libs/openssl:0=
+ )
+ )
+"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ econf \
+ --disable-maintainer-mode \
+ --with-eprefix="${EPREFIX}" \
+ $(use_enable qmanifest) \
+ $(use_enable qtegrity) \
+ $(use_enable openmp) \
+ $(use_enable static)
+}
diff --git a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-9999.ebuild b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-9999.ebuild
index 85c3b587a2..c1242cd92b 100644
--- a/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-9999.ebuild
+++ b/sdk_container/src/third_party/portage-stable/app-portage/portage-utils/portage-utils-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=7
DESCRIPTION="Small and fast Portage helper tools written in C"
HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils"
@@ -15,7 +15,7 @@ if [[ ${PV} == *9999 ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/portage-utils.git"
else
SRC_URI="https://dev.gentoo.org/~grobian/distfiles/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
RDEPEND="
diff --git a/sdk_container/src/third_party/portage-stable/changelog/security/2022-08-23-binutils.md b/sdk_container/src/third_party/portage-stable/changelog/security/2022-08-23-binutils.md
new file mode 100644
index 0000000000..adafe64a87
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/changelog/security/2022-08-23-binutils.md
@@ -0,0 +1 @@
+- binutils ([CVE-2021-45078](https://nvd.nist.gov/vuln/detail/CVE-2021-45078))
diff --git a/sdk_container/src/third_party/portage-stable/changelog/updates/2022-08-23-toolchain-updates.md b/sdk_container/src/third_party/portage-stable/changelog/updates/2022-08-23-toolchain-updates.md
new file mode 100644
index 0000000000..591060d2aa
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/changelog/updates/2022-08-23-toolchain-updates.md
@@ -0,0 +1,7 @@
+- automake ([1.16.5](https://savannah.gnu.org/forum/forum.php?forum_id=10055))
+- binutils ([2.38](https://lwn.net/Articles/884264/))
+- bison ([3.8.2](https://lists.gnu.org/archive/html/bug-bison/2021-09/msg00056.html))
+- gcc ([11.3.0](https://gcc.gnu.org/gcc-11/changes.html))
+- libtool ([2.4.7](https://savannah.gnu.org/forum/forum.php?forum_id=10139))
+- perl ([5.34.1](https://perldoc.perl.org/5.34.1/perldelta))
+- pkgconf ([1.8.0](https://gitea.treehouse.systems/ariadne/pkgconf/src/tag/pkgconf-1.8.0/NEWS))
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/Manifest b/sdk_container/src/third_party/portage-stable/dev-lang/perl/Manifest
index c34d186f39..afeb7e399c 100644
--- a/sdk_container/src/third_party/portage-stable/dev-lang/perl/Manifest
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/Manifest
@@ -1,6 +1,10 @@
-DIST perl-5.32.0-patches-1.tar.xz 20220 BLAKE2B 46ebca5c74f59aa935ceec2a5807426c0e653ad7ba27de441d26e049e62dc67b17d58dfe5755f31bdd157e349d47fd46a98699207729f8f4f747930ed1064ba2 SHA512 42ed00f5f6be40af59e02691ff439a048cccd96fb970cca0976209faa921af98a773cc4cb1466e164328350d58cb46950ffa8c6f2fddabbeb3e8819349b06849
-DIST perl-5.32.1.tar.xz 12610988 BLAKE2B 9f89bcf9cffb245a0f2cb0afa17c25f092c84cc2f29bb1c744294c2f0393c72dc3beb9fcbe256cf252677b33bc594b294b3f6a4774ad9e30b771aceed1f4f147 SHA512 3443c75aea91f0fe3712fee576239f1946d2301b8f7390b690e2f5d070fe71af8f9fa7769e42086c2d33d5f84370f80368fa9350b4f10cc0ac3e6c1f6209d8f9
DIST perl-5.34.0-patches-1.tar.xz 20360 BLAKE2B e60074c49f357d4841708f58b5165a44201783238ff33ee81580bb83ba07d3d2dda447edd30a71ce8c9bafe5e5e0235b68e31a79081c3482bdd589231f0e898e SHA512 909e1fb22cda4ca769b51645b51a64df81b92210cfee388ac57834406bc13e404f0a1e6bad0888fafc73fc34b7fb224801fd02e87fb4c2f9145482ad74374e7b
DIST perl-5.34.0.tar.xz 12881416 BLAKE2B 4139e77fbb38b2b72671c0b130233cf5ed35112bbba3301b8ed724739c7ff96b041752aa505b938e257ef6ebf98a9b6dad1858e00f756c841a0520688d974e9a SHA512 691b4b31eacec357191fba777612b4e3eae59e946a22998a50766697c0d61db1d42a9b3bc1e41abf0d1ca1893e4a7c06d7bf3290480cf03d7f79befd7a8a3267
-DIST perl-cross-1.3.4.tar.gz 108461 BLAKE2B 28f207d235f51ebf681598cf85f7f16923574aafb593426a59d67578135ee3632efb12b9e1a672759195a79f80e49f5c929ec42b2b4571b1d36f5d8c8dceadc2 SHA512 7e1fc7b2b19d8c2e2fb8615e074e218b2e1a4d276b563ffabccfd0c7398bc8680fca96da89cc61d611993f38a2c67dfbb0201c58658e05437395ad8c00d31874
+DIST perl-5.34.1-zlib-1.2.12-encrypt-standard.zip.bin 207 BLAKE2B b52e1322930d5f7b8d6e3a319d24322b5dffb2313bdc757c0c8eb8713fd03adace199c8449ccc306e49b5b71e3c1b9786b2acb0ab8780a09d718a1c54f653226 SHA512 5a7e0950f0f94bd961fa9cf3e4ab5dd30006bee0f4553da755688a32d0411a4a850a28d4f998b36e7177dcf3aba192b899ca4138e84452baffef1a0b2ed1fb7b
+DIST perl-5.34.1-zlib-1.2.12.patch.xz 180480 BLAKE2B 39da5c1ef406d018f73e641d86ff81d5257cf1f7d6c1b0caac9651a546d70a2e0fff53bf0fc584907e792cb681a961c8442ab355f8f0c2cfffbb26c997cdbac0 SHA512 b32b57721b10943e21003429b42c535f7833e450f097855162241775a161a557fe0ea86ce615d6a9c885f165f45438cabba5580f9b299796d3a3da5ea720f1ff
+DIST perl-5.34.1.tar.xz 12760168 BLAKE2B 3768e55f66551c83295153e91d25d568b7b8638789141f7fcd5a304509cb391cb9ad0232ba6ac70113bb0881ddb00ca5b19c53aa01e1e206c44401dad60d8942 SHA512 9261958291b49eea30c120a89e5ee32dc6a5fd46de4869c89c3d6a4c1162d6cf192ebe429d01a293eda93d8680ce15294af27717fd4ec4c75f511c1fa820fdac
+DIST perl-5.36.0-patches-1.tar.xz 20352 BLAKE2B f5413c75c5bbced230ad7fa692998caef8e4041f3394ae5212dc2aaee465de619b56cf07551be1bb36f2e06b9ed7d0ddda31ad4a7ec81d5c0c64b698ddd80379 SHA512 ab24577b6d71a13d9ccf272efa0881b29933b6a39532ca0d71d4c9a134f451bbe5f3d87c6c851f26114702ac3f92af5c5a72129a458ebee31e372106955eb157
+DIST perl-5.36.0.tar.xz 13051500 BLAKE2B e4864a4c21e5242df4164c73db8af10f7b9c36b075e0c05777abec79716db7778ccbf2c0c9e7e749518ad310019d2a6b32bd8b5ab2af5a8b16b5d920f83d034f SHA512 6dd6ac2a77566c173c5ab9c238cf555f2c3e592e89abb5600bc23ce1cbd0c349e0233f6417cbbf1f6d0aefc6a734ba491285af0d3dc68a605b658b65c89f1dab
DIST perl-cross-1.3.6.tar.gz 110210 BLAKE2B 39074d6f4a526f59de2b1c40432936552e625a5a4e44fbb7ce3c1c3828b12c5298d1ab49b7d34ea92e2a4c8c88f8bbef8cc0c582a3fbbed975cf46d331e89c08 SHA512 d394fbd75d890442aa599eae8893a26540c8b7af966583ad1c3213c3fe0e074415cfed8814de8f397830833fd78267bdc55adc5267168198f269634c2ef3b982
+DIST perl-cross-1.3.7.tar.gz 118291 BLAKE2B dc9c060857d6905c817e91c3f5b1f546b76e02c6de02dc260185e0de8628a5ead3a557501da75549e2585cd30879190558740e697b1c78a69fa08ccb5649efcd SHA512 1111274f34f8b46e9f418883e9b1652ba4a5a9b4a5880a9a5b38bc8aeb5d75a9f4943233870f5ebf5fbcdc0c30b2983ace11ad051b55d3283327d8f2c15e172c
+DIST perl-cross-1.4.tar.gz 113861 BLAKE2B 7c7783afccc6a04ab122a7c60b1cff7f0a2725655b2b63325ca25d7b8acb0cf993b496e2a590db943054336337ad215550b6b2a565f1d91a5aa9cfe3a4c36db4 SHA512 bde73cac13c0b42c4c6783d7e30dea491d70b65131e1c8434ef75db1f39a8e15ef5857568b706e8456faa3822402676dd247a1f20f4bed983597fdd5a6b4faad
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/files/perl-5.26.2-hppa.patch b/sdk_container/src/third_party/portage-stable/dev-lang/perl/files/perl-5.26.2-hppa.patch
deleted file mode 100644
index 83ed944353..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-lang/perl/files/perl-5.26.2-hppa.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-https://bugs.gentoo.org/634162
-
-Source:
-https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869122
-
-Index: perl-5.26.0/op.c
-===================================================================
---- perl-5.26.0.orig/op.c
-+++ perl-5.26.0/op.c
-@@ -14832,6 +14832,7 @@ Perl_custom_op_get_field(pTHX_ const OP
- SV *keysv;
- HE *he = NULL;
- XOP *xop;
-+ XOPRETANY any;
-
- static const XOP xop_null = { 0, 0, 0, 0, 0 };
-
-@@ -14874,58 +14875,37 @@ Perl_custom_op_get_field(pTHX_ const OP
- else
- xop = INT2PTR(XOP *, SvIV(HeVAL(he)));
- }
-- {
-- XOPRETANY any;
-- if(field == XOPe_xop_ptr) {
-- any.xop_ptr = xop;
-- } else {
-- const U32 flags = XopFLAGS(xop);
-- if(flags & field) {
-- switch(field) {
-- case XOPe_xop_name:
-- any.xop_name = xop->xop_name;
-- break;
-- case XOPe_xop_desc:
-- any.xop_desc = xop->xop_desc;
-- break;
-- case XOPe_xop_class:
-- any.xop_class = xop->xop_class;
-- break;
-- case XOPe_xop_peep:
-- any.xop_peep = xop->xop_peep;
-- break;
-- default:
-- NOT_REACHED; /* NOTREACHED */
-- break;
-- }
-- } else {
-- switch(field) {
-- case XOPe_xop_name:
-- any.xop_name = XOPd_xop_name;
-- break;
-- case XOPe_xop_desc:
-- any.xop_desc = XOPd_xop_desc;
-- break;
-- case XOPe_xop_class:
-- any.xop_class = XOPd_xop_class;
-- break;
-- case XOPe_xop_peep:
-- any.xop_peep = XOPd_xop_peep;
-- break;
-- default:
-- NOT_REACHED; /* NOTREACHED */
-- break;
-- }
-- }
-+
-+ if(field == XOPe_xop_ptr) {
-+ any.xop_ptr = xop;
-+ } else {
-+ const U32 flags = XopFLAGS(xop);
-+ switch(field) {
-+ case XOPe_xop_name:
-+ any.xop_name = (flags & field) ? xop->xop_name : XOPd_xop_name;
-+ break;
-+ case XOPe_xop_desc:
-+ any.xop_desc = (flags & field) ? xop->xop_desc : XOPd_xop_desc;
-+ break;
-+ case XOPe_xop_class:
-+ any.xop_class = (flags & field) ? xop->xop_class : XOPd_xop_class;
-+ break;
-+ case XOPe_xop_peep:
-+ any.xop_peep = (flags & field) ? xop->xop_peep : XOPd_xop_peep;
-+ break;
-+ default:
-+ NOT_REACHED; /* NOTREACHED */
-+ break;
- }
-- /* On some platforms (HP-UX, IA64) gcc emits a warning for this function:
-- * op.c: In function 'Perl_custom_op_get_field':
-- * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
-- * This is because on those platforms (with -DEBUGGING) NOT_REACHED
-- * expands to assert(0), which expands to ((0) ? (void)0 :
-- * __assert(...)), and gcc doesn't know that __assert can never return. */
-- return any;
- }
-+
-+ /* On some platforms (HP-UX, IA64) gcc emits a warning for this function:
-+ * op.c: In function 'Perl_custom_op_get_field':
-+ * op.c:...: warning: 'any.xop_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
-+ * This is because on those platforms (with -DEBUGGING) NOT_REACHED
-+ * expands to assert(0), which expands to ((0) ? (void)0 :
-+ * __assert(...)), and gcc doesn't know that __assert can never return. */
-+ return any;
- }
-
- /*
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/files/perl-5.34.0-fallback-getcwd-pwd.patch b/sdk_container/src/third_party/portage-stable/dev-lang/perl/files/perl-5.34.0-fallback-getcwd-pwd.patch
new file mode 100644
index 0000000000..849a09a39a
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/files/perl-5.34.0-fallback-getcwd-pwd.patch
@@ -0,0 +1,263 @@
+https://github.com/Perl/perl5/pull/18791
+https://github.com/Perl/perl5/issues/18703
+https://bugs.gentoo.org/818172
+
+From: Tony Cook
+Date: Tue, 4 May 2021 14:55:50 +1000
+Subject: [PATCH 1/4] remove code that assuming finding pwd on the path is
+ reasonable
+
+We deliberately clear PATH when invoking pwd, so this search is
+useless.
+---
+ dist/PathTools/Cwd.pm | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
+index 6a1d2f17ee57..49c12885b32e 100644
+--- a/dist/PathTools/Cwd.pm
++++ b/dist/PathTools/Cwd.pm
+@@ -213,20 +213,6 @@ sub _backtick_pwd {
+ # we take care not to override an existing definition for cwd().
+
+ unless ($METHOD_MAP{$^O}{cwd} or defined &cwd) {
+- # The pwd command is not available in some chroot(2)'ed environments
+- my $sep = $Config::Config{path_sep} || ':';
+- my $os = $^O; # Protect $^O from tainting
+-
+-
+- # Try again to find a pwd, this time searching the whole PATH.
+- if (defined $ENV{PATH} and $os ne 'MSWin32') { # no pwd on Windows
+- my @candidates = split($sep, $ENV{PATH});
+- while (!$found_pwd_cmd and @candidates) {
+- my $candidate = shift @candidates;
+- $found_pwd_cmd = 1 if -x "$candidate/pwd";
+- }
+- }
+-
+ if( $found_pwd_cmd )
+ {
+ *cwd = \&_backtick_pwd;
+
+From e5378ea37c6c4910107975d8099c1d552af0c7b3 Mon Sep 17 00:00:00 2001
+From: Tony Cook
+Date: Wed, 5 May 2021 10:12:31 +1000
+Subject: [PATCH 2/4] don't fallback to simple pwd
+
+When _backtick_pwd invokes $pwd_cmd it first clears the PATH, and since
+the command has no shell metacharacters, it perl won't invoke the
+shell, so it will always fail.
+
+An alternative here might be to use "/bin/sh -c pwd" but there's no
+guarantee that pwd is available as a shell builtin.
+---
+ dist/PathTools/Cwd.pm | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
+index 49c12885b32e..fbe683e20b8a 100644
+--- a/dist/PathTools/Cwd.pm
++++ b/dist/PathTools/Cwd.pm
+@@ -181,12 +181,6 @@ if ($^O =~ /android/) {
+ }
+
+ my $found_pwd_cmd = defined($pwd_cmd);
+-unless ($pwd_cmd) {
+- # Isn't this wrong? _backtick_pwd() will fail if someone has
+- # pwd in their path but it is not /bin/pwd or /usr/bin/pwd?
+- # See [perl #16774]. --jhi
+- $pwd_cmd = 'pwd';
+-}
+
+ # Lazy-load Carp
+ sub _carp { require Carp; Carp::carp(@_) }
+
+From e14ffd3c21efe708a5fb5e25f29d61ccb6ee0a0a Mon Sep 17 00:00:00 2001
+From: Tony Cook
+Date: Tue, 4 May 2021 15:04:25 +1000
+Subject: [PATCH 3/4] avoid a prototype warning assigning \&getcwd to *cwd
+
+This would produce a warning if we fallback to using getcwd() where
+getcwd() has a prototype.
+---
+ dist/PathTools/Cwd.pm | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
+index fbe683e20b8a..b6dc0b798e8c 100644
+--- a/dist/PathTools/Cwd.pm
++++ b/dist/PathTools/Cwd.pm
+@@ -212,7 +212,8 @@ unless ($METHOD_MAP{$^O}{cwd} or defined &cwd) {
+ *cwd = \&_backtick_pwd;
+ }
+ else {
+- *cwd = \&getcwd;
++ # getcwd() might have an empty prototype
++ *cwd = sub { getcwd(); };
+ }
+ }
+
+
+From e725e6ced4d2bbb6a5866992509c2ac3e995c228 Mon Sep 17 00:00:00 2001
+From: Tony Cook
+Date: Wed, 12 May 2021 12:24:59 +1000
+Subject: [PATCH 4/4] bump PathTools to 3.81
+
+---
+ dist/PathTools/Cwd.pm | 2 +-
+ dist/PathTools/lib/File/Spec.pm | 2 +-
+ dist/PathTools/lib/File/Spec/AmigaOS.pm | 2 +-
+ dist/PathTools/lib/File/Spec/Cygwin.pm | 2 +-
+ dist/PathTools/lib/File/Spec/Epoc.pm | 2 +-
+ dist/PathTools/lib/File/Spec/Functions.pm | 2 +-
+ dist/PathTools/lib/File/Spec/Mac.pm | 2 +-
+ dist/PathTools/lib/File/Spec/OS2.pm | 2 +-
+ dist/PathTools/lib/File/Spec/Unix.pm | 2 +-
+ dist/PathTools/lib/File/Spec/VMS.pm | 2 +-
+ dist/PathTools/lib/File/Spec/Win32.pm | 2 +-
+ 11 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
+index b6dc0b798e8c..4a9c786c1c3c 100644
+--- a/dist/PathTools/Cwd.pm
++++ b/dist/PathTools/Cwd.pm
+@@ -3,7 +3,7 @@ use strict;
+ use Exporter;
+
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ my $xs_version = $VERSION;
+ $VERSION =~ tr/_//d;
+
+diff --git a/dist/PathTools/lib/File/Spec.pm b/dist/PathTools/lib/File/Spec.pm
+index 30d883b61b3e..fe738acf58bd 100644
+--- a/dist/PathTools/lib/File/Spec.pm
++++ b/dist/PathTools/lib/File/Spec.pm
+@@ -2,7 +2,7 @@ package File::Spec;
+
+ use strict;
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ my %module = (
+diff --git a/dist/PathTools/lib/File/Spec/AmigaOS.pm b/dist/PathTools/lib/File/Spec/AmigaOS.pm
+index fd9da81cdf5a..1398379ca57c 100644
+--- a/dist/PathTools/lib/File/Spec/AmigaOS.pm
++++ b/dist/PathTools/lib/File/Spec/AmigaOS.pm
+@@ -3,7 +3,7 @@ package File::Spec::AmigaOS;
+ use strict;
+ require File::Spec::Unix;
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ our @ISA = qw(File::Spec::Unix);
+diff --git a/dist/PathTools/lib/File/Spec/Cygwin.pm b/dist/PathTools/lib/File/Spec/Cygwin.pm
+index 953c23361a10..55d551ce0663 100644
+--- a/dist/PathTools/lib/File/Spec/Cygwin.pm
++++ b/dist/PathTools/lib/File/Spec/Cygwin.pm
+@@ -3,7 +3,7 @@ package File::Spec::Cygwin;
+ use strict;
+ require File::Spec::Unix;
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ our @ISA = qw(File::Spec::Unix);
+diff --git a/dist/PathTools/lib/File/Spec/Epoc.pm b/dist/PathTools/lib/File/Spec/Epoc.pm
+index fcb9e894e33c..4cde744231aa 100644
+--- a/dist/PathTools/lib/File/Spec/Epoc.pm
++++ b/dist/PathTools/lib/File/Spec/Epoc.pm
+@@ -2,7 +2,7 @@ package File::Spec::Epoc;
+
+ use strict;
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ require File::Spec::Unix;
+diff --git a/dist/PathTools/lib/File/Spec/Functions.pm b/dist/PathTools/lib/File/Spec/Functions.pm
+index e14ad2f74538..4b3d7bbde130 100644
+--- a/dist/PathTools/lib/File/Spec/Functions.pm
++++ b/dist/PathTools/lib/File/Spec/Functions.pm
+@@ -3,7 +3,7 @@ package File::Spec::Functions;
+ use File::Spec;
+ use strict;
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ require Exporter;
+diff --git a/dist/PathTools/lib/File/Spec/Mac.pm b/dist/PathTools/lib/File/Spec/Mac.pm
+index 8026edcb1261..51d00a01f6f7 100644
+--- a/dist/PathTools/lib/File/Spec/Mac.pm
++++ b/dist/PathTools/lib/File/Spec/Mac.pm
+@@ -4,7 +4,7 @@ use strict;
+ use Cwd ();
+ require File::Spec::Unix;
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ our @ISA = qw(File::Spec::Unix);
+diff --git a/dist/PathTools/lib/File/Spec/OS2.pm b/dist/PathTools/lib/File/Spec/OS2.pm
+index 3c35ba99b48a..57d67ba01e93 100644
+--- a/dist/PathTools/lib/File/Spec/OS2.pm
++++ b/dist/PathTools/lib/File/Spec/OS2.pm
+@@ -4,7 +4,7 @@ use strict;
+ use Cwd ();
+ require File::Spec::Unix;
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ our @ISA = qw(File::Spec::Unix);
+diff --git a/dist/PathTools/lib/File/Spec/Unix.pm b/dist/PathTools/lib/File/Spec/Unix.pm
+index c06d18f46819..df98f580c3ea 100644
+--- a/dist/PathTools/lib/File/Spec/Unix.pm
++++ b/dist/PathTools/lib/File/Spec/Unix.pm
+@@ -3,7 +3,7 @@ package File::Spec::Unix;
+ use strict;
+ use Cwd ();
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ =head1 NAME
+diff --git a/dist/PathTools/lib/File/Spec/VMS.pm b/dist/PathTools/lib/File/Spec/VMS.pm
+index 9b78c8b4bc6e..bbff3ad7d807 100644
+--- a/dist/PathTools/lib/File/Spec/VMS.pm
++++ b/dist/PathTools/lib/File/Spec/VMS.pm
+@@ -4,7 +4,7 @@ use strict;
+ use Cwd ();
+ require File::Spec::Unix;
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ our @ISA = qw(File::Spec::Unix);
+diff --git a/dist/PathTools/lib/File/Spec/Win32.pm b/dist/PathTools/lib/File/Spec/Win32.pm
+index 153744202338..b38419cdf1a6 100644
+--- a/dist/PathTools/lib/File/Spec/Win32.pm
++++ b/dist/PathTools/lib/File/Spec/Win32.pm
+@@ -5,7 +5,7 @@ use strict;
+ use Cwd ();
+ require File::Spec::Unix;
+
+-our $VERSION = '3.80';
++our $VERSION = '3.81';
+ $VERSION =~ tr/_//d;
+
+ our @ISA = qw(File::Spec::Unix);
+
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/files/perl-5.34.0-gdbm-1.20.patch b/sdk_container/src/third_party/portage-stable/dev-lang/perl/files/perl-5.34.0-gdbm-1.20.patch
new file mode 100644
index 0000000000..fc4c55c689
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/files/perl-5.34.0-gdbm-1.20.patch
@@ -0,0 +1,40 @@
+From: Sergey Poznyakoff
+Date: Wed, 23 Jun 2021 10:26:50 +0300
+Subject: Fix GDBM_File to compile with version 1.20 and earlier
+
+* ext/GDBM_File/GDBM_File.xs (ITEM_NOT_FOUND): Define conditionally,
+depending on the GDBM_VERSION_MAJOR and GDBM_VERSION_MINOR.
+Don't assume GDBM_ITEM_NOT_FOUND is a define (it isn't since
+gdbm commit d3e27957).
+
+Origin: backport, https://github.com/Perl/perl5/pull/18924/commits/aacd2398e766500cb5d83c4d76b642fcf31d997a
+Bug: https://github.com/Perl/perl5/issues/18915
+Bug-Debian: https://bugs.debian.org/993514
+---
+ ext/GDBM_File/GDBM_File.xs | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
+index cd0bb6f..494c288 100644
+--- a/ext/GDBM_File/GDBM_File.xs
++++ b/ext/GDBM_File/GDBM_File.xs
+@@ -145,14 +145,13 @@ output_datum(pTHX_ SV *arg, char *str, int size)
+ #define gdbm_setopt(db,optflag,optval,optlen) not_here("gdbm_setopt")
+ #endif
+
+-#ifndef GDBM_ITEM_NOT_FOUND
+-# define GDBM_ITEM_NOT_FOUND GDBM_NO_ERROR
+-#endif
+-
++#if GDBM_VERSION_MAJOR == 1 && GDBM_VERSION_MINOR < 13
+ /* Prior to 1.13, gdbm_fetch family functions set gdbm_errno to GDBM_NO_ERROR
+ if the requested key did not exist */
+-#define ITEM_NOT_FOUND() \
+- (gdbm_errno == GDBM_ITEM_NOT_FOUND || gdbm_errno == GDBM_NO_ERROR)
++# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_NO_ERROR)
++#else
++# define ITEM_NOT_FOUND() (gdbm_errno == GDBM_ITEM_NOT_FOUND)
++#endif
+
+ #define CHECKDB(db) do { \
+ if (!db->dbp) { \
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-lang/perl/metadata.xml
index 8575287281..d72260120d 100644
--- a/sdk_container/src/third_party/portage-stable/dev-lang/perl/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/metadata.xml
@@ -7,8 +7,10 @@
+ Perl/perl5
arsv/perl-cross
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r10.ebuild
similarity index 91%
rename from sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r2.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r10.ebuild
index 48656abf54..b94dfcf6d2 100644
--- a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r10.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,18 +14,16 @@ DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
-# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
+# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
-# Yes we can.
-PERL_SINGLE_SLOT=y
-
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
+
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
@@ -33,6 +31,7 @@ if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
else
SUBSLOT="${DIST_VERSION%.*}"
fi
+
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
@@ -53,10 +52,10 @@ LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
-IUSE="berkdb debug doc gdbm ithreads minimal"
+IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
RDEPEND="
berkdb? ( sys-libs/db:= )
@@ -71,6 +70,7 @@ BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
+ >=virtual/perl-CPAN-2.290.0
>=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
@@ -126,13 +126,16 @@ check_rebuild() {
return 0;
# Reinstall w/ USE Change
- elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ elif
+ ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
+ ( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
- ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
@@ -154,6 +157,9 @@ pkg_setup() {
if use debug ; then
myarch+="-debug"
fi
+ if use quadmath ; then
+ myarch+="-quadmath"
+ fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
@@ -165,24 +171,12 @@ pkg_setup() {
LIBPERL="libperl$(get_libname ${MY_PV} )"
- # This ENV var tells perl to build with a directory like "5.30"
- # regardless of its patch version. This is for experts only
- # at this point.
- if [[ -z "${PERL_SINGLE_SLOT}" ]]; then
- PRIV_LIB="${PRIV_BASE}/${MY_PV}"
- ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
- SITE_LIB="${SITE_BASE}/${MY_PV}"
- SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
- VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
- VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
- else
- PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
- ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- SITE_LIB="${SITE_BASE}/${SUBSLOT}"
- SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
- VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- fi
+ PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
+ ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${SUBSLOT}"
+ SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
+ VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
@@ -264,6 +258,7 @@ src_prepare_perlcross() {
MAKEOPTS+=" -j1"
export MAKEOPTS
}
+
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
@@ -292,9 +287,10 @@ add_patch() {
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
+
# Remove a patch using a glob expr
# eg:
-# rm_patch *-darin-Use-CC*
+# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
@@ -307,6 +303,7 @@ rm_patch() {
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
+
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
@@ -388,6 +385,7 @@ apply_patchdir() {
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
+
src_prepare() {
local patchdir="${WORKDIR}/patches"
@@ -398,6 +396,16 @@ src_prepare() {
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
+ add_patch "${FILESDIR}/${P}-gdbm-1.20.patch" "0101-Fix-build-with-gdb120.patch"\
+ "Fix GDBM_File to compile with version 1.20 and earlier"\
+ "https://bugs.gentoo.org/802945"
+
+ if use prefix ; then
+ add_patch "${FILESDIR}/${P}"-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
+ "Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
+ "https://bugs.gentoo.org/818172"
+ fi
+
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
@@ -428,6 +436,12 @@ src_prepare() {
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
+
+ # fix environ linkage absence (only a real issue on Darwin9)
+ if [[ ${CHOST##*-darwin} -le 9 ]] ; then
+ sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
+ Makefile.SH || die
+ fi
fi
default
@@ -444,16 +458,10 @@ myconf() {
# /usr/local/lib64/perl5/
# /usr/lib64/perl5/vendor_perl/
#
-# All values of NUMBER must be like "5.x.y", unless PERL_SUPPORT_SINGLE_SLOT
-# is enabled, where it will also allow numbers like "5.x"
+# All values of NUMBER must be like "5.x.y" or like "5.x"
#
-# PERL_SUPPORT_SINGLE_SLOT should only be used to transition *away* from PERL_SINGLE_SLOT
-# if you used that.
find_candidate_inc_versions() {
- local regex='.*/5[.][0-9]+[.][0-9]+$';
- if [[ ! -z "${PERL_SUPPORT_SINGLE_SLOT}" || ! -z "${PERL_SINGLE_SLOT}" ]]; then
- regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
- fi
+ local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
@@ -477,13 +485,11 @@ find_candidate_inc_versions() {
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
+
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
- local vexclude="${DIST_VERSION%-RC}"
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- vexclude="${SUBSLOT}"
- fi
+ local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
@@ -495,22 +501,18 @@ sanitize_inc_versions() {
}
versions_to_inclist() {
- local oldv="${PERL_BIN_OLDVERSEN}"
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
- fi
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
+
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
+
versions_to_gentoolibdirs() {
- local oldv="${PERL_BIN_OLDVERSEN}"
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
- fi
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
@@ -577,6 +579,8 @@ src_configure() {
use ithreads && myconf -Dusethreads
+ use quadmath && myconf -Dusequadmath
+
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
@@ -624,9 +628,11 @@ src_configure() {
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
- # using c89 mode as injected by cflags.SH
+ # using c89 mode as injected by cflags.SH, in addition, we override
+ # cflags, so we loose PERL_DARWIN which enables compat code that
+ # apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
- append-cflags -Dinline=__inline__
+ append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
@@ -676,6 +682,7 @@ src_configure() {
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
+ -Dccflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
@@ -708,7 +715,6 @@ src_configure() {
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
- "${myconf[@]}" \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
@@ -795,7 +801,7 @@ pkg_preinst() {
pkg_postinst() {
dual_scripts
- if [[ "${ROOT}" = "/" ]] ; then
+ if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r11.ebuild
similarity index 91%
rename from sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r1.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r11.ebuild
index 7a294fedba..23b0a697df 100644
--- a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r11.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,18 +14,16 @@ DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
-# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
+# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
-# Yes we can.
-PERL_SINGLE_SLOT=y
-
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
+
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
@@ -33,6 +31,7 @@ if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
else
SUBSLOT="${DIST_VERSION%.*}"
fi
+
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
@@ -56,7 +55,7 @@ if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
-IUSE="berkdb debug doc gdbm ithreads minimal"
+IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
RDEPEND="
berkdb? ( sys-libs/db:= )
@@ -71,6 +70,8 @@ BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
+ >=virtual/perl-CPAN-2.290.0
+ >=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
virtual/perl-Test-Harness
@@ -125,13 +126,16 @@ check_rebuild() {
return 0;
# Reinstall w/ USE Change
- elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ elif
+ ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
+ ( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
- ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
@@ -153,6 +157,9 @@ pkg_setup() {
if use debug ; then
myarch+="-debug"
fi
+ if use quadmath ; then
+ myarch+="-quadmath"
+ fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
@@ -164,24 +171,12 @@ pkg_setup() {
LIBPERL="libperl$(get_libname ${MY_PV} )"
- # This ENV var tells perl to build with a directory like "5.30"
- # regardless of its patch version. This is for experts only
- # at this point.
- if [[ -z "${PERL_SINGLE_SLOT}" ]]; then
- PRIV_LIB="${PRIV_BASE}/${MY_PV}"
- ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
- SITE_LIB="${SITE_BASE}/${MY_PV}"
- SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
- VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
- VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
- else
- PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
- ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- SITE_LIB="${SITE_BASE}/${SUBSLOT}"
- SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
- VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- fi
+ PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
+ ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${SUBSLOT}"
+ SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
+ VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
@@ -263,6 +258,7 @@ src_prepare_perlcross() {
MAKEOPTS+=" -j1"
export MAKEOPTS
}
+
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
@@ -291,9 +287,10 @@ add_patch() {
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
+
# Remove a patch using a glob expr
# eg:
-# rm_patch *-darin-Use-CC*
+# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
@@ -306,6 +303,7 @@ rm_patch() {
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
+
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
@@ -387,6 +385,7 @@ apply_patchdir() {
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
+
src_prepare() {
local patchdir="${WORKDIR}/patches"
@@ -397,6 +396,16 @@ src_prepare() {
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
+ add_patch "${FILESDIR}/${P}-gdbm-1.20.patch" "0101-Fix-build-with-gdb120.patch"\
+ "Fix GDBM_File to compile with version 1.20 and earlier"\
+ "https://bugs.gentoo.org/802945"
+
+ if use prefix ; then
+ add_patch "${FILESDIR}/${P}"-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
+ "Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
+ "https://bugs.gentoo.org/818172"
+ fi
+
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
@@ -427,6 +436,12 @@ src_prepare() {
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
+
+ # fix environ linkage absence (only a real issue on Darwin9)
+ if [[ ${CHOST##*-darwin} -le 9 ]] ; then
+ sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
+ Makefile.SH || die
+ fi
fi
default
@@ -443,16 +458,10 @@ myconf() {
# /usr/local/lib64/perl5/
# /usr/lib64/perl5/vendor_perl/
#
-# All values of NUMBER must be like "5.x.y", unless PERL_SUPPORT_SINGLE_SLOT
-# is enabled, where it will also allow numbers like "5.x"
+# All values of NUMBER must be like "5.x.y" or like "5.x"
#
-# PERL_SUPPORT_SINGLE_SLOT should only be used to transition *away* from PERL_SINGLE_SLOT
-# if you used that.
find_candidate_inc_versions() {
- local regex='.*/5[.][0-9]+[.][0-9]+$';
- if [[ ! -z "${PERL_SUPPORT_SINGLE_SLOT}" || ! -z "${PERL_SINGLE_SLOT}" ]]; then
- regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
- fi
+ local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
@@ -476,13 +485,11 @@ find_candidate_inc_versions() {
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
+
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
- local vexclude="${DIST_VERSION%-RC}"
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- vexclude="${SUBSLOT}"
- fi
+ local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
@@ -494,22 +501,18 @@ sanitize_inc_versions() {
}
versions_to_inclist() {
- local oldv="${PERL_BIN_OLDVERSEN}"
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
- fi
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
+
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
+
versions_to_gentoolibdirs() {
- local oldv="${PERL_BIN_OLDVERSEN}"
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
- fi
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
@@ -576,6 +579,8 @@ src_configure() {
use ithreads && myconf -Dusethreads
+ use quadmath && myconf -Dusequadmath
+
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
@@ -623,9 +628,11 @@ src_configure() {
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
- # using c89 mode as injected by cflags.SH
+ # using c89 mode as injected by cflags.SH, in addition, we override
+ # cflags, so we loose PERL_DARWIN which enables compat code that
+ # apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
- append-cflags -Dinline=__inline__
+ append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
@@ -675,6 +682,7 @@ src_configure() {
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
+ -Accflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
@@ -707,7 +715,6 @@ src_configure() {
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
- "${myconf[@]}" \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
@@ -794,7 +801,7 @@ pkg_preinst() {
pkg_postinst() {
dual_scripts
- if [[ "${ROOT}" = "/" ]] ; then
+ if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r9.ebuild
similarity index 92%
rename from sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r9.ebuild
index c13ea3d2ed..ba13129590 100644
--- a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.0-r9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,18 +14,16 @@ DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
-# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
+# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
-# Yes we can.
-PERL_SINGLE_SLOT=y
-
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
+
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
@@ -33,6 +31,7 @@ if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
else
SUBSLOT="${DIST_VERSION%.*}"
fi
+
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
@@ -53,7 +52,7 @@ LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
IUSE="berkdb debug doc gdbm ithreads minimal"
@@ -71,6 +70,8 @@ BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
+ >=virtual/perl-CPAN-2.290.0
+ >=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
virtual/perl-Test-Harness
@@ -164,24 +165,12 @@ pkg_setup() {
LIBPERL="libperl$(get_libname ${MY_PV} )"
- # This ENV var tells perl to build with a directory like "5.30"
- # regardless of its patch version. This is for experts only
- # at this point.
- if [[ -z "${PERL_SINGLE_SLOT}" ]]; then
- PRIV_LIB="${PRIV_BASE}/${MY_PV}"
- ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
- SITE_LIB="${SITE_BASE}/${MY_PV}"
- SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
- VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
- VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
- else
- PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
- ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- SITE_LIB="${SITE_BASE}/${SUBSLOT}"
- SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
- VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- fi
+ PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
+ ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${SUBSLOT}"
+ SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
+ VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
@@ -256,10 +245,14 @@ src_remove_dual() {
src_prepare_perlcross() {
cp -a ../perl-cross-${CROSS_VER}/* . || die
+ # bug 794463, needs further analysis what is exactly wrong here
+ eapply "${FILESDIR}/perl-5.34.0-crossfit.patch"
+
# bug 604072
MAKEOPTS+=" -j1"
export MAKEOPTS
}
+
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
@@ -288,9 +281,10 @@ add_patch() {
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
+
# Remove a patch using a glob expr
# eg:
-# rm_patch *-darin-Use-CC*
+# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
@@ -303,6 +297,7 @@ rm_patch() {
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
+
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
@@ -384,6 +379,7 @@ apply_patchdir() {
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
+
src_prepare() {
local patchdir="${WORKDIR}/patches"
@@ -394,6 +390,16 @@ src_prepare() {
# "Fix broken miniperl on hppa"\
# "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
+ add_patch "${FILESDIR}/${P}-gdbm-1.20.patch" "0101-Fix-build-with-gdb120.patch"\
+ "Fix GDBM_File to compile with version 1.20 and earlier"\
+ "https://bugs.gentoo.org/802945"
+
+ if use prefix ; then
+ add_patch "${FILESDIR}/${P}"-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
+ "Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
+ "https://bugs.gentoo.org/818172"
+ fi
+
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
@@ -424,6 +430,12 @@ src_prepare() {
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
+
+ # fix environ linkage absence (only a real issue on Darwin9)
+ if [[ ${CHOST##*-darwin} -le 9 ]] ; then
+ sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
+ Makefile.SH || die
+ fi
fi
default
@@ -440,16 +452,10 @@ myconf() {
# /usr/local/lib64/perl5/
# /usr/lib64/perl5/vendor_perl/
#
-# All values of NUMBER must be like "5.x.y", unless PERL_SUPPORT_SINGLE_SLOT
-# is enabled, where it will also allow numbers like "5.x"
+# All values of NUMBER must be like "5.x.y" or like "5.x"
#
-# PERL_SUPPORT_SINGLE_SLOT should only be used to transition *away* from PERL_SINGLE_SLOT
-# if you used that.
find_candidate_inc_versions() {
- local regex='.*/5[.][0-9]+[.][0-9]+$';
- if [[ ! -z "${PERL_SUPPORT_SINGLE_SLOT}" || ! -z "${PERL_SINGLE_SLOT}" ]]; then
- regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
- fi
+ local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
@@ -473,13 +479,11 @@ find_candidate_inc_versions() {
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
+
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
- local vexclude="${DIST_VERSION%-RC}"
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- vexclude="${SUBSLOT}"
- fi
+ local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
@@ -491,22 +495,18 @@ sanitize_inc_versions() {
}
versions_to_inclist() {
- local oldv="${PERL_BIN_OLDVERSEN}"
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
- fi
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
+
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
+
versions_to_gentoolibdirs() {
- local oldv="${PERL_BIN_OLDVERSEN}"
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
- fi
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
@@ -620,9 +620,11 @@ src_configure() {
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
- # using c89 mode as injected by cflags.SH
+ # using c89 mode as injected by cflags.SH, in addition, we override
+ # cflags, so we loose PERL_DARWIN which enables compat code that
+ # apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
- append-cflags -Dinline=__inline__
+ append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
@@ -672,6 +674,7 @@ src_configure() {
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
+ -Dccflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
@@ -704,7 +707,6 @@ src_configure() {
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
- "${myconf[@]}" \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
@@ -791,7 +793,7 @@ pkg_preinst() {
pkg_postinst() {
dual_scripts
- if [[ "${ROOT}" = "/" ]] ; then
+ if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.32.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.1-r2.ebuild
similarity index 86%
rename from sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.32.1.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.1-r2.ebuild
index 0f7097a137..2d2c3d383c 100644
--- a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.32.1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,26 +6,24 @@ EAPI=7
inherit alternatives flag-o-matic toolchain-funcs multilib multiprocessing
PATCH_VER=1
-CROSS_VER=1.3.4
-PATCH_BASE="perl-5.32.0-patches-${PATCH_VER}"
-PATCH_DEV=kentnl
+CROSS_VER=1.3.7
+PATCH_BASE="perl-5.34.0-patches-${PATCH_VER}"
+PATCH_DEV=dilfridge
DIST_AUTHOR=XSAWYERX
# Greatest first, don't include yourself
# Devel point-releases are not ABI-intercompatible, but stable point releases are
-# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
+# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
PERL_BIN_OLDVERSEN=""
-# Yes we can.
-PERL_SINGLE_SLOT=y
-
if [[ "${PV##*.}" == "9999" ]]; then
DIST_VERSION=5.30.0
else
DIST_VERSION="${PV/_rc/-RC}"
fi
SHORT_PV="${DIST_VERSION%.*}"
+
# Even numbered major versions are ABI intercompatible
# Odd numbered major versions are not
if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
@@ -33,6 +31,7 @@ if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
else
SUBSLOT="${DIST_VERSION%.*}"
fi
+
# Used only in tar paths
MY_P="perl-${DIST_VERSION}"
# Used in library paths
@@ -53,12 +52,10 @@ LICENSE="|| ( Artistic GPL-1+ )"
SLOT="0/${SUBSLOT}"
if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
-# SOMEWHAT EXPERIMENTAL CODE, DO NOT USE WITHOUT AN ADULT PRESENT, CHECK CHANGELOG
-# FOR DETAILS
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
-IUSE="berkdb debug doc gdbm ithreads minimal"
+IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
RDEPEND="
berkdb? ( sys-libs/db:= )
@@ -73,6 +70,8 @@ BDEPEND="${RDEPEND}"
PDEPEND="
!minimal? (
>=app-admin/perl-cleaner-2.5
+ >=virtual/perl-CPAN-2.290.0
+ >=virtual/perl-Encode-3.120.0
>=virtual/perl-File-Temp-0.230.400-r2
>=virtual/perl-Data-Dumper-2.154.0
virtual/perl-Test-Harness
@@ -84,19 +83,19 @@ PDEPEND="
S="${WORKDIR}/${MY_P}"
dual_scripts() {
- src_remove_dual perl-core/Archive-Tar 2.360.0 ptar ptardiff ptargrep
- src_remove_dual perl-core/CPAN 2.270.0 cpan
+ src_remove_dual perl-core/Archive-Tar 2.380.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.280.0 cpan
src_remove_dual perl-core/Digest-SHA 6.20.0 shasum
- src_remove_dual perl-core/Encode 3.60.0 enc2xs piconv
- src_remove_dual perl-core/ExtUtils-MakeMaker 7.440.0 instmodsh
- src_remove_dual perl-core/ExtUtils-ParseXS 3.400.0 xsubpp
- src_remove_dual perl-core/IO-Compress 2.93.0 zipdetails
- src_remove_dual perl-core/JSON-PP 4.40.0 json_pp
- src_remove_dual perl-core/Module-CoreList 5.202.101.23 corelist
- src_remove_dual perl-core/Pod-Checker 1.730.0 podchecker
+ src_remove_dual perl-core/Encode 3.80.100_rc enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.620.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.430.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.102.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 4.60.0 json_pp
+ src_remove_dual perl-core/Module-CoreList 5.202.203.130 corelist
+ src_remove_dual perl-core/Pod-Checker 1.740.0 podchecker
src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
- src_remove_dual perl-core/Pod-Usage 1.690.0 pod2usage
- src_remove_dual perl-core/Test-Harness 3.420.0 prove
+ src_remove_dual perl-core/Pod-Usage 2.10.0 pod2usage
+ src_remove_dual perl-core/Test-Harness 3.430.0 prove
src_remove_dual perl-core/podlators 4.140.0 pod2man pod2text
src_remove_dual_man perl-core/podlators 4.140.0 /usr/share/man/man1/perlpodstyle.1
}
@@ -127,13 +126,16 @@ check_rebuild() {
return 0;
# Reinstall w/ USE Change
- elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ elif
+ ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
+ ( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
( use debug && ! has_version dev-lang/perl[debug] ) || \
( ! use debug && has_version dev-lang/perl[debug] ) ; then
echo ""
ewarn "TOGGLED USE-FLAGS WARNING:"
- ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
ewarn "You must rebuild all perl-modules installed."
ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
fi
@@ -155,6 +157,9 @@ pkg_setup() {
if use debug ; then
myarch+="-debug"
fi
+ if use quadmath ; then
+ myarch+="-quadmath"
+ fi
if use ithreads ; then
mythreading="-multi"
myarch+="-thread"
@@ -166,24 +171,12 @@ pkg_setup() {
LIBPERL="libperl$(get_libname ${MY_PV} )"
- # This ENV var tells perl to build with a directory like "5.30"
- # regardless of its patch version. This is for experts only
- # at this point.
- if [[ -z "${PERL_SINGLE_SLOT}" ]]; then
- PRIV_LIB="${PRIV_BASE}/${MY_PV}"
- ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
- SITE_LIB="${SITE_BASE}/${MY_PV}"
- SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
- VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
- VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
- else
- PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
- ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- SITE_LIB="${SITE_BASE}/${SUBSLOT}"
- SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
- VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
- fi
+ PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
+ ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${SUBSLOT}"
+ SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
+ VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
dual_scripts
}
@@ -258,10 +251,14 @@ src_remove_dual() {
src_prepare_perlcross() {
cp -a ../perl-cross-${CROSS_VER}/* . || die
+ # bug 794463, needs further analysis what is exactly wrong here
+ eapply "${FILESDIR}/perl-5.34.0-crossfit.patch"
+
# bug 604072
MAKEOPTS+=" -j1"
export MAKEOPTS
}
+
src_prepare_dynamic() {
ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
ln -s ${LIBPERL} libperl$(get_libname ) || die
@@ -290,9 +287,10 @@ add_patch() {
printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
fi
}
+
# Remove a patch using a glob expr
# eg:
-# rm_patch *-darin-Use-CC*
+# rm_patch *-darwin-Use-CC*
#
rm_patch() {
local patchdir="${WORKDIR}/patches"
@@ -305,6 +303,7 @@ rm_patch() {
ewarn "No ${expr} found in ${patchdir} to remove"
fi
}
+
# Yes, this is a reasonable amount of code for something seemingly simple
# but this is far easier to debug when things go wrong, and things went wrong
# multiple times while I was getting the exact number of slashes right, which
@@ -386,17 +385,23 @@ apply_patchdir() {
printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
}
+
src_prepare() {
local patchdir="${WORKDIR}/patches"
# Prepare Patch dir with additional patches / remove unwanted patches
# Inject bug/desc entries for perl -V
- if use hppa ; then
- # bug 634162
- add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
- "Fix broken miniperl on hppa"\
- "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
+ # Old example:
+ # add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
+ # "Fix broken miniperl on hppa"\
+ # "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
+
+ if use prefix ; then
+ add_patch "${FILESDIR}/${PN}"-5.34.0-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
+ "Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
+ "https://bugs.gentoo.org/818172"
fi
+
if [[ ${CHOST} == *-solaris* ]] ; then
# do NOT mess with nsl, on Solaris this is always necessary,
# when -lsocket is used e.g. to get h_errno
@@ -427,6 +432,12 @@ src_prepare() {
if [[ ${CHOST} == *-darwin* ]] ; then
# fix install_name (soname) not to reference $D
sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
+
+ # fix environ linkage absence (only a real issue on Darwin9)
+ if [[ ${CHOST##*-darwin} -le 9 ]] ; then
+ sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
+ Makefile.SH || die
+ fi
fi
default
@@ -443,16 +454,10 @@ myconf() {
# /usr/local/lib64/perl5/
# /usr/lib64/perl5/vendor_perl/
#
-# All values of NUMBER must be like "5.x.y", unless PERL_SUPPORT_SINGLE_SLOT
-# is enabled, where it will also allow numbers like "5.x"
+# All values of NUMBER must be like "5.x.y" or like "5.x"
#
-# PERL_SUPPORT_SINGLE_SLOT should only be used to transition *away* from PERL_SINGLE_SLOT
-# if you used that.
find_candidate_inc_versions() {
- local regex='.*/5[.][0-9]+[.][0-9]+$';
- if [[ ! -z "${PERL_SUPPORT_SINGLE_SLOT}" || ! -z "${PERL_SINGLE_SLOT}" ]]; then
- regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
- fi
+ local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
local dirs=(
"${EROOT}${PRIV_BASE}"
"${EROOT}${SITE_BASE}"
@@ -476,13 +481,11 @@ find_candidate_inc_versions() {
einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
}
+
# Sort versions passed versiony-ly, remove self-version if present
# dedup. Takes each version as an argument
sanitize_inc_versions() {
- local vexclude="${DIST_VERSION%-RC}"
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- vexclude="${SUBSLOT}"
- fi
+ local vexclude="${SUBSLOT}"
einfo "Normalizing/Sorting candidate list: $*"
einfo " to remove '${vexclude}'"
# Note, general numeric sort has to be used
@@ -494,22 +497,18 @@ sanitize_inc_versions() {
}
versions_to_inclist() {
- local oldv="${PERL_BIN_OLDVERSEN}"
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
- fi
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
+
for v; do
has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
echo -n "${v}/ ";
done
}
+
versions_to_gentoolibdirs() {
- local oldv="${PERL_BIN_OLDVERSEN}"
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
local root
local v
- if [[ ! -z "${PERL_SINGLE_SLOT}" ]]; then
- oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
- fi
for v; do
for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
local fullpath="${EROOT}${root}/${v}"
@@ -576,6 +575,8 @@ src_configure() {
use ithreads && myconf -Dusethreads
+ use quadmath && myconf -Dusequadmath
+
if use debug ; then
append-cflags "-g"
myconf -DDEBUGGING
@@ -623,9 +624,11 @@ src_configure() {
myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
# Older macOS with non-Apple GCC chokes on inline in system headers
- # using c89 mode as injected by cflags.SH
+ # using c89 mode as injected by cflags.SH, in addition, we override
+ # cflags, so we loose PERL_DARWIN which enables compat code that
+ # apparently on more recent macOS releases is no longer necessary
[[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
- append-cflags -Dinline=__inline__
+ append-cflags -Dinline=__inline__ -DPERL_DARWIN
# flock on 32-bit sparc Solaris is broken, fall back to fcntl
[[ ${CHOST} == sparc-*-solaris* ]] && \
@@ -675,6 +678,7 @@ src_configure() {
-Dnm="$(tc-getNM)" \
-Dcpp="$(tc-getCPP)" \
-Dranlib="$(tc-getRANLIB)" \
+ -Accflags="${CFLAGS}" \
-Doptimize="${CFLAGS}" \
-Dldflags="${LDFLAGS}" \
-Dprefix="${EPREFIX}"'/usr' \
@@ -707,7 +711,6 @@ src_configure() {
-Dsh="${EPREFIX}"/bin/sh \
-Dtargetsh="${EPREFIX}"/bin/sh \
-Uusenm \
- "${myconf[@]}" \
"${EXTRA_ECONF[@]}"
if tc-is-cross-compiler; then
@@ -794,7 +797,7 @@ pkg_preinst() {
pkg_postinst() {
dual_scripts
- if [[ "${ROOT}" = "/" ]] ; then
+ if [[ -z "${ROOT}" ]] ; then
local INC DIR file
INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
einfo "Removing old .ph files"
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.1-r3.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.1-r3.ebuild
new file mode 100644
index 0000000000..c92f6b9c15
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.34.1-r3.ebuild
@@ -0,0 +1,836 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+CROSS_VER=1.3.7
+PATCH_BASE="perl-5.34.0-patches-${PATCH_VER}"
+PATCH_DEV=dilfridge
+
+DIST_AUTHOR=XSAWYERX
+
+# Greatest first, don't include yourself
+# Devel point-releases are not ABI-intercompatible, but stable point releases are
+# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
+PERL_BIN_OLDVERSEN=""
+
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.30.0
+else
+ DIST_VERSION="${PV/_rc/-RC}"
+fi
+SHORT_PV="${DIST_VERSION%.*}"
+
+# Even numbered major versions are ABI intercompatible
+# Odd numbered major versions are not
+if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
+ SUBSLOT="${DIST_VERSION%-RC*}"
+else
+ SUBSLOT="${DIST_VERSION%.*}"
+fi
+
+# Used only in tar paths
+MY_P="perl-${DIST_VERSION}"
+# Used in library paths
+MY_PV="${DIST_VERSION%-RC*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.xz
+ mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
+ https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.xz
+ https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
+"
+
+SRC_URI+="
+ https://dev.gentoo.org/~dilfridge/distfiles/perl-5.34.1-zlib-1.2.12.patch.xz
+ https://dev.gentoo.org/~dilfridge/distfiles/perl-5.34.1-zlib-1.2.12-encrypt-standard.zip.bin
+"
+
+HOMEPAGE="https://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SUBSLOT}"
+
+if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3:= )
+ app-arch/bzip2
+ sys-libs/zlib
+ virtual/libcrypt:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${RDEPEND}"
+
+PDEPEND="
+ !minimal? (
+ >=app-admin/perl-cleaner-2.5
+ >=virtual/perl-CPAN-2.290.0
+ >=virtual/perl-Encode-3.120.0
+ >=virtual/perl-File-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+ virtual/perl-Test-Harness
+ )
+"
+# bug 390719, bug 523624
+# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.380.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.280.0 cpan
+ src_remove_dual perl-core/Digest-SHA 6.20.0 shasum
+ src_remove_dual perl-core/Encode 3.80.100_rc enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.620.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.430.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.103.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 4.60.0 json_pp
+ src_remove_dual perl-core/Module-CoreList 5.202.203.130 corelist
+ src_remove_dual perl-core/Pod-Checker 1.740.0 podchecker
+ src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
+ src_remove_dual perl-core/Pod-Usage 2.10.0 pod2usage
+ src_remove_dual perl-core/Test-Harness 3.430.0 prove
+ src_remove_dual perl-core/podlators 4.140.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.140.0 /usr/share/man/man1/perlpodstyle.1
+}
+
+check_rebuild() {
+ # Fresh install
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ return 0;
+ # Major Upgrade
+ # doesn't matter if there's multiple copies, it still needs a rebuild
+ # if the string is anything other than "5.CURRENTMAJOR"
+ elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but subsequent steps are still recommended"
+ ewarn "to ensure system consistency."
+ ewarn
+ ewarn "You should start with a depclean to remove any unused perl dependencies"
+ ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
+ ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
+ ewarn "Recommended: emerge --depclean -va"
+ ewarn
+ ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
+ ewarn "remaining rebuilds portage may have missed."
+ ewarn "Use: perl-cleaner --all"
+ return 0;
+
+ # Reinstall w/ USE Change
+ elif
+ ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
+ ( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
+ ( use debug && ! has_version dev-lang/perl[debug] ) || \
+ ( ! use debug && has_version dev-lang/perl[debug] ) ; then
+ echo ""
+ ewarn "TOGGLED USE-FLAGS WARNING:"
+ ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
+ ewarn "You must rebuild all perl-modules installed."
+ ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+ fi
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ *-freebsd*) osname="freebsd" ;;
+ *-dragonfly*) osname="dragonfly" ;;
+ *-netbsd*) osname="netbsd" ;;
+ *-openbsd*) osname="openbsd" ;;
+ *-darwin*) osname="darwin" ;;
+ *-solaris*) osname="solaris" ;;
+ *-cygwin*) osname="cygwin" ;;
+ *) osname="linux" ;;
+ esac
+
+ myarch="${CHOST%%-*}-${osname}"
+ if use debug ; then
+ myarch+="-debug"
+ fi
+ if use quadmath ; then
+ myarch+="-quadmath"
+ fi
+ if use ithreads ; then
+ mythreading="-multi"
+ myarch+="-thread"
+ fi
+
+ PRIV_BASE="/usr/$(get_libdir)/perl5"
+ SITE_BASE="/usr/local/$(get_libdir)/perl5"
+ VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
+
+ LIBPERL="libperl$(get_libname ${MY_PV} )"
+
+ PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
+ ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${SUBSLOT}"
+ SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
+ VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+
+ dual_scripts
+}
+
+src_remove_dual_file() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ alternatives_auto_makesym "${i}" "${i}-[0-9]*"
+ done
+ ;;
+ setup)
+ for i in "$@" ; do
+ if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
+ has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+ break
+ fi
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i}{,-${ver}-${P}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual_man() {
+ local i pkg ver ff
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+ ff=${ff##*${i#${i%.[0-9]}}}
+ alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ for i in "$@" ; do
+ src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
+ src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
+ done
+}
+
+src_prepare_perlcross() {
+ cp -a ../perl-cross-${CROSS_VER}/* . || die
+
+ # bug 794463, needs further analysis what is exactly wrong here
+ eapply "${FILESDIR}/perl-5.34.0-crossfit.patch"
+
+ # bug 604072
+ MAKEOPTS+=" -j1"
+ export MAKEOPTS
+}
+
+src_prepare_dynamic() {
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+}
+
+# Copy a patch into the patch series
+# add_patch SRC_PATH DEST_NAME ['description'] ['bug'] ['bug']
+# - description is optional, but recommended
+# - all arguments after descriptions are bug URLs
+add_patch() {
+ local patchdir="${WORKDIR}/patches"
+ local infodir="${WORKDIR}/patch-info"
+ local src_name dest_name desc
+ src_name="$1"
+ dest_name="$2"
+ desc="$3"
+ shift; shift; shift;
+ einfo "Adding ${dest_name} to patch bundle"
+ cp "${src_name}" "${patchdir}/${dest_name}" || die "Couldn't copy ${src_name} to ${dest_name}"
+ if [[ -n "${desc}" ]]; then
+ printf "%s" "${desc}" > "${infodir}/${dest_name}.desc" || die "Couldn't write ${dest_name}.desc"
+ fi
+ if [[ $# -gt 0 ]]; then
+ # Note: when $@ is more than one element, this emits a
+ # line for each element
+ printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
+ fi
+}
+
+# Remove a patch using a glob expr
+# eg:
+# rm_patch *-darwin-Use-CC*
+#
+rm_patch() {
+ local patchdir="${WORKDIR}/patches"
+ local expr="$1"
+ local patch="$( cd "${patchdir}"; echo $expr )"
+ einfo "Removing $patch ($expr) from patch bundle"
+ if [[ -e "${patchdir}/${patch}" ]]; then
+ rm -f "${patchdir}/${patch}" || die "Can't remove ${patch} ( $expr )"
+ else
+ ewarn "No ${expr} found in ${patchdir} to remove"
+ fi
+}
+
+# Yes, this is a reasonable amount of code for something seemingly simple
+# but this is far easier to debug when things go wrong, and things went wrong
+# multiple times while I was getting the exact number of slashes right, which
+# requires circumnavigating both bash and sed escape mechanisms.
+c_escape_string() {
+ local slash dquote
+ slash='\'
+ dquote='"'
+ re_slash="${slash}${slash}"
+ re_dquote="${slash}${dquote}"
+
+ # Convert \ to \\,
+ # " to \"
+ echo "$1" |\
+ sed "s|${re_slash}|${re_slash}${re_slash}|g" |\
+ sed "s|${re_dquote}|${re_slash}${re_dquote}|g"
+}
+c_escape_file() {
+ c_escape_string "$(cat "$1")"
+}
+
+apply_patchdir() {
+ local patchdir="${WORKDIR}/patches"
+ local infodir="${WORKDIR}/patch-info"
+ local patchoutput="patchlevel-gentoo.h"
+
+ # Inject Patch-Level info into description for patchlevel.h patch
+ # to show in -V
+ local patch_expr="*List-packaged-patches*"
+ local patch="$( cd "${patchdir}"; echo $patch_expr )";
+ einfo "Injecting patch-level info into ${patch}.desc ( $patch_expr )"
+
+ if [[ -e "${patchdir}/${patch}" ]]; then
+ printf "List packaged patches for %s(%s) in patchlevel.h" "${PF}" "${PATCH_BASE}"\
+ >"${infodir}/${patch}.desc" || die "Can't rewrite ${patch}.desc"
+ else
+ eerror "No $patch_expr found in ${patchdir}"
+ fi
+
+ # Compute patch list to apply
+ # different name other than PATCHES to stop default
+ # reapplying it
+ # Single depth is currently only supported, as artifacts can reside
+ # from the old layout being multiple-directories, as well as it grossly
+ # simplifying the patchlevel_gentoo.h generation.
+ local PERL_PATCHES=($(
+ find "${patchdir}" -maxdepth 1 -mindepth 1 -type f -printf "%f\n" |\
+ grep -E '[.](diff|patch)$' |\
+ sort -n
+ ))
+
+ for patch in "${PERL_PATCHES[@]}"; do
+ eapply "${WORKDIR}"/patches/${patch}
+ done
+
+ einfo "Generating $patchoutput"
+
+ # This code creates a header file, each iteration
+ # creates one-or-more-lines for each entry found in PERL_PATCHES
+ # and STDOUT is redirected to the .h file
+ for patch in "${PERL_PATCHES[@]}"; do
+ local desc_f="${infodir}/${patch}.desc"
+ local bugs_f="${infodir}/${patch}.bugs"
+
+ printf ',"%s"\n' "${patch}"
+ if [[ ! -e "${desc_f}" ]]; then
+ ewarn "No description provided for ${patch} (expected: ${desc_f} )"
+ else
+ local desc="$(c_escape_file "${desc_f}")"
+ printf ',"- %s"\n' "${desc}"
+ fi
+ if [[ -e "${bugs_f}" ]]; then
+ while read -d $'\n' -r line; do
+ local esc_line="$(c_escape_string "${line}")"
+ printf ',"- Bug: %s"\n' "${esc_line}"
+ done <"${bugs_f}"
+ fi
+ done > "${S}/${patchoutput}"
+ printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
+
+}
+
+src_prepare() {
+ local patchdir="${WORKDIR}/patches"
+
+ # Prepare Patch dir with additional patches / remove unwanted patches
+ # Inject bug/desc entries for perl -V
+ # Old example:
+ # add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
+ # "Fix broken miniperl on hppa"\
+ # "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
+
+ add_patch "${WORKDIR}/perl-5.34.1-zlib-1.2.12.patch" "0501-5.34.1-zlib-1.2.12.patch"\
+ "Update IO-Compress, Compress-Raw-* to 2.103"\
+ "https://bugs.gentoo.org/837176"
+ # this is the binary chunk that gnu patch can't do
+ cp "${DISTDIR}/perl-5.34.1-zlib-1.2.12-encrypt-standard.zip.bin" "${S}/cpan/IO-Compress/t/files/encrypt-standard.zip" || die
+
+ if use prefix ; then
+ add_patch "${FILESDIR}/${PN}"-5.34.0-fallback-getcwd-pwd.patch "0102-5.34.0-fallback-get-cwd-pwd.patch"\
+ "Fix installation during Prefix bootstrap (finding 'pwd' from coreutils)"\
+ "https://bugs.gentoo.org/818172"
+ fi
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # do NOT mess with nsl, on Solaris this is always necessary,
+ # when -lsocket is used e.g. to get h_errno
+ rm_patch "*-nsl-and-cl*"
+ fi
+
+ apply_patchdir
+
+ tc-is-cross-compiler && src_prepare_perlcross
+
+ tc-is-static-only || src_prepare_dynamic
+
+ if use gdbm; then
+ sed -i "s:INC => .*:INC => \"-I${EROOT}/usr/include/gdbm\":g" \
+ ext/NDBM_File/Makefile.PL || die
+ fi
+
+ # Use errno.h from prefix rather than from host system, bug #645804
+ if use prefix && [[ -e "${EPREFIX}"/usr/include/errno.h ]] ; then
+ sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
+ fi
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # set a soname, fix linking against just built libperl
+ sed -i -e 's/netbsd\*/netbsd*|solaris*/' Makefile.SH || die
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fix install_name (soname) not to reference $D
+ sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
+
+ # fix environ linkage absence (only a real issue on Darwin9)
+ if [[ ${CHOST##*-darwin} -le 9 ]] ; then
+ sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
+ Makefile.SH || die
+ fi
+ fi
+
+ default
+}
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+# Outputs a list of versions which have been seen in any of the
+# primary perl @INC prefix paths, such as:
+# /usr/lib64/perl5/
+# /usr/local/lib64/perl5/
+# /usr/lib64/perl5/vendor_perl/
+#
+# All values of NUMBER must be like "5.x.y" or like "5.x"
+#
+find_candidate_inc_versions() {
+ local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
+ local dirs=(
+ "${EROOT}${PRIV_BASE}"
+ "${EROOT}${SITE_BASE}"
+ "${EROOT}${VENDOR_BASE}"
+ )
+ for dir in "${dirs[@]}"; do
+ if [[ ! -e "${dir}" ]]; then
+ continue
+ fi
+ # Without access to readdir() on these dirs, find will not be able
+ # to reveal any @INC directories inside them, and will subsequently prune
+ # them from the built perl's @INC support, breaking our compatiblity options
+ # entirely.
+ if [[ ! -r "${dir}" || ! -x "${dir}" ]]; then
+ eerror "Bad permissions on ${dir}, this will probably break things"
+ eerror "Ensure ${dir} is +rx for at least uid=$EUID"
+ eerror "Recommended permission is +rx for all"
+ eerror "> chmod o+rx ${dir}"
+ fi
+ done
+ einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
+ find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
+}
+
+# Sort versions passed versiony-ly, remove self-version if present
+# dedup. Takes each version as an argument
+sanitize_inc_versions() {
+ local vexclude="${SUBSLOT}"
+ einfo "Normalizing/Sorting candidate list: $*"
+ einfo " to remove '${vexclude}'"
+ # Note, general numeric sort has to be used
+ # for the last component, or unique will convert
+ # 5.30.0 + 5.30 into just 5.30
+ printf "%s\n" "$@" |\
+ grep -vxF "${vexclude}" |\
+ sort -u -nr -t'.' -k1,1rn -k2,2rn -k3,3rg
+}
+
+versions_to_inclist() {
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
+
+ for v; do
+ has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
+ echo -n "${v}/ ";
+ done
+}
+
+versions_to_gentoolibdirs() {
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
+ local root
+ local v
+ for v; do
+ for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
+ local fullpath="${EROOT}${root}/${v}"
+ if [[ -e "${fullpath}" ]]; then
+ has "${v}" ${oldv} && printf "%s:" "${fullpath}/${myarch}${mythreading}";
+ printf "%s:" "${fullpath}"
+ fi
+ done
+ done
+}
+
+src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # Perl has problems compiling with -Os in your flags with glibc
+ replace-flags "-Os" "-O2"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+
+ # Generic LTO broken since 5.28, triggers EUMM failures
+ filter-flags "-flto"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EROOT}/usr/include
+ export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EROOT}/usr/include
+ export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
+
+ # allow either gdbm to provide ndbm (in ) or db1
+ myndbm='U'
+ mygdbm='U'
+ mydb='U'
+ if use gdbm ; then
+ mygdbm='D'
+ if use berkdb ; then
+ myndbm='D'
+ fi
+ fi
+ if use berkdb ; then
+ mydb='D'
+ has_version '=sys-libs/db-1*' && myndbm='D'
+ fi
+
+ myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+ if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+ ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+ myconf -Ui_db -Ui_ndbm
+ fi
+
+ use ithreads && myconf -Dusethreads
+
+ use quadmath && myconf -Dusequadmath
+
+ if use debug ; then
+ append-cflags "-g"
+ myconf -DDEBUGGING
+ elif [[ ${CFLAGS} == *-g* ]] ; then
+ myconf -DDEBUGGING=-g
+ else
+ myconf -DDEBUGGING=none
+ fi
+
+ # modifying 'optimize' prevents cross configure script from appending required flags
+ if tc-is-cross-compiler; then
+ append-cflags "-fwrapv -fno-strict-aliasing"
+ fi
+
+ # Autodiscover all old version directories, some of them will even be newer
+ # if you downgrade
+ if [[ -z ${PERL_OLDVERSEN} ]]; then
+ PERL_OLDVERSEN="$( find_candidate_inc_versions )"
+ fi
+
+ # Fixup versions, removing self match, fixing order and dupes
+ PERL_OLDVERSEN="$( sanitize_inc_versions ${PERL_OLDVERSEN} )"
+
+ # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
+ if [[ -n "${PERL_OLDVERSEN// }" ]]; then
+ local inclist="$( versions_to_inclist ${PERL_OLDVERSEN} )"
+ einfo "This version of perl may partially support modules previously"
+ einfo "installed in any of the following paths:"
+ for incpath in ${inclist}; do
+ [[ -e "${EROOT}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT}${VENDOR_BASE}/${incpath}"
+ [[ -e "${EROOT}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROOT}${PRIV_BASE}/${incpath}"
+ [[ -e "${EROOT}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT}${SITE_BASE}/${incpath}"
+ done
+ einfo "This is a temporary measure and you should aim to cleanup these paths"
+ einfo "via world updates and perl-cleaner"
+ # myconf -Dinc_version_list="${inclist}"
+ myconf -Dgentoolibdirs="$( versions_to_gentoolibdirs ${PERL_OLDVERSEN} )"
+ fi
+
+ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+ # Make sure we can do the final link #523730, need to set deployment
+ # target to override hardcoded 10.3 which breaks on modern OSX
+ [[ ${CHOST} == *-darwin* ]] && \
+ myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
+
+ # Older macOS with non-Apple GCC chokes on inline in system headers
+ # using c89 mode as injected by cflags.SH, in addition, we override
+ # cflags, so we loose PERL_DARWIN which enables compat code that
+ # apparently on more recent macOS releases is no longer necessary
+ [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
+ append-cflags -Dinline=__inline__ -DPERL_DARWIN
+
+ # flock on 32-bit sparc Solaris is broken, fall back to fcntl
+ [[ ${CHOST} == sparc-*-solaris* ]] && \
+ myconf -Ud_flock
+
+ # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
+ # Prefix itself we don't do multilib either, so make sure perl can find
+ # something compatible.
+ if use prefix ; then
+ # Set a hook to check for each detected library whether it actually works.
+ export libscheck="
+ ( echo 'main(){}' > '${T}'/conftest.c &&
+ $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
+ ) || xxx=/dev/null"
+
+ # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
+ local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+ elif [[ $(get_libdir) != "lib" ]] ; then
+ # We need to use " and not ', as the written config.sh use ' ...
+ myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+ fi
+
+ # don't try building ODBM, bug #354453
+ disabled_extensions="ODBM_File"
+
+ if ! use gdbm ; then
+ # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
+ disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
+ fi
+
+ myconf -Dnoextensions="${disabled_extensions}"
+
+ [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
+
+ [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
+ # allow fiddling via EXTRA_ECONF, bug 558070
+ eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
+
+ # setting -Dld= to tc-getLD breaks perl and all perl things
+ # https://github.com/Perl/perl5/issues/17791#issuecomment-630145202
+ myconf \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Dar="$(tc-getAR)" \
+ -Dnm="$(tc-getNM)" \
+ -Dcpp="$(tc-getCPP)" \
+ -Dranlib="$(tc-getRANLIB)" \
+ -Accflags="${CFLAGS}" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dsiteprefix="${EPREFIX}"'/usr/local' \
+ -Dvendorprefix="${EPREFIX}"'/usr' \
+ -Dscriptdir="${EPREFIX}"'/usr/bin' \
+ -Dprivlib="${EPREFIX}${PRIV_LIB}" \
+ -Darchlib="${EPREFIX}${ARCH_LIB}" \
+ -Dsitelib="${EPREFIX}${SITE_LIB}" \
+ -Dsitearch="${EPREFIX}${SITE_ARCH}" \
+ -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+ -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+ -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
+ -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
+ -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dman1ext='1' \
+ -Dman3ext='3pm' \
+ -Dlibperl="${LIBPERL}" \
+ -Dlocincpth="${EPREFIX}"'/usr/include ' \
+ -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+ -Duselargefiles \
+ -Dd_semctl_semun \
+ -Dcf_by='Gentoo' \
+ -Dmyhostname='localhost' \
+ -Dperladmin='root@localhost' \
+ -Ud_csh \
+ -Dsh="${EPREFIX}"/bin/sh \
+ -Dtargetsh="${EPREFIX}"/bin/sh \
+ -Uusenm \
+ "${EXTRA_ECONF[@]}"
+
+ if tc-is-cross-compiler; then
+ ./configure \
+ --target="${CHOST}" \
+ --build="${CBUILD}" \
+ -Dinstallprefix='' \
+ -Dinstallusrbinperl='undef' \
+ -Dusevendorprefix='define' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ else
+ sh Configure \
+ -des \
+ -Dinstallprefix="${EPREFIX}"'/usr' \
+ -Dinstallusrbinperl='n' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ fi
+}
+
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
+ export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}"
+ if [[ ${EUID} == 0 ]] ; then
+ ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+ return 0
+ fi
+ TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
+}
+
+src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}/usr/bin/perl${MY_PV}"
+ ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
+
+ if ! tc-is-static-only ; then
+ dolib.so "${ED}"${coredir}/${LIBPERL}
+ rm -f "${ED}"${coredir}/${LIBPERL}
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+
+ ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+ ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+ fi
+
+ rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+ # This removes ${D} from Config.pm
+ for i in $(find "${D}" -iname "Config.pm" ) ; do
+ einfo "Removing ${D} from ${i}..."
+ sed -i -e "s:${D}::" "${i}" || die "Sed failed"
+ done
+
+ dodoc Changes* README AUTHORS
+
+ if use doc ; then
+ # HTML Documentation
+ # We expect errors, warnings, and such with the following.
+
+ dodir /usr/share/doc/${PF}/html
+ LD_LIBRARY_PATH=. ./perl installhtml \
+ --podroot='.' \
+ --podpath='lib:ext:pod:vms' \
+ --recurse \
+ --htmldir="${ED}/usr/share/doc/${PF}/html"
+ fi
+
+ [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
+
+ dual_scripts
+}
+
+pkg_preinst() {
+ check_rebuild
+}
+
+pkg_postinst() {
+ dual_scripts
+
+ if [[ -z "${ROOT}" ]] ; then
+ local INC DIR file
+ INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
+ einfo "Removing old .ph files"
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
+ rm -f "${file}"
+ einfo "<< ${file}"
+ done
+ fi
+ done
+ # Silently remove the now empty dirs
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
+ fi
+ done
+
+ fi
+}
+
+pkg_postrm() {
+ dual_scripts
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.36.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.36.0.ebuild
new file mode 100644
index 0000000000..bcc7e53105
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/perl/perl-5.36.0.ebuild
@@ -0,0 +1,819 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+CROSS_VER=1.4
+PATCH_BASE="perl-5.36.0-patches-${PATCH_VER}"
+PATCH_DEV=dilfridge
+
+DIST_AUTHOR=RJBS
+
+# Greatest first, don't include yourself
+# Devel point-releases are not ABI-intercompatible, but stable point releases are
+# BIN_OLDVERSEN contains only C-ABI-intercompatible versions
+PERL_BIN_OLDVERSEN=""
+
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.30.0
+else
+ DIST_VERSION="${PV/_rc/-RC}"
+fi
+SHORT_PV="${DIST_VERSION%.*}"
+
+# Even numbered major versions are ABI intercompatible
+# Odd numbered major versions are not
+if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
+ SUBSLOT="${DIST_VERSION%-RC*}"
+else
+ SUBSLOT="${DIST_VERSION%.*}"
+fi
+
+# Used only in tar paths
+MY_P="perl-${DIST_VERSION}"
+# Used in library paths
+MY_PV="${DIST_VERSION%-RC*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.xz
+ mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
+ https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PATCH_BASE}.tar.xz
+ https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
+"
+
+HOMEPAGE="https://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SUBSLOT}"
+
+if [[ "${PV##*.}" != "9999" ]] && [[ "${PV/rc//}" == "${PV}" ]] ; then
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="berkdb debug doc gdbm ithreads minimal quadmath"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3:= )
+ app-arch/bzip2
+ >=sys-libs/zlib-1.2.12
+ virtual/libcrypt:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="${RDEPEND}"
+
+PDEPEND="
+ !minimal? (
+ >=app-admin/perl-cleaner-2.5
+ >=virtual/perl-CPAN-2.290.0
+ >=virtual/perl-Encode-3.120.0
+ >=virtual/perl-File-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+ virtual/perl-Test-Harness
+ )
+"
+# bug 390719, bug 523624
+# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.400.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.330.0 cpan
+ src_remove_dual perl-core/Digest-SHA 6.20.0 shasum
+ src_remove_dual perl-core/Encode 3.170.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.640.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.450.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.106.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 4.70.0 json_pp
+ src_remove_dual perl-core/Module-CoreList 5.202.205.200 corelist
+ src_remove_dual perl-core/Pod-Checker 1.740.0 podchecker
+ src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
+ src_remove_dual perl-core/Pod-Usage 2.10.0 pod2usage
+ src_remove_dual perl-core/Test-Harness 3.440.0 prove
+ src_remove_dual perl-core/podlators 4.140.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.140.0 /usr/share/man/man1/perlpodstyle.1
+}
+
+check_rebuild() {
+ # Fresh install
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ return 0;
+ # Major Upgrade
+ # doesn't matter if there's multiple copies, it still needs a rebuild
+ # if the string is anything other than "5.CURRENTMAJOR"
+ elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but subsequent steps are still recommended"
+ ewarn "to ensure system consistency."
+ ewarn
+ ewarn "You should start with a depclean to remove any unused perl dependencies"
+ ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
+ ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
+ ewarn "Recommended: emerge --depclean -va"
+ ewarn
+ ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
+ ewarn "remaining rebuilds portage may have missed."
+ ewarn "Use: perl-cleaner --all"
+ return 0;
+
+ # Reinstall w/ USE Change
+ elif
+ ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use quadmath && ! has_version dev-lang/perl[quadmath] ) || \
+ ( ! use quadmath && has_version dev-lang/perl[quadmath] ) || \
+ ( use debug && ! has_version dev-lang/perl[debug] ) || \
+ ( ! use debug && has_version dev-lang/perl[debug] ) ; then
+ echo ""
+ ewarn "TOGGLED USE-FLAGS WARNING:"
+ ewarn "You changed one of the use-flags ithreads, quadmath, or debug."
+ ewarn "You must rebuild all perl-modules installed."
+ ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+ fi
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ *-freebsd*) osname="freebsd" ;;
+ *-dragonfly*) osname="dragonfly" ;;
+ *-netbsd*) osname="netbsd" ;;
+ *-openbsd*) osname="openbsd" ;;
+ *-darwin*) osname="darwin" ;;
+ *-solaris*) osname="solaris" ;;
+ *-cygwin*) osname="cygwin" ;;
+ *) osname="linux" ;;
+ esac
+
+ myarch="${CHOST%%-*}-${osname}"
+ if use debug ; then
+ myarch+="-debug"
+ fi
+ if use quadmath ; then
+ myarch+="-quadmath"
+ fi
+ if use ithreads ; then
+ mythreading="-multi"
+ myarch+="-thread"
+ fi
+
+ PRIV_BASE="/usr/$(get_libdir)/perl5"
+ SITE_BASE="/usr/local/$(get_libdir)/perl5"
+ VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
+
+ LIBPERL="libperl$(get_libname ${MY_PV} )"
+
+ PRIV_LIB="${PRIV_BASE}/${SUBSLOT}"
+ ARCH_LIB="${PRIV_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${SUBSLOT}"
+ SITE_ARCH="${SITE_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${SUBSLOT}"
+ VENDOR_ARCH="${VENDOR_BASE}/${SUBSLOT}/${myarch}${mythreading}"
+
+ dual_scripts
+}
+
+src_remove_dual_file() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ alternatives_auto_makesym "${i}" "${i}-[0-9]*"
+ done
+ ;;
+ setup)
+ for i in "$@" ; do
+ if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
+ has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+ break
+ fi
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i}{,-${ver}-${P}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual_man() {
+ local i pkg ver ff
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+ ff=${ff##*${i#${i%.[0-9]}}}
+ alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ for i in "$@" ; do
+ src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
+ src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
+ done
+}
+
+src_prepare_perlcross() {
+ cp -a ../perl-cross-${CROSS_VER}/* . || die
+
+ # bug 794463, needs further analysis what is exactly wrong here
+ eapply "${FILESDIR}/perl-5.34.0-crossfit.patch"
+
+ # bug 604072
+ MAKEOPTS+=" -j1"
+ export MAKEOPTS
+}
+
+src_prepare_dynamic() {
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+}
+
+# Copy a patch into the patch series
+# add_patch SRC_PATH DEST_NAME ['description'] ['bug'] ['bug']
+# - description is optional, but recommended
+# - all arguments after descriptions are bug URLs
+add_patch() {
+ local patchdir="${WORKDIR}/patches"
+ local infodir="${WORKDIR}/patch-info"
+ local src_name dest_name desc
+ src_name="$1"
+ dest_name="$2"
+ desc="$3"
+ shift; shift; shift;
+ einfo "Adding ${dest_name} to patch bundle"
+ cp "${src_name}" "${patchdir}/${dest_name}" || die "Couldn't copy ${src_name} to ${dest_name}"
+ if [[ -n "${desc}" ]]; then
+ printf "%s" "${desc}" > "${infodir}/${dest_name}.desc" || die "Couldn't write ${dest_name}.desc"
+ fi
+ if [[ $# -gt 0 ]]; then
+ # Note: when $@ is more than one element, this emits a
+ # line for each element
+ printf "%s\n" "$@" > "${infodir}/${dest_name}.bugs" || die "Couldn't write ${dest_name}.bugs"
+ fi
+}
+
+# Remove a patch using a glob expr
+# eg:
+# rm_patch *-darwin-Use-CC*
+#
+rm_patch() {
+ local patchdir="${WORKDIR}/patches"
+ local expr="$1"
+ local patch="$( cd "${patchdir}"; echo $expr )"
+ einfo "Removing $patch ($expr) from patch bundle"
+ if [[ -e "${patchdir}/${patch}" ]]; then
+ rm -f "${patchdir}/${patch}" || die "Can't remove ${patch} ( $expr )"
+ else
+ ewarn "No ${expr} found in ${patchdir} to remove"
+ fi
+}
+
+# Yes, this is a reasonable amount of code for something seemingly simple
+# but this is far easier to debug when things go wrong, and things went wrong
+# multiple times while I was getting the exact number of slashes right, which
+# requires circumnavigating both bash and sed escape mechanisms.
+c_escape_string() {
+ local slash dquote
+ slash='\'
+ dquote='"'
+ re_slash="${slash}${slash}"
+ re_dquote="${slash}${dquote}"
+
+ # Convert \ to \\,
+ # " to \"
+ echo "$1" |\
+ sed "s|${re_slash}|${re_slash}${re_slash}|g" |\
+ sed "s|${re_dquote}|${re_slash}${re_dquote}|g"
+}
+c_escape_file() {
+ c_escape_string "$(cat "$1")"
+}
+
+apply_patchdir() {
+ local patchdir="${WORKDIR}/patches"
+ local infodir="${WORKDIR}/patch-info"
+ local patchoutput="patchlevel-gentoo.h"
+
+ # Inject Patch-Level info into description for patchlevel.h patch
+ # to show in -V
+ local patch_expr="*List-packaged-patches*"
+ local patch="$( cd "${patchdir}"; echo $patch_expr )";
+ einfo "Injecting patch-level info into ${patch}.desc ( $patch_expr )"
+
+ if [[ -e "${patchdir}/${patch}" ]]; then
+ printf "List packaged patches for %s(%s) in patchlevel.h" "${PF}" "${PATCH_BASE}"\
+ >"${infodir}/${patch}.desc" || die "Can't rewrite ${patch}.desc"
+ else
+ eerror "No $patch_expr found in ${patchdir}"
+ fi
+
+ # Compute patch list to apply
+ # different name other than PATCHES to stop default
+ # reapplying it
+ # Single depth is currently only supported, as artifacts can reside
+ # from the old layout being multiple-directories, as well as it grossly
+ # simplifying the patchlevel_gentoo.h generation.
+ local PERL_PATCHES=($(
+ find "${patchdir}" -maxdepth 1 -mindepth 1 -type f -printf "%f\n" |\
+ grep -E '[.](diff|patch)$' |\
+ sort -n
+ ))
+
+ for patch in "${PERL_PATCHES[@]}"; do
+ eapply "${WORKDIR}"/patches/${patch}
+ done
+
+ einfo "Generating $patchoutput"
+
+ # This code creates a header file, each iteration
+ # creates one-or-more-lines for each entry found in PERL_PATCHES
+ # and STDOUT is redirected to the .h file
+ for patch in "${PERL_PATCHES[@]}"; do
+ local desc_f="${infodir}/${patch}.desc"
+ local bugs_f="${infodir}/${patch}.bugs"
+
+ printf ',"%s"\n' "${patch}"
+ if [[ ! -e "${desc_f}" ]]; then
+ ewarn "No description provided for ${patch} (expected: ${desc_f} )"
+ else
+ local desc="$(c_escape_file "${desc_f}")"
+ printf ',"- %s"\n' "${desc}"
+ fi
+ if [[ -e "${bugs_f}" ]]; then
+ while read -d $'\n' -r line; do
+ local esc_line="$(c_escape_string "${line}")"
+ printf ',"- Bug: %s"\n' "${esc_line}"
+ done <"${bugs_f}"
+ fi
+ done > "${S}/${patchoutput}"
+ printf "%s\n" "${patchoutput}" >> "${S}/MANIFEST"
+
+}
+
+src_prepare() {
+ local patchdir="${WORKDIR}/patches"
+
+ # Prepare Patch dir with additional patches / remove unwanted patches
+ # Inject bug/desc entries for perl -V
+ # Old example:
+ # add_patch "${FILESDIR}/${PN}-5.26.2-hppa.patch" "100-5.26.2-hppa.patch"\
+ # "Fix broken miniperl on hppa"\
+ # "https://bugs.debian.org/869122" "https://bugs.gentoo.org/634162"
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # do NOT mess with nsl, on Solaris this is always necessary,
+ # when -lsocket is used e.g. to get h_errno
+ rm_patch "*-nsl-and-cl*"
+ fi
+
+ apply_patchdir
+
+ tc-is-cross-compiler && src_prepare_perlcross
+
+ tc-is-static-only || src_prepare_dynamic
+
+ if use gdbm; then
+ sed -i "s:INC => .*:INC => \"-I${EROOT}/usr/include/gdbm\":g" \
+ ext/NDBM_File/Makefile.PL || die
+ fi
+
+ # Use errno.h from prefix rather than from host system, bug #645804
+ if use prefix && [[ -e "${EPREFIX}"/usr/include/errno.h ]] ; then
+ sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
+ fi
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # set a soname, fix linking against just built libperl
+ sed -i -e 's/netbsd\*/netbsd*|solaris*/' Makefile.SH || die
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fix install_name (soname) not to reference $D
+ sed -i -e '/install_name `pwd/s/`pwd`/\\$(shrpdir)/' Makefile.SH || die
+
+ # fix environ linkage absence (only a real issue on Darwin9)
+ if [[ ${CHOST##*-darwin} -le 9 ]] ; then
+ sed -i -e '/^PLDLFLAGS =/s/=/= -include crt_externs.h -Denviron="(*_NSGetEnviron())"/' \
+ Makefile.SH || die
+ fi
+ fi
+
+ default
+}
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+# Outputs a list of versions which have been seen in any of the
+# primary perl @INC prefix paths, such as:
+# /usr/lib64/perl5/
+# /usr/local/lib64/perl5/
+# /usr/lib64/perl5/vendor_perl/
+#
+# All values of NUMBER must be like "5.x.y" or like "5.x"
+#
+find_candidate_inc_versions() {
+ local regex='.*/5[.][0-9]+\([.][0-9]+\|\)$'
+ local dirs=(
+ "${EROOT}${PRIV_BASE}"
+ "${EROOT}${SITE_BASE}"
+ "${EROOT}${VENDOR_BASE}"
+ )
+ for dir in "${dirs[@]}"; do
+ if [[ ! -e "${dir}" ]]; then
+ continue
+ fi
+ # Without access to readdir() on these dirs, find will not be able
+ # to reveal any @INC directories inside them, and will subsequently prune
+ # them from the built perl's @INC support, breaking our compatiblity options
+ # entirely.
+ if [[ ! -r "${dir}" || ! -x "${dir}" ]]; then
+ eerror "Bad permissions on ${dir}, this will probably break things"
+ eerror "Ensure ${dir} is +rx for at least uid=$EUID"
+ eerror "Recommended permission is +rx for all"
+ eerror "> chmod o+rx ${dir}"
+ fi
+ done
+ einfo "Scanning for old @INC dirs matching '$regex' in: ${dirs[*]}"
+ find "${dirs[@]}" -maxdepth 1 -mindepth 1 -type d -regex "${regex}" -printf "%f " 2>/dev/null
+}
+
+# Sort versions passed versiony-ly, remove self-version if present
+# dedup. Takes each version as an argument
+sanitize_inc_versions() {
+ local vexclude="${SUBSLOT}"
+ einfo "Normalizing/Sorting candidate list: $*"
+ einfo " to remove '${vexclude}'"
+ # Note, general numeric sort has to be used
+ # for the last component, or unique will convert
+ # 5.30.0 + 5.30 into just 5.30
+ printf "%s\n" "$@" |\
+ grep -vxF "${vexclude}" |\
+ sort -u -nr -t'.' -k1,1rn -k2,2rn -k3,3rg
+}
+
+versions_to_inclist() {
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
+
+ for v; do
+ has "${v}" ${oldv} && echo -n "${v}/${myarch}${mythreading}/ ";
+ echo -n "${v}/ ";
+ done
+}
+
+versions_to_gentoolibdirs() {
+ local oldv="${DIST_VERSION%-RC} ${PERL_BIN_OLDVERSEN}"
+ local root
+ local v
+ for v; do
+ for root in "${PRIV_BASE}" "${VENDOR_BASE}" "${SITE_BASE}"; do
+ local fullpath="${EROOT}${root}/${v}"
+ if [[ -e "${fullpath}" ]]; then
+ has "${v}" ${oldv} && printf "%s:" "${fullpath}/${myarch}${mythreading}";
+ printf "%s:" "${fullpath}"
+ fi
+ done
+ done
+}
+
+src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # Perl has problems compiling with -Os in your flags with glibc
+ replace-flags "-Os" "-O2"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+
+ # Generic LTO broken since 5.28, triggers EUMM failures
+ filter-flags "-flto"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EROOT}/usr/include
+ export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EROOT}/usr/include
+ export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
+
+ # allow either gdbm to provide ndbm (in ) or db1
+ myndbm='U'
+ mygdbm='U'
+ mydb='U'
+ if use gdbm ; then
+ mygdbm='D'
+ if use berkdb ; then
+ myndbm='D'
+ fi
+ fi
+ if use berkdb ; then
+ mydb='D'
+ has_version '=sys-libs/db-1*' && myndbm='D'
+ fi
+
+ myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+ if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+ ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+ myconf -Ui_db -Ui_ndbm
+ fi
+
+ use ithreads && myconf -Dusethreads
+
+ use quadmath && myconf -Dusequadmath
+
+ if use debug ; then
+ append-cflags "-g"
+ myconf -DDEBUGGING
+ elif [[ ${CFLAGS} == *-g* ]] ; then
+ myconf -DDEBUGGING=-g
+ else
+ myconf -DDEBUGGING=none
+ fi
+
+ # modifying 'optimize' prevents cross configure script from appending required flags
+ if tc-is-cross-compiler; then
+ append-cflags "-fwrapv -fno-strict-aliasing"
+ fi
+
+ # Autodiscover all old version directories, some of them will even be newer
+ # if you downgrade
+ if [[ -z ${PERL_OLDVERSEN} ]]; then
+ PERL_OLDVERSEN="$( find_candidate_inc_versions )"
+ fi
+
+ # Fixup versions, removing self match, fixing order and dupes
+ PERL_OLDVERSEN="$( sanitize_inc_versions ${PERL_OLDVERSEN} )"
+
+ # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
+ if [[ -n "${PERL_OLDVERSEN// }" ]]; then
+ local inclist="$( versions_to_inclist ${PERL_OLDVERSEN} )"
+ einfo "This version of perl may partially support modules previously"
+ einfo "installed in any of the following paths:"
+ for incpath in ${inclist}; do
+ [[ -e "${EROOT}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT}${VENDOR_BASE}/${incpath}"
+ [[ -e "${EROOT}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROOT}${PRIV_BASE}/${incpath}"
+ [[ -e "${EROOT}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT}${SITE_BASE}/${incpath}"
+ done
+ einfo "This is a temporary measure and you should aim to cleanup these paths"
+ einfo "via world updates and perl-cleaner"
+ # myconf -Dinc_version_list="${inclist}"
+ myconf -Dgentoolibdirs="$( versions_to_gentoolibdirs ${PERL_OLDVERSEN} )"
+ fi
+
+ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+ # Make sure we can do the final link #523730, need to set deployment
+ # target to override hardcoded 10.3 which breaks on modern OSX
+ [[ ${CHOST} == *-darwin* ]] && \
+ myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
+
+ # Older macOS with non-Apple GCC chokes on inline in system headers
+ # using c89 mode as injected by cflags.SH, in addition, we override
+ # cflags, so we loose PERL_DARWIN which enables compat code that
+ # apparently on more recent macOS releases is no longer necessary
+ [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] && tc-is-gcc && \
+ append-cflags -Dinline=__inline__ -DPERL_DARWIN
+
+ # flock on 32-bit sparc Solaris is broken, fall back to fcntl
+ [[ ${CHOST} == sparc-*-solaris* ]] && \
+ myconf -Ud_flock
+
+ # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
+ # Prefix itself we don't do multilib either, so make sure perl can find
+ # something compatible.
+ if use prefix ; then
+ # Set a hook to check for each detected library whether it actually works.
+ export libscheck="
+ ( echo 'main(){}' > '${T}'/conftest.c &&
+ $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
+ ) || xxx=/dev/null"
+
+ # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
+ local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+ elif [[ $(get_libdir) != "lib" ]] ; then
+ # We need to use " and not ', as the written config.sh use ' ...
+ myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+ fi
+
+ # don't try building ODBM, bug #354453
+ disabled_extensions="ODBM_File"
+
+ if ! use gdbm ; then
+ # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
+ disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
+ fi
+
+ myconf -Dnoextensions="${disabled_extensions}"
+
+ [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
+
+ [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
+ # allow fiddling via EXTRA_ECONF, bug 558070
+ eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
+
+ # setting -Dld= to tc-getLD breaks perl and all perl things
+ # https://github.com/Perl/perl5/issues/17791#issuecomment-630145202
+ myconf \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Dar="$(tc-getAR)" \
+ -Dnm="$(tc-getNM)" \
+ -Dcpp="$(tc-getCPP)" \
+ -Dranlib="$(tc-getRANLIB)" \
+ -Accflags="${CFLAGS}" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dsiteprefix="${EPREFIX}"'/usr/local' \
+ -Dvendorprefix="${EPREFIX}"'/usr' \
+ -Dscriptdir="${EPREFIX}"'/usr/bin' \
+ -Dprivlib="${EPREFIX}${PRIV_LIB}" \
+ -Darchlib="${EPREFIX}${ARCH_LIB}" \
+ -Dsitelib="${EPREFIX}${SITE_LIB}" \
+ -Dsitearch="${EPREFIX}${SITE_ARCH}" \
+ -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+ -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+ -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
+ -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
+ -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dman1ext='1' \
+ -Dman3ext='3pm' \
+ -Dlibperl="${LIBPERL}" \
+ -Dlocincpth="${EPREFIX}"'/usr/include ' \
+ -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+ -Duselargefiles \
+ -Dd_semctl_semun \
+ -Dcf_by='Gentoo' \
+ -Dmyhostname='localhost' \
+ -Dperladmin='root@localhost' \
+ -Ud_csh \
+ -Dsh="${EPREFIX}"/bin/sh \
+ -Dtargetsh="${EPREFIX}"/bin/sh \
+ -Uusenm \
+ "${EXTRA_ECONF[@]}"
+
+ if tc-is-cross-compiler; then
+ ./configure \
+ --target="${CHOST}" \
+ --build="${CBUILD}" \
+ -Dinstallprefix='' \
+ -Dinstallusrbinperl='undef' \
+ -Dusevendorprefix='define' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ else
+ sh Configure \
+ -des \
+ -Dinstallprefix="${EPREFIX}"'/usr' \
+ -Dinstallusrbinperl='n' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ fi
+}
+
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
+ export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_TESTS:-1}"
+ if [[ ${EUID} == 0 ]] ; then
+ ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+ return 0
+ fi
+ TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
+}
+
+src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}/usr/bin/perl${MY_PV}"
+ ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
+
+ if ! tc-is-static-only ; then
+ dolib.so "${ED}"${coredir}/${LIBPERL}
+ rm -f "${ED}"${coredir}/${LIBPERL}
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+
+ ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+ ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ../../../../${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+ fi
+
+ rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+ # This removes ${D} from Config.pm
+ for i in $(find "${D}" -iname "Config.pm" ) ; do
+ einfo "Removing ${D} from ${i}..."
+ sed -i -e "s:${D}::" "${i}" || die "Sed failed"
+ done
+
+ dodoc Changes* README AUTHORS
+
+ if use doc ; then
+ # HTML Documentation
+ # We expect errors, warnings, and such with the following.
+
+ dodir /usr/share/doc/${PF}/html
+ LD_LIBRARY_PATH=. ./perl installhtml \
+ --podroot='.' \
+ --podpath='lib:ext:pod:vms' \
+ --recurse \
+ --htmldir="${ED}/usr/share/doc/${PF}/html"
+ fi
+
+ [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
+
+ dual_scripts
+}
+
+pkg_preinst() {
+ check_rebuild
+}
+
+pkg_postinst() {
+ dual_scripts
+
+ if [[ -z "${ROOT}" ]] ; then
+ local INC DIR file
+ INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
+ einfo "Removing old .ph files"
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
+ rm -f "${file}"
+ einfo "<< ${file}"
+ done
+ fi
+ done
+ # Silently remove the now empty dirs
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
+ fi
+ done
+
+ fi
+}
+
+pkg_postrm() {
+ dual_scripts
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/Manifest
index 4f2d5bac18..123e05bfb2 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/Manifest
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/Manifest
@@ -1 +1,2 @@
DIST libtool-2.4.6.tar.xz 973080 BLAKE2B 0865af9f8701ca9dc62eec8294a088d24f4a3ff541bc76acfe7b69f70637d7e8261a17d69f7d54a4177f974c429be68467883a1560edb539061966cbf7d4a356 SHA512 a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4
+DIST libtool-2.4.7.tar.xz 1016040 BLAKE2B 5e022586337637dd634bd40578ad944bec6e3b8de41f95d55777b90cc88cbc4badb3d76cbf0e638166ece1ea7de828e83590e1e6bac30c1e4b1c254a11a742f2 SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.4.7.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.4.7.ebuild
new file mode 100644
index 0000000000..e278860805
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libltdl/libltdl-2.4.7.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Please bump with sys-devel/libtool.
+
+inherit multilib-minimal
+
+MY_P="libtool-${PV}"
+
+DESCRIPTION="A shared library tool for developers"
+HOMEPAGE="https://www.gnu.org/software/libtool/"
+SRC_URI="mirror://gnu/libtool/${MY_P}.tar.xz"
+S="${WORKDIR}"/${MY_P}/libltdl
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs"
+# libltdl doesn't have a testsuite.
+
+BDEPEND="app-arch/xz-utils"
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --enable-ltdl-install \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ # While the libltdl.la file is not used directly, the m4 ltdl logic
+ # keys off of its existence when searching for ltdl support. # bug #293921
+ #use static-libs || find "${D}" -name libltdl.la -delete
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/Manifest b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/Manifest
index af60a22e7d..866cfc71e4 100644
--- a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/Manifest
+++ b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/Manifest
@@ -1,2 +1,2 @@
-DIST pkgconf-1.7.4.tar.xz 293888 BLAKE2B af814174b59e3ea7009230f639a6237226caafb22300946904dd10810c0b5cfcbfeea21767a3a1d2c2b5cb1fe4b7b1d995a52d820fcfce3adb383c66762b7576 SHA512 92c080684898b42824a1f1a7e3ce8a600896fc9c20fcf263f032b856fa4c7139607f87ba44d18ed358b8c5f4f04477708800d20a4e10f96e4268a55682f7f0c1
DIST pkgconf-1.8.0.tar.xz 296304 BLAKE2B 6585a855a313406f77d26fba3cc3cef798b27c4b7ece81738bdba12f36ee93fbcaf838e1065406c28adc20852e34e2de14bc5f4837982f9cc35360d9a3ac83a5 SHA512 58204006408ad5ce91222ed3c93c2e0b61c04fa83c0a8ad337b747b583744578dbebd4ad5ccbc577689637caa1c5dc246b7795ac46e39c6666b1aa78199b7c28
+DIST pkgconf-1.9.3.tar.xz 308612 BLAKE2B 90d48171e24235906c41e97f7a2fa53825724c7500e90e502e5e2e4d668d3be863119e39b83a8e02adcef83a7def42e1c5e3641e77f6194bd81f653776bc95b4 SHA512 f65583f78571e4da161201d6387091562b38893adc31df421b0e6d560a060deb306a0b7ad8b28266253244c935d0a8169f35e04825a7857f21a09527d36f921e
diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/metadata.xml
index 492c5279d5..53180d5fbb 100644
--- a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/metadata.xml
@@ -5,10 +5,6 @@
floppym@gentoo.org
Mike Gilbert
-
- polynomial-c@gentoo.org
- Lars Wendler
-
base-system@gentoo.org
diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.8.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.8.0-r1.ebuild
index 2e564e60bf..bb47d458c3 100644
--- a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.8.0-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.8.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2012-2021 Gentoo Authors
+# Copyright 2012-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -7,14 +7,14 @@ inherit multilib multilib-minimal
if [[ ${PV} == "9999" ]] ; then
inherit autotools git-r3
- EGIT_REPO_URI="https://git.sr.ht/~kaniini/pkgconf"
+ EGIT_REPO_URI="https://gitea.treehouse.systems/ariadne/pkgconf.git"
else
- SRC_URI="http://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ SRC_URI="https://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="pkg-config compatible replacement with no dependencies other than ANSI C89"
-HOMEPAGE="https://git.sr.ht/~kaniini/pkgconf"
+HOMEPAGE="https://gitea.treehouse.systems/ariadne/pkgconf"
LICENSE="ISC"
SLOT="0/3"
diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.7.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.9.3.ebuild
similarity index 54%
rename from sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.7.4-r1.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.9.3.ebuild
index b174cb7572..e962927aff 100644
--- a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.7.4-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-1.9.3.ebuild
@@ -1,26 +1,26 @@
-# Copyright 2012-2021 Gentoo Authors
+# Copyright 2012-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit multilib multilib-minimal
-if [[ ${PV} == "9999" ]] ; then
+if [[ ${PV} == 9999 ]] ; then
inherit autotools git-r3
- EGIT_REPO_URI="https://git.sr.ht/~kaniini/pkgconf"
+ EGIT_REPO_URI="https://gitea.treehouse.systems/ariadne/pkgconf.git"
else
- SRC_URI="http://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~ppc-macos ~x64-macos"
+ SRC_URI="https://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
+ # Per release notes, 1.9.x is a testing/development release.
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="pkg-config compatible replacement with no dependencies other than ANSI C89"
-HOMEPAGE="https://git.sr.ht/~kaniini/pkgconf"
+HOMEPAGE="https://gitea.treehouse.systems/ariadne/pkgconf"
LICENSE="ISC"
-SLOT="0/3"
+SLOT="0/4"
IUSE="test"
-# tests require 'kyua'
RESTRICT="!test? ( test )"
BDEPEND="
@@ -29,31 +29,26 @@ BDEPEND="
dev-util/kyua
)
"
-RDEPEND="
- !dev-util/pkgconfig
-"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/pkgconf$(get_exeext)
-)
+RDEPEND="!dev-util/pkgconfig"
src_prepare() {
default
- [[ ${PV} == "9999" ]] && eautoreconf
- MULTILIB_CHOST_TOOLS+=(
+ [[ ${PV} == 9999 ]] && eautoreconf
+
+ MULTILIB_CHOST_TOOLS=(
+ /usr/bin/pkgconf
/usr/bin/pkg-config$(get_exeext)
)
}
multilib_src_configure() {
- local ECONF_SOURCE="${S}"
- local args=(
- --disable-static
+ local myeconfargs=(
--with-system-includedir="${EPREFIX}/usr/include"
--with-system-libdir="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)"
)
- econf "${args[@]}"
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_test() {
@@ -70,5 +65,6 @@ multilib_src_install() {
multilib_src_install_all() {
einstalldocs
+
find "${ED}" -type f -name '*.la' -delete || die
}
diff --git a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-9999.ebuild b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-9999.ebuild
index 8ac703ecfd..e962927aff 100644
--- a/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-9999.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-util/pkgconf/pkgconf-9999.ebuild
@@ -1,26 +1,26 @@
-# Copyright 2012-2021 Gentoo Authors
+# Copyright 2012-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit multilib multilib-minimal
-if [[ ${PV} == "9999" ]] ; then
+if [[ ${PV} == 9999 ]] ; then
inherit autotools git-r3
- EGIT_REPO_URI="https://github.com/pkgconf/pkgconf.git"
+ EGIT_REPO_URI="https://gitea.treehouse.systems/ariadne/pkgconf.git"
else
- SRC_URI="http://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~ppc-macos ~x64-macos"
+ SRC_URI="https://distfiles.dereferenced.org/${PN}/${P}.tar.xz"
+ # Per release notes, 1.9.x is a testing/development release.
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="pkg-config compatible replacement with no dependencies other than ANSI C89"
-HOMEPAGE="https://git.sr.ht/~kaniini/pkgconf"
+HOMEPAGE="https://gitea.treehouse.systems/ariadne/pkgconf"
LICENSE="ISC"
-SLOT="0/3"
+SLOT="0/4"
IUSE="test"
-# tests require 'kyua'
RESTRICT="!test? ( test )"
BDEPEND="
@@ -29,31 +29,26 @@ BDEPEND="
dev-util/kyua
)
"
-RDEPEND="
- !dev-util/pkgconfig
-"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/pkgconf$(get_exeext)
-)
+RDEPEND="!dev-util/pkgconfig"
src_prepare() {
default
- [[ ${PV} == "9999" ]] && eautoreconf
- MULTILIB_CHOST_TOOLS+=(
+ [[ ${PV} == 9999 ]] && eautoreconf
+
+ MULTILIB_CHOST_TOOLS=(
+ /usr/bin/pkgconf
/usr/bin/pkg-config$(get_exeext)
)
}
multilib_src_configure() {
- local ECONF_SOURCE="${S}"
- local args=(
- --disable-static
+ local myeconfargs=(
--with-system-includedir="${EPREFIX}/usr/include"
--with-system-libdir="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)"
)
- econf "${args[@]}"
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_test() {
@@ -70,5 +65,6 @@ multilib_src_install() {
multilib_src_install_all() {
einstalldocs
+
find "${ED}" -type f -name '*.la' -delete || die
}
diff --git a/sdk_container/src/third_party/portage-stable/eclass/alternatives.eclass b/sdk_container/src/third_party/portage-stable/eclass/alternatives.eclass
index d6bb6b19e9..155a2457bb 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/alternatives.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/alternatives.eclass
@@ -51,12 +51,12 @@ EXPORT_FUNCTIONS pkg_postinst pkg_postrm
if [[ -z ${_ALTERNATIVES_ECLASS} ]]; then
_ALTERNATIVES_ECLASS=1
-# @ECLASS-VARIABLE: SOURCE
+# @ECLASS_VARIABLE: SOURCE
# @DEFAULT_UNSET
# @DESCRIPTION:
# The symlink to be created
-# @ECLASS-VARIABLE: ALTERNATIVES
+# @ECLASS_VARIABLE: ALTERNATIVES
# @DEFAULT_UNSET
# @DESCRIPTION:
# The list of alternatives
diff --git a/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass b/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass
index 47cc492554..ab9040d99c 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/autotools.eclass
@@ -1,12 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# Flatcar: Support EAPI 0 and 4.
-
# @ECLASS: autotools.eclass
# @MAINTAINER:
# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 0 4 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Regenerates auto* build scripts
# @DESCRIPTION:
# This eclass is for safely handling autotooled software packages that need to
@@ -15,21 +13,21 @@
# Note: We require GNU m4, as does autoconf. So feel free to use any features
# from the GNU version of m4 without worrying about other variants (i.e. BSD).
-if [[ ${__AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then
+if [[ ${_AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then
# See if we were included already, but someone changed the value
# of AUTOTOOLS_AUTO_DEPEND on us. We could reload the entire
# eclass at that point, but that adds overhead, and it's trivial
# to re-order inherit in eclasses/ebuilds instead. #409611
- if [[ ${__AUTOTOOLS_AUTO_DEPEND} != ${AUTOTOOLS_AUTO_DEPEND} ]] ; then
- die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit ${ECLASS} first! ${__AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}"
+ if [[ ${_AUTOTOOLS_AUTO_DEPEND} != ${AUTOTOOLS_AUTO_DEPEND} ]] ; then
+ die "AUTOTOOLS_AUTO_DEPEND changed value between inherits; please inherit ${ECLASS} first! ${_AUTOTOOLS_AUTO_DEPEND} -> ${AUTOTOOLS_AUTO_DEPEND}"
fi
fi
if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then
_AUTOTOOLS_ECLASS=1
-case ${EAPI:-0} in
- 0|4|5|6)
+case ${EAPI} in
+ 6)
# Needed for eqawarn
inherit eutils
;;
@@ -39,25 +37,25 @@ esac
inherit gnuconfig libtool
-# @ECLASS-VARIABLE: WANT_AUTOCONF
+# @ECLASS_VARIABLE: WANT_AUTOCONF
# @PRE_INHERIT
# @DESCRIPTION:
# The major version of autoconf your package needs
: ${WANT_AUTOCONF:=latest}
-# @ECLASS-VARIABLE: WANT_AUTOMAKE
+# @ECLASS_VARIABLE: WANT_AUTOMAKE
# @PRE_INHERIT
# @DESCRIPTION:
# The major version of automake your package needs
: ${WANT_AUTOMAKE:=latest}
-# @ECLASS-VARIABLE: WANT_LIBTOOL
+# @ECLASS_VARIABLE: WANT_LIBTOOL
# @PRE_INHERIT
# @DESCRIPTION:
# Do you want libtool? Valid values here are "latest" and "none".
: ${WANT_LIBTOOL:=latest}
-# @ECLASS-VARIABLE: _LATEST_AUTOMAKE
+# @ECLASS_VARIABLE: _LATEST_AUTOMAKE
# @INTERNAL
# @DESCRIPTION:
# CONSTANT!
@@ -76,7 +74,7 @@ inherit gnuconfig libtool
# Do NOT change this variable in your ebuilds!
# If you want to force a newer minor version, you can specify the correct
# WANT value by using a colon: :
-_LATEST_AUTOMAKE=( 1.16.2-r1:1.16 )
+_LATEST_AUTOMAKE=( 1.16.5:1.16 )
_automake_atom="sys-devel/automake"
_autoconf_atom="sys-devel/autoconf"
@@ -97,7 +95,7 @@ if [[ -n ${WANT_AUTOCONF} ]] ; then
none) _autoconf_atom="" ;; # some packages don't require autoconf at all
2.1) _autoconf_atom="~sys-devel/autoconf-2.13" ;;
# if you change the "latest" version here, change also autotools_env_setup
- latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.69" ;;
+ latest|2.5) _autoconf_atom=">=sys-devel/autoconf-2.71" ;;
*) die "Invalid WANT_AUTOCONF value '${WANT_AUTOCONF}'" ;;
esac
export WANT_AUTOCONF
@@ -113,7 +111,7 @@ if [[ -n ${WANT_LIBTOOL} ]] ; then
export WANT_LIBTOOL
fi
-# @ECLASS-VARIABLE: AUTOTOOLS_DEPEND
+# @ECLASS_VARIABLE: AUTOTOOLS_DEPEND
# @OUTPUT_VARIABLE
# @DESCRIPTION:
# Contains the combination of requested automake/autoconf/libtool
@@ -123,7 +121,7 @@ AUTOTOOLS_DEPEND="${_automake_atom}
${_libtool_atom}"
RDEPEND=""
-# @ECLASS-VARIABLE: AUTOTOOLS_AUTO_DEPEND
+# @ECLASS_VARIABLE: AUTOTOOLS_AUTO_DEPEND
# @PRE_INHERIT
# @DESCRIPTION:
# Set to 'no' to disable automatically adding to DEPEND. This lets
@@ -131,30 +129,30 @@ RDEPEND=""
# their own DEPEND string.
: ${AUTOTOOLS_AUTO_DEPEND:=yes}
if [[ ${AUTOTOOLS_AUTO_DEPEND} != "no" ]] ; then
- case ${EAPI:-0} in
- 0|4|5|6) DEPEND=${AUTOTOOLS_DEPEND} ;;
+ case ${EAPI} in
+ 6) DEPEND=${AUTOTOOLS_DEPEND} ;;
*) BDEPEND=${AUTOTOOLS_DEPEND} ;;
esac
fi
-__AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass
+_AUTOTOOLS_AUTO_DEPEND=${AUTOTOOLS_AUTO_DEPEND} # See top of eclass
unset _automake_atom _autoconf_atom
-# @ECLASS-VARIABLE: AM_OPTS
+# @ECLASS_VARIABLE: AM_OPTS
# @DEFAULT_UNSET
# @DESCRIPTION:
# Additional options to pass to automake during
# eautoreconf call.
: ${AM_OPTS:=}
-# @ECLASS-VARIABLE: AT_NOEAUTOHEADER
+# @ECLASS_VARIABLE: AT_NOEAUTOHEADER
# @DEFAULT_UNSET
# @DESCRIPTION:
# Don't run eautoheader command if set to 'yes'; only used to work around
# packages that don't want their headers being modified.
: ${AT_NOEAUTOHEADER:=}
-# @ECLASS-VARIABLE: AT_NOEAUTOMAKE
+# @ECLASS_VARIABLE: AT_NOEAUTOMAKE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Don't run eautomake command if set to 'yes'; only used to workaround
@@ -162,7 +160,7 @@ unset _automake_atom _autoconf_atom
# not call AM_INIT_AUTOMAKE if it doesn't actually use automake.
: ${AT_NOEAUTOMAKE:=}
-# @ECLASS-VARIABLE: AT_NOELIBTOOLIZE
+# @ECLASS_VARIABLE: AT_NOELIBTOOLIZE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Don't run elibtoolize command if set to 'yes',
@@ -170,13 +168,13 @@ unset _automake_atom _autoconf_atom
# particular options
: ${AT_NOELIBTOOLIZE:=}
-# @ECLASS-VARIABLE: AT_M4DIR
+# @ECLASS_VARIABLE: AT_M4DIR
# @DEFAULT_UNSET
# @DESCRIPTION:
# Additional director(y|ies) aclocal should search
: ${AT_M4DIR:=}
-# @ECLASS-VARIABLE: AT_SYS_M4DIR
+# @ECLASS_VARIABLE: AT_SYS_M4DIR
# @DEFAULT_UNSET
# @INTERNAL
# @DESCRIPTION:
@@ -285,7 +283,7 @@ _at_uses_pkg() {
for macro ; do
args+=( -e "^[[:space:]]*${macro}\>" )
done
- egrep -q "${args[@]}" configure.??
+ grep -E -q "${args[@]}" configure.??
fi
}
_at_uses_autoheader() { _at_uses_pkg A{C,M}_CONFIG_HEADER{S,}; }
@@ -334,8 +332,26 @@ eaclocal_amflags() {
# They also force installing the support files for safety.
# Respects AT_M4DIR for additional directories to search for macros.
eaclocal() {
+ # Feed in a list of paths:
+ # - ${BROOT}/usr/share/aclocal
+ # - ${ESYSROOT}/usr/share/aclocal
+ # See bug #677002
+ if [[ ${EAPI} != 6 ]] ; then
+ if [[ ! -f "${T}"/aclocal/dirlist ]] ; then
+ mkdir "${T}"/aclocal || die
+ cat <<- EOF > "${T}"/aclocal/dirlist || die
+ ${BROOT}/usr/share/aclocal
+ ${ESYSROOT}/usr/share/aclocal
+ EOF
+ fi
+
+ local system_acdir=" --system-acdir=${T}/aclocal"
+ else
+ local system_acdir=""
+ fi
+
[[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
- autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags)
+ autotools_run_tool --at-m4flags aclocal "$@" $(eaclocal_amflags) ${system_acdir}
}
# @FUNCTION: _elibtoolize
@@ -377,8 +393,8 @@ eautoconf() {
if [[ ${WANT_AUTOCONF} != "2.1" && -e configure.in ]] ; then
- case ${EAPI:-0} in
- 0|1|2|3|4|5|6|7)
+ case ${EAPI} in
+ 6|7)
eqawarn "This package has a configure.in file which has long been deprecated. Please"
eqawarn "update it to use configure.ac instead as newer versions of autotools will die"
eqawarn "when it finds this file. See https://bugs.gentoo.org/426262 for details."
@@ -468,8 +484,8 @@ eautopoint() {
config_rpath_update() {
local dst src
- case ${EAPI:-0} in
- 0|4|5|6)
+ case ${EAPI} in
+ 6)
src="${EPREFIX}/usr/share/gettext/config.rpath"
;;
*)
@@ -499,20 +515,30 @@ autotools_env_setup() {
for pv in ${_LATEST_AUTOMAKE[@]/#*:} ; do
# Break on first hit to respect _LATEST_AUTOMAKE order.
local hv_args=""
- case ${EAPI:-0} in
- 0|4|5|6)
+ case ${EAPI} in
+ 6)
hv_args="--host-root"
;;
- 7)
+ *)
hv_args="-b"
;;
esac
- ROOT=/ has_version ${hv_args} "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break
+ has_version ${hv_args} "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break
done
- [[ ${WANT_AUTOMAKE} == "latest" ]] && \
- die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}"
+
+ # During bootstrap in prefix there might be no automake merged yet
+ # due to --nodeps, but still available somewhere in PATH.
+ # For example, ncurses needs local libtool on aix and hpux.
+ # So, make the check non-fatal where automake doesn't yet
+ # exist within BROOT. (We could possibly do better here
+ # and inspect PATH, but I'm not sure there's much point.)
+ if use prefix && [[ ! -x "${BROOT}"/usr/bin/automake ]] ; then
+ [[ ${WANT_AUTOMAKE} == "latest" ]] && ewarn "Ignoring missing automake during Prefix bootstrap! Tried ${_LATEST_AUTOMAKE[*]}"
+ else
+ [[ ${WANT_AUTOMAKE} == "latest" ]] && die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}"
+ fi
fi
- [[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.5
+ [[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.71
}
# @FUNCTION: autotools_run_tool
@@ -668,12 +694,6 @@ autotools_m4sysdir_include() {
# First try to use the paths the system integrator has set up.
local paths=( $(eval echo ${AT_SYS_M4DIR}) )
- if [[ ${#paths[@]} -eq 0 && -n ${SYSROOT} ]] ; then
- # If they didn't give us anything, then default to the SYSROOT.
- # This helps when cross-compiling.
- local path="${SYSROOT}/usr/share/aclocal"
- [[ -d ${path} ]] && paths+=( "${path}" )
- fi
_autotools_m4dir_include "${paths[@]}"
}
diff --git a/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass b/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass
index c52b0a0216..7319326c7a 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/flag-o-matic.eclass
@@ -1,21 +1,18 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# Flatcar: Support EAPI 0 and 4.
-
# @ECLASS: flag-o-matic.eclass
# @MAINTAINER:
# toolchain@gentoo.org
-# @SUPPORTED_EAPIS: 0 4 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: common functions to manipulate and query toolchain flags
# @DESCRIPTION:
# This eclass contains a suite of functions to help developers sanely
# and safely manage toolchain flags in their builds.
-case ${EAPI:-0} in
- 1|2|3) die "flag-o-matic.eclass: EAPI ${EAPI} is too old." ;;
- 0|4|5|6|7|8) ;;
- *) die "EAPI ${EAPI} is not supported by flag-o-matic.eclass." ;;
+case ${EAPI} in
+ 6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ -z ${_FLAG_O_MATIC_ECLASS} ]]; then
@@ -23,11 +20,11 @@ _FLAG_O_MATIC_ECLASS=1
inherit toolchain-funcs
-[[ ${EAPI:-0} == [04567] ]] && inherit eutils
+[[ ${EAPI} == [67] ]] && inherit eutils
# @FUNCTION: all-flag-vars
# @DESCRIPTION:
-# Return all the flag variables that our high level funcs operate on.
+# Return all the flag variables that our high level functions operate on.
all-flag-vars() {
echo {ADA,C,CPP,CXX,CCAS,F,FC,LD}FLAGS
}
@@ -38,8 +35,8 @@ all-flag-vars() {
# {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags
# Note: shell globs and character lists are allowed
setup-allowed-flags() {
- [[ ${EAPI:-0} == [04567] ]] ||
- die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI:-0}."
+ [[ ${EAPI} == [67] ]] ||
+ die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_setup-allowed-flags "$@"
}
@@ -50,21 +47,39 @@ setup-allowed-flags() {
# Note: shell globs and character lists are allowed
_setup-allowed-flags() {
ALLOWED_FLAGS=(
- -pipe -O '-O[12sg]' -mcpu -march -mtune
- '-fstack-protector*'
- '-fsanitize*' '-fno-sanitize*'
- '-fstack-check*' -fno-stack-check
- -fbounds-check -fbounds-checking -fno-strict-overflow
- -fno-PIE -fno-pie -nopie -no-pie -fno-unit-at-a-time
+ -pipe -O '-O[12sg]' '-mcpu=*' '-march=*' '-mtune=*'
- # debugging symbols should generally be very safe to add
+ # Hardening flags
+ '-fstack-protector*'
+ '-fstack-check*' -fno-stack-check
+ -fstack-clash-protection
+ '-fcf-protection=*'
+ -fbounds-check -fbounds-checking
+ -fno-PIE -fno-pie -nopie -no-pie
+ # Spectre mitigations, bug #646076
+ '-mindirect-branch=*'
+ -mindirect-branch-register
+ '-mfunction-return=*'
+ -mretpoline
+
+ # Misc
+ -fno-unit-at-a-time -fno-strict-overflow
+
+ # Sanitizers
+ '-fsanitize*' '-fno-sanitize*'
+
+ # Debugging symbols should generally be very safe to add
-g '-g[0-9]'
-ggdb '-ggdb[0-9]'
-gdwarf '-gdwarf-*'
-gstabs -gstabs+
-gz
+ -glldb
+ # Cosmetic/output related, see e.g. bug #830534
+ -fno-diagnostics-color '-fmessage-length=*'
-fno-ident -fpermissive -frecord-gcc-switches
+ -frecord-command-line
'-fdiagnostics*' '-fplugin*'
'-W*' -w
@@ -72,7 +87,7 @@ _setup-allowed-flags() {
'-[DUILR]*' '-Wl,*'
# Linker choice flag
- '-fuse-ld'
+ '-fuse-ld=*'
)
# allow a bunch of flags that negate features / control ABI
@@ -82,19 +97,22 @@ _setup-allowed-flags() {
-fno-omit-frame-pointer '-fno-builtin*'
)
ALLOWED_FLAGS+=(
- -mregparm -mno-app-regs -mapp-regs -mno-mmx -mno-sse
+ '-mregparm=*' -mno-app-regs -mapp-regs -mno-mmx -mno-sse
-mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2
-mno-avx -mno-aes -mno-pclmul -mno-sse4a -mno-3dnow -mno-popcnt
-mno-abm -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -mplt
- -msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu
- -mieee -mieee-with-inexact -mschedule -mfloat-gprs -mspe -mno-spe
+ -msoft-float -mno-soft-float -mhard-float -mno-hard-float '-mfpu=*'
+ -mieee -mieee-with-inexact '-mschedule=*' -mfloat-gprs -mspe -mno-spe
-mtls-direct-seg-refs -mno-tls-direct-seg-refs -mflat -mno-flat
- -mno-faster-structs -mfaster-structs -m32 -m64 -mx32 -mabi
- -mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 -mcmodel
- -mstack-bias -mno-stack-bias -msecure-plt '-m*-toc' -mfloat-abi
+ -mno-faster-structs -mfaster-structs -m32 -m64 -mx32 '-mabi=*'
+ -mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 '-mcmodel=*'
+ -mstack-bias -mno-stack-bias -msecure-plt '-m*-toc' '-mfloat-abi=*'
-mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400
-mfix-rm7000 -mno-fix-rm7000 -mfix-r10000 -mno-fix-r10000
- -mr10k-cache-barrier -mthumb -marm
+ '-mr10k-cache-barrier=*' -mthumb -marm
+
+ # needed for arm64 (and in particular SCS)
+ -ffixed-x18
# gcc 4.5
-mno-fma4 -mno-movbe -mno-xop -mno-lwp
@@ -191,6 +209,7 @@ filter-flags() {
# Remove flags that enable Large File Support.
filter-lfs-flags() {
[[ $# -ne 0 ]] && die "filter-lfs-flags takes no arguments"
+
# http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
# _LARGEFILE_SOURCE: enable support for new LFS funcs (ftello/etc...)
# _LARGEFILE64_SOURCE: enable support for 64bit variants (off64_t/fseeko64/etc...)
@@ -199,6 +218,14 @@ filter-lfs-flags() {
filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_TIME_BITS=64
}
+# @FUNCTION: filter-lto
+# @DESCRIPTION:
+# Remove flags that enable LTO and those that depend on it
+filter-lto() {
+ [[ $# -ne 0 ]] && die "filter-lto takes no arguments"
+ filter-flags '-flto*' -fwhole-program-vtables '-fsanitize=cfi*'
+}
+
# @FUNCTION: filter-ldflags
# @USAGE:
# @DESCRIPTION:
@@ -228,7 +255,7 @@ append-cppflags() {
# @CODE
append-cflags() {
[[ $# -eq 0 ]] && return 0
- # Do not do automatic flag testing ourselves. #417047
+ # Do not do automatic flag testing ourselves, bug #417047
export CFLAGS+=" $*"
return 0
}
@@ -243,7 +270,7 @@ append-cflags() {
# @CODE
append-cxxflags() {
[[ $# -eq 0 ]] && return 0
- # Do not do automatic flag testing ourselves. #417047
+ # Do not do automatic flag testing ourselves, bug #417047
export CXXFLAGS+=" $*"
return 0
}
@@ -258,7 +285,7 @@ append-cxxflags() {
# @CODE
append-fflags() {
[[ $# -eq 0 ]] && return 0
- # Do not do automatic flag testing ourselves. #417047
+ # Do not do automatic flag testing ourselves, bug #417047
export FFLAGS+=" $*"
export FCFLAGS+=" $*"
return 0
@@ -269,7 +296,8 @@ append-fflags() {
# Add flags that enable Large File Support.
append-lfs-flags() {
[[ $# -ne 0 ]] && die "append-lfs-flags takes no arguments"
- # see comments in filter-lfs-flags func for meaning of these
+
+ # See comments in filter-lfs-flags func for meaning of these
append-cppflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
}
@@ -296,9 +324,9 @@ append-ldflags() {
append-flags() {
[[ $# -eq 0 ]] && return 0
case " $* " in
- *' '-[DIU]*) eqawarn 'please use append-cppflags for preprocessor flags' ;;
+ *' '-[DIU]*) eqawarn 'Please use append-cppflags for preprocessor flags' ;;
*' '-L*|\
- *' '-Wl,*) eqawarn 'please use append-ldflags for linker flags' ;;
+ *' '-Wl,*) eqawarn 'Please use append-ldflags for linker flags' ;;
esac
append-cflags "$@"
append-cxxflags "$@"
@@ -454,9 +482,8 @@ strip-flags() {
local new=()
for x in ${!var} ; do
- local flag=${x%%=*}
for y in "${ALLOWED_FLAGS[@]}" ; do
- if [[ -z ${flag%%${y}} ]] ; then
+ if [[ ${x} == ${y} ]] ; then
new+=( "${x}" )
break
fi
@@ -486,8 +513,8 @@ strip-flags() {
# Returns shell true if is supported by given ,
# else returns shell false.
test-flag-PROG() {
- [[ ${EAPI:-0} == [04567] ]] ||
- die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI:-0}."
+ [[ ${EAPI} == [67] ]] ||
+ die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_test-flag-PROG "$@"
}
@@ -547,6 +574,15 @@ _test-flag-PROG() {
c+ld)
in_ext='c'
in_src='int main(void) { return 0; }'
+
+ if is-ldflagq -fuse-ld=* ; then
+ # Respect linker chosen by user so we don't
+ # end up giving false results by checking
+ # with default linker. bug #832377
+ fuse_ld_value=$(get-flag -fuse-ld=*)
+ cmdline_extra+=(${fuse_ld_value})
+ fi
+
cmdline_extra+=(-xc)
;;
esac
@@ -556,7 +592,7 @@ _test-flag-PROG() {
printf "%s\n" "${in_src}" > "${test_in}" || die "Failed to create '${test_in}'"
# Currently we rely on warning-free output of a compiler
- # before the flag to see if a flag prduces any warnings.
+ # before the flag to see if a flag produces any warnings.
# This has a few drawbacks:
# - if compiler already generates warnings we filter out
# every single flag: bug #712488
@@ -582,7 +618,9 @@ _test-flag-PROG() {
# -Werror makes clang bail out on unused arguments as well;
# try to add -Qunused-arguments to work-around that
# other compilers don't support it but then, it's failure like
- # any other
+ # any other.
+ #
+ # See also bug #712488 and bug #714742.
cmdline+=( -Qunused-arguments )
"${cmdline[@]}" &>/dev/null
fi
@@ -625,8 +663,8 @@ test-flag-CCLD() { _test-flag-PROG CC c+ld "$@"; }
# Returns shell true if are supported by given ,
# else returns shell false.
test-flags-PROG() {
- [[ ${EAPI:-0} == [04567] ]] ||
- die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI:-0}."
+ [[ ${EAPI} == [67] ]] ||
+ die "Internal function ${FUNCNAME} is not available in EAPI ${EAPI}."
_test-flags-PROG "$@"
}
@@ -647,7 +685,7 @@ _test-flags-PROG() {
while (( $# )); do
case "$1" in
- # '-B /foo': bug # 687198
+ # '-B /foo': bug #687198
--param|-B)
if test-flag-${comp} "$1" "$2"; then
flags+=( "$1" "$2" )
@@ -833,7 +871,7 @@ raw-ldflags() {
x=${x#-Wl,}
set -- "$@" ${x//,/ }
;;
- *) # Assume it's a compiler driver flag, so throw it away #441808
+ *) # Assume it's a compiler driver flag, so throw it away, bug #441808
;;
esac
done
@@ -850,4 +888,150 @@ no-as-needed() {
esac
}
+# @FUNCTION: _test-compile-PROG
+# @USAGE:
+# @INTERNAL
+# @DESCRIPTION:
+# Attempts to compile (and possibly link) the given program. The first
+# parameter corresponds to the standard -x compiler argument.
+# If the program should additionally be attempted to be linked, the string
+# "+ld" should be added to the parameter.
+_test-compile-PROG() {
+ local lang=$1
+ local code=$2
+ shift 2
+
+ [[ -z "${lang}" ]] && return 1
+ [[ -z "${code}" ]] && return 1
+
+ local compiler filename_in filename_out args=() libs=()
+ case "${lang}" in
+ c)
+ compiler="$(tc-getCC)"
+ filename_in="${T}/test.c"
+ filename_out="${T}/test.o"
+ args+=(${CFLAGS[@]} -xc -c)
+ ;;
+ c++)
+ compiler="$(tc-getCXX)"
+ filename_in="${T}/test.cc"
+ filename_out="${T}/test.o"
+ args+=(${CXXFLAGS[@]} -xc++ -c)
+ ;;
+ f77)
+ compiler="$(tc-getF77)"
+ filename_in="${T}/test.f"
+ filename_out="${T}/test.o"
+ args+=(${FFFLAGS[@]} -xf77 -c)
+ ;;
+ f95)
+ compiler="$(tc-getFC)"
+ filename_in="${T}/test.f90"
+ filename_out="${T}/test.o"
+ args+=(${FCFLAGS[@]} -xf95 -c)
+ ;;
+ c+ld)
+ compiler="$(tc-getCC)"
+ filename_in="${T}/test.c"
+ filename_out="${T}/test.exe"
+ args+=(${CFLAGS[@]} ${LDFLAGS[@]} -xc)
+ libs+=(${LIBS[@]})
+ ;;
+ c+++ld)
+ compiler="$(tc-getCXX)"
+ filename_in="${T}/test.cc"
+ filename_out="${T}/test.exe"
+ args+=(${CXXFLAGS[@]} ${LDFLAGS[@]} -xc++)
+ libs+=(${LIBS[@]})
+ ;;
+ f77+ld)
+ compiler="$(tc-getF77)"
+ filename_in="${T}/test.f"
+ filename_out="${T}/test.exe"
+ args+=(${FFLAGS[@]} ${LDFLAGS[@]} -xf77)
+ libs+=(${LIBS[@]})
+ ;;
+ f95+ld)
+ compiler="$(tc-getFC)"
+ filename_in="${T}/test.f90"
+ filename_out="${T}/test.exe"
+ args+=(${FCFLAGS[@]} ${LDFLAGS[@]} -xf95)
+ libs+=(${LIBS[@]})
+ ;;
+ *)
+ die "Unknown compiled language ${lang}"
+ ;;
+ esac
+
+ printf "%s\n" "${code}" > "${filename_in}" || die "Failed to create '${test_in}'"
+
+ "${compiler}" ${args[@]} "${filename_in}" -o "${filename_out}" ${libs[@]} &>/dev/null
+}
+
+# @FUNCTION: append-atomic-flags
+# @USAGE: [bytes]
+# @DESCRIPTION:
+# Attempts to detect if appending -latomic is required to use
+# a specific-sized atomic intrinsic, and if so, appends it. If the bytesize
+# is not specified, then check the four most common byte sizes (1, 2, 4, 8).
+# >=16-byte atomics are not included in this default set and must be explicitly
+# passed if required. This may require you to add a macro definition like
+# -Duint128_t=__uint128_t to your CFLAGS.
+append-atomic-flags() {
+ # this implementation is as described in bug #820101
+ local code
+
+ # first, ensure we can compile a trivial program
+ # this is because we can't distinguish if _test-compile-PROG
+ # fails because -latomic is actually needed or if we have a
+ # broken toolchain (like due to bad FLAGS)
+ read -r -d '' code <<- EOF
+ int main()
+ {
+ return 0;
+ }
+ EOF
+
+ # if toolchain is broken, just return silently. it's better to
+ # let other pieces of the build fail later down the line than to
+ # make people think that something to do with atomic support is the
+ # cause of their problems.
+ _test-compile-PROG "c+ld" "${code}" || return
+
+ local bytesizes
+ [[ "${#}" == "0" ]] && bytesizes=( "1" "2" "4" "8" ) || bytesizes="${@}"
+
+ for bytesize in ${bytesizes[@]}
+ do
+ # this sample program is informed by the great testing from the buildroot project:
+ # https://github.com/buildroot/buildroot/commit/6856e417da4f3aa77e2a814db2a89429af072f7d
+ read -r -d '' code <<- EOF
+ #include
+ int main()
+ {
+ uint$((${bytesize} * 8))_t a = 0;
+ __atomic_add_fetch(&a, 3, __ATOMIC_RELAXED);
+ __atomic_compare_exchange_n(&a, &a, 2, 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+ return 0;
+ }
+ EOF
+
+ # do nothing if test program links fine
+ _test-compile-PROG "c+ld" "${code}" && continue
+
+ # ensure that the toolchain supports -latomic
+ test-flags-CCLD "-latomic" &>/dev/null || die "-latomic is required but not supported by $(tc-getCC)"
+
+ append-libs "-latomic"
+
+ # verify that this did indeed fix the problem
+ _test-compile-PROG "c+ld" "${code}" || \
+ die "libatomic does not include an implementation of ${bytesize}-byte atomics for this toolchain"
+
+ # if any of the required bytesizes require -latomic, no need to continue
+ # checking the others
+ return
+ done
+}
+
fi
diff --git a/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass b/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass
index 895b3046e0..59d4f9a003 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/git-r3.eclass
@@ -1,19 +1,17 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# Flatcar: Support EAPI 4.
-
# @ECLASS: git-r3.eclass
# @MAINTAINER:
# Michał Górny
-# @SUPPORTED_EAPIS: 4 5 6 7 8
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: Eclass for fetching and unpacking git repositories.
# @DESCRIPTION:
# Third generation eclass for easing maintenance of live ebuilds using
# git as remote repository.
case ${EAPI:-0} in
- 4|5|6|7|8) ;;
+ 5|6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -23,13 +21,13 @@ if [[ ! ${_GIT_R3} ]]; then
PROPERTIES+=" live"
-if [[ ${EAPI} != [456] ]]; then
+if [[ ${EAPI} != [56] ]]; then
BDEPEND=">=dev-vcs/git-1.8.2.1[curl]"
else
DEPEND=">=dev-vcs/git-1.8.2.1[curl]"
fi
-# @ECLASS-VARIABLE: EGIT_CLONE_TYPE
+# @ECLASS_VARIABLE: EGIT_CLONE_TYPE
# @USER_VARIABLE
# @DESCRIPTION:
# Type of clone that should be used against the remote repository.
@@ -67,7 +65,7 @@ fi
# embedded systems with limited disk space.
: ${EGIT_CLONE_TYPE:=single}
-# @ECLASS-VARIABLE: EGIT_MIN_CLONE_TYPE
+# @ECLASS_VARIABLE: EGIT_MIN_CLONE_TYPE
# @DESCRIPTION:
# 'Minimum' clone type supported by the ebuild. Takes same values
# as EGIT_CLONE_TYPE. When user sets a type that's 'lower' (that is,
@@ -84,7 +82,7 @@ fi
# fatal errors rather than 'non-pretty versions'.
: ${EGIT_MIN_CLONE_TYPE:=shallow}
-# @ECLASS-VARIABLE: EGIT3_STORE_DIR
+# @ECLASS_VARIABLE: EGIT3_STORE_DIR
# @USER_VARIABLE
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -95,7 +93,7 @@ fi
#
# EGIT3_STORE_DIR=${DISTDIR}/git3-src
-# @ECLASS-VARIABLE: EGIT_MIRROR_URI
+# @ECLASS_VARIABLE: EGIT_MIRROR_URI
# @DEFAULT_UNSET
# @DESCRIPTION:
# 'Top' URI to a local git mirror. If specified, the eclass will try
@@ -109,7 +107,7 @@ fi
# EGIT_MIRROR_URI="git://mirror.lan/"
# @CODE
-# @ECLASS-VARIABLE: EGIT_REPO_URI
+# @ECLASS_VARIABLE: EGIT_REPO_URI
# @REQUIRED
# @DESCRIPTION:
# URIs to the repository, e.g. https://foo. If multiple URIs are
@@ -128,12 +126,12 @@ fi
# EGIT_REPO_URI="https://a/b.git https://c/d.git"
# @CODE
-# @ECLASS-VARIABLE: EVCS_OFFLINE
+# @ECLASS_VARIABLE: EVCS_OFFLINE
# @DEFAULT_UNSET
# @DESCRIPTION:
# If non-empty, this variable prevents any online operations.
-# @ECLASS-VARIABLE: EVCS_UMASK
+# @ECLASS_VARIABLE: EVCS_UMASK
# @DEFAULT_UNSET
# @DESCRIPTION:
# Set this variable to a custom umask. This is intended to be set by
@@ -144,13 +142,13 @@ fi
# portage group write access already can screw the system over in more
# creative ways.
-# @ECLASS-VARIABLE: EGIT_BRANCH
+# @ECLASS_VARIABLE: EGIT_BRANCH
# @DEFAULT_UNSET
# @DESCRIPTION:
# The branch name to check out. If unset, the upstream default (HEAD)
# will be used.
-# @ECLASS-VARIABLE: EGIT_COMMIT
+# @ECLASS_VARIABLE: EGIT_COMMIT
# @DEFAULT_UNSET
# @DESCRIPTION:
# The tag name or commit identifier to check out. If unset, newest
@@ -158,7 +156,7 @@ fi
# not on HEAD branch, EGIT_BRANCH needs to be set to a branch on which
# the commit is available.
-# @ECLASS-VARIABLE: EGIT_COMMIT_DATE
+# @ECLASS_VARIABLE: EGIT_COMMIT_DATE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Attempt to check out the repository state for the specified timestamp.
@@ -172,14 +170,14 @@ fi
# will be considered alike a single commit with date corresponding
# to the merge commit date.
-# @ECLASS-VARIABLE: EGIT_CHECKOUT_DIR
+# @ECLASS_VARIABLE: EGIT_CHECKOUT_DIR
# @DEFAULT_UNSET
# @DESCRIPTION:
# The directory to check the git sources out to.
#
# EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
-# @ECLASS-VARIABLE: EGIT_SUBMODULES
+# @ECLASS_VARIABLE: EGIT_SUBMODULES
# @DEFAULT_UNSET
# @DESCRIPTION:
# An array of inclusive and exclusive wildcards on submodule names,
@@ -562,7 +560,7 @@ git-r3_fetch() {
local commit_date=${4:-${EGIT_COMMIT_DATE}}
# support new override API for EAPI 6+
- if [[ ${EAPI} != [45] ]]; then
+ if [[ ${EAPI} != 5 ]]; then
# get the name and do some more processing:
# 1) kill .git suffix,
# 2) underscore (remaining) non-variable characters,
diff --git a/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass b/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass
index 54bba31e4c..0791798632 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/gnuconfig.eclass
@@ -1,14 +1,12 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# Flatcar: Support EAPI 0 and 4.
-
# @ECLASS: gnuconfig.eclass
# @MAINTAINER:
# Sam James
# @AUTHOR:
# Will Woods
-# @SUPPORTED_EAPIS: 0 4 5 6 7 8
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: Refresh bundled gnuconfig files (config.guess, config.sub)
# @DESCRIPTION:
# This eclass is used to automatically update files that typically come with
@@ -19,7 +17,7 @@
#
case ${EAPI:-0} in
- 0|4|5|6|7|8) ;;
+ 5|6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -28,7 +26,7 @@ if [[ -z ${_GNUCONFIG_ECLASS} ]] ; then
BDEPEND="sys-devel/gnuconfig"
-[[ ${EAPI:-0} == [0456] ]] && DEPEND="${BDEPEND}"
+[[ ${EAPI} == [56] ]] && DEPEND="${BDEPEND}"
# @FUNCTION: gnuconfig_update
# @USAGE: [file1 file2 ...]
@@ -86,9 +84,9 @@ gnuconfig_do_update() {
if [[ -n ${targetlist} ]] ; then
for target in ${targetlist} ; do
[[ -L ${target} ]] && rm -f "${target}"
- einfo " Updating ${target/$startdir\//}"
+ ebegin " Updating ${target/$startdir\//}"
cp -f "${configsubs_dir}/${file}" "${target}"
- eend $?
+ eend $? || die
done
else
ewarn " No ${file} found in ${startdir}, skipping ..."
@@ -107,8 +105,8 @@ gnuconfig_findnewest() {
local locations=()
local prefix
- case ${EAPI:-0} in
- 0|4|5|6)
+ case ${EAPI} in
+ 5|6)
prefix="${EPREFIX}"
;;
*)
diff --git a/sdk_container/src/third_party/portage-stable/eclass/java-pkg-opt-2.eclass b/sdk_container/src/third_party/portage-stable/eclass/java-pkg-opt-2.eclass
index 92f2cb5314..b4461d7f14 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/java-pkg-opt-2.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/java-pkg-opt-2.eclass
@@ -23,7 +23,7 @@ _JAVA_PKG_OPT_2_ECLASS=1
inherit java-utils-2
-# @ECLASS-VARIABLE: JAVA_PKG_OPT_USE
+# @ECLASS_VARIABLE: JAVA_PKG_OPT_USE
# @DESCRIPTION:
# USE flag to control if optional Java stuff is build. Defaults to 'java'.
JAVA_PKG_OPT_USE=${JAVA_PKG_OPT_USE:-java}
diff --git a/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass b/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass
index a79e865e66..4f50ce39c5 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/java-utils-2.eclass
@@ -43,22 +43,7 @@ has test ${JAVA_PKG_IUSE} && RESTRICT+=" !test? ( test )"
JAVA_PKG_E_DEPEND=">=dev-java/java-config-2.2.0-r3"
has source ${JAVA_PKG_IUSE} && JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} source? ( app-arch/zip )"
-# @ECLASS-VARIABLE: JAVA_PKG_WANT_BOOTCLASSPATH
-# @DEFAULT_UNSET
-# @DESCRIPTION:
-# The version of bootclasspath the package needs to work. Translates to a proper
-# dependency. The bootclasspath can then be obtained by java-ant_rewrite-bootclasspath
-if [[ -n "${JAVA_PKG_WANT_BOOTCLASSPATH}" ]]; then
- if [[ "${JAVA_PKG_WANT_BOOTCLASSPATH}" == "1.5" ]]; then
- JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} >=dev-java/gnu-classpath-0.98-r1:0.98"
- else
- eerror "Unknown value of JAVA_PKG_WANT_BOOTCLASSPATH"
- # since die in global scope doesn't work, this will make repoman fail
- JAVA_PKG_E_DEPEND="${JAVA_PKG_E_DEPEND} BAD_JAVA_PKG_WANT_BOOTCLASSPATH"
- fi
-fi
-
-# @ECLASS-VARIABLE: JAVA_PKG_ALLOW_VM_CHANGE
+# @ECLASS_VARIABLE: JAVA_PKG_ALLOW_VM_CHANGE
# @DESCRIPTION:
# Allow this eclass to change the active VM?
# If your system VM isn't sufficient for the package, the build will fail
@@ -68,7 +53,7 @@ fi
# should not be used in the final ebuild.
JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
-# @ECLASS-VARIABLE: JAVA_PKG_FORCE_VM
+# @ECLASS_VARIABLE: JAVA_PKG_FORCE_VM
# @DEFAULT_UNSET
# @DESCRIPTION:
# Explicitly set a particular VM to use. If its not valid, it'll fall back to
@@ -76,12 +61,12 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
#
# Should only be used for testing and debugging.
#
-# Example: use sun-jdk-1.5 to emerge foo:
+# Example: use openjdk-11 to emerge foo:
# @CODE
-# JAVA_PKG_FORCE_VM=sun-jdk-1.5 emerge foo
+# JAVA_PKG_FORCE_VM=openjdk-11 emerge foo
# @CODE
-# @ECLASS-VARIABLE: JAVA_PKG_WANT_BUILD_VM
+# @ECLASS_VARIABLE: JAVA_PKG_WANT_BUILD_VM
# @DEFAULT_UNSET
# @DESCRIPTION:
# A list of VM handles to choose a build VM from. If the list contains the
@@ -93,7 +78,7 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
# covered by DEPEND.
# Requires JAVA_PKG_WANT_SOURCE and JAVA_PKG_WANT_TARGET to be set as well.
-# @ECLASS-VARIABLE: JAVA_PKG_WANT_SOURCE
+# @ECLASS_VARIABLE: JAVA_PKG_WANT_SOURCE
# @DEFAULT_UNSET
# @DESCRIPTION:
# Specify a non-standard Java source version for compilation (via javac -source
@@ -103,12 +88,12 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
#
# Should generally only be used for testing and debugging.
#
-# Use 1.4 source to emerge baz
+# Use 1.8 source to emerge baz
# @CODE
-# JAVA_PKG_WANT_SOURCE=1.4 emerge baz
+# JAVA_PKG_WANT_SOURCE=1.8 emerge baz
# @CODE
-# @ECLASS-VARIABLE: JAVA_PKG_WANT_TARGET
+# @ECLASS_VARIABLE: JAVA_PKG_WANT_TARGET
# @DEFAULT_UNSET
# @DESCRIPTION:
# Same as JAVA_PKG_WANT_SOURCE (see above) but for javac -target parameter,
@@ -118,12 +103,12 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
#
# Should generally only be used for testing and debugging.
#
-# emerge bar to be compatible with 1.3
+# emerge bar to be compatible with 1.8
# @CODE
-# JAVA_PKG_WANT_TARGET=1.3 emerge bar
+# JAVA_PKG_WANT_TARGET=1.8 emerge bar
# @CODE
-# @ECLASS-VARIABLE: JAVA_TEST_EXTRA_ARGS
+# @ECLASS_VARIABLE: JAVA_TEST_EXTRA_ARGS
# @DEFAULT_UNSET
# @DESCRIPTION:
# Array of extra arguments that should be passed to java command when running tests.
@@ -139,7 +124,21 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
# )
# @CODE
-# @ECLASS-VARIABLE: JAVA_PKG_DEBUG
+# @ECLASS_VARIABLE: JAVA_TEST_RUNNER_EXTRA_ARGS
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Array of extra arguments that should be passed to the test runner when running tests.
+# It is useful when you need to pass an extra argument to the test runner.
+#
+# It is used only when running tests.
+#
+# @CODE
+# JAVA_TEST_RUNNER_EXTRA_ARGS=(
+# -verbose 3
+# )
+# @CODE
+
+# @ECLASS_VARIABLE: JAVA_PKG_DEBUG
# @DEFAULT_UNSET
# @DESCRIPTION:
# A variable to be set with "yes" or "y", or ANY string of length non equal to
@@ -149,7 +148,7 @@ JAVA_PKG_ALLOW_VM_CHANGE=${JAVA_PKG_ALLOW_VM_CHANGE:="yes"}
# JAVA_PKG_DEBUG="yes"
# @CODE
-# @ECLASS-VARIABLE: JAVA_RM_FILES
+# @ECLASS_VARIABLE: JAVA_RM_FILES
# @DEFAULT_UNSET
# @DESCRIPTION:
# An array containing a list of files to remove. If defined, this array will be
@@ -177,7 +176,7 @@ JAVA_PKG_COMPILER_DIR=${JAVA_PKG_COMPILER_DIR:="/usr/share/java-config-2/compile
# Can be overloaded, but it should be overloaded only for local testing.
JAVA_PKG_COMPILERS_CONF=${JAVA_PKG_COMPILERS_CONF:="/etc/java-config-2/build/compilers.conf"}
-# @ECLASS-VARIABLE: JAVA_PKG_FORCE_COMPILER
+# @ECLASS_VARIABLE: JAVA_PKG_FORCE_COMPILER
# @INTERNAL
# @DEFAULT_UNSET
# @DESCRIPTION:
@@ -191,7 +190,7 @@ JAVA_PKG_COMPILERS_CONF=${JAVA_PKG_COMPILERS_CONF:="/etc/java-config-2/build/com
# JAVA_PKG_FORCE_COMPILER="jikes javac"
# @CODE
-# @ECLASS-VARIABLE: JAVA_PKG_FORCE_ANT_TASKS
+# @ECLASS_VARIABLE: JAVA_PKG_FORCE_ANT_TASKS
# @DEFAULT_UNSET
# @DESCRIPTION:
# An $IFS separated list of ant tasks. Can be set in environment before calling
@@ -317,7 +316,6 @@ java-pkg_rm_files() {
[[ ! -f "${filename}" ]] && die "${filename} is not a regular file. Aborting."
einfo "Removing unneeded file ${filename}"
rm -f "${S}/${filename}" || die "cannot remove ${filename}"
- eend $?
done
}
@@ -1373,7 +1371,7 @@ java-pkg_register-environment-variable() {
# @DESCRIPTION:
# Returns classpath of a given bootclasspath-providing package version.
#
-# @param $1 - the version of bootclasspath (e.g. 1.5), 'auto' for bootclasspath
+# @param $1 - the version of bootclasspath (e.g. 1.8), 'auto' for bootclasspath
# of the current JDK
java-pkg_get-bootclasspath() {
local version="${1}"
@@ -1383,9 +1381,6 @@ java-pkg_get-bootclasspath() {
auto)
bcp="$(java-config -g BOOTCLASSPATH)"
;;
- 1.5)
- bcp="$(java-pkg_getjars --build-only gnu-classpath-0.98)"
- ;;
*)
eerror "unknown parameter of java-pkg_get-bootclasspath"
die "unknown parameter of java-pkg_get-bootclasspath"
@@ -1807,8 +1802,18 @@ ejunit_() {
if [[ "${junit}" == "junit-4" ]] ; then
runner=org.junit.runner.JUnitCore
fi
- debug-print "Calling: java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner} ${@}"
- java -cp "${cp}" -Djava.io.tmpdir="${T}/" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner} "${@}" || die "Running junit failed"
+
+ local args=(
+ -cp ${cp}
+ -Djava.io.tmpdir="${T}"
+ -Djava.awt.headless=true
+ ${JAVA_TEST_EXTRA_ARGS[@]}
+ ${runner}
+ ${JAVA_TEST_RUNNER_EXTRA_ARGS[@]}
+ ${@}
+ )
+ debug-print "Calling: java ${args[@]}"
+ java "${args[@]}" || die "Running junit failed"
}
# @FUNCTION: ejunit
@@ -1886,12 +1891,26 @@ etestng() {
tests+="${test},"
done
- debug-print "java -cp \"${cp}\" -Djava.io.tmpdir=\"${T}\""\
- "-Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]} ${runner}"\
- "-usedefaultlisteners false -testclass ${tests}"
- java -cp "${cp}" -Djava.io.tmpdir=\"${T}\" -Djava.awt.headless=true ${JAVA_TEST_EXTRA_ARGS[@]}\
- ${runner} -usedefaultlisteners false -testclass ${tests}\
- || die "Running TestNG failed."
+ local args=(
+ -cp ${cp}
+ -Djava.io.tmpdir="${T}"
+ -Djava.awt.headless=true
+ ${JAVA_TEST_EXTRA_ARGS[@]}
+ ${runner}
+ ${JAVA_TEST_RUNNER_EXTRA_ARGS[@]}
+ )
+
+ if [[ ! "${JAVA_TEST_RUNNER_EXTRA_ARGS[@]}" =~ "-usedefaultlisteners" ]]; then
+ args+=(
+ -verbose 3
+ -usedefaultlisteners true
+ )
+ fi
+
+ args+=( -testclass ${tests} )
+
+ debug-print "java ${args[@]}"
+ java ${args[@]} || die "Running TestNG failed."
}
# @FUNCTION: java-utils-2_src_prepare
@@ -2099,8 +2118,9 @@ ejavac() {
einfo "${compiler_executable} ${javac_args} ${@}"
fi
- ebegin "Compiling"
- ${compiler_executable} ${javac_args} "${@}" || die "ejavac failed"
+ local args=( ${compiler_executable} ${javac_args} "${@}" )
+ echo "${args[@]}" >&2
+ "${args[@]}" || die "ejavac failed"
}
# @FUNCTION: ejavadoc
@@ -2125,8 +2145,9 @@ ejavadoc() {
einfo "javadoc ${javadoc_args} ${@}"
fi
- ebegin "Generating JavaDoc"
- javadoc ${javadoc_args} "${@}" || die "ejavadoc failed"
+ local args=( javadoc ${javadoc_args} "${@}" )
+ echo "${args[@]}" >&2
+ "${args[@]}" || die "ejavadoc failed"
}
# @FUNCTION: java-pkg_filter-compiler
@@ -2545,20 +2566,9 @@ java-pkg_setup-vm() {
debug-print-function ${FUNCNAME} $*
local vendor="$(java-pkg_get-vm-vendor)"
- if [[ "${vendor}" == "sun" ]] && java-pkg_is-vm-version-ge "1.5" ; then
- addpredict "/dev/random"
- elif [[ "${vendor}" == "ibm" ]]; then
- addpredict "/proc/self/maps"
- addpredict "/proc/cpuinfo"
- addpredict "/proc/self/coredump_filter"
- elif [[ "${vendor}" == "oracle" ]]; then
+ if [[ "${vendor}" == icedtea* ]] && java-pkg_is-vm-version-ge "1.8" ; then
addpredict "/dev/random"
addpredict "/proc/self/coredump_filter"
- elif [[ "${vendor}" == icedtea* ]] && java-pkg_is-vm-version-ge "1.7" ; then
- addpredict "/dev/random"
- addpredict "/proc/self/coredump_filter"
- elif [[ "${vendor}" == "jrockit" ]]; then
- addpredict "/proc/cpuinfo"
fi
}
diff --git a/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass b/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass
index e70fd715ae..a38f415882 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/libtool.eclass
@@ -1,12 +1,10 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# Flatcar: Support EAPI 0 and 4.
-
# @ECLASS: libtool.eclass
# @MAINTAINER:
# base-system@gentoo.org
-# @SUPPORTED_EAPIS: 0 4 5 6 7 8
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: quickly update bundled libtool code
# @DESCRIPTION:
# This eclass patches ltmain.sh distributed with libtoolized packages with the
@@ -20,7 +18,7 @@ if [[ -z ${_LIBTOOL_ECLASS} ]]; then
_LIBTOOL_ECLASS=1
case ${EAPI:-0} in
- 0|4|5|6) DEPEND=">=app-portage/elt-patches-20170815" ;;
+ 5|6) DEPEND=">=app-portage/elt-patches-20170815" ;;
7|8) BDEPEND=">=app-portage/elt-patches-20170815" ;;
*) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
esac
diff --git a/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass b/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass
index c4c33a92b9..42efdc9def 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/multilib-build.eclass
@@ -1,14 +1,12 @@
-# Copyright 2013-2021 Gentoo Authors
+# Copyright 2013-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# Flatcar: Support EAPI 4.
-
# @ECLASS: multilib-build.eclass
# @MAINTAINER:
# Michał Górny
# @AUTHOR:
# Author: Michał Górny
-# @SUPPORTED_EAPIS: 4 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @PROVIDES: multibuild
# @BLURB: flags and utility functions for building multilib packages
# @DESCRIPTION:
@@ -21,17 +19,16 @@
# to properly request multilib enabled.
case ${EAPI} in
- 4|5|6|7|8) ;;
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_MULTILIB_BUILD} ]]; then
-_MULTILIB_BUILD=1
+if [[ -z ${_MULTILIB_BUILD_ECLASS} ]]; then
+_MULTILIB_BUILD_ECLASS=1
-[[ ${EAPI} == [45] ]] && inherit eutils
inherit multibuild multilib
-# @ECLASS-VARIABLE: _MULTILIB_FLAGS
+# @ECLASS_VARIABLE: _MULTILIB_FLAGS
# @INTERNAL
# @DESCRIPTION:
# The list of multilib flags and corresponding ABI values. If the same
@@ -55,7 +52,7 @@ _MULTILIB_FLAGS=(
)
readonly _MULTILIB_FLAGS
-# @ECLASS-VARIABLE: MULTILIB_COMPAT
+# @ECLASS_VARIABLE: MULTILIB_COMPAT
# @DEFAULT_UNSET
# @DESCRIPTION:
# List of multilib ABIs supported by the ebuild. If unset, defaults to
@@ -79,7 +76,7 @@ readonly _MULTILIB_FLAGS
# MULTILIB_COMPAT=( abi_x86_{32,64} )
# @CODE
-# @ECLASS-VARIABLE: MULTILIB_USEDEP
+# @ECLASS_VARIABLE: MULTILIB_USEDEP
# @OUTPUT_VARIABLE
# @DESCRIPTION:
# The USE-dependency to be used on dependencies (libraries) needing
@@ -91,7 +88,7 @@ readonly _MULTILIB_FLAGS
# net-libs/libbar[ssl,${MULTILIB_USEDEP}]"
# @CODE
-# @ECLASS-VARIABLE: MULTILIB_ABI_FLAG
+# @ECLASS_VARIABLE: MULTILIB_ABI_FLAG
# @OUTPUT_VARIABLE
# @DESCRIPTION:
# The complete ABI name. Resembles the USE flag name.
@@ -246,23 +243,6 @@ multilib_parallel_foreach_abi() {
multibuild_foreach_variant _multilib_multibuild_wrapper "${@}"
}
-# @FUNCTION: multilib_for_best_abi
-# @USAGE: ...
-# @DESCRIPTION:
-# Runs the given command with setup for the 'best' (usually native) ABI.
-multilib_for_best_abi() {
- debug-print-function ${FUNCNAME} "${@}"
-
- [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead"
-
- eqawarn "QA warning: multilib_for_best_abi() function is deprecated and should"
- eqawarn "not be used. The multilib_is_native_abi() check may be used instead."
-
- local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abi_pairs) )
-
- multibuild_for_best_variant _multilib_multibuild_wrapper "${@}"
-}
-
# @FUNCTION: multilib_check_headers
# @DESCRIPTION:
# Check whether the header files are consistent between ABIs.
@@ -321,7 +301,7 @@ multilib_copy_sources() {
multibuild_copy_sources
}
-# @ECLASS-VARIABLE: MULTILIB_WRAPPED_HEADERS
+# @ECLASS_VARIABLE: MULTILIB_WRAPPED_HEADERS
# @DEFAULT_UNSET
# @DESCRIPTION:
# A list of headers to wrap for multilib support. The listed headers
@@ -344,7 +324,7 @@ multilib_copy_sources() {
# )
# @CODE
-# @ECLASS-VARIABLE: MULTILIB_CHOST_TOOLS
+# @ECLASS_VARIABLE: MULTILIB_CHOST_TOOLS
# @DEFAULT_UNSET
# @DESCRIPTION:
# A list of tool executables to preserve for each multilib ABI.
@@ -585,20 +565,6 @@ multilib_is_native_abi() {
[[ ${COMPLETE_MULTILIB} == yes || ${ABI} == ${DEFAULT_ABI} ]]
}
-# @FUNCTION: multilib_build_binaries
-# @DESCRIPTION:
-# Deprecated synonym for multilib_is_native_abi
-multilib_build_binaries() {
- debug-print-function ${FUNCNAME} "${@}"
-
- [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}, use multilib_is_native_abi() instead"
-
- eqawarn "QA warning: multilib_build_binaries is deprecated. Please use the equivalent"
- eqawarn "multilib_is_native_abi function instead."
-
- multilib_is_native_abi "${@}"
-}
-
# @FUNCTION: multilib_native_use_with
# @USAGE: [ []]
# @DESCRIPTION:
@@ -666,7 +632,6 @@ multilib_native_with() {
# of (or 'no' if unspecified) and . Arguments
# are the same as for usex in the EAPI.
#
-# Note: in EAPI 4 you need to inherit eutils to use this function.
multilib_native_usex() {
if multilib_is_native_abi; then
usex "${@}"
diff --git a/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass b/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass
index 220b1f2296..92968b6cf2 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/multilib-minimal.eclass
@@ -1,12 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# Flatcar: Support EAPI 4.
-
# @ECLASS: multilib-minimal.eclass
# @MAINTAINER:
# Michał Górny
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @PROVIDES: multilib-build
# @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions
# @DESCRIPTION:
@@ -25,18 +23,15 @@
#
# If you need generic install rules, use multilib_src_install_all function.
-
case ${EAPI} in
- 4|5|6|7|8) ;;
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-
-[[ ${EAPI} == [45] ]] && inherit eutils
inherit multilib-build
-EXPORT_FUNCTIONS src_configure src_compile src_test src_install
-
+if [[ ! ${_MULTILIB_MINIMAL_ECLASS} ]]; then
+_MULTILIB_MINIMAL_ECLASS=1
multilib-minimal_src_configure() {
debug-print-function ${FUNCNAME} "$@"
@@ -125,3 +120,7 @@ multilib-minimal_src_install() {
einstalldocs
fi
}
+
+fi
+
+EXPORT_FUNCTIONS src_configure src_compile src_test src_install
diff --git a/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass b/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass
index ec2676cb6c..e3c0d78a6e 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/multilib.eclass
@@ -4,14 +4,13 @@
# @ECLASS: multilib.eclass
# @MAINTAINER:
# toolchain@gentoo.org
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: This eclass is for all functions pertaining to handling multilib configurations.
# @DESCRIPTION:
# This eclass is for all functions pertaining to handling multilib configurations.
-case ${EAPI:-0} in
- # EAPI=0 is still used by crossdev, bug #797367
- 0|5|6|7|8) ;;
+case ${EAPI} in
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -40,32 +39,6 @@ has_multilib_profile() {
[ -n "${MULTILIB_ABIS}" -a "${MULTILIB_ABIS}" != "${MULTILIB_ABIS/ /}" ]
}
-# @FUNCTION: get_libdir
-# @RETURN: the libdir for the selected ABI
-# @DESCRIPTION:
-# This function simply returns the desired lib directory. With portage
-# 2.0.51, we now have support for installing libraries to lib32/lib64
-# to accomidate the needs of multilib systems. It's no longer a good idea
-# to assume all libraries will end up in lib. Replace any (sane) instances
-# where lib is named directly with $(get_libdir) if possible.
-#
-# Jeremy Huddleston (23 Dec 2004):
-# Added support for ${ABI} and ${DEFAULT_ABI}. If they're both not set,
-# fall back on old behavior. Any profile that has these set should also
-# depend on a newer version of portage (not yet released) which uses these
-# over CONF_LIBDIR in econf, dolib, etc...
-if [[ ${EAPI} == [05] ]] ; then
- get_libdir() {
- local CONF_LIBDIR
- if [ -n "${CONF_LIBDIR_OVERRIDE}" ] ; then
- # if there is an override, we want to use that... always.
- echo ${CONF_LIBDIR_OVERRIDE}
- else
- get_abi_LIBDIR
- fi
- }
-fi
-
# @FUNCTION: get_abi_var
# @USAGE: [ABI]
# @RETURN: returns the value of ${_} which should be set in make.defaults
@@ -422,9 +395,9 @@ multilib_env() {
# the default abi is set to the 1-level libdir default
- local __libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}"
- local __libdir_riscvdefaultabi=${!__libdir_riscvdefaultabi_variable}
- export ${__libdir_riscvdefaultabi_variable}=${__libdir_riscvdefaultabi:-lib64}
+ local _libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}"
+ local _libdir_riscvdefaultabi=${!_libdir_riscvdefaultabi_variable}
+ export ${_libdir_riscvdefaultabi_variable}=${_libdir_riscvdefaultabi:-lib64}
# all other abi are set to the 2-level libdir default
@@ -454,9 +427,9 @@ multilib_env() {
# the default abi is set to the 1-level libdir default
- local __libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}"
- local __libdir_riscvdefaultabi=${!__libdir_riscvdefaultabi_variable}
- export ${__libdir_riscvdefaultabi_variable}=${__libdir_riscvdefaultabi:-lib}
+ local _libdir_riscvdefaultabi_variable="LIBDIR_${DEFAULT_ABI}"
+ local _libdir_riscvdefaultabi=${!_libdir_riscvdefaultabi_variable}
+ export ${_libdir_riscvdefaultabi_variable}=${_libdir_riscvdefaultabi:-lib}
# all other abi are set to the 2-level libdir default
diff --git a/sdk_container/src/third_party/portage-stable/eclass/pax-utils.eclass b/sdk_container/src/third_party/portage-stable/eclass/pax-utils.eclass
index f48dcdafe0..3830f03df3 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/pax-utils.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/pax-utils.eclass
@@ -29,7 +29,7 @@ esac
if [[ -z ${_PAX_UTILS_ECLASS} ]]; then
_PAX_UTILS_ECLASS=1
-# @ECLASS-VARIABLE: PAX_MARKINGS
+# @ECLASS_VARIABLE: PAX_MARKINGS
# @DESCRIPTION:
# Control which markings are made:
# PT = PT_PAX markings, XT = XATTR_PAX markings
diff --git a/sdk_container/src/third_party/portage-stable/eclass/prefix.eclass b/sdk_container/src/third_party/portage-stable/eclass/prefix.eclass
index 0571dd1fb2..8d50d0ba7b 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/prefix.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/prefix.eclass
@@ -20,7 +20,7 @@ esac
if [[ -z ${_PREFIX_ECLASS} ]]; then
_PREFIX_ECLASS=1
-# @ECLASS-VARIABLE: EPREFIX
+# @ECLASS_VARIABLE: EPREFIX
# @DESCRIPTION:
# The offset prefix of a Gentoo Prefix installation. When Gentoo Prefix
# is not used, ${EPREFIX} should be "". Prefix Portage sets EPREFIX,
diff --git a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass
index 77fb304940..48bf11606c 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain-funcs.eclass
@@ -1,10 +1,10 @@
-# Copyright 2002-2021 Gentoo Authors
+# Copyright 2002-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
# Toolchain Ninjas
-# @SUPPORTED_EAPIS: 5 6 7 8
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: functions to query common info about the toolchain
# @DESCRIPTION:
# The toolchain-funcs aims to provide a complete suite of functions
@@ -13,9 +13,8 @@
# in such a way that you can rely on the function always returning
# something sane.
-case ${EAPI:-0} in
- # EAPI=0 is still used by crossdev, bug #797367
- 0|5|6|7|8) ;;
+case ${EAPI} in
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -453,6 +452,9 @@ econf_build() {
tc-ld-is-gold() {
local out
+ # Ensure ld output is in English.
+ local -x LC_ALL=C
+
# First check the linker directly.
out=$($(tc-getLD "$@") --version 2>&1)
if [[ ${out} == *"GNU gold"* ]] ; then
@@ -483,6 +485,9 @@ tc-ld-is-gold() {
tc-ld-is-lld() {
local out
+ # Ensure ld output is in English.
+ local -x LC_ALL=C
+
# First check the linker directly.
out=$($(tc-getLD "$@") --version 2>&1)
if [[ ${out} == *"LLD"* ]] ; then
@@ -569,11 +574,12 @@ tc-ld-force-bfd() {
fi
}
-# @FUNCTION: tc-has-openmp
+# @FUNCTION: _tc-has-openmp
+# @INTERNAL
# @USAGE: [toolchain prefix]
# @DESCRIPTION:
# See if the toolchain supports OpenMP.
-tc-has-openmp() {
+_tc-has-openmp() {
local base="${T}/test-tc-openmp"
cat <<-EOF > "${base}.c"
#include
@@ -593,6 +599,16 @@ tc-has-openmp() {
return ${ret}
}
+# @FUNCTION: tc-has-openmp
+# @USAGE: [toolchain prefix]
+# @DEPRECATED: tc-check-openmp
+# @DESCRIPTION:
+# See if the toolchain supports OpenMP. This function is deprecated and will be
+# removed on 2023-01-01.
+tc-has-openmp() {
+ _tc-has-openmp "$@"
+}
+
# @FUNCTION: tc-check-openmp
# @DESCRIPTION:
# Test for OpenMP support with the current compiler and error out with
@@ -600,8 +616,21 @@ tc-has-openmp() {
# OpenMP support that has been requested by the ebuild. Using this function
# to test for OpenMP support should be preferred over tc-has-openmp and
# printing a custom message, as it presents a uniform interface to the user.
+#
+# You should test for any necessary OpenMP support in pkg_pretend in order to
+# warn the user of required toolchain changes. You must still check for OpenMP
+# support at build-time, e.g.
+# @CODE
+# pkg_pretend() {
+# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+# }
+#
+# pkg_setup() {
+# [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+# }
+# @CODE
tc-check-openmp() {
- if ! tc-has-openmp; then
+ if ! _tc-has-openmp; then
eerror "Your current compiler does not support OpenMP!"
if tc-is-gcc; then
diff --git a/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass b/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass
index 3e65249712..ed473e0c62 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/toolchain.eclass
@@ -1,21 +1,33 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# Maintainer: Toolchain Ninjas
-# @SUPPORTED_EAPIS: 5 6 7
+# @ECLASS: toolchain.eclass
+# @MAINTAINER:
+# Toolchain Ninjas
+# @SUPPORTED_EAPIS: 7 8
+# @BLURB: Common code for sys-devel/gcc ebuilds
+
+case ${EAPI} in
+ 7) inherit eutils ;;
+ 8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ ! ${_TOOLCHAIN_ECLASS} ]]; then
+_TOOLCHAIN_ECLASS=1
DESCRIPTION="The GNU Compiler Collection"
HOMEPAGE="https://gcc.gnu.org/"
-inherit eutils flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix
+inherit edo flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix
tc_is_live() {
[[ ${PV} == *9999* ]]
}
if tc_is_live ; then
- EGIT_REPO_URI="https://gcc.gnu.org/git/gcc.git"
- # naming style:
+ EGIT_REPO_URI="https://gcc.gnu.org/git/gcc.git https://github.com/gcc-mirror/gcc"
+ # Naming style:
# gcc-10.1.0_pre9999 -> gcc-10-branch
# Note that the micro version is required or lots of stuff will break.
# To checkout master set gcc_LIVE_BRANCH="master" in the ebuild before
@@ -23,20 +35,12 @@ if tc_is_live ; then
EGIT_BRANCH="releases/${PN}-${PV%.?.?_pre9999}"
EGIT_BRANCH=${EGIT_BRANCH//./_}
inherit git-r3
+elif [[ -n ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ inherit git-r3
fi
FEATURES=${FEATURES/multilib-strict/}
-case ${EAPI:-0} in
- 0|1|2|3|4*) die "Need to upgrade to at least EAPI=5" ;;
- 5*|6) inherit eapi7-ver ;;
- 7) ;;
- *) die "I don't speak EAPI ${EAPI}." ;;
-esac
-
-EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
- src_compile src_test src_install pkg_postinst pkg_postrm
-
#---->> globals <<----
export CTARGET=${CTARGET:-${CHOST}}
@@ -53,50 +57,116 @@ is_crosscompile() {
[[ ${CHOST} != ${CTARGET} ]]
}
-# General purpose version check. Without a second arg matches up to minor version (x.x.x)
+# @FUNCTION: tc_version_is_at_least
+# @USAGE: ver1 [ver2]
+# @DESCRIPTION:
+# General purpose version check. Without a second argument, matches
+# up to minor version (x.x.x).
tc_version_is_at_least() {
ver_test "${2:-${GCC_RELEASE_VER}}" -ge "$1"
}
-# General purpose version range check
+# @FUNCTION: tc_version_is_between
+# @USAGE: ver1 ver2
+# @DESCRIPTION:
+# General purpose version range check.
# Note that it matches up to but NOT including the second version
tc_version_is_between() {
tc_version_is_at_least "${1}" && ! tc_version_is_at_least "${2}"
}
+# @ECLASS_VARIABLE: TOOLCHAIN_GCC_PV
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Used to override GCC version. Useful for e.g. live ebuilds or snapshots.
+# Defaults to ${PV}.
+
+# @ECLASS_VARIABLE: TOOLCHAIN_USE_GIT_PATCHES
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Used to force fetching patches from git. Useful for non-released versions
+# of GCC where we don't want to keep creating patchset tarballs for a new
+# release series (e.g. suppose 12.0 just got released, then adding snapshots
+# for 13.0, we don't want to create new patchsets for every single 13.0 snapshot,
+# so just grab patches from git each time if this variable is set).
+
+# @ECLASS_VARIABLE: TOOLCHAIN_PATCH_DEV
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Indicate the developer who hosts the patchset for an ebuild.
+
+# @ECLASS_VARIABLE: GCC_PV
+# @INTERNAL
+# @DESCRIPTION:
+# Internal variable representing (spoofed) GCC version.
GCC_PV=${TOOLCHAIN_GCC_PV:-${PV}}
+
+# @ECLASS_VARIABLE: GCC_PVR
+# @INTERNAL
+# @DESCRIPTION:
+# Full GCC version including revision.
GCC_PVR=${GCC_PV}
[[ ${PR} != "r0" ]] && GCC_PVR=${GCC_PVR}-${PR}
+# @ECLASS_VARIABLE: GCC_RELEASE_VER
+# @INTERNAL
+# @DESCRIPTION:
# GCC_RELEASE_VER must always match 'gcc/BASE-VER' value.
# It's an internal representation of gcc version used for:
# - versioned paths on disk
# - 'gcc -dumpversion' output. Must always match ...
GCC_RELEASE_VER=$(ver_cut 1-3 ${GCC_PV})
+# @ECLASS_VARIABLE: GCC_BRANCH_VER
+# @INTERNAL
+# @DESCRIPTION:
+# GCC branch version.
GCC_BRANCH_VER=$(ver_cut 1-2 ${GCC_PV})
+# @ECLASS_VARIABLE: GCCMAJOR
+# @INTERNAL
+# @DESCRIPTION:
+# Major GCC version.
GCCMAJOR=$(ver_cut 1 ${GCC_PV})
+# @ECLASS_VARIABLE: GCCMINOR
+# @INTERNAL
+# @DESCRIPTION:
+# Minor GCC version.
GCCMINOR=$(ver_cut 2 ${GCC_PV})
+# @ECLASS_VARIABLE: GCCMICRO
+# @INTERNAL
+# @DESCRIPTION:
+# GCC micro version.
GCCMICRO=$(ver_cut 3 ${GCC_PV})
+# @ECLASS_VARIABLE: GCC_CONFIG_VER
+# @INTERNAL
+# @DESCRIPTION:
# Ideally this variable should allow for custom gentoo versioning
# of binary and gcc-config names not directly tied to upstream
-# versioning. In practive it's hard to untangle from gcc/BASE-VER
+# versioning. In practice it's hard to untangle from gcc/BASE-VER
# (GCC_RELEASE_VER) value.
GCC_CONFIG_VER=${GCC_RELEASE_VER}
# Pre-release support. Versioning schema:
# 1.0.0_pre9999: live ebuild
-# 1.2.3_alphaYYYYMMDD: weekly snapshots
+# 1.2.3_pYYYYMMDD (or 1.2.3_preYYYYMMDD for unreleased major versions): weekly snapshots
# 1.2.3_rcYYYYMMDD: release candidates
-if [[ ${GCC_PV} == *_alpha* ]] ; then
- # weekly snapshots
- SNAPSHOT=${GCCMAJOR}-${GCC_PV##*_alpha}
+if [[ ${GCC_PV} == *_pre* ]] ; then
+ # Weekly snapshots
+ SNAPSHOT=${GCCMAJOR}-${GCC_PV##*_pre}
+elif [[ ${GCC_PV} == *_p* ]] ; then
+ # Weekly snapshots
+ SNAPSHOT=${GCCMAJOR}-${GCC_PV##*_p}
elif [[ ${GCC_PV} == *_rc* ]] ; then
- # release candidates
+ # Release candidates
SNAPSHOT=${GCC_PV%_rc*}-RC-${GCC_PV##*_rc}
fi
+# Require minimum gcc version to simplify assumptions.
+# Normally we would require gcc-6+ (based on sys-devel/gcc)
+# but we still have sys-devel/gcc-apple-4.2.1_p5666.
+tc_version_is_at_least 4.2.1 || die "${ECLASS}: ${GCC_RELEASE_VER} is too old."
+
PREFIX=${TOOLCHAIN_PREFIX:-${EPREFIX}/usr}
LIBPATH=${TOOLCHAIN_LIBPATH:-${PREFIX}/lib/gcc/${CTARGET}/${GCC_CONFIG_VER}}
@@ -111,7 +181,7 @@ fi
DATAPATH=${TOOLCHAIN_DATAPATH:-${PREFIX}/share/gcc-data/${CTARGET}/${GCC_CONFIG_VER}}
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
+# Don't install in /usr/include/g++-v3/, but instead to gcc's internal directory.
# We will handle /usr/include/g++-v3/ with gcc-config ...
STDCXX_INCDIR=${TOOLCHAIN_STDCXX_INCDIR:-${LIBPATH}/include/g++-v${GCC_BRANCH_VER/\.*/}}
@@ -121,46 +191,31 @@ LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-excepti
IUSE="test vanilla +nls"
RESTRICT="!test? ( test )"
-tc_supports_dostrip() {
- case ${EAPI:-0} in
- 5*|6) return 1 ;;
- 7) return 0 ;;
- *) die "Update apply_patches() for ${EAPI}." ;;
- esac
-}
-
-tc_supports_dostrip || RESTRICT+=" strip" # cross-compilers need controlled stripping
-
TC_FEATURES=()
tc_has_feature() {
has "$1" "${TC_FEATURES[@]}"
}
-if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
- # --enable-altivec was dropped before gcc-4. We don't set it.
- # We drop USE=altivec for newer gccs only to avoid rebuilds
- # for most stable users. Once gcc-10 is stable we can drop it.
- if ! tc_version_is_at_least 10; then
- IUSE+=" altivec"
- fi
- IUSE+=" debug +cxx +nptl" TC_FEATURES+=(nptl)
+if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
+ IUSE+=" debug +cxx +nptl" TC_FEATURES+=( nptl )
[[ -n ${PIE_VER} ]] && IUSE+=" nopie"
[[ -n ${SPECS_VER} ]] && IUSE+=" nossp"
- # fortran support appeared in 4.1, but 4.1 needs outdated mpfr
- tc_version_is_at_least 4.2 && IUSE+=" +fortran" TC_FEATURES+=(fortran)
- tc_version_is_at_least 3 && IUSE+=" doc hardened multilib objc"
- tc_version_is_between 3 7 && IUSE+=" awt gcj" TC_FEATURES+=(gcj)
- tc_version_is_at_least 3.3 && IUSE+=" pgo"
- tc_version_is_at_least 4.0 &&
- IUSE+=" objc-gc" TC_FEATURES+=(objc-gc)
- tc_version_is_at_least 4.1 && IUSE+=" libssp objc++"
- tc_version_is_at_least 4.2 && IUSE+=" +openmp"
+ IUSE+=" +fortran" TC_FEATURES+=( fortran )
+ IUSE+=" doc hardened multilib objc"
+ tc_version_is_between 3 7 && IUSE+=" awt gcj" TC_FEATURES+=( gcj )
+ IUSE+=" pgo"
+ IUSE+=" objc-gc" TC_FEATURES+=( objc-gc )
+ IUSE+=" libssp objc++"
+ IUSE+=" +openmp"
+
tc_version_is_at_least 4.3 && IUSE+=" fixed-point"
tc_version_is_at_least 4.7 && IUSE+=" go"
+
# sanitizer support appeared in gcc-4.8, but > DEPEND <<----
RDEPEND="sys-libs/zlib
- nls? ( virtual/libintl )"
+ virtual/libiconv
+ nls? ( virtual/libintl )
+"
-tc_version_is_at_least 3 && RDEPEND+=" virtual/libiconv"
-
-if tc_version_is_at_least 4 ; then
- GMP_MPFR_DEPS=">=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0="
- if tc_version_is_at_least 4.3 ; then
- RDEPEND+=" ${GMP_MPFR_DEPS}"
- elif tc_has_feature fortran ; then
- RDEPEND+=" fortran? ( ${GMP_MPFR_DEPS} )"
- fi
+GMP_MPFR_DEPS=">=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0="
+if tc_version_is_at_least 4.3 ; then
+ RDEPEND+=" ${GMP_MPFR_DEPS}"
+elif tc_has_feature fortran ; then
+ RDEPEND+=" fortran? ( ${GMP_MPFR_DEPS} )"
fi
tc_version_is_at_least 4.5 && RDEPEND+=" >=dev-libs/mpc-0.8.1:0="
@@ -230,18 +289,29 @@ BDEPEND="
DEPEND="${RDEPEND}"
if tc_has_feature gcj ; then
- GCJ_DEPS=">=media-libs/libart_lgpl-2.1"
- GCJ_GTK_DEPS="
- x11-base/xorg-proto
- x11-libs/libXt
- x11-libs/libX11
- x11-libs/libXtst
- =x11-libs/gtk+-2*
- virtual/pkgconfig
+ DEPEND+="
+ gcj? (
+ app-arch/zip
+ app-arch/unzip
+ >=media-libs/libart_lgpl-2.1
+ awt? (
+ x11-base/xorg-proto
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libXtst
+ =x11-libs/gtk+-2*
+ x11-libs/pango
+ virtual/pkgconfig
+ )
+ )
"
- tc_version_is_at_least 3.4 && GCJ_GTK_DEPS+=" x11-libs/pango"
- tc_version_is_at_least 4.2 && GCJ_DEPS+=" app-arch/zip app-arch/unzip"
- DEPEND+=" gcj? ( awt? ( ${GCJ_GTK_DEPS} ) ${GCJ_DEPS} )"
+fi
+
+if tc_has_feature sanitize ; then
+ # libsanitizer relies on 'crypt.h' to be present
+ # on target. glibc user to provide it unconditionally.
+ # Nowadays it's a standalone library: bug #802648
+ DEPEND+=" sanitize? ( virtual/libcrypt )"
fi
if tc_has_feature systemtap ; then
@@ -250,41 +320,95 @@ if tc_has_feature systemtap ; then
fi
if tc_has_feature zstd ; then
- DEPEND+=" zstd? ( app-arch/zstd )"
+ DEPEND+=" zstd? ( app-arch/zstd:= )"
+ RDEPEND+=" zstd? ( app-arch/zstd:= )"
fi
if tc_has_feature valgrind; then
BDEPEND+=" valgrind? ( dev-util/valgrind )"
fi
-case ${EAPI:-0} in
- 5*|6) DEPEND+=" ${BDEPEND}" ;;
-esac
+if tc_version_is_at_least 12.0 ; then
+ # D in 12+ is self-hosting and needs D to bootstrap.
+ # TODO: package some binary we can use, like for Ada
+ # bug #840182
+ BDEPEND+=" d? ( || ( sys-devel/gcc[d(-)] =sys-devel/gcc-config-1.9"
+PDEPEND=">=sys-devel/gcc-config-2.3"
#---->> S + SRC_URI essentials <<----
+# @ECLASS_VARIABLE: TOOLCHAIN_PATCH_SUFFIX
+# @DESCRIPTION:
+# Used to override compression used for for patchsets.
+# Default is xz for EAPI 8+ and bz2 for older EAPIs.
+if [[ ${EAPI} == 8 ]] ; then
+ : ${TOOLCHAIN_PATCH_SUFFIX:=xz}
+else
+ # Older EAPIs
+ : ${TOOLCHAIN_PATCH_SUFFIX:=bz2}
+fi
+
+# @ECLASS_VARIABLE: TOOLCHAIN_SET_S
+# @DESCRIPTION:
+# Used to override value of S for snapshots and such. Mainly useful
+# if needing to set GCC_TARBALL_SRC_URI.
+: ${TOOLCHAIN_SET_S:=yes}
+
# Set the source directory depending on whether we're using
# a live git tree, snapshot, or release tarball.
-S=$(
- if tc_is_live ; then
- echo ${EGIT_CHECKOUT_DIR}
- elif [[ -n ${SNAPSHOT} ]] ; then
- echo ${WORKDIR}/gcc-${SNAPSHOT}
- else
- echo ${WORKDIR}/gcc-${GCC_RELEASE_VER}
- fi
-)
+if [[ ${TOOLCHAIN_SET_S} == yes ]] ; then
+ S=$(
+ if tc_is_live ; then
+ echo ${EGIT_CHECKOUT_DIR}
+ elif [[ -n ${SNAPSHOT} ]] ; then
+ echo ${WORKDIR}/gcc-${SNAPSHOT}
+ else
+ echo ${WORKDIR}/gcc-${GCC_RELEASE_VER}
+ fi
+ )
+fi
gentoo_urls() {
- local devspace="HTTP~vapier/dist/URI HTTP~rhill/dist/URI
- HTTP~zorry/patches/gcc/URI HTTP~blueness/dist/URI
- HTTP~tamiko/distfiles/URI HTTP~slyfox/distfiles/URI"
+ # the list is sorted by likelihood of getting the patches tarball from
+ # respective devspace
+ # slyfox's distfiles are mirrored to sam's devspace
+ declare -A devspace_urls=(
+ [soap]=HTTP~soap/distfiles/URI
+ [sam]=HTTP~sam/distfiles/sys-devel/gcc/URI
+ [slyfox]=HTTP~sam/distfiles/URI
+ [xen0n]=HTTP~xen0n/distfiles/sys-devel/gcc/URI
+ [tamiko]=HTTP~tamiko/distfiles/URI
+ [zorry]=HTTP~zorry/patches/gcc/URI
+ [vapier]=HTTP~vapier/dist/URI
+ [blueness]=HTTP~blueness/dist/URI
+ )
+
+ # Newer ebuilds should set TOOLCHAIN_PATCH_DEV and we'll just
+ # return the full URL from the array.
+ if [[ -n ${TOOLCHAIN_PATCH_DEV} ]] ; then
+ local devspace_url=${devspace_urls[${TOOLCHAIN_PATCH_DEV}]}
+ if [[ -n ${devspace_url} ]] ; then
+ local devspace_url_exp=${devspace_url//HTTP/https:\/\/dev.gentoo.org\/}
+ devspace_url_exp=${devspace_url_exp//URI/$1}
+ echo ${devspace_url_exp}
+ return
+ fi
+ fi
+
+ # But we keep the old fallback list for compatibility with
+ # older ebuilds (overlays etc).
+ local devspace="
+ HTTP~soap/distfiles/URI
+ HTTP~sam/distfiles/URI
+ HTTP~sam/distfiles/sys-devel/gcc/URI
+ HTTP~tamiko/distfiles/URI
+ HTTP~zorry/patches/gcc/URI
+ HTTP~vapier/dist/URI
+ HTTP~blueness/dist/URI"
devspace=${devspace//HTTP/https:\/\/dev.gentoo.org\/}
- echo mirror://gentoo/$1 ${devspace//URI/$1}
+ echo ${devspace//URI/$1} mirror://gentoo/$1
}
# This function handles the basics of setting the SRC_URI for a gcc ebuild.
@@ -309,19 +433,19 @@ gentoo_urls() {
# PATCH_GCC_VER
# This should be set to the version of the gentoo patch tarball.
# The resulting filename of this tarball will be:
-# gcc-${PATCH_GCC_VER:-${GCC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
+# gcc-${PATCH_GCC_VER:-${GCC_RELEASE_VER}}-patches-${PATCH_VER}.tar.xz
#
# PIE_VER
# PIE_GCC_VER
# These variables control patching in various updates for the logic
-# controlling Position Independant Executables. PIE_VER is expected
+# controlling Position Independent Executables. PIE_VER is expected
# to be the version of this patch, and PIE_GCC_VER the gcc version of
# the patch:
# An example:
# PIE_VER="8.7.6.5"
# PIE_GCC_VER="3.4.0"
# The resulting filename of this tarball will be:
-# gcc-${PIE_GCC_VER:-${GCC_RELEASE_VER}}-piepatches-v${PIE_VER}.tar.bz2
+# gcc-${PIE_GCC_VER:-${GCC_RELEASE_VER}}-piepatches-v${PIE_VER}.tar.xz
#
# SPECS_VER
# SPECS_GCC_VER
@@ -333,7 +457,7 @@ gentoo_urls() {
# SPECS_VER="8.7.6.5"
# SPECS_GCC_VER="3.4.0"
# The resulting filename of this tarball will be:
-# gcc-${SPECS_GCC_VER:-${GCC_RELEASE_VER}}-specs-${SPECS_VER}.tar.bz2
+# gcc-${SPECS_GCC_VER:-${GCC_RELEASE_VER}}-specs-${SPECS_VER}.tar.xz
#
# CYGWINPORTS_GITREV
# If set, this variable signals that we should apply additional patches
@@ -344,7 +468,7 @@ gentoo_urls() {
# with a Cygwin target.
get_gcc_src_uri() {
export PATCH_GCC_VER=${PATCH_GCC_VER:-${GCC_RELEASE_VER}}
- export UCLIBC_GCC_VER=${UCLIBC_GCC_VER:-${PATCH_GCC_VER}}
+ export MUSL_GCC_VER=${MUSL_GCC_VER:-${PATCH_GCC_VER}}
export PIE_GCC_VER=${PIE_GCC_VER:-${GCC_RELEASE_VER}}
export HTB_GCC_VER=${HTB_GCC_VER:-${GCC_RELEASE_VER}}
export SPECS_GCC_VER=${SPECS_GCC_VER:-${GCC_RELEASE_VER}}
@@ -354,10 +478,10 @@ get_gcc_src_uri() {
if tc_is_live ; then
: # Nothing to do w/git snapshots.
elif [[ -n ${GCC_TARBALL_SRC_URI} ]] ; then
- # pull gcc tarball from another location. Frequently used by gnat-gpl.
+ # Pull gcc tarball from another location. Frequently used by gnat-gpl.
GCC_SRC_URI="${GCC_TARBALL_SRC_URI}"
elif [[ -n ${SNAPSHOT} ]] ; then
- GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz"
+ GCC_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz"
else
if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then
GCC_SRC_URI="mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.xz"
@@ -366,18 +490,18 @@ get_gcc_src_uri() {
fi
fi
- [[ -n ${UCLIBC_VER} ]] && \
- GCC_SRC_URI+=" $(gentoo_urls gcc-${UCLIBC_GCC_VER}-uclibc-patches-${UCLIBC_VER}.tar.bz2)"
[[ -n ${PATCH_VER} ]] && \
- GCC_SRC_URI+=" $(gentoo_urls gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2)"
+ GCC_SRC_URI+=" $(gentoo_urls gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.${TOOLCHAIN_PATCH_SUFFIX})"
+ [[ -n ${MUSL_VER} ]] && \
+ GCC_SRC_URI+=" $(gentoo_urls gcc-${MUSL_GCC_VER}-musl-patches-${MUSL_VER}.tar.${TOOLCHAIN_PATCH_SUFFIX})"
[[ -n ${PIE_VER} ]] && \
- PIE_CORE=${PIE_CORE:-gcc-${PIE_GCC_VER}-piepatches-v${PIE_VER}.tar.bz2} && \
+ PIE_CORE=${PIE_CORE:-gcc-${PIE_GCC_VER}-piepatches-v${PIE_VER}.tar.${TOOLCHAIN_PATCH_SUFFIX}} && \
GCC_SRC_URI+=" $(gentoo_urls ${PIE_CORE})"
# gcc minispec for the hardened gcc 4 compiler
[[ -n ${SPECS_VER} ]] && \
- GCC_SRC_URI+=" $(gentoo_urls gcc-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.bz2)"
+ GCC_SRC_URI+=" $(gentoo_urls gcc-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.${TOOLCHAIN_PATCH_SUFFIX})"
if tc_has_feature gcj ; then
if tc_version_is_at_least 4.5 ; then
@@ -415,42 +539,61 @@ toolchain_pkg_pretend() {
#---->> pkg_setup <<----
toolchain_pkg_setup() {
- # we dont want to use the installed compiler's specs to build gcc
+ # We don't want to use the installed compiler's specs to build gcc
unset GCC_SPECS
- unset LANGUAGES #265283
+
+ # bug #265283
+ unset LANGUAGES
+
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
}
#---->> src_unpack <<----
+# @FUNCTION: toolchain_fetch_git_patches
+# @INTERNAL
+# @DESCRIPTION:
+# Fetch patches from Gentoo's gcc-patches repository.
+toolchain_fetch_git_patches() {
+ local gcc_patches_repo="https://anongit.gentoo.org/git/proj/gcc-patches.git https://github.com/gentoo/gcc-patches"
+
+ # If we weren't given a patchset number, pull it from git too.
+ einfo "Fetching patchset from git as PATCH_VER is unset"
+ EGIT_REPO_URI=${gcc_patches_repo} EGIT_BRANCH="master" \
+ EGIT_CHECKOUT_DIR="${WORKDIR}"/patch.tmp \
+ git-r3_src_unpack
+
+ mkdir "${WORKDIR}"/patch || die
+ mv "${WORKDIR}"/patch.tmp/${PATCH_GCC_VER}/gentoo/* "${WORKDIR}"/patch || die
+
+ if [[ -n ${MUSL_VER} || -d "${WORKDIR}"/musl ]] && [[ ${CTARGET} == *musl* ]] ; then
+ mkdir "${WORKDIR}"/musl || die
+ mv "${WORKDIR}"/patch.tmp/${PATCH_GCC_VER}/musl/* "${WORKDIR}"/musl || die
+ fi
+}
+
toolchain_src_unpack() {
if tc_is_live ; then
git-r3_src_unpack
+
+ if [[ -z ${PATCH_VER} ]] && ! use vanilla ; then
+ toolchain_fetch_git_patches
+ fi
+ elif [[ -z ${PATCH_VER} && -n ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ toolchain_fetch_git_patches
fi
- default_src_unpack
+ default
}
#---->> src_prepare <<----
-# 'epatch' is not available in EAPI=7. Abstract away patchset application
-# until we eventually get all gcc ebuilds on EAPI=7 or later.
-tc_apply_patches() {
- [[ ${#@} -lt 2 ]] && die "usage: tc_apply_patches "
-
- einfo "$1"; shift
-
- case ${EAPI:-0} in
- # Note: even for EAPI=6 we used 'epatch' semantics. To avoid
- # breaking existing ebuilds use 'eapply' only in EAPI=7 or later.
- 5*|6) epatch "$@" ;;
- 7) eapply "$@" ;;
- *) die "Update apply_patches() for ${EAPI}." ;;
- esac
-}
-
toolchain_src_prepare() {
export BRANDING_GCC_PKGVERSION="Gentoo ${GCC_PVR}"
- cd "${S}"
+ cd "${S}" || die
do_gcc_gentoo_patches
do_gcc_PIE_patches
@@ -460,22 +603,18 @@ toolchain_src_prepare() {
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, commit ${EGIT_VERSION}"
fi
- case ${EAPI:-0} in
- 5*) epatch_user;;
- 6|7) eapply_user ;;
- *) die "Update toolchain_src_prepare() for ${EAPI}." ;;
- esac
+ eapply_user
if ( tc_version_is_at_least 4.8.2 || _tc_use_if_iuse hardened ) \
&& ! use vanilla ; then
make_gcc_hard
fi
- # make sure the pkg config files install into multilib dirs.
- # since we configure with just one --libdir, we can't use that
- # (as gcc itself takes care of building multilibs). #435728
+ # Make sure the pkg-config files install into multilib dirs.
+ # Since we configure with just one --libdir, we can't use that
+ # (as gcc itself takes care of building multilibs). bug #435728
find "${S}" -name Makefile.in \
- -exec sed -i '/^pkgconfigdir/s:=.*:=$(toolexeclibdir)/pkgconfig:' {} +
+ -exec sed -i '/^pkgconfigdir/s:=.*:=$(toolexeclibdir)/pkgconfig:' {} + || die
setup_multilib_osdirnames
gcc_version_patch
@@ -508,7 +647,7 @@ toolchain_src_prepare() {
gnuconfig_update
- # update configure files
+ # Update configure files
local f
einfo "Fixing misc issues in configure files"
for f in $(grep -l 'autoconf version 2.13' $(find "${S}" -name configure)) ; do
@@ -517,12 +656,12 @@ toolchain_src_prepare() {
|| eerror "Please file a bug about this"
eend $?
done
- sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk #215828
+ # bug #215828
+ sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk || die
- # Prevent new texinfo from breaking old versions (see #198182, #464008)
- if tc_version_is_at_least 4.1; then
- tc_apply_patches "Remove texinfo (bug #198182, bug #464008)" "${FILESDIR}"/gcc-configure-texinfo.patch
- fi
+ # Prevent new texinfo from breaking old versions (see #198182, bug #464008)
+ einfo "Remove texinfo (bug #198182, bug #464008)"
+ eapply "${FILESDIR}"/gcc-configure-texinfo.patch
# >=gcc-4
if [[ -x contrib/gcc_update ]] ; then
@@ -536,12 +675,28 @@ toolchain_src_prepare() {
do_gcc_gentoo_patches() {
if ! use vanilla ; then
- if [[ -n ${PATCH_VER} ]] ; then
- tc_apply_patches "Applying Gentoo patches ..." "${WORKDIR}"/patch/*.patch
+ if [[ -n ${PATCH_VER} || -d "${WORKDIR}"/patch ]] ; then
+ einfo "Applying Gentoo patches ..."
+ eapply "${WORKDIR}"/patch/*.patch
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION} p${PATCH_VER}"
fi
- if [[ -n ${UCLIBC_VER} ]] ; then
- tc_apply_patches "Applying uClibc patches ..." "${WORKDIR}"/uclibc/*.patch
+
+ if [[ -n ${MUSL_VER} || -d "${WORKDIR}"/musl ]] && [[ ${CTARGET} == *musl* ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ # We don't want to apply some patches when cross-compiling.
+ if [[ -d "${WORKDIR}"/musl/nocross ]] ; then
+ rm -fv "${WORKDIR}"/musl/nocross/*.patch || die
+ else
+ # Just make an empty directory to make the glob below easier.
+ mkdir -p "${WORKDIR}"/musl/nocross || die
+ fi
+ fi
+
+ local shopt_save=$(shopt -p nullglob)
+ shopt -s nullglob
+ einfo "Applying musl patches ..."
+ eapply "${WORKDIR}"/musl/{,nocross/}*.patch
+ ${shopt_save}
fi
fi
}
@@ -550,7 +705,8 @@ do_gcc_PIE_patches() {
want_pie || return 0
use vanilla && return 0
- tc_apply_patches "Applying pie patches ..." "${WORKDIR}"/piepatch/*.patch
+ einfo "Applying PIE patches ..."
+ eapply "${WORKDIR}"/piepatch/*.patch
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, pie-${PIE_VER}"
}
@@ -560,7 +716,7 @@ do_gcc_CYGWINPORTS_patches() {
use elibc_Cygwin || return 0
local p d="${WORKDIR}/gcc-${CYGWINPORTS_GITREV}"
- # readarray -t is available since bash-4.4 only, #690686
+ # readarray -t is available since bash-4.4 only, bug #690686
local patches=( $(
for p in $(
sed -e '1,/PATCH_URI="/d;/"/,$d' < "${d}"/gcc.cygport
@@ -568,21 +724,23 @@ do_gcc_CYGWINPORTS_patches() {
echo "${d}/${p}"
done
) )
- tc_apply_patches "Applying cygwin port patches ..." ${patches[*]}
+ einfo "Applying cygwin port patches ..."
+ eapply -- "${patches[@]}"
}
# configure to build with the hardened GCC specs as the default
make_gcc_hard() {
local gcc_hard_flags=""
- # If we use gcc-6 or newer with pie enable to compile older gcc we need to pass -no-pie
- # to stage1; bug #618908
+ # If we use gcc-6 or newer with PIE enabled to compile older gcc,
+ # we need to pass -no-pie to stage1; bug #618908
if ! tc_version_is_at_least 6.0 && [[ $(gcc-major-version) -ge 6 ]] ; then
einfo "Disabling PIE in stage1 (only) ..."
sed -i -e "/^STAGE1_LDFLAGS/ s/$/ -no-pie/" "${S}"/Makefile.in || die
fi
- # Gcc >= 6.X we can use configurations options to turn pie/ssp on as default
+ # For gcc >= 6.x, we can use configuration options to turn PIE/SSP
+ # on as default
if tc_version_is_at_least 6.0 ; then
if _tc_use_if_iuse pie ; then
einfo "Updating gcc to use automatic PIE building ..."
@@ -592,16 +750,21 @@ make_gcc_hard() {
fi
if _tc_use_if_iuse hardened ; then
# Will add some hardened options as default, like:
- # -fstack-clash-protection
- # -z now
- # see *_all_extra-options.patch gcc patches.
+ # * -fstack-clash-protection
+ # * -z now
+ # See gcc *_all_extra-options.patch patches.
gcc_hard_flags+=" -DEXTRA_OPTIONS"
- # rebrand to make bug reports easier
+
+ if _tc_use_if_iuse cet && [[ ${CTARGET} == *x86_64*-linux* ]] ; then
+ gcc_hard_flags+=" -DEXTRA_OPTIONS_CF"
+ fi
+
+ # Rebrand to make bug reports easier
BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened}
fi
else
if _tc_use_if_iuse hardened ; then
- # rebrand to make bug reports easier
+ # Rebrand to make bug reports easier
BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened}
if hardened_gcc_works ; then
einfo "Updating gcc to use automatic PIE + SSP building ..."
@@ -615,7 +778,7 @@ make_gcc_hard() {
ewarn "PIE has not been enabled by default"
gcc_hard_flags+=" -DEFAULT_SSP"
else
- # do nothing if hardened isn't supported, but don't die either
+ # Do nothing if hardened isn't supported, but don't die either
ewarn "hardened is not supported for this arch in this gcc version"
return 0
fi
@@ -627,16 +790,16 @@ make_gcc_hard() {
fi
fi
- # we want to be able to control the pie patch logic via something other
+ # We want to be able to control the PIE patch logic via something other
# than ALL_CFLAGS...
sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \
-e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \
- -i "${S}"/gcc/Makefile.in
+ -i "${S}"/gcc/Makefile.in || die
# Need to add HARD_CFLAGS to ALL_CXXFLAGS on >= 4.7
if tc_version_is_at_least 4.7 ; then
sed -e '/^ALL_CXXFLAGS/iHARD_CFLAGS = ' \
-e 's|^ALL_CXXFLAGS = |ALL_CXXFLAGS = $(HARD_CFLAGS) |' \
- -i "${S}"/gcc/Makefile.in
+ -i "${S}"/gcc/Makefile.in || die
fi
sed -i \
@@ -665,13 +828,13 @@ setup_multilib_osdirnames() {
local config
local libdirs="../lib64 ../lib32"
- # this only makes sense for some Linux targets
+ # This only makes sense for some Linux targets
case ${CTARGET} in
- x86_64*-linux*) config="i386" ;;
- powerpc64*-linux*) config="rs6000" ;;
- sparc64*-linux*) config="sparc" ;;
- s390x*-linux*) config="s390" ;;
- *) return 0 ;;
+ x86_64*-linux*) config="i386" ;;
+ powerpc64*-linux*) config="rs6000" ;;
+ sparc64*-linux*) config="sparc" ;;
+ s390x*-linux*) config="s390" ;;
+ *) return 0 ;;
esac
config+="/t-linux64"
@@ -680,14 +843,14 @@ setup_multilib_osdirnames() {
sed_args+=( -e 's:$[(]call if_multiarch[^)]*[)]::g' )
fi
if [[ ${SYMLINK_LIB} == "yes" ]] ; then
- einfo "updating multilib directories to be: ${libdirs}"
+ einfo "Updating multilib directories to be: ${libdirs}"
if tc_version_is_at_least 4.6.4 || tc_version_is_at_least 4.7 ; then
sed_args+=( -e '/^MULTILIB_OSDIRNAMES.*lib32/s:[$][(]if.*):../lib32:' )
else
sed_args+=( -e "/^MULTILIB_OSDIRNAMES/s:=.*:= ${libdirs}:" )
fi
else
- einfo "using upstream multilib; disabling lib32 autodetection"
+ einfo "Using upstream multilib; disabling lib32 autodetection"
sed_args+=( -r -e 's:[$][(]if.*,(.*)[)]:\1:' )
fi
sed -i "${sed_args[@]}" "${S}"/gcc/config/${config} || die
@@ -699,7 +862,7 @@ gcc_version_patch() {
local version_string=${GCC_RELEASE_VER}
- einfo "patching gcc version: ${version_string} (${BRANDING_GCC_PKGVERSION})"
+ einfo "Patching gcc version: ${version_string} (${BRANDING_GCC_PKGVERSION})"
local gcc_sed=( -e 's:gcc\.gnu\.org/bugs\.html:bugs\.gentoo\.org/:' )
if grep -qs VERSUFFIX "${S}"/gcc/version.c ; then
@@ -717,15 +880,21 @@ toolchain_src_configure() {
downgrade_arch_flags
gcc_do_filter_flags
+ if ! tc_version_is_at_least 11 && [[ $(gcc-major-version) -ge 12 ]] ; then
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105695
+ # bug #849359
+ export ac_cv_std_swap_in_utility=no
+ fi
+
einfo "CFLAGS=\"${CFLAGS}\""
einfo "CXXFLAGS=\"${CXXFLAGS}\""
einfo "LDFLAGS=\"${LDFLAGS}\""
# Force internal zip based jar script to avoid random
- # issues with 3rd party jar implementations. #384291
+ # issues with 3rd party jar implementations. bug #384291
export JAR=no
- # For hardened gcc 4.3 piepatchset to build the hardened specs
+ # For hardened gcc 4.3: add the pie patchset to build the hardened specs
# file (build.specs) to use when building gcc.
if ! tc_version_is_at_least 4.4 && want_minispecs ; then
setup_minispecs_gcc_build_specs
@@ -733,6 +902,8 @@ toolchain_src_configure() {
local confgcc=( --host=${CHOST} )
+ local build_config_targets=()
+
if is_crosscompile || tc-is-cross-compiler ; then
# Straight from the GCC install doc:
# "GCC has code to correctly determine the correct value for target
@@ -772,16 +943,13 @@ toolchain_src_configure() {
is_d && GCC_LANG+=",d"
is_gcj && GCC_LANG+=",java"
is_go && GCC_LANG+=",go"
- is_jit && GCC_LANG+=",jit"
if is_objc || is_objcxx ; then
GCC_LANG+=",objc"
- if tc_version_is_at_least 4 ; then
- use objc-gc && confgcc+=( --enable-objc-gc )
- fi
+ use objc-gc && confgcc+=( --enable-objc-gc )
is_objcxx && GCC_LANG+=",obj-c++"
fi
- # fortran support just got sillier! the lang value can be f77 for
+ # Fortran support just got sillier! The lang value can be f77 for
# fortran77, f95 for fortran95, or just plain old fortran for the
# currently supported standard depending on gcc version.
is_fortran && GCC_LANG+=",fortran"
@@ -807,11 +975,11 @@ toolchain_src_configure() {
confgcc+=( --disable-nls )
fi
- tc_version_is_at_least 3.4 || confgcc+=( --disable-libunwind-exceptions )
+ confgcc+=( --disable-libunwind-exceptions )
# Use the default ("release") checking because upstream usually neglects
# to test "disabled" so it has a history of breaking. bug #317217
- if tc_version_is_at_least 3.4 && in_iuse debug ; then
+ if in_iuse debug ; then
# The "release" keyword is new to 4.0. bug #551636
local off=$(tc_version_is_at_least 4.0 && echo release || echo no)
confgcc+=( --enable-checking="${GCC_CHECKS_LIST:-$(usex debug yes ${off})}" )
@@ -823,12 +991,12 @@ toolchain_src_configure() {
--with-pkgversion="${BRANDING_GCC_PKGVERSION}"
)
- # If we want hardened support with the newer piepatchset for >=gcc 4.4
+ # If we want hardened support with the newer PIE patchset for >=gcc 4.4
if tc_version_is_at_least 4.4 && want_minispecs && in_iuse hardened ; then
confgcc+=( $(use_enable hardened esp) )
fi
- # allow gcc to search for clock funcs in the main C lib.
+ # Allow gcc to search for clock funcs in the main C lib.
# if it can't find them, then tough cookies -- we aren't
# going to link in -lrt to all C++ apps. bug #411681
if tc_version_is_at_least 4.4 && is_cxx ; then
@@ -837,17 +1005,18 @@ toolchain_src_configure() {
# Build compiler itself using LTO
if tc_version_is_at_least 9.1 && _tc_use_if_iuse lto ; then
- confgcc+=( --with-build-config=bootstrap-lto )
+ build_config_targets+=( bootstrap-lto )
fi
- # Support to disable pch when building libstdcxx
+ if tc_version_is_at_least 12 && _tc_use_if_iuse cet ; then
+ build_config_targets+=( bootstrap-cet )
+ fi
+
+ # Support to disable PCH when building libstdcxx
if tc_version_is_at_least 6.0 && ! _tc_use_if_iuse pch ; then
confgcc+=( --disable-libstdcxx-pch )
fi
- # The jit language requires this.
- is_jit && confgcc+=( --enable-host-shared )
-
# build-id was disabled for file collisions: bug #526144
#
# # Turn on the -Wl,--build-id flag by default for ELF targets. bug #525942
@@ -860,7 +1029,7 @@ toolchain_src_configure() {
# ;;
# esac
- # newer gcc versions like to bootstrap themselves with C++,
+ # Newer gcc versions like to bootstrap themselves with C++,
# so we need to manually disable it ourselves
if tc_version_is_between 4.7 4.8 && ! is_cxx ; then
confgcc+=( --disable-build-with-cxx --disable-build-poststage1-with-cxx )
@@ -876,49 +1045,55 @@ toolchain_src_configure() {
# disable a bunch of features or gcc goes boom
local needed_libc=""
case ${CTARGET} in
- *-linux) needed_libc=error-unknown-libc;;
- *-dietlibc) needed_libc=dietlibc;;
- *-elf|*-eabi)
- needed_libc=newlib
- # Bare-metal targets don't have access to clock_gettime()
- # arm-none-eabi example: bug #589672
- # But we explicitly do --enable-libstdcxx-time above.
- # Undoing it here.
- confgcc+=( --disable-libstdcxx-time )
- ;;
- *-freebsd*) needed_libc=freebsd-lib;;
- *-gnu*) needed_libc=glibc;;
- *-klibc) needed_libc=klibc;;
- *-musl*) needed_libc=musl;;
- *-uclibc*)
- # Enable shared library support only on targets
- # that support it: bug #291870
- if ! echo '#include ' | \
- $(tc-getCPP ${CTARGET}) -E -dD - 2>/dev/null | \
- grep -q __HAVE_SHARED__
- then
- confgcc+=( --disable-shared )
- fi
- needed_libc=uclibc-ng
- ;;
- *-cygwin) needed_libc=cygwin;;
- x86_64-*-mingw*|\
- *-w64-mingw*) needed_libc=mingw64-runtime;;
- avr) confgcc+=( --enable-shared --disable-threads );;
+ *-linux)
+ needed_libc=error-unknown-libc
+ ;;
+ *-dietlibc)
+ needed_libc=dietlibc
+ ;;
+ *-elf|*-eabi)
+ needed_libc=newlib
+ # Bare-metal targets don't have access to clock_gettime()
+ # arm-none-eabi example: bug #589672
+ # But we explicitly do --enable-libstdcxx-time above.
+ # Undoing it here.
+ confgcc+=( --disable-libstdcxx-time )
+ ;;
+ *-gnu*)
+ needed_libc=glibc
+ ;;
+ *-klibc)
+ needed_libc=klibc
+ ;;
+ *-musl*)
+ needed_libc=musl
+ ;;
+ *-cygwin)
+ needed_libc=cygwin
+ ;;
+ x86_64-*-mingw*|*-w64-mingw*)
+ needed_libc=mingw64-runtime
+ ;;
+ avr)
+ confgcc+=( --enable-shared --disable-threads )
+ ;;
esac
+
if [[ -n ${needed_libc} ]] ; then
local confgcc_no_libc=( --disable-shared )
# requires libc: bug #734820
tc_version_is_at_least 4.6 && confgcc_no_libc+=( --disable-libquadmath )
# requires libc
tc_version_is_at_least 4.8 && confgcc_no_libc+=( --disable-libatomic )
+
if ! has_version ${CATEGORY}/${needed_libc} ; then
confgcc+=(
"${confgcc_no_libc[@]}"
--disable-threads
--without-headers
)
- if [[ $needed_libc == glibc ]]; then
+
+ if [[ ${needed_libc} == glibc ]] ; then
# By default gcc looks at glibc's headers
# to detect long double support. This does
# not work for --disable-headers mode.
@@ -936,7 +1111,7 @@ toolchain_src_configure() {
fi
fi
- tc_version_is_at_least 4.2 && confgcc+=( --disable-bootstrap )
+ confgcc+=( --disable-bootstrap )
else
if tc-is-static-only ; then
confgcc+=( --disable-shared )
@@ -944,46 +1119,33 @@ toolchain_src_configure() {
confgcc+=( --enable-shared )
fi
case ${CHOST} in
- mingw*|*-mingw*)
- confgcc+=( --enable-threads=win32 ) ;;
- *)
- confgcc+=( --enable-threads=posix ) ;;
+ mingw*|*-mingw*)
+ confgcc+=( --enable-threads=win32 )
+ ;;
+ *)
+ confgcc+=( --enable-threads=posix )
+ ;;
esac
fi
# __cxa_atexit is "essential for fully standards-compliant handling of
# destructors", but apparently requires glibc.
case ${CTARGET} in
- *-uclibc*)
- if tc_has_feature nptl ; then
+ *-elf|*-eabi)
+ confgcc+=( --with-newlib )
+ ;;
+ *-musl*)
+ confgcc+=( --enable-__cxa_atexit )
+ ;;
+ *-gnu*)
confgcc+=(
- --disable-__cxa_atexit
- $(use_enable nptl tls)
+ --enable-__cxa_atexit
+ --enable-clocale=gnu
)
- fi
- tc_version_is_between 3.3 3.4 && confgcc+=( --enable-sjlj-exceptions )
- if tc_version_is_between 3.4 4.3 ; then
- confgcc+=( --enable-clocale=uclibc )
- fi
- ;;
- *-elf|*-eabi)
- confgcc+=( --with-newlib )
- ;;
- *-musl*)
- confgcc+=( --enable-__cxa_atexit )
- ;;
- *-gnu*)
- confgcc+=(
- --enable-__cxa_atexit
- --enable-clocale=gnu
- )
- ;;
- *-freebsd*)
- confgcc+=( --enable-__cxa_atexit )
- ;;
- *-solaris*)
- confgcc+=( --enable-__cxa_atexit )
- ;;
+ ;;
+ *-solaris*)
+ confgcc+=( --enable-__cxa_atexit )
+ ;;
esac
### arch options
@@ -996,99 +1158,117 @@ toolchain_src_configure() {
tc_version_is_at_least 4.3 && in_iuse fixed-point && confgcc+=( $(use_enable fixed-point) )
case $(tc-is-softfloat) in
- yes) confgcc+=( --with-float=soft ) ;;
- softfp) confgcc+=( --with-float=softfp ) ;;
- *)
- # If they've explicitly opt-ed in, do hardfloat,
- # otherwise let the gcc default kick in.
- case ${CTARGET//_/-} in
- *-hardfloat-*|*eabihf) confgcc+=( --with-float=hard ) ;;
- esac
+ yes)
+ confgcc+=( --with-float=soft )
+ ;;
+ softfp)
+ confgcc+=( --with-float=softfp )
+ ;;
+ *)
+ # If they've explicitly opt-ed in, do hardfloat,
+ # otherwise let the gcc default kick in.
+ case ${CTARGET//_/-} in
+ *-hardfloat-*|*eabihf)
+ confgcc+=( --with-float=hard )
+ ;;
+ esac
esac
local with_abi_map=()
case $(tc-arch) in
- arm) #264534 #414395
- local a arm_arch=${CTARGET%%-*}
- # Remove trailing endian variations first: eb el be bl b l
- for a in e{b,l} {b,l}e b l ; do
- if [[ ${arm_arch} == *${a} ]] ; then
- arm_arch=${arm_arch%${a}}
- break
+ arm)
+ # bug #264534, bug #414395
+ local a arm_arch=${CTARGET%%-*}
+ # Remove trailing endian variations first: eb el be bl b l
+ for a in e{b,l} {b,l}e b l ; do
+ if [[ ${arm_arch} == *${a} ]] ; then
+ arm_arch=${arm_arch%${a}}
+ break
+ fi
+ done
+
+ # Convert armv6m to armv6-m
+ [[ ${arm_arch} == armv6m ]] && arm_arch=armv6-m
+ # Convert armv7{a,r,m} to armv7-{a,r,m}
+ [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
+ # See if this is a valid --with-arch flag
+ if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch};
+ . "${srcdir}"/config.gcc) &>/dev/null
+ then
+ confgcc+=( --with-arch=${arm_arch} )
fi
- done
- # Convert armv7{a,r,m} to armv7-{a,r,m}
- [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
- # See if this is a valid --with-arch flag
- if (srcdir=${S}/gcc target=${CTARGET} with_arch=${arm_arch};
- . "${srcdir}"/config.gcc) &>/dev/null
- then
- confgcc+=( --with-arch=${arm_arch} )
- fi
- # Make default mode thumb for microcontroller classes #418209
- [[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb )
+ # Make default mode thumb for microcontroller classes, bug #418209
+ [[ ${arm_arch} == *-m ]] && confgcc+=( --with-mode=thumb )
- # Enable hardvfp
- if [[ $(tc-is-softfloat) == "no" ]] && \
- [[ ${CTARGET} == armv[67]* ]] && \
- tc_version_is_at_least 4.5
- then
- # Follow the new arm hardfp distro standard by default
- confgcc+=( --with-float=hard )
- case ${CTARGET} in
- armv6*) confgcc+=( --with-fpu=vfp ) ;;
- armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
- esac
- fi
- ;;
- mips)
- # Add --with-abi flags to set default ABI
- confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) )
- ;;
- amd64)
- # drop the older/ABI checks once this get's merged into some
- # version of gcc upstream
- if tc_version_is_at_least 4.8 && has x32 $(get_all_abis TARGET) ; then
+ # Enable hardvfp
+ if [[ $(tc-is-softfloat) == "no" ]] && \
+ [[ ${CTARGET} == armv[67]* ]] && \
+ tc_version_is_at_least 4.5
+ then
+ # Follow the new arm hardfp distro standard by default
+ confgcc+=( --with-float=hard )
+ case ${CTARGET} in
+ armv6*) confgcc+=( --with-fpu=vfp ) ;;
+ armv7*) confgcc+=( --with-fpu=vfpv3-d16 ) ;;
+ esac
+ fi
+ ;;
+ mips)
+ # Add --with-abi flags to set default ABI
confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) )
- fi
- ;;
- x86)
- # Default arch for x86 is normally i386, lets give it a bump
- # since glibc will do so based on CTARGET anyways
- confgcc+=( --with-arch=${CTARGET%%-*} )
- ;;
- hppa)
- # Enable sjlj exceptions for backward compatibility on hppa
- [[ ${GCCMAJOR} == "3" ]] && confgcc+=( --enable-sjlj-exceptions )
- ;;
- ppc)
- # Set up defaults based on current CFLAGS
- is-flagq -mfloat-gprs=double && confgcc+=( --enable-e500-double )
- [[ ${CTARGET//_/-} == *-e500v2-* ]] && confgcc+=( --enable-e500-double )
- ;;
- ppc64)
- # On ppc64 big endian target gcc assumes elfv1 by default,
- # and elfv2 on little endian
- # but musl does not support elfv1 at all on any endian ppc64
- # see https://git.musl-libc.org/cgit/musl/tree/INSTALL
- # https://bugs.gentoo.org/704784
- # https://gcc.gnu.org/PR93157
- [[ ${CTARGET} == powerpc64-*-musl ]] && confgcc+=( --with-abi=elfv2 )
- ;;
- riscv)
- # Add --with-abi flags to set default ABI
- confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) )
- ;;
+ ;;
+
+ amd64)
+ # drop the older/ABI checks once this get's merged into some
+ # version of gcc upstream
+ if tc_version_is_at_least 4.8 && has x32 $(get_all_abis TARGET) ; then
+ confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) )
+ fi
+ ;;
+ x86)
+ # Default arch for x86 is normally i386, let's give it a bump
+ # since glibc will do so based on CTARGET anyways
+ confgcc+=( --with-arch=${CTARGET%%-*} )
+ ;;
+ hppa)
+ # Enable sjlj exceptions for backward compatibility on hppa
+ [[ ${GCCMAJOR} == "3" ]] && confgcc+=( --enable-sjlj-exceptions )
+ ;;
+ ppc)
+ # Set up defaults based on current CFLAGS
+ is-flagq -mfloat-gprs=double && confgcc+=( --enable-e500-double )
+ [[ ${CTARGET//_/-} == *-e500v2-* ]] && confgcc+=( --enable-e500-double )
+ ;;
+ ppc64)
+ # On ppc64, the big endian target gcc assumes elfv1 by default,
+ # and elfv2 on little endian.
+ # But musl does not support elfv1 at all on any endian ppc64.
+ # See:
+ # - https://git.musl-libc.org/cgit/musl/tree/INSTALL
+ # - bug #704784
+ # - https://gcc.gnu.org/PR93157
+ [[ ${CTARGET} == powerpc64-*-musl ]] && confgcc+=( --with-abi=elfv2 )
+ ;;
+ riscv)
+ # Add --with-abi flags to set default ABI
+ confgcc+=( --with-abi=$(gcc-abi-map ${TARGET_DEFAULT_ABI}) )
+ ;;
esac
- # if the target can do biarch (-m32/-m64), enable it. overhead should
+ # If the target can do biarch (-m32/-m64), enable it. overhead should
# be small, and should simplify building of 64bit kernels in a 32bit
- # userland by not needing sys-devel/kgcc64. #349405
+ # userland by not needing sys-devel/kgcc64. bug #349405
case $(tc-arch) in
- ppc|ppc64) tc_version_is_at_least 3.4 && confgcc+=( --enable-targets=all ) ;;
- sparc) tc_version_is_at_least 4.4 && confgcc+=( --enable-targets=all ) ;;
- amd64|x86) tc_version_is_at_least 4.3 && confgcc+=( --enable-targets=all ) ;;
+ ppc|ppc64)
+ confgcc+=( --enable-targets=all )
+ ;;
+ sparc)
+ tc_version_is_at_least 4.4 && confgcc+=( --enable-targets=all )
+ ;;
+ amd64|x86)
+ tc_version_is_at_least 4.3 && confgcc+=( --enable-targets=all )
+ ;;
esac
# On Darwin we need libdir to be set in order to get correct install names
@@ -1109,44 +1289,45 @@ toolchain_src_configure() {
fi
fi
- if tc_version_is_at_least 4.2 ; then
- if in_iuse openmp ; then
- # Make sure target has pthreads support. #326757 #335883
- # There shouldn't be a chicken & egg problem here as openmp won't
- # build without a C library, and you can't build that w/out
- # already having a compiler ...
- if ! is_crosscompile || \
- $(tc-getCPP ${CTARGET}) -E - <<<"#include " >& /dev/null
- then
- confgcc+=( $(use_enable openmp libgomp) )
- else
- # Force disable as the configure script can be dumb #359855
- confgcc+=( --disable-libgomp )
- fi
+ if in_iuse openmp ; then
+ # Make sure target has pthreads support: bug #326757, bug #335883
+ # There shouldn't be a chicken & egg problem here as openmp won't
+ # build without a C library, and you can't build that w/o
+ # already having a compiler...
+ if ! is_crosscompile || \
+ $(tc-getCPP ${CTARGET}) -E - <<<"#include " >& /dev/null
+ then
+ confgcc+=( $(use_enable openmp libgomp) )
else
- # For gcc variants where we don't want openmp (e.g. kgcc)
+ # Force disable as the configure script can be dumb, bug #359855
confgcc+=( --disable-libgomp )
fi
+ else
+ # For gcc variants where we don't want openmp (e.g. kgcc)
+ confgcc+=( --disable-libgomp )
fi
- if tc_version_is_at_least 4.0 ; then
- if _tc_use_if_iuse libssp ; then
- confgcc+=( --enable-libssp )
+ if _tc_use_if_iuse libssp ; then
+ confgcc+=( --enable-libssp )
+ else
+ if hardened_gcc_is_stable ssp; then
+ export gcc_cv_libc_provides_ssp=yes
+ fi
+
+ if _tc_use_if_iuse ssp; then
+ # On some targets USE="ssp -libssp" is an invalid
+ # configuration as the target libc does not provide
+ # stack_chk_* functions. Do not disable libssp there.
+ case ${CTARGET} in
+ mingw*|*-mingw*)
+ ewarn "Not disabling libssp"
+ ;;
+ *)
+ confgcc+=( --disable-libssp )
+ ;;
+ esac
else
- if hardened_gcc_is_stable ssp; then
- export gcc_cv_libc_provides_ssp=yes
- fi
- if _tc_use_if_iuse ssp; then
- # On some targets USE="ssp -libssp" is an invalid
- # configuration as target libc does not provide
- # stack_chk_* functions. Do not disable libssp there.
- case ${CTARGET} in
- mingw*|*-mingw*) ewarn "Not disabling libssp" ;;
- *) confgcc+=( --disable-libssp ) ;;
- esac
- else
- confgcc+=( --disable-libssp )
- fi
+ confgcc+=( --disable-libssp )
fi
fi
@@ -1154,6 +1335,10 @@ toolchain_src_configure() {
confgcc+=( --disable-libada )
fi
+ if in_iuse cet ; then
+ confgcc+=( $(use_enable cet) )
+ fi
+
if in_iuse cilk ; then
confgcc+=( $(use_enable cilk libcilkrts) )
fi
@@ -1182,6 +1367,8 @@ toolchain_src_configure() {
confgcc+=( $(use_with zstd) )
fi
+ # This only controls whether the compiler *supports* LTO, not whether
+ # it's *built using* LTO. Hence we do it without a USE flag.
if tc_version_is_at_least 4.6 ; then
confgcc+=( --enable-lto )
elif tc_version_is_at_least 4.5 ; then
@@ -1189,7 +1376,7 @@ toolchain_src_configure() {
fi
# graphite was added in 4.4 but we only support it in 6.5+ due to external
- # library issues. #448024, #701270
+ # library issues. bug #448024, bug #701270
if tc_version_is_at_least 6.5 && in_iuse graphite ; then
confgcc+=( $(use_with graphite isl) )
use graphite && confgcc+=( --disable-isl-version-check )
@@ -1222,7 +1409,7 @@ toolchain_src_configure() {
fi
# Disable gcc info regeneration -- it ships with generated info pages
- # already. Our custom version/urls/etc... trigger it. #464008
+ # already. Our custom version/urls/etc... trigger it. bug #464008
export gcc_cv_prog_makeinfo_modern=no
# Do not let the X detection get in our way. We know things can be found
@@ -1233,6 +1420,11 @@ toolchain_src_configure() {
confgcc+=( "$@" ${EXTRA_ECONF} )
+ if [[ -n ${build_config_targets} ]] ; then
+ # ./configure --with-build-config='bootstrap-lto bootstrap-cet'
+ confgcc+=( --with-build-config="${build_config_targets[*]}" )
+ fi
+
# Nothing wrong with a good dose of verbosity
echo
einfo "PREFIX: ${PREFIX}"
@@ -1240,26 +1432,47 @@ toolchain_src_configure() {
einfo "LIBPATH: ${LIBPATH}"
einfo "DATAPATH: ${DATAPATH}"
einfo "STDCXX_INCDIR: ${STDCXX_INCDIR}"
- echo
einfo "Languages: ${GCC_LANG}"
echo
- einfo "Configuring GCC with: ${confgcc[@]//--/\n\t--}"
- echo
# Build in a separate build tree
- mkdir -p "${WORKDIR}"/build
- pushd "${WORKDIR}"/build > /dev/null
+ mkdir -p "${WORKDIR}"/build || die
+ pushd "${WORKDIR}"/build > /dev/null || die
- # and now to do the actual configuration
+ # ...and now to do the actual configuration
addwrite /dev/zero
- echo "${S}"/configure "${confgcc[@]}"
- # Older gcc versions did not detect bash and re-exec itself, so force the
- # use of bash. Newer ones will auto-detect, but this is not harmful.
- CONFIG_SHELL="${EPREFIX}/bin/bash" \
- bash "${S}"/configure "${confgcc[@]}" || die "failed to run configure"
- # return to whatever directory we were in before
- popd > /dev/null
+ local gcc_shell="${BROOT}"/bin/bash
+ # Older gcc versions did not detect bash and re-exec itself, so force the
+ # use of bash for them.
+ if tc_version_is_at_least 11.2 ; then
+ gcc_shell="${BROOT}"/bin/sh
+ fi
+
+ if is_jit ; then
+ einfo "Configuring JIT gcc"
+
+ mkdir -p "${WORKDIR}"/build-jit || die
+ pushd "${WORKDIR}"/build-jit > /dev/null || die
+ CONFIG_SHELL="${gcc_shell}" edo "${gcc_shell}" "${S}"/configure \
+ "${confgcc[@]}" \
+ --disable-libada \
+ --disable-libsanitizer \
+ --disable-libvtv \
+ --disable-libgomp \
+ --disable-libquadmath \
+ --disable-libatomic \
+ --disable-lto \
+ --disable-bootstrap \
+ --enable-host-shared \
+ --enable-languages=jit
+ popd > /dev/null || die
+ fi
+
+ CONFIG_SHELL="${gcc_shell}" edo "${gcc_shell}" "${S}"/configure "${confgcc[@]}"
+
+ # Return to whatever directory we were in before
+ popd > /dev/null || die
}
# Replace -m flags unsupported by the version being built with the best
@@ -1275,23 +1488,13 @@ downgrade_arch_flags() {
myarch=$(get-flag march)
mytune=$(get-flag mtune)
- # If -march=native isn't supported we have to tease out the actual arch
- if [[ ${myarch} == native || ${mytune} == native ]] ; then
- if ! tc_version_is_at_least 4.2 ${bver}; then
- arch=$($(tc-getCC) -march=native -v -E -P - &1 \
- | sed -rn "/cc1.*-march/s:.*-march=([^ ']*).*:\1:p")
- replace-cpu-flags native ${arch}
- fi
- fi
-
# Handle special -mtune flags
[[ ${mytune} == intel ]] && ! tc_version_is_at_least 4.9 ${bver} && replace-cpu-flags intel generic
- [[ ${mytune} == generic ]] && ! tc_version_is_at_least 4.2 ${bver} && filter-flags '-mtune=*'
[[ ${mytune} == x86-64 ]] && filter-flags '-mtune=*'
- tc_version_is_at_least 3.4 ${bver} || filter-flags '-mtune=*'
# "added" "arch" "replacement"
local archlist=(
+ 10 znver3 znver2
9 znver2 znver1
4.9 bdver4 bdver3
4.9 bonnell atom
@@ -1319,14 +1522,6 @@ downgrade_arch_flags() {
4.3 geode k6-2 # gcc.gnu.org/PR41989#c22
4.3 k8-sse3 k8
4.3 opteron-sse3 k8
- 3.4 athlon-fx x86-64
- 3.4 athlon64 x86-64
- 3.4 c3-2 c3
- 3.4 k8 x86-64
- 3.4 opteron x86-64
- 3.4 pentium-m pentium3
- 3.4 pentium3m pentium3
- 3.4 pentium4m pentium4
)
for ((i = 0; i < ${#archlist[@]}; i += 3)) ; do
@@ -1349,7 +1544,7 @@ downgrade_arch_flags() {
fi
done
- # we only check -mno* here since -m* get removed by strip-flags later on
+ # We only check -mno* here since -m* get removed by strip-flags later on
local isalist=(
4.9 -mno-sha
4.9 -mno-avx512pf
@@ -1393,37 +1588,29 @@ downgrade_arch_flags() {
}
gcc_do_filter_flags() {
- # Be conservative here:
- # - don't allow -O3 and like to over-optimize libgcc # 701786
- # - don't allow -O0 to generate potentially invalid startup code
- strip-flags
- filter-flags '-O?'
- append-flags -O2
+ # Allow users to explicitly avoid flag sanitization via
+ # USE=custom-cflags.
+ if ! _tc_use_if_iuse custom-cflags; then
+ # Over-zealous CFLAGS can often cause problems. What may work for one
+ # person may not work for another. To avoid a large influx of bugs
+ # relating to failed builds, we strip most CFLAGS out to ensure as few
+ # problems as possible.
+ strip-flags
- # dont want to funk ourselves
+ # Lock gcc at -O2; we want to be conservative here.
+ filter-flags '-O?'
+ append-flags -O2
+ fi
+
+ # Avoid shooting self in foot
filter-flags '-mabi*' -m31 -m32 -m64
- filter-flags -frecord-gcc-switches # 490738
- filter-flags -mno-rtm -mno-htm # 506202
+ # bug #490738
+ filter-flags -frecord-gcc-switches
+ # bug #506202
+ filter-flags -mno-rtm -mno-htm
- if tc_version_is_between 3.2 3.4 ; then
- # XXX: this is so outdated it's barely useful, but it don't hurt...
- replace-cpu-flags G3 750
- replace-cpu-flags G4 7400
- replace-cpu-flags G5 7400
-
- # XXX: should add a sed or something to query all supported flags
- # from the gcc source and trim everything else ...
- filter-flags -f{no-,}unit-at-a-time -f{no-,}web -mno-tls-direct-seg-refs
- filter-flags -f{no-,}stack-protector{,-all}
- filter-flags -fvisibility-inlines-hidden -fvisibility=hidden
- # and warning options
- filter-flags -Wextra -Wstack-protector
- fi
- if ! tc_version_is_at_least 4.1 ; then
- filter-flags -fdiagnostics-show-option
- filter-flags -Wstack-protector
- fi
+ filter-flags '-fsanitize=*'
if tc_version_is_between 6 8 ; then
# -mstackrealign triggers crashes in exception throwing
@@ -1432,39 +1619,37 @@ gcc_do_filter_flags() {
filter-flags -mstackrealign
fi
- if tc_version_is_at_least 3.4 ; then
- case $(tc-arch) in
- amd64|x86)
- filter-flags '-mcpu=*'
+ case $(tc-arch) in
+ amd64|x86)
+ filter-flags '-mcpu=*'
- tc_version_is_between 4.4 4.5 && append-flags -mno-avx # 357287
+ # bug #357287
+ tc_version_is_between 4.4 4.5 && append-flags -mno-avx
- if tc_version_is_between 4.6 4.7 ; then
- # https://bugs.gentoo.org/411333
- # https://bugs.gentoo.org/466454
- replace-cpu-flags c3-2 pentium2 pentium3 pentium3m pentium-m i686
- fi
- ;;
- alpha)
- # https://bugs.gentoo.org/454426
- append-ldflags -Wl,--no-relax
- ;;
- sparc)
- # temporary workaround for random ICEs reproduced by multiple users
- # https://bugs.gentoo.org/457062
- tc_version_is_between 4.6 4.8 && MAKEOPTS+=" -j1"
- ;;
- *-macos)
- # http://gcc.gnu.org/PR25127
- tc_version_is_between 4.0 4.2 && \
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
- ;;
- esac
- fi
+ if tc_version_is_between 4.6 4.7 ; then
+ # bug #411333, bug #466454
+ replace-cpu-flags c3-2 pentium2 pentium3 pentium3m pentium-m i686
+ fi
+ ;;
+ alpha)
+ # bug #454426
+ append-ldflags -Wl,--no-relax
+ ;;
+ sparc)
+ # Temporary workaround for random ICEs reproduced by multiple users
+ # bug #457062
+ tc_version_is_between 4.6 4.8 && MAKEOPTS+=" -j1"
+ ;;
+ *-macos)
+ # https://gcc.gnu.org/PR25127
+ tc_version_is_between 4.0 4.2 && \
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+ ;;
+ esac
strip-unsupported-flags
- # these are set here so we have something sane at configure time
+ # These are set here so we have something sane at configure time
if is_crosscompile ; then
# Set this to something sane for both native and target
CFLAGS="-O2 -pipe"
@@ -1484,14 +1669,17 @@ setup_minispecs_gcc_build_specs() {
if hardened_gcc_works pie ; then
cat "${WORKDIR}"/specs/pie.specs >> "${WORKDIR}"/build.specs
fi
+
if hardened_gcc_works ssp ; then
for s in ssp sspall ; do
cat "${WORKDIR}"/specs/${s}.specs >> "${WORKDIR}"/build.specs
done
fi
+
for s in nostrict znow ; do
cat "${WORKDIR}"/specs/${s}.specs >> "${WORKDIR}"/build.specs
done
+
export GCC_SPECS="${WORKDIR}"/build.specs
}
@@ -1506,16 +1694,17 @@ gcc-multilib-configure() {
confgcc+=( --enable-multilib )
fi
- # translate our notion of multilibs into gcc's
+ # Translate our notion of multilibs into gcc's
local abi list
for abi in $(get_all_abis TARGET) ; do
local l=$(gcc-abi-map ${abi})
[[ -n ${l} ]] && list+=",${l}"
done
+
if [[ -n ${list} ]] ; then
case ${CTARGET} in
- x86_64*)
- tc_version_is_at_least 4.8 && confgcc+=( --with-multilib-list=${list:1} )
+ x86_64*)
+ tc_version_is_at_least 4.8 && confgcc+=( --with-multilib-list=${list:1} )
;;
esac
fi
@@ -1525,9 +1714,15 @@ gcc-abi-map() {
# Convert the ABI name we use in Gentoo to what gcc uses
local map=()
case ${CTARGET} in
- mips*) map=("o32 32" "n32 n32" "n64 64") ;;
- riscv*) map=("lp64d lp64d" "lp64 lp64" "ilp32d ilp32d" "ilp32 ilp32") ;;
- x86_64*) map=("amd64 m64" "x86 m32" "x32 mx32") ;;
+ mips*)
+ map=("o32 32" "n32 n32" "n64 64")
+ ;;
+ riscv*)
+ map=("lp64d lp64d" "lp64 lp64" "ilp32d ilp32d" "ilp32 ilp32")
+ ;;
+ x86_64*)
+ map=("amd64 m64" "x86 m32" "x32 mx32")
+ ;;
esac
local m
@@ -1540,7 +1735,7 @@ gcc-abi-map() {
#----> src_compile <----
toolchain_src_compile() {
- touch "${S}"/gcc/c-gperf.h
+ touch "${S}"/gcc/c-gperf.h || die
# Do not make manpages if we do not have perl ...
[[ ! -x /usr/bin/perl ]] \
@@ -1552,11 +1747,16 @@ toolchain_src_compile() {
unset ADAFLAGS
# Older gcc versions did not detect bash and re-exec itself, so force the
- # use of bash. Newer ones will auto-detect, but this is not harmful.
+ # use of bash for them.
# This needs to be set for compile as well, as it's used in libtool
- # generation, which will break install otherwise (at least in 3.3.6): #664486
- CONFIG_SHELL="${EPREFIX}/bin/bash" \
- gcc_do_make ${GCC_MAKE_TARGET}
+ # generation, which will break install otherwise (at least in 3.3.6): bug #664486
+ local gcc_shell="${BROOT}"/bin/bash
+ if tc_version_is_at_least 11.2 ; then
+ gcc_shell="${BROOT}"/bin/sh
+ fi
+
+ CONFIG_SHELL="${gcc_shell}" \
+ gcc_do_make ${GCC_MAKE_TARGET}
}
gcc_do_make() {
@@ -1571,11 +1771,17 @@ gcc_do_make() {
# default target
if is_crosscompile || tc-is-cross-compiler ; then
- # 3 stage bootstrapping doesnt quite work when you cant run the
- # resulting binaries natively ^^;
+ # 3 stage bootstrapping doesn't quite work when you can't run the
+ # resulting binaries natively
GCC_MAKE_TARGET=${GCC_MAKE_TARGET-all}
else
- if tc_version_is_at_least 3.3 && _tc_use_if_iuse pgo; then
+ if [[ ${EXTRA_ECONF} == *--disable-bootstrap* ]] ; then
+ GCC_MAKE_TARGET=${GCC_MAKE_TARGET-all}
+
+ ewarn "Disabling bootstrapping. ONLY recommended for development."
+ ewarn "This is NOT a safe configuration for endusers!"
+ ewarn "This compiler may not be safe or reliable for production use!"
+ elif _tc_use_if_iuse pgo; then
GCC_MAKE_TARGET=${GCC_MAKE_TARGET-profiledbootstrap}
else
GCC_MAKE_TARGET=${GCC_MAKE_TARGET-bootstrap-lean}
@@ -1584,7 +1790,7 @@ gcc_do_make() {
# Older versions of GCC could not do profiledbootstrap in parallel due to
# collisions with profiling info.
- if [[ ${GCC_MAKE_TARGET} == "profiledbootstrap" ]]; then
+ if [[ ${GCC_MAKE_TARGET} == "profiledbootstrap" ]] ; then
! tc_version_is_at_least 4.6 && export MAKEOPTS="${MAKEOPTS} -j1"
fi
@@ -1606,23 +1812,36 @@ gcc_do_make() {
BOOT_CFLAGS=${BOOT_CFLAGS-"$(get_abi_CFLAGS ${TARGET_DEFAULT_ABI}) ${CFLAGS}"}
fi
+ if is_jit ; then
+ # TODO: docs for jit?
+ pushd "${WORKDIR}"/build-jit > /dev/null || die
+
+ einfo "Building JIT"
+ emake \
+ LDFLAGS="${LDFLAGS}" \
+ STAGE1_CFLAGS="${STAGE1_CFLAGS}" \
+ LIBPATH="${LIBPATH}" \
+ BOOT_CFLAGS="${BOOT_CFLAGS}"
+ popd > /dev/null || die
+ fi
+
einfo "Compiling ${PN} (${GCC_MAKE_TARGET})..."
- pushd "${WORKDIR}"/build >/dev/null
+ pushd "${WORKDIR}"/build >/dev/null || die
emake \
LDFLAGS="${LDFLAGS}" \
STAGE1_CFLAGS="${STAGE1_CFLAGS}" \
LIBPATH="${LIBPATH}" \
BOOT_CFLAGS="${BOOT_CFLAGS}" \
- ${GCC_MAKE_TARGET} \
- || die "emake failed with ${GCC_MAKE_TARGET}"
+ ${GCC_MAKE_TARGET}
if is_ada; then
- # Without these links it is not getting the good compiler
- # Need to check why
+ # Without these links, it is not getting the good compiler
+ # TODO: Need to check why
ln -s gcc ../build/prev-gcc || die
ln -s ${CHOST} ../build/prev-${CHOST} || die
+
# Building standard ada library
emake -C gcc gnatlib-shared
# Building gnat toold
@@ -1633,16 +1852,17 @@ gcc_do_make() {
if type -p doxygen > /dev/null ; then
if tc_version_is_at_least 4.3 ; then
cd "${CTARGET}"/libstdc++-v3/doc
- emake doc-man-doxygen || ewarn "failed to make docs"
- elif tc_version_is_at_least 3.0 ; then
+ emake doc-man-doxygen
+ else
cd "${CTARGET}"/libstdc++-v3
- emake doxygen-man || ewarn "failed to make docs"
+ emake doxygen-man
fi
- # Clean bogus manpages. #113902
+ # Clean bogus manpages. bug #113902
find -name '*_build_*' -delete
- # Blow away generated directory references. Newer versions of gcc
- # have gotten better at this, but not perfect. This is easier than
- # backporting all of the various doxygen patches. #486754
+
+ # Blow away generated directory references. Newer versions of gcc
+ # have gotten better at this, but not perfect. This is easier than
+ # backporting all of the various doxygen patches. bug #486754
find -name '*_.3' -exec grep -l ' Directory Reference ' {} + | \
xargs rm -f
else
@@ -1650,30 +1870,67 @@ gcc_do_make() {
fi
fi
- popd >/dev/null
+ popd >/dev/null || die
}
#---->> src_test <<----
toolchain_src_test() {
- cd "${WORKDIR}"/build
+ cd "${WORKDIR}"/build || die
+
+ # From opensuse's spec file:
+ # "asan needs a whole shadow address space"
+ ulimit -v unlimited
+
# 'asan' wants to be preloaded first, so does 'sandbox'.
# To make asan tests work disable sandbox for all of test suite.
# 'backtrace' tests also does not like 'libsandbox.so' presence.
- SANDBOX_ON=0 LD_PRELOAD= emake -k check
+ #
+ # Nonfatal here as we die if compare_tests failed
+ SANDBOX_ON=0 LD_PRELOAD= nonfatal emake -k check
+ local success_tests=$?
+
+ if [[ ! -d "${BROOT}"/var/cache/gcc/${SLOT} ]] && ! [[ ${success_tests} -eq 0 ]] ; then
+ # We have no reference data saved from a previous run to know if
+ # the failures are tolerable or not, so we bail out.
+ eerror "Reference test data does NOT exist at ${BROOT}/var/cache/gcc/${SLOT}"
+ eerror "Tests failed and nothing to compare with, so this is a fatal error."
+ eerror "(Set GCC_TESTS_IGNORE_NO_BASELINE=1 to make this non-fatal for initial run.)"
+
+ if [[ -z ${GCC_TESTS_IGNORE_NO_BASELINE} ]] ; then
+ die "Tests failed (failures occurred with no reference data)"
+ fi
+ fi
+
+ einfo "Testing complete! Review the following output to check for success or failure."
+ einfo "Please ignore any 'mail' lines in the summary output below (no mail is sent)."
+ einfo "Summary:"
+ "${S}"/contrib/test_summary
+
+ # If previous results exist on the system, compare with it
+ # TODO: Distribute some baseline results in e.g. gcc-patches.git?
+ if [[ -d "${BROOT}"/var/cache/gcc/${SLOT} ]] ; then
+ einfo "Comparing with previous cached results at ${BROOT}/var/cache/gcc/${SLOT}"
+
+ # Exit with the following values:
+ # 0 if there is nothing of interest
+ # 1 if there are errors when comparing single test case files
+ # N for the number of errors found when comparing directories
+ "${S}"/contrib/compare_tests "${BROOT}"/var/cache/gcc/${SLOT}/ . || die "Comparison for tests results failed, error code: $?"
+ fi
}
#---->> src_install <<----
toolchain_src_install() {
- cd "${WORKDIR}"/build
+ cd "${WORKDIR}"/build || die
# Don't allow symlinks in private gcc include dir as this can break the build
- find gcc/include*/ -type l -delete
+ find gcc/include*/ -type l -delete || die
# Copy over the info pages. We disabled their generation earlier, but the
- # build system only expects to install out of the build dir, not the source. #464008
- mkdir -p gcc/doc
+ # build system only expects to install out of the build dir, not the source. bug #464008
+ mkdir -p gcc/doc || die
local x=
for x in "${S}"/gcc/doc/*.info* ; do
if [[ -f ${x} ]] ; then
@@ -1692,8 +1949,32 @@ toolchain_src_install() {
&& rm -f "${x}"
done < <(find gcc/include*/ -name '*.h')
+ if is_jit ; then
+ # See https://gcc.gnu.org/onlinedocs/gcc-11.3.0/jit/internals/index.html#packaging-notes
+ # and bug #843341.
+ #
+ # Both of the non-JIT and JIT builds are configured to install to $(DESTDIR)
+ # Install the configuration with --enable-host-shared first
+ # *then* the one without, so that the faster build
+ # of "cc1" et al overwrites the slower build.
+ #
+ # Do the 'make install' from the build directory
+ pushd "${WORKDIR}"/build-jit > /dev/null || die
+ S="${WORKDIR}"/build-jit emake DESTDIR="${D}" install
+
+ # Punt some tools which are really only useful while building gcc
+ find "${ED}" -name install-tools -prune -type d -exec rm -rf "{}" \;
+ # This one comes with binutils
+ find "${ED}" -name libiberty.a -delete
+
+ # Move the libraries to the proper location
+ gcc_movelibs
+
+ popd > /dev/null || die
+ fi
+
# Do the 'make install' from the build directory
- S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install || die
+ S="${WORKDIR}"/build emake DESTDIR="${D}" install
# Punt some tools which are really only useful while building gcc
find "${ED}" -name install-tools -prune -type d -exec rm -rf "{}" \;
@@ -1717,12 +1998,12 @@ toolchain_src_install() {
# Setup the gcc_env_entry for hardened gcc 4 with minispecs
want_minispecs && copy_minispecs_gcc_specs
- # Make sure we dont have stuff lying around that
+ # Make sure we don't have stuff lying around that
# can nuke multiple versions of gcc
gcc_slot_java
dodir /usr/bin
- cd "${D}"${BINPATH}
+ cd "${D}"${BINPATH} || die
# Ugh: we really need to auto-detect this list.
# It's constantly out of date.
for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo gnat* ; do
@@ -1756,7 +2037,7 @@ toolchain_src_install() {
# When cross-building gcc does install native tools.
if ! is_crosscompile; then
# Rename the main go binaries as we don't want to clobber dev-lang/go
- # when gcc-config runs. #567806
+ # when gcc-config runs. bug #567806
if tc_version_is_at_least 5 && is_go ; then
for x in go gofmt; do
mv ${x} ${x}-${GCCMAJOR} || die
@@ -1764,7 +2045,7 @@ toolchain_src_install() {
fi
fi
- # As gcc installs object files built against bost ${CHOST} and ${CTARGET}
+ # As gcc installs object files built against both ${CHOST} and ${CTARGET}
# ideally we will need to strip them using different tools:
# Using ${CHOST} tools:
# - "${D}${BINPATH}"
@@ -1774,29 +2055,27 @@ toolchain_src_install() {
# - "${D}${LIBPATH}"
# As dostrip does not specify host to override ${CHOST} tools just skip
# non-native binary stripping.
- is_crosscompile && tc_supports_dostrip && dostrip -x "${LIBPATH}"
+ is_crosscompile && dostrip -x "${LIBPATH}"
- cd "${S}"
+ cd "${S}" || die
if is_crosscompile; then
rm -rf "${ED}"/usr/share/{man,info}
rm -rf "${D}"${DATAPATH}/{man,info}
else
- if tc_version_is_at_least 3.0 ; then
- local cxx_mandir=$(find "${WORKDIR}/build/${CTARGET}/libstdc++-v3" -name man)
- if [[ -d ${cxx_mandir} ]] ; then
- cp -r "${cxx_mandir}"/man? "${D}${DATAPATH}"/man/
- fi
+ local cxx_mandir=$(find "${WORKDIR}/build/${CTARGET}/libstdc++-v3" -name man)
+ if [[ -d ${cxx_mandir} ]] ; then
+ cp -r "${cxx_mandir}"/man? "${D}${DATAPATH}"/man/
fi
fi
- # portage regenerates 'dir' files on it's own: bug #672408
+ # Portage regenerates 'dir' files on its own: bug #672408
# Drop 'dir' files to avoid collisions.
if [[ -f "${D}${DATAPATH}"/info/dir ]]; then
einfo "Deleting '${D}${DATAPATH}/info/dir'"
rm "${D}${DATAPATH}"/info/dir || die
fi
- # prune empty dirs left behind
+ # Prune empty dirs left behind
find "${ED}" -depth -type d -delete 2>/dev/null
# libstdc++.la: Delete as it doesn't add anything useful: g++ itself
@@ -1812,14 +2091,14 @@ toolchain_src_install() {
# libgomp-plugin-*.la: Same as above, and it's an internal plugin only
# loaded via dlopen.
# libgfortran.la: gfortran itself handles linkage correctly in the
- # dynamic & static case (libgfortran.spec). #573302
+ # dynamic & static case (libgfortran.spec). bug #573302
# libgfortranbegin.la: Same as above, and it's an internal lib.
# libmpx.la: gcc itself handles linkage correctly (libmpx.spec).
# libmpxwrappers.la: See above.
# libitm.la: gcc itself handles linkage correctly (libitm.spec).
# libvtv.la: gcc itself handles linkage correctly.
# lib*san.la: Sanitizer linkage is handled internally by gcc, and they
- # do not support static linking. #487550 #546700
+ # do not support static linking. bug #487550, bug #546700
find "${D}${LIBPATH}" \
'(' \
-name libstdc++.la -o \
@@ -1842,16 +2121,19 @@ toolchain_src_install() {
# Use gid of 0 because some stupid ports don't have
# the group 'root' set to gid 0. Send to /dev/null
# for people who are testing as non-root.
- chown -R root:0 "${D}${LIBPATH}" 2>/dev/null
+ chown -R 0:0 "${D}${LIBPATH}" 2>/dev/null
# Installing gdb pretty-printers into gdb-specific location.
local py gdbdir=/usr/share/gdb/auto-load${LIBPATH}
pushd "${D}${LIBPATH}" >/dev/null
for py in $(find . -name '*-gdb.py') ; do
local multidir=${py%/*}
+
insinto "${gdbdir}/${multidir}"
- sed -i "/^libdir =/s:=.*:= '${LIBPATH}/${multidir}':" "${py}" || die #348128
- doins "${py}" || die
+ # bug #348128
+ sed -i "/^libdir =/s:=.*:= '${LIBPATH}/${multidir}':" "${py}" || die
+ doins "${py}"
+
rm "${py}" || die
done
popd >/dev/null
@@ -1860,16 +2142,29 @@ toolchain_src_install() {
export QA_EXECSTACK="usr/lib*/go/*/*.gox"
export QA_WX_LOAD="usr/lib*/go/*/*.gox"
- # Disable RANDMMAP so PCH works. #301299
+ # Disable RANDMMAP so PCH works, bug #301299
if tc_version_is_at_least 4.3 ; then
- pax-mark -r "${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1"
- pax-mark -r "${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1plus"
+ pax-mark -r "${ED}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1"
+ pax-mark -r "${ED}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1plus"
fi
- # Disable MPROTECT so java works. #574808
+ # Disable MPROTECT so java works, bug #574808
if is_gcj ; then
- pax-mark -m "${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/ecj1"
- pax-mark -m "${D}${PREFIX}/${CTARGET}/gcc-bin/${GCC_CONFIG_VER}/gij"
+ pax-mark -m "${ED}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/ecj1"
+ pax-mark -m "${ED}/${CTARGET}/gcc-bin/${GCC_CONFIG_VER}/gij"
+ fi
+
+ if use test ; then
+ # TODO: In future, install orphaned to allow comparison across
+ # more versions even after unmerged? Also would be useful for
+ # historical records and tracking down regressions a while
+ # after they first appeared, but were only just reported.
+ einfo "Copying test results to ${EPREFIX}/var/cache/gcc/${SLOT} for future comparison"
+ (
+ dodir /var/cache/gcc/${SLOT}
+ cd "${WORKDIR}"/build || die
+ find . -name \*.sum -exec cp --parents -v {} "${ED}"/var/cache/gcc/${SLOT} \;
+ )
fi
}
@@ -1877,9 +2172,6 @@ toolchain_src_install() {
# when installing gcc, it dumps internal libraries into /usr/lib
# instead of the private gcc lib path
gcc_movelibs() {
- # older versions of gcc did not support --print-multi-os-directory
- tc_version_is_at_least 3.2 || return 0
-
# For non-target libs which are for CHOST and not CTARGET, we want to
# move them to the compiler-specific CHOST internal dir. This is stuff
# that you want to link against when building tools rather than building
@@ -1888,9 +2180,10 @@ gcc_movelibs() {
dodir "${HOSTLIBPATH#${EPREFIX}}"
mv "${ED}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die
fi
+
# libgccjit gets installed to /usr/lib, not /usr/$(get_libdir). Probably
# due to a bug in gcc build system.
- if is_jit ; then
+ if [[ ${PWD} == "${WORKDIR}"/build-jit ]] && is_jit ; then
dodir "${LIBPATH#${EPREFIX}}"
mv "${ED}"/usr/lib/libgccjit* "${D}${LIBPATH}" || die
fi
@@ -1942,24 +2235,25 @@ gcc_movelibs() {
for FROMDIR in ${removedirs} ; do
rmdir "${D}"${FROMDIR} >& /dev/null
done
+
find -depth "${ED}" -type d -exec rmdir {} + >& /dev/null
}
-# make sure the libtool archives have libdir set to where they actually
-# -are-, and not where they -used- to be. also, any dependencies we have
+# Make sure the libtool archives have libdir set to where they actually
+# -are-, and not where they -used- to be. Also, any dependencies we have
# on our own .la files need to be updated.
fix_libtool_libdir_paths() {
local libpath="$1"
- pushd "${D}" >/dev/null
+ pushd "${D}" >/dev/null || die
- pushd "./${libpath}" >/dev/null
+ pushd "./${libpath}" >/dev/null || die
local dir="${PWD#${D%/}}"
local allarchives=$(echo *.la)
allarchives="\(${allarchives// /\\|}\)"
- popd >/dev/null
+ popd >/dev/null || die
- # The libdir might not have any .la files. #548782
+ # The libdir might not have any .la files. bug #548782
find "./${dir}" -maxdepth 1 -name '*.la' \
-exec sed -i -e "/^libdir=/s:=.*:='${dir}':" {} + || die
# Would be nice to combine these, but -maxdepth can not be specified
@@ -1969,13 +2263,13 @@ fix_libtool_libdir_paths() {
find "./${dir}/" -maxdepth 1 -name '*.la' \
-exec sed -i -e "/^dependency_libs=/s:/[^ ]*/${allarchives}:${libpath}/\1:g" {} + || die
- popd >/dev/null
+ popd >/dev/null || die
}
create_gcc_env_entry() {
dodir /etc/env.d/gcc
- local gcc_envd_base="/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}"
+ local gcc_envd_base="/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}"
local gcc_specs_file
local gcc_envd_file="${ED}${gcc_envd_base}"
if [[ -z $1 ]] ; then
@@ -1994,21 +2288,16 @@ create_gcc_env_entry() {
# workaround for libtool being stupid and using .la's from
# conflicting ABIs by using the first one in the search path
local ldpaths mosdirs
- if tc_version_is_at_least 3.2 ; then
- local mdir mosdir abi ldpath
- for abi in $(get_all_abis TARGET) ; do
- mdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory)
- ldpath=${LIBPATH}
- [[ ${mdir} != "." ]] && ldpath+="/${mdir}"
- ldpaths="${ldpath}${ldpaths:+:${ldpaths}}"
+ local mdir mosdir abi ldpath
+ for abi in $(get_all_abis TARGET) ; do
+ mdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory)
+ ldpath=${LIBPATH}
+ [[ ${mdir} != "." ]] && ldpath+="/${mdir}"
+ ldpaths="${ldpath}${ldpaths:+:${ldpaths}}"
- mosdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) -print-multi-os-directory)
- mosdirs="${mosdir}${mosdirs:+:${mosdirs}}"
- done
- else
- # Older gcc's didn't do multilib, so logic is simple.
- ldpaths=${LIBPATH}
- fi
+ mosdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) -print-multi-os-directory)
+ mosdirs="${mosdir}${mosdirs:+:${mosdirs}}"
+ done
cat <<-EOF > ${gcc_envd_file}
GCC_PATH="${BINPATH}"
@@ -2037,12 +2326,12 @@ create_revdep_rebuild_entry() {
}
copy_minispecs_gcc_specs() {
- # on gcc 6 we don't need minispecs
+ # On gcc 6, we don't need minispecs
if tc_version_is_at_least 6.0 ; then
return 0
fi
- # setup the hardenedno* specs files and the vanilla specs file.
+ # Setup the hardenedno* specs files and the vanilla specs file.
if hardened_gcc_works ; then
create_gcc_env_entry hardenednopiessp
fi
@@ -2092,7 +2381,7 @@ gcc_slot_java() {
done
# Rename jar because it could clash with Kaffe's jar if this gcc is
- # primary compiler (aka don't have the - extension)
+ # primary compiler (aka doesn't have the - extension)
cd "${D}${BINPATH}"
[[ -f jar ]] && mv -f jar gcj-jar
}
@@ -2101,40 +2390,41 @@ gcc_slot_java() {
toolchain_pkg_postinst() {
do_gcc_config
- if [[ ! ${ROOT%/} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+
+ if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
eselect compiler-shadow update all
fi
if ! is_crosscompile && [[ ${PN} != "kgcc64" ]] ; then
# gcc stopped installing .la files fixer in June 2020.
# Cleaning can be removed in June 2022.
- rm -f "${EROOT%/}"/sbin/fix_libtool_files.sh
- rm -f "${EROOT%/}"/usr/sbin/fix_libtool_files.sh
- rm -f "${EROOT%/}"/usr/share/gcc-data/fixlafiles.awk
+ rm -f "${EROOT}"/sbin/fix_libtool_files.sh
+ rm -f "${EROOT}"/usr/sbin/fix_libtool_files.sh
+ rm -f "${EROOT}"/usr/share/gcc-data/fixlafiles.awk
fi
}
toolchain_pkg_postrm() {
do_gcc_config
- if [[ ! ${ROOT%/} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
+ if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
eselect compiler-shadow clean all
fi
- # clean up the cruft left behind by cross-compilers
+ # Clean up the cruft left behind by cross-compilers
if is_crosscompile ; then
- if [[ -z $(ls "${EROOT%/}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then
+ if [[ -z $(ls "${EROOT}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then
einfo "Removing last cross-compiler instance. Deleting dangling symlinks."
- rm -f "${EROOT%/}"/etc/env.d/gcc/config-${CTARGET}
- rm -f "${EROOT%/}"/etc/env.d/??gcc-${CTARGET}
- rm -f "${EROOT%/}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64}
+ rm -f "${EROOT}"/etc/env.d/gcc/config-${CTARGET}
+ rm -f "${EROOT}"/etc/env.d/??gcc-${CTARGET}
+ rm -f "${EROOT}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64}
fi
return 0
fi
# gcc stopped installing .la files fixer in June 2020.
# Cleaning can be removed in June 2022.
- rm -f "${EROOT%/}"/sbin/fix_libtool_files.sh
- rm -f "${EROOT%/}"/usr/share/gcc-data/fixlafiles.awk
+ rm -f "${EROOT}"/sbin/fix_libtool_files.sh
+ rm -f "${EROOT}"/usr/share/gcc-data/fixlafiles.awk
}
do_gcc_config() {
@@ -2148,12 +2438,12 @@ do_gcc_config() {
current_gcc_config=$(gcc-config -c ${CTARGET} 2>/dev/null)
if [[ -n ${current_gcc_config} ]] ; then
local current_specs use_specs
- # figure out which specs-specific config is active
+ # Figure out which specs-specific config is active
current_specs=$(gcc-config -S ${current_gcc_config} | awk '{print $3}')
[[ -n ${current_specs} ]] && use_specs=-${current_specs}
if [[ -n ${use_specs} ]] && \
- [[ ! -e ${EROOT%/}/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}${use_specs} ]]
+ [[ ! -e ${EROOT}/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}${use_specs} ]]
then
ewarn "The currently selected specs-specific gcc config,"
ewarn "${current_specs}, doesn't exist anymore. This is usually"
@@ -2166,7 +2456,7 @@ do_gcc_config() {
target="${CTARGET}-${GCC_CONFIG_VER}${use_specs}"
else
# The curent target is invalid. Attempt to switch to a valid one.
- # Blindly pick the latest version. #529608
+ # Blindly pick the latest version. bug #529608
# TODO: Should update gcc-config to accept `-l ${CTARGET}` rather than
# doing a partial grep like this.
target=$(gcc-config -l 2>/dev/null | grep " ${CTARGET}-[0-9]" | tail -1 | awk '{print $2}')
@@ -2181,9 +2471,9 @@ should_we_gcc_config() {
local curr_config
curr_config=$(gcc-config -c ${CTARGET} 2>&1) || return 0
- # if the previously selected config has the same major.minor (branch) as
+ # If the previously selected config has the same major.minor (branch) as
# the version we are installing, then it will probably be uninstalled
- # for being in the same SLOT, make sure we run gcc-config.
+ # for being in the same SLOT, so make sure we run gcc-config.
local curr_config_ver=$(gcc-config -S ${curr_config} | awk '{print $2}')
local curr_branch_ver=$(ver_cut 1-2 ${curr_config_ver})
@@ -2191,12 +2481,14 @@ should_we_gcc_config() {
if [[ ${curr_branch_ver} == ${GCC_BRANCH_VER} ]] ; then
return 0
else
- # if we're installing a genuinely different compiler version,
+ # If we're installing a genuinely different compiler version,
# we should probably tell the user -how- to switch to the new
- # gcc version, since we're not going to do it for him/her.
+ # gcc version, since we're not going to do it for them.
+ #
# We don't want to switch from say gcc-3.3 to gcc-3.4 right in
# the middle of an emerge operation (like an 'emerge -e world'
# which could install multiple gcc versions).
+ #
# Only warn if we're installing a pkg as we might be called from
# the pkg_{pre,post}rm steps. #446830
if [[ ${EBUILD_PHASE} == *"inst" ]] ; then
@@ -2272,15 +2564,16 @@ is_go() {
is_jit() {
gcc-lang-supported jit || return 1
+
# cross-compiler does not really support jit as it has
- # to generate code for a target. On target like avr
+ # to generate code for a target. On targets like avr,
# libgcclit.so can't link at all: bug #594572
is_crosscompile && return 1
+
_tc_use_if_iuse jit
}
is_multilib() {
- tc_version_is_at_least 3 || return 1
_tc_use_if_iuse multilib
}
@@ -2303,7 +2596,7 @@ get_make_var() {
XGCC() { get_make_var GCC_FOR_TARGET ; }
-# The gentoo piessp patches allow for 3 configurations:
+# The gentoo pie-ssp patches allow for 3 configurations:
# 1) PIE+SSP by default
# 2) PIE by default
# 3) SSP by default
@@ -2312,8 +2605,6 @@ hardened_gcc_works() {
# $gcc_cv_ld_pie is unreliable as it simply take the output of
# `ld --help | grep -- -pie`, that reports the option in all cases, also if
# the loader doesn't actually load the resulting executables.
- # To avoid breakage, blacklist FreeBSD here at least
- [[ ${CTARGET} == *-freebsd* ]] && return 1
want_pie || return 1
_tc_use_if_iuse nopie && return 1
@@ -2335,17 +2626,9 @@ hardened_gcc_works() {
hardened_gcc_is_stable() {
local tocheck
if [[ $1 == "pie" ]] ; then
- if [[ ${CTARGET} == *-uclibc* ]] ; then
- tocheck=${PIE_UCLIBC_STABLE}
- else
- tocheck=${PIE_GLIBC_STABLE}
- fi
+ tocheck=${PIE_GLIBC_STABLE}
elif [[ $1 == "ssp" ]] ; then
- if [[ ${CTARGET} == *-uclibc* ]] ; then
- tocheck=${SSP_UCLIBC_STABLE}
- elif [[ ${CTARGET} == *-gnu* ]] ; then
- tocheck=${SSP_STABLE}
- fi
+ tocheck=${SSP_STABLE}
else
die "hardened_gcc_stable needs to be called with pie or ssp"
fi
@@ -2355,7 +2638,7 @@ hardened_gcc_is_stable() {
}
want_minispecs() {
- # on gcc 6 we don't need minispecs
+ # On gcc 6, we don't need minispecs
if tc_version_is_at_least 6.0 ; then
return 0
fi
@@ -2403,6 +2686,11 @@ toolchain_death_notice() {
fi
}
+fi
+
+EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
+ src_compile src_test src_install pkg_postinst pkg_postrm
+
# Note [implicitly enabled flags]
# -------------------------------
# Usually configure-based packages handle explicit feature requests
diff --git a/sdk_container/src/third_party/portage-stable/eclass/verify-sig.eclass b/sdk_container/src/third_party/portage-stable/eclass/verify-sig.eclass
index dadfd456e1..1d7c62d4dc 100644
--- a/sdk_container/src/third_party/portage-stable/eclass/verify-sig.eclass
+++ b/sdk_container/src/third_party/portage-stable/eclass/verify-sig.eclass
@@ -51,7 +51,7 @@ if [[ ! ${_VERIFY_SIG_ECLASS} ]]; then
IUSE="verify-sig"
-# @ECLASS-VARIABLE: VERIFY_SIG_METHOD
+# @ECLASS_VARIABLE: VERIFY_SIG_METHOD
# @PRE_INHERIT
# @DESCRIPTION:
# Signature verification method to use. The allowed value are:
@@ -76,7 +76,7 @@ case ${VERIFY_SIG_METHOD} in
;;
esac
-# @ECLASS-VARIABLE: VERIFY_SIG_OPENPGP_KEY_PATH
+# @ECLASS_VARIABLE: VERIFY_SIG_OPENPGP_KEY_PATH
# @DEFAULT_UNSET
# @DESCRIPTION:
# Path to key bundle used to perform the verification. This is required
@@ -86,7 +86,7 @@ esac
# NB: this variable is also used for non-OpenPGP signatures. The name
# contains "OPENPGP" for historical reasons.
-# @ECLASS-VARIABLE: VERIFY_SIG_OPENPGP_KEYSERVER
+# @ECLASS_VARIABLE: VERIFY_SIG_OPENPGP_KEYSERVER
# @DEFAULT_UNSET
# @DESCRIPTION:
# Keyserver used to refresh keys. If not specified, the keyserver
@@ -95,7 +95,7 @@ esac
#
# Supported for OpenPGP only.
-# @ECLASS-VARIABLE: VERIFY_SIG_OPENPGP_KEY_REFRESH
+# @ECLASS_VARIABLE: VERIFY_SIG_OPENPGP_KEY_REFRESH
# @USER_VARIABLE
# @DESCRIPTION:
# Attempt to refresh keys via WKD/keyserver. Set it to "yes"
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/Manifest
index a861b9983d..bffbec5a87 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/Manifest
@@ -1,2 +1,4 @@
DIST gentoo-functions-0.14.tar.gz 11330 BLAKE2B 72543941f2954e35d3671c1c482eda44ae00cf0c636a1d706c5b90c56dfbb985d20c156b6de650e5d33ff9fac0abaf9fc50b1172832c2bd5276f6adfe5baf3b8 SHA512 e1e0fee9f3e8b79478aaf2b9a54c8623c858e62f72f2885ea88f7006631cf513bdfaac7122f2a5fc97379bde57851793bf7d6c63a1c63a6923a7f13a73d803fc
DIST gentoo-functions-0.15.tar.gz 11236 BLAKE2B da3df4ee809c33a7aa275757380584abcc70dc5f54d32b2e9d3336a9453cfc935e932df065a65a7458b885a449774713fead5aea99ea5e7ee522e5493d35482b SHA512 b2a42e5b43c487d62e036eade88b5cc8e0f4eb249c783837a0293cdbba4ed8a1eea8742d531885bcc56eefa337853c41d257b6a9880fc0e7420b490bb6f98fd4
+DIST gentoo-functions-0.16.tar.bz2 10769 BLAKE2B aa85c97bf07e86631f9d11fc93252099925fb798a12483bead1e270799f44d3107c28e370925c948484a3f490247caf4c17b0068a160af7f72bec0f941699c95 SHA512 aa1f1bfbdd1e7ea51b2cceaae36b15a457b726ecc4fbed5bb3e5475d88b8142642df97b729303085716b1e3c7c92da58fa3b6842af5a04152e9f4c563d3d4b12
+DIST gentoo-functions-0.17.tar.bz2 10798 BLAKE2B 1b725945421ab36b1412f9addc22e9fe299c0e6460790ee2832b9f63d4c06b86bb0d054b01505640a5dc1e62f3cd257628717fec852116a4c8b2c9f9d2d149ee SHA512 6a3de93b5e4d761a53a622f41e6079606cc4ad8a964771d49dafdefbb632afdf722fd055d261e494aa0be956c4160c49a775ab40c927c5340b8e4da275ef51fb
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.14.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.14.ebuild
index a750147b59..f78a9ce16c 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.14.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.14.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2014-2021 Gentoo Authors
+# Copyright 2014-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,12 +13,11 @@ fi
inherit toolchain-funcs flag-o-matic
-DESCRIPTION="base functions required by all Gentoo systems"
+DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
-IUSE=""
src_configure() {
tc-export CC
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.15.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.15.ebuild
index 8f51bdc66c..9214af16ef 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.15.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.15.ebuild
@@ -8,17 +8,16 @@ if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
inherit toolchain-funcs flag-o-matic
-DESCRIPTION="base functions required by all Gentoo systems"
+DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
-IUSE=""
src_configure() {
tc-export CC
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.16.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.16.ebuild
new file mode 100644
index 0000000000..cf5513d3fc
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.16.ebuild
@@ -0,0 +1,27 @@
+# Copyright 2014-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Base functions required by all Gentoo systems"
+HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+src_configure() {
+ tc-export CC
+ append-lfs-flags
+ export ROOTPREFIX="${EPREFIX}"
+ export PREFIX="${EPREFIX}/usr"
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.17.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.17.ebuild
new file mode 100644
index 0000000000..cf5513d3fc
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-0.17.ebuild
@@ -0,0 +1,27 @@
+# Copyright 2014-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
+else
+ SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Base functions required by all Gentoo systems"
+HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+src_configure() {
+ tc-export CC
+ append-lfs-flags
+ export ROOTPREFIX="${EPREFIX}"
+ export PREFIX="${EPREFIX}/usr"
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild
index 6ab30b8f6e..cf5513d3fc 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gentoo-functions/gentoo-functions-9999.ebuild
@@ -1,24 +1,23 @@
-# Copyright 2014-2021 Gentoo Authors
+# Copyright 2014-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
if [[ ${PV} == 9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gentoo-functions.git"
else
- SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ SRC_URI="https://gitweb.gentoo.org/proj/gentoo-functions.git/snapshot/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
inherit toolchain-funcs flag-o-matic
-DESCRIPTION="base functions required by all Gentoo systems"
+DESCRIPTION="Base functions required by all Gentoo systems"
HOMEPAGE="https://gitweb.gentoo.org/proj/gentoo-functions.git"
LICENSE="GPL-2"
SLOT="0"
-IUSE=""
src_configure() {
tc-export CC
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/help2man/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/help2man/Manifest
index f911d52ebe..184c445c00 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/help2man/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/help2man/Manifest
@@ -1,2 +1,2 @@
-DIST help2man-1.48.3.tar.xz 211504 BLAKE2B 407cc87b1238242c202d37c0c4cd394e0efba95759b86a88026aef7c05d6a097d1946614547ebfab45f7fe0c1ddd057724234629246d32e94862c3d633b78c31 SHA512 e000e7380604c0986b14cb64b852d55eff48595884bddd389e876056dde6ce72b37aa16d92230e6f8f6e128003b819954bae4aa90933a58b51d3665d3c0ba356
DIST help2man-1.48.5.tar.xz 204672 BLAKE2B 6d96f5f65f8c637d524e5c373f2b89f114adf544c1d3508a9cb51115279b9bf6399c8ebb0a8d831de12ef8cdaca40b6e75412a221efc5d2dd1794e9c9643196f SHA512 800eb0daa9daef8e423d52ede55eee2960122ea0269865295afada4cf4fcc1c6791da8429c3a57c0fc1bf0a14c8a77953952325413a8faa5dd07b1bc5bc0edd1
+DIST help2man-1.49.2.tar.xz 225428 BLAKE2B 62db47a5915432093991f060390a62ebf2d1e5e6e78f7142d0cd5f8a273a1fd74f55de4b3ead5c1071aaf4de084e62782981a1d888b8a8b76da9c07e0cda20ea SHA512 cb8f9f923263d7160a27a7924ae559aba93d7258167888eb9e0e3e97a2014297b8d739b2bb7869acbf586354d099bd91d85f8208b901bce5ba0c5ad4b6abd6d5
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.48.5.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.48.5.ebuild
index 2f5c10989e..b55c7a1c9a 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.48.5.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.48.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -9,7 +9,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="nls"
RDEPEND="dev-lang/perl
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.48.3.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.49.2.ebuild
similarity index 61%
rename from sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.48.3.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.49.2.ebuild
index 31a7f04f2f..bd9be868fe 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.48.3.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/help2man/help2man-1.49.2.ebuild
@@ -1,22 +1,23 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
DESCRIPTION="GNU utility to convert program --help output to a man page"
-HOMEPAGE="https://www.gnu.org/software/help2man/"
+HOMEPAGE="https://www.gnu.org/software/help2man/ https://salsa.debian.org/bod/help2man"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="nls"
RDEPEND="dev-lang/perl
nls? ( dev-perl/Locale-gettext )"
DEPEND="${RDEPEND}"
-DOCS=( debian/changelog NEWS README THANKS ) #385753
+# bug #385753
+DOCS=( debian/changelog NEWS README THANKS )
PATCHES=(
"${FILESDIR}"/${PN}-1.46.1-linguas.patch
@@ -28,14 +29,16 @@ src_prepare() {
-e 's/-shared/-bundle/' \
Makefile.in || die
fi
+
default
}
src_configure() {
- # Disable gettext requirement as the release includes the gmo files #555018
+ # Disable gettext requirement as the release includes the gmo files, bug #555018
local myeconfargs=(
ac_cv_path_MSGFMT=$(type -P false)
$(use_enable nls)
)
+
econf "${myeconfargs[@]}"
}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild
index da94ac0d18..bce68764f8 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-archive/autoconf-archive-2022.02.11.ebuild
@@ -9,7 +9,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
# File collisions. #540246
RDEPEND="!=gnome-base/gnome-common-3.14.0-r0
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-archive/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-archive/metadata.xml
index de9d784241..9eca8509dc 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-archive/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-archive/metadata.xml
@@ -6,4 +6,7 @@
Gentoo Base System
+
+ autoconf-archive/autoconf-archive
+
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/Manifest
new file mode 100644
index 0000000000..72082a2b2d
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/Manifest
@@ -0,0 +1 @@
+DIST autotools-wrappers-at-20220130.tar.gz 3625 BLAKE2B c587d778a0c3331d14498308ae720dabdbcf27349ef0a3a2d5db56bb0ef597a5b1ab43388f1456e7888b40f043d68b0d89b420ac7404008f9a813ef78ae7e96f SHA512 700204b6024636dc808339aac15fb19bb645b654d4777ba8bf0febded5eb6af98659d04ed23819a8a638b6ee905e62292995bf2f838c30dedacb1a6bc0d04f1a
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild
deleted file mode 100644
index d960af4fa6..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/autoconf-wrapper-15.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-
-LICENSE="GPL-2"
-SLOT="0"
-[[ "${PV}" == *_pre* ]] || \
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-S="${WORKDIR}"
-
-src_install() {
- exeinto /usr/$(get_libdir)/misc
- newexe "${FILESDIR}"/ac-wrapper-${PV}.sh ac-wrapper.sh
-
- dodir /usr/bin
- local x=
- for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do
- dosym ../$(get_libdir)/misc/ac-wrapper.sh /usr/bin/${x}
- done
-}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild
new file mode 100644
index 0000000000..7b58c31e8b
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/autoconf-wrapper-20220130.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+MY_P="autotools-wrappers-at-${PV}"
+
+DESCRIPTION="wrapper for autoconf to manage multiple autoconf versions"
+HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git"
+#SRC_URI="https://gitweb.gentoo.org/proj/autotools-wrappers.git/snapshot/${MY_P}.tar.gz"
+SRC_URI="https://dev.gentoo.org/~vapier/dist/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+S="${WORKDIR}/${MY_P}"
+
+src_install() {
+ exeinto /usr/$(get_libdir)/misc
+ newexe ac-wrapper.sh ac-wrapper.sh
+
+ dodir /usr/bin
+ local x=
+ for x in auto{conf,header,m4te,reconf,scan,update} ifnames ; do
+ dosym ../$(get_libdir)/misc/ac-wrapper.sh /usr/bin/${x}
+ done
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh
deleted file mode 100644
index e5eda0e53f..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf-wrapper/files/ac-wrapper-15.sh
+++ /dev/null
@@ -1,203 +0,0 @@
-#!/bin/sh
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# Based on the ac-wrapper.pl script provided by MandrakeSoft
-# Rewritten in bash by Gregorio Guidi
-#
-# Executes the correct autoconf version.
-#
-# - defaults to newest version available (hopefully autoconf-2.60)
-# - runs autoconf 2.13 if:
-# - envvar WANT_AUTOCONF is set to `2.1'
-# -or-
-# - `ac{local,include}.m4' or `configure.{in,ac}' have AC_PREREQ(2.1) (not higher)
-# -or-
-# - `configure' is already present and was generated by autoconf 2.13
-
-warn() { printf "ac-wrapper: $*\n" 1>&2; }
-err() { warn "$@"; exit 1; }
-unset IFS
-which() {
- local p
- IFS=: # we don't use IFS anywhere, so don't bother saving/restoring
- for p in ${PATH} ; do
- p="${p}/$1"
- [ -e "${p}" ] && echo "${p}" && return 0
- done
- unset IFS
- return 1
-}
-
-#
-# Sanitize argv[0] since it isn't always a full path #385201
-#
-argv0=${0##*/}
-case ${0} in
- ${argv0})
- # find it in PATH
- if ! full_argv0=$(which "${argv0}") ; then
- err "could not locate ${argv0}; file a bug"
- fi
- ;;
- *)
- # re-use full/relative paths
- full_argv0=$0
- ;;
-esac
-
-if [ "${argv0}" = "ac-wrapper.sh" ] ; then
- err "Don't call this script directly"
-fi
-
-if [ "${WANT_AUTOCONF}" = "2.1" ] && [ "${argv0}" = "autom4te" ] ; then
- err "Autoconf 2.13 doesn't contain autom4te.\n" \
- " Either unset WANT_AUTOCONF or don't execute anything\n" \
- " that would use autom4te."
-fi
-
-if ! seq 0 0 2>/dev/null 1>&2 ; then #338518
- seq() {
- local f l i
- case $# in
- 1) f=1 i=1 l=$1;;
- 2) f=$1 i=1 l=$2;;
- 3) f=$1 i=$2 l=$3;;
- esac
- while :; do
- [ $l -lt $f -a $i -gt 0 ] && break
- [ $f -lt $l -a $i -lt 0 ] && break
- echo $f
- : $(( f += i ))
- done
- return 0
- }
-fi
-
-#
-# Set up bindings between actual version and WANT_AUTOCONF;
-# Start at last known unstable/stable versions to speed up lookup process.
-#
-if [ -z "${KNOWN_AUTOCONF}" ] ; then
- KNOWN_AUTOCONF="2.71:2.5 2.70:2.5 2.69:2.5"
-fi
-vers="${KNOWN_AUTOCONF} 9999:2.5 $(printf '2.%s:2.5 ' `seq 99 -1 59`) 2.13:2.1"
-
-binary=""
-for v in ${vers} ; do
- auto_ver=${v%:*}
- if [ -z "${binary}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then
- binary="${full_argv0}-${auto_ver}"
- break
- fi
-done
-if [ -z "${binary}" ] ; then
- err "Unable to locate any usuable version of autoconf.\n" \
- "\tI tried these versions: ${vers}\n" \
- "\tWith a base name of '${full_argv0}'."
-fi
-
-#
-# Check the WANT_AUTOCONF setting. We accept a whitespace delimited
-# list of autoconf versions.
-#
-if [ -n "${WANT_AUTOCONF}" ] ; then
- for v in ${vers} x ; do
- if [ "${v}" = "x" ] ; then
- warn "warning: invalid WANT_AUTOCONF '${WANT_AUTOCONF}'; ignoring."
- unset WANT_AUTOCONF
- break
- fi
-
- auto_ver=${v%:*}
- want_ver=${v#*:}
- for wx in ${WANT_AUTOCONF} ; do
- if [ -x "${full_argv0}-${wx}" ] ; then
- binary="${full_argv0}-${wx}"
- v="x"
- elif [ "${wx}" = "${want_ver}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then
- binary="${full_argv0}-${auto_ver}"
- v="x"
- fi
- done
- [ "${v}" = "x" ] && break
- done
-fi
-
-#
-# autodetect helpers
-#
-acprereq_version() {
- sed -n -r \
- -e '/^\s*(#|dnl)/d' \
- -e '/AC_PREREQ/s:.*AC_PREREQ\s*\(\[?\s*([0-9.]+)\s*\]?\):\1:p' \
- "$@" |
- LC_ALL=C sort -n -t . |
- tail -1
-}
-
-generated_version() {
- local re='^# Generated (by (GNU )?Autoconf|automatically using autoconf version) ([0-9.]+).*'
- sed -n -r "/${re}/{s:${re}:\3:;p;q}" "$@"
-}
-
-#
-# autodetect routine
-#
-if [ "${WANT_AUTOCONF}" = "2.1" ] && [ -f "configure.ac" ] ; then
- err "Since configure.ac is present, aclocal always use\n" \
- "\tautoconf 2.59+, which conflicts with your choice and\n" \
- "\tcauses error. You have two options:\n" \
- "\t1. Try execute command again after removing configure.ac\n" \
- "\t2. Don't set WANT_AUTOCONF"
-fi
-
-if [ "${WANT_AUTOCONF:-2.1}" = "2.1" ] && [ -n "${WANT_AUTOMAKE}" ] ; then
- # Automake-1.7 and better require autoconf-2.5x so if WANT_AUTOMAKE
- # is set to an older version, let's do some sanity checks.
- case "${WANT_AUTOMAKE}" in
- 1.[456])
- acfiles=$(ls aclocal.m4 acinclude.m4 configure.in configure.ac 2>/dev/null)
- [ -n "${acfiles}" ] && confversion=$(acprereq_version ${acfiles})
-
- [ -z "${confversion}" ] && [ -r "configure" ] \
- && confversion=$(generated_version configure)
-
- if [ "${confversion}" = "2.1" ] && [ ! -f "configure.ac" ] ; then
- binary="${full_argv0}-2.13"
- fi
- esac
-fi
-
-if [ -n "${WANT_ACWRAPPER_DEBUG}" ] ; then
- if [ -n "${WANT_AUTOCONF}" ] ; then
- warn "DEBUG: WANT_AUTOCONF is set to ${WANT_AUTOCONF}"
- fi
- warn "DEBUG: will execute <${binary}>"
-fi
-
-#
-# for further consistency
-#
-if [ -z "${WANT_AUTOCONF}" ] ; then
- for v in ${vers} ; do
- auto_ver=${v%:*}
- want_ver=${v#*:}
- if [ "${binary}" = "${full_argv0}-${auto_ver}" ] ; then
- export WANT_AUTOCONF="${want_ver}"
- break
- fi
- done
-fi
-
-#
-# Now try to run the binary
-#
-if [ ! -x "${binary}" ] ; then
- # this shouldn't happen
- err "${binary} is missing or not executable.\n" \
- "\tPlease try emerging the correct version of autoconf."
-fi
-
-exec "${binary}" "$@"
-# The shell will error out if `exec` failed.
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/Manifest
index 4d729262f2..e7e8a8d234 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/Manifest
@@ -1,5 +1,4 @@
DIST autoconf-2.13.tar.gz 443844 BLAKE2B ade10f9d4a0b1a0e8b752eee817cfe100d77b074192b9892330402ddc5b62dda1a3485ce0c36e72191daa9fd49382b99851cb6aa3a13aca8cf2ae6e884638fb6 SHA512 602584f4c77b7a554aaa068eda5409b68eb0b3229e9c224bffb91c83c4314d25de15bd560a323626ff78f6df339c79e1ef8938c54b78ecadf4dc75c5241290ad
-DIST autoconf-2.64.tar.xz 1113892 BLAKE2B 598873209a67725150cd4cf09c4b78b26b3d1782f259846da48dc8106a1d32ae2b24f3a864c3be0e9e8dc7d6b6ca8781b83ff33a691c88e68391d1ea861ccf23 SHA512 ee4b504447c14a59b849d0915e55a90522cfb071d1583af2bd3575e5a05d7bd290e55e0e9d0760c8f36043f926199fc2d962b559d27d2f95c70d0e147b4ad0a3
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.71.tar.xz 1292296 BLAKE2B 7fd4b98b4cfff10720e8da6ee91045637991643b50fcb3e47a0ecfcc01600f7b7b36fd1c0a5f08b68a418f1bdbd8d5a98de1008157595dd37cc3a31facb61416 SHA512 73d32b4adcbe24e3bafa9f43f59ed3b6efbd3de0f194e5ec90375f35da1199c583f5d3e89139b7edbad35171403709270e339ffa56a2ecb9b3123e9285021ff0
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.13-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.13-r2.ebuild
similarity index 71%
rename from sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.13-r1.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.13-r2.ebuild
index 51e415706f..e84a401dd1 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.13-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.13-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit toolchain-autoconf
@@ -11,13 +11,13 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="${PV:0:3}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="userland_BSD"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-DEPEND=">=sys-apps/texinfo-4.3
- =sys-devel/m4-1.4*
+BDEPEND="
+ sys-devel/m4
dev-lang/perl"
-RDEPEND="${DEPEND}
+RDEPEND="${BDEPEND}
+ sys-apps/texinfo
>=sys-devel/autoconf-wrapper-13"
PATCHES=(
@@ -40,10 +40,8 @@ src_configure() {
# 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.
- local prepend=""
- use userland_BSD && prepend="g"
- ac_cv_path_M4="${prepend}m4" \
- ac_cv_prog_AWK="${prepend}awk" \
+ ac_cv_path_M4="m4" \
+ ac_cv_prog_AWK="awk" \
LC_ALL=C \
econf \
--exec-prefix="${EPREFIX}"/usr \
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.64-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.64-r1.ebuild
deleted file mode 100644
index efed7086f5..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.64-r1.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-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.xz"
-
-LICENSE="GPL-2"
-SLOT="${PV}"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE=""
-
-DEPEND=">=sys-devel/m4-1.4.6
- dev-lang/perl"
-RDEPEND="${DEPEND}
- !~sys-devel/${P}:2.5
- >=sys-devel/autoconf-wrapper-13"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.69-perl-5.26.patch
- "${FILESDIR}"/${PN}-2.69-perl-5.26-2.patch
-)
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.69-r6.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.69-r6.ebuild
new file mode 100644
index 0000000000..83a8759838
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.69-r6.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2022 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
+ 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"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+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}
+ >=sys-devel/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
+
+ "${WORKDIR}"/patches/${P}-texinfo.patch
+)
+
+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/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.71-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.71-r1.ebuild
index 2421cf85b3..7ef4e0bcbe 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.71-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-2.71-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-if [[ ${PV} == "9999" ]] ; then
+if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/autoconf.git"
inherit git-r3
else
@@ -11,12 +11,14 @@ else
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 -> ${P}.tar.xz
- https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz -> ${P}.tar.xz"
+ 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"
- [[ "${PV}" == *_beta* ]] || \
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
- S="${WORKDIR}/${MY_P}"
+
+ if ! [[ ${PV} == *_beta* ]] ; then
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ fi
+ S="${WORKDIR}"/${MY_P}
fi
inherit toolchain-autoconf
@@ -28,13 +30,15 @@ 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.6"
+ >=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"
+[[ ${PV} == 9999 ]] && BDEPEND+=" >=sys-apps/texinfo-4.3"
PDEPEND="emacs? ( app-emacs/autoconf-mode )"
PATCHES=( "${FILESDIR}/${P}-time.patch" )
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-9999.ebuild
index cb3d17704c..a3424daaea 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-9999.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/autoconf/autoconf-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -22,7 +22,7 @@ SLOT="${PV}"
IUSE="emacs"
BDEPEND=">=sys-devel/m4-1.4.16
- >=dev-lang/perl-5.6"
+ >=dev-lang/perl-5.10"
RDEPEND="${BDEPEND}
>=sys-devel/autoconf-wrapper-14
sys-devel/gnuconfig
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild
new file mode 100644
index 0000000000..e65eb87b26
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/automake-wrapper/automake-wrapper-11-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="wrapper for automake to manage multiple automake versions"
+HOMEPAGE="https://gitweb.gentoo.org/proj/autotools-wrappers.git"
+S="${WORKDIR}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+src_unpack() {
+ cp "${FILESDIR}"/am-wrapper-${PV}.sh "${S}"/ || die
+}
+
+src_prepare() {
+ default
+
+ # usr/bin/aclocal: bad substitution -> /bin/sh != POSIX shell
+ if use prefix ; then
+ sed -i -e '1c\#!'"${EPREFIX}"'/bin/sh' am-wrapper-${PV}.sh || die
+ fi
+}
+
+src_install() {
+ newbin am-wrapper-${PV}.sh automake
+ dosym automake /usr/bin/aclocal
+
+ keepdir /usr/share/aclocal
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake-wrapper/automake-wrapper-11.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/automake-wrapper/automake-wrapper-11.ebuild
deleted file mode 100644
index 1516e27afb..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/automake-wrapper/automake-wrapper-11.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-DESCRIPTION="wrapper for automake to manage multiple automake versions"
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
-SRC_URI=""
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE=""
-
-S=${WORKDIR}
-
-src_unpack() {
- cp "${FILESDIR}"/am-wrapper-${PV}.sh "${S}"/ || die
-}
-
-src_prepare() {
- default
-
- # usr/bin/aclocal: bad substitution -> /bin/sh != POSIX shell
- if use prefix ; then
- sed -i -e '1c\#!'"${EPREFIX}"'/bin/sh' \
- "${S}"/am-wrapper-${PV}.sh || die
- fi
-}
-
-src_install() {
- newbin "${S}"/am-wrapper-${PV}.sh automake
- dosym automake /usr/bin/aclocal
-
- keepdir /usr/share/aclocal
-}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/automake/Manifest
index e5df40b3ad..e73efe2785 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/automake/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/automake/Manifest
@@ -1,6 +1,4 @@
DIST automake-1.11.6.tar.xz 1092908 BLAKE2B 17254d81d6920c32aa877b6c892025de8e4060b8bcbe50fff841ada513dd462ddde8fc6838b4976098a812f8fda047e7186cb62cea8175df615dde75a9959144 SHA512 6e4cdf69f07734954f770fd4a7211a8c9dc69fe25a7746bd3c1e01d3139c94cab2900399e87371548833e99687e0d2b59c5e746ab2fdfbc7d47f2c1d439137ba
DIST automake-1.13.4.tar.xz 1449608 BLAKE2B 03dee42d65362a6f36e81c83d516c85faba1aac59bdc0d941077fde9be7742da0f57b48d678169e7a0e8b652c3ef46c314cdd3efb0fc489c389852fed1c39a02 SHA512 c9b145c1b822a4d83f2899f4280a76ccae932301b273f4c9718dc7f53161aa03dc1be2c1fb1a61083c54186e1908ae2c8284250aa1d8f6dea484767aca1344d3
DIST automake-1.15.1.tar.xz 1509496 BLAKE2B e6ade31089f969140472004cd9854318470228c64e4f8e829d48c5379f62d2c5f8ef9509131c577653e81868d94544ecf6520f86b5d582ebb6ed65c832039f30 SHA512 02f661b2676f1d44334ce1c7188f9913a6874bf46ba487708ad8090ad57905f14aead80fefed815e21effacfbb925e23b944ea7dd32563dca39c1a4174eda688
-DIST automake-1.16.3.tar.xz 1590708 BLAKE2B ab6001a1b09e171ec83bac07155a77ab0fc29f5185116616aa3080b27e8bbf759472cd0dfb75630b26f7ad8d0741e668662d00b370ef79cf5ef6c62e945c94da SHA512 7265aeb7f82a8a205761d76e6ade7b7e97831c283349fd80f86e511f4b0b3e17f429d1506fca84c76079f63781e5dbf5ca81455d6bf6cda27d2e5c3d23b0d1aa
-DIST automake-1.16.4.tar.xz 1599336 BLAKE2B a74bb444e7074e7dd7cf920a94a86756a5e6dec24a9eeb669ee629a1d3ab667efef0005d488fe6d9d8b33a680ada54f098ca334b63da4a739b0fec7c630a65aa SHA512 5a8883657e73b75bfa1ee59ab04af6bf4d43f390ab62fb7a9e8e2ac66159dfe4947b2ac7bc1028afffe6a09d88f388339500e03f6cdfa1226985be45ec033246
DIST automake-1.16.5.tar.xz 1601740 BLAKE2B 87408abc57e1d4317a2b518fb3606d0f6d156522e7333016dd84747cd8922f27ef7fcc93220b11f794ce52bf8fd9a788d0166a4d1964d7c283905f269977ac7c SHA512 3084ae543aa3fb5a05104ffb2e66cfa9a53080f2343c44809707fd648516869511500dba50dae67ff10f92a1bf3b5a92b2a0fa01cda30adb69b9da03994d9d88
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.11.6-r3.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.11.6-r3.ebuild
index 8b96c4f831..2aea15120d 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.11.6-r3.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.11.6-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,7 +14,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 s
IUSE=""
RESTRICT="test"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-10
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.13.4-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.13.4-r2.ebuild
index 286477158c..520ca9e3da 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.13.4-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.13.4-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,7 +14,7 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 s
IUSE=""
RESTRICT="test"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-10
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.15.1-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.15.1-r2.ebuild
index 61626303e8..fcc66ddf35 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.15.1-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.15.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -32,7 +32,7 @@ SLOT="${PV:0:4}"
IUSE=""
RESTRICT="test"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-10
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.3-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.3-r1.ebuild
deleted file mode 100644
index 6908170eb0..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.3-r1.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{8,9,10} )
-
-inherit python-any-r1
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
-
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
- if [[ ${PV/_beta} == ${PV} ]]; then
- MY_P="${P}"
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
- https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- else
- MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
- MY_P="${PN}-${MY_PV}"
-
- # Alpha/beta releases are not distributed on the usual mirrors.
- SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- fi
- S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="Used to generate Makefile.in from Makefile.am"
-HOMEPAGE="https://www.gnu.org/software/automake/"
-
-LICENSE="GPL-2"
-# Use Gentoo versioning for slotting.
-SLOT="${PV:0:4}"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-lang/perl
- >=sys-devel/automake-wrapper-11
- >=sys-devel/autoconf-2.69:*
- sys-devel/gnuconfig"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/gzip
- sys-apps/help2man
- test? ( ${PYTHON_DEPS} )
-"
-
-PATCHES=(
- "${FILESDIR}"/automake-1.16.2-py3-compile.patch
- "${FILESDIR}"/automake-1.16.2-fix-instmany-python.sh-test.patch
- "${FILESDIR}"/automake-1.16.2-fix-py-compile-basedir.sh-test.patch
-)
-
-pkg_setup() {
- # Avoid python-any-r1_pkg_setup
- :
-}
-
-src_prepare() {
- default
- export WANT_AUTOCONF=2.5
- # Don't try wrapping the autotools this thing runs as it tends
- # to be a bit esoteric, and the script does `set -e` itself.
- ./bootstrap || die
- sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
-
- # Bug 628912
- if ! has_version sys-apps/texinfo ; then
- touch doc/{stamp-vti,version.texi,automake.info} || die
- fi
-}
-
-src_configure() {
- use test && python_setup
- default
-}
-
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
-slot_info_pages() {
- pushd "${ED}"/usr/share/info >/dev/null || die
- rm -f dir
-
- # Rewrite all the references to other pages.
- # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
- # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
- local p pages=( *.info ) args=()
- for p in "${pages[@]/%.info}" ; do
- args+=(
- -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
- -e "s:(${p}):(${p}-${SLOT}):g"
- )
- done
- sed -i "${args[@]}" * || die
-
- # Rewrite all the file references, and rename them in the process.
- local f d
- for f in * ; do
- d=${f/.info/-${SLOT}.info}
- mv "${f}" "${d}" || die
- sed -i -e "s:${f}:${d}:g" * || die
- done
-
- popd >/dev/null || die
-}
-
-src_install() {
- default
-
- slot_info_pages
- rm "${ED}"/usr/share/aclocal/README || die
- rmdir "${ED}"/usr/share/aclocal || die
- rm \
- "${ED}"/usr/bin/{aclocal,automake} \
- "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
-
- # remove all config.guess and config.sub files replacing them
- # w/a symlink to a specific gnuconfig version
- local x
- for x in guess sub ; do
- dosym ../gnuconfig/config.${x} \
- /usr/share/${PN}-${SLOT}/config.${x}
- done
-
- # Avoid QA message about pre-compressed file in docs
- local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
- if [[ -f "${tarfile}" ]] ; then
- gunzip "${tarfile}" || die
- fi
-}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.4.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.4.ebuild
deleted file mode 100644
index 6908170eb0..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.4.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{8,9,10} )
-
-inherit python-any-r1
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
-
- inherit git-r3
-else
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
- if [[ ${PV/_beta} == ${PV} ]]; then
- MY_P="${P}"
- SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
- https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- else
- MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
- MY_P="${PN}-${MY_PV}"
-
- # Alpha/beta releases are not distributed on the usual mirrors.
- SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
- fi
- S="${WORKDIR}/${MY_P}"
-fi
-
-DESCRIPTION="Used to generate Makefile.in from Makefile.am"
-HOMEPAGE="https://www.gnu.org/software/automake/"
-
-LICENSE="GPL-2"
-# Use Gentoo versioning for slotting.
-SLOT="${PV:0:4}"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="dev-lang/perl
- >=sys-devel/automake-wrapper-11
- >=sys-devel/autoconf-2.69:*
- sys-devel/gnuconfig"
-DEPEND="${RDEPEND}"
-BDEPEND="
- app-arch/gzip
- sys-apps/help2man
- test? ( ${PYTHON_DEPS} )
-"
-
-PATCHES=(
- "${FILESDIR}"/automake-1.16.2-py3-compile.patch
- "${FILESDIR}"/automake-1.16.2-fix-instmany-python.sh-test.patch
- "${FILESDIR}"/automake-1.16.2-fix-py-compile-basedir.sh-test.patch
-)
-
-pkg_setup() {
- # Avoid python-any-r1_pkg_setup
- :
-}
-
-src_prepare() {
- default
- export WANT_AUTOCONF=2.5
- # Don't try wrapping the autotools this thing runs as it tends
- # to be a bit esoteric, and the script does `set -e` itself.
- ./bootstrap || die
- sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
-
- # Bug 628912
- if ! has_version sys-apps/texinfo ; then
- touch doc/{stamp-vti,version.texi,automake.info} || die
- fi
-}
-
-src_configure() {
- use test && python_setup
- default
-}
-
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
-slot_info_pages() {
- pushd "${ED}"/usr/share/info >/dev/null || die
- rm -f dir
-
- # Rewrite all the references to other pages.
- # before: * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
- # after: * aclocal-invocation v1.13: (automake-1.13)aclocal Invocation. Generating aclocal.m4.
- local p pages=( *.info ) args=()
- for p in "${pages[@]/%.info}" ; do
- args+=(
- -e "/START-INFO-DIR-ENTRY/,/END-INFO-DIR-ENTRY/s|: (${p})| v${SLOT}&|"
- -e "s:(${p}):(${p}-${SLOT}):g"
- )
- done
- sed -i "${args[@]}" * || die
-
- # Rewrite all the file references, and rename them in the process.
- local f d
- for f in * ; do
- d=${f/.info/-${SLOT}.info}
- mv "${f}" "${d}" || die
- sed -i -e "s:${f}:${d}:g" * || die
- done
-
- popd >/dev/null || die
-}
-
-src_install() {
- default
-
- slot_info_pages
- rm "${ED}"/usr/share/aclocal/README || die
- rmdir "${ED}"/usr/share/aclocal || die
- rm \
- "${ED}"/usr/bin/{aclocal,automake} \
- "${ED}"/usr/share/man/man1/{aclocal,automake}.1 || die
-
- # remove all config.guess and config.sub files replacing them
- # w/a symlink to a specific gnuconfig version
- local x
- for x in guess sub ; do
- dosym ../gnuconfig/config.${x} \
- /usr/share/${PN}-${SLOT}/config.${x}
- done
-
- # Avoid QA message about pre-compressed file in docs
- local tarfile="${ED}/usr/share/doc/${PF}/amhello-1.0.tar.gz"
- if [[ -f "${tarfile}" ]] ; then
- gunzip "${tarfile}" || die
- fi
-}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.5.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.5.ebuild
index a9dc19ef2b..75cb2be5e4 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.5.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-1.16.5.ebuild
@@ -1,21 +1,21 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{8,9,10} )
+
+PYTHON_COMPAT=( python3_{8..11} )
inherit python-any-r1
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/${PN}.git"
-
inherit git-r3
else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
if [[ ${PV/_beta} == ${PV} ]]; then
MY_P="${P}"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
else
MY_PV="$(ver_cut 1).$(($(ver_cut 2)-1))b"
MY_P="${PN}-${MY_PV}"
@@ -23,6 +23,7 @@ else
# Alpha/beta releases are not distributed on the usual mirrors.
SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
fi
+
S="${WORKDIR}/${MY_P}"
fi
@@ -35,7 +36,7 @@ SLOT="${PV:0:4}"
IUSE="test"
RESTRICT="!test? ( test )"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-11
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
@@ -59,14 +60,15 @@ pkg_setup() {
src_prepare() {
default
+
export WANT_AUTOCONF=2.5
- # Don't try wrapping the autotools this thing runs as it tends
+ # Don't try wrapping the autotools - this thing runs as it tends
# to be a bit esoteric, and the script does `set -e` itself.
./bootstrap || die
sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
- # Bug 628912
- if ! has_version sys-apps/texinfo ; then
+ # bug #628912
+ if ! has_version -b sys-apps/texinfo ; then
touch doc/{stamp-vti,version.texi,automake.info} || die
fi
}
@@ -76,8 +78,8 @@ src_configure() {
default
}
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
+# Slot the info pages. Do this w/out munging the source so we don't have
+# to depend on texinfo to regen things. bug #464146 (among others)
slot_info_pages() {
pushd "${ED}"/usr/share/info >/dev/null || die
rm -f dir
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-9999.ebuild
index d5f464992b..c569293725 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-9999.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/automake/automake-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{8,9,10} )
+PYTHON_COMPAT=( python3_{8..11} )
inherit python-any-r1
@@ -23,6 +23,7 @@ else
# Alpha/beta releases are not distributed on the usual mirrors.
SRC_URI="https://alpha.gnu.org/pub/gnu/${PN}/${MY_P}.tar.xz"
fi
+
S="${WORKDIR}/${MY_P}"
fi
@@ -35,7 +36,7 @@ SLOT="${PV:0:4}"
IUSE="test"
RESTRICT="!test? ( test )"
-RDEPEND="dev-lang/perl
+RDEPEND=">=dev-lang/perl-5.6
>=sys-devel/automake-wrapper-11
>=sys-devel/autoconf-2.69:*
sys-devel/gnuconfig"
@@ -46,11 +47,6 @@ BDEPEND="
test? ( ${PYTHON_DEPS} )
"
-PATCHES=(
- "${FILESDIR}"/automake-1.16.2-py3-compile.patch
-)
-# All patches have been submitted upstream.
-
pkg_setup() {
# Avoid python-any-r1_pkg_setup
:
@@ -58,14 +54,15 @@ pkg_setup() {
src_prepare() {
default
+
export WANT_AUTOCONF=2.5
- # Don't try wrapping the autotools this thing runs as it tends
+ # Don't try wrapping the autotools - this thing runs as it tends
# to be a bit esoteric, and the script does `set -e` itself.
./bootstrap || die
sed -i -e "/APIVERSION=/s:=.*:=${SLOT}:" configure || die
- # Bug 628912
- if ! has_version sys-apps/texinfo ; then
+ # bug #628912
+ if ! has_version -b sys-apps/texinfo ; then
touch doc/{stamp-vti,version.texi,automake.info} || die
fi
}
@@ -75,8 +72,8 @@ src_configure() {
default
}
-# slot the info pages. do this w/out munging the source so we don't have
-# to depend on texinfo to regen things. #464146 (among others)
+# Slot the info pages. Do this w/out munging the source so we don't have
+# to depend on texinfo to regen things. bug #464146 (among others)
slot_info_pages() {
pushd "${ED}"/usr/share/info >/dev/null || die
rm -f dir
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.07.1-r3.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.07.1-r4.ebuild
similarity index 57%
rename from sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.07.1-r3.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.07.1-r4.ebuild
index 84f22cd7fd..82f798fc4f 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.07.1-r3.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/bc/bc-1.07.1-r4.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="6"
+EAPI=7
inherit flag-o-matic toolchain-funcs
@@ -9,33 +9,29 @@ DESCRIPTION="Handy console-based calculator utility"
HOMEPAGE="https://www.gnu.org/software/bc/bc.html"
SRC_URI="mirror://gnu/bc/${P}.tar.gz"
-LICENSE="GPL-2 LGPL-2.1"
+LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="libedit readline static"
RDEPEND="
!readline? ( libedit? ( dev-libs/libedit:= ) )
readline? (
- >=sys-libs/readline-4.1:0=
- >=sys-libs/ncurses-5.2:=
- )
-"
-DEPEND="
- ${RDEPEND}
+ sys-libs/readline:=
+ sys-libs/ncurses:=
+ )"
+DEPEND="${RDEPEND}"
+BDEPEND="
sys-devel/flex
- virtual/yacc
-"
+ virtual/yacc"
-PATCHES=(
- "${FILESDIR}/${PN}-1.07.1-no-ed-its-sed.patch"
-)
+PATCHES=( "${FILESDIR}"/${PN}-1.07.1-no-ed-its-sed.patch )
src_prepare() {
default
- # Avoid bad build tool usage when cross-compiling. #627126
- tc-is-cross-compiler && eapply "${FILESDIR}/${PN}-1.07.1-use-system-bc.patch"
+ # Avoid bad build tool usage when cross-compiling. Bug #627126
+ tc-is-cross-compiler && eapply "${FILESDIR}"/${PN}-1.07.1-use-system-bc.patch
}
src_configure() {
@@ -52,8 +48,8 @@ src_configure() {
econf "${myconf[@]}"
# Do not regen docs -- configure produces a small fragment that includes
- # the version info which causes all pages to regen (newer file). #554774
- touch -r doc doc/*
+ # the version info which causes all pages to regen (newer file). Bug #554774
+ touch -r doc doc/* || die
}
src_compile() {
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/bc/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-devel/bc/metadata.xml
index 73dda144f9..b0d83aa2e4 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/bc/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/bc/metadata.xml
@@ -1,8 +1,8 @@
-
- base-system@gentoo.org
- Gentoo Base System
-
+
+ base-system@gentoo.org
+ Gentoo Base System
+
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils-config/binutils-config-5.4.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils-config/binutils-config-5.4.1.ebuild
index 91b67f894d..eafb482fa1 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils-config/binutils-config-5.4.1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils-config/binutils-config-5.4.1.ebuild
@@ -10,7 +10,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
DESCRIPTION="Utility to change the binutils version being used"
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/Manifest
index af733e6a04..63c7be532b 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/Manifest
@@ -8,5 +8,10 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e
DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
-DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
+DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
+DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
+DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
+DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
+DIST binutils-2.39-patches-3.tar.xz 57332 BLAKE2B 08bdcd35afb6310c5f61e8a93f60c624ff461a612d8b473b2cfc1d8eb94eedb311af0b39b5f8ac425f3676d8e1addd13a4b223983de2f6d579e50daec08d3881 SHA512 f8a1a908866637a39a3ad55d47304f3320ab663d299d8d231a873008a50bb2a09c89a2482394c017a2a73c2cfc48ed944e99b422fd5db19f829e45ff071bb659
+DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.32-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.32-r2.ebuild
index d4de5f2ce4..40db4705c2 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.32-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.32-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@@ -97,7 +97,7 @@ src_unpack() {
}
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
# Use upstream patch to enable development mode
rm -v "${WORKDIR}/patch"/0000-Gentoo-Git-is-development.patch || die
@@ -105,13 +105,6 @@ src_prepare() {
eapply "${WORKDIR}/patch"/*.patch
fi
- # This check should probably go somewhere else, like pkg_pretend.
- if [[ ${CTARGET} == *-uclibc* ]] ; then
- if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
- die "sorry, but this binutils doesn't yet support uClibc :("
- fi
- fi
-
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.33.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.33.1-r1.ebuild
index 50ec961624..785ea17b65 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.33.1-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.33.1-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@@ -93,18 +93,11 @@ src_unpack() {
}
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
- # This check should probably go somewhere else, like pkg_pretend.
- if [[ ${CTARGET} == *-uclibc* ]] ; then
- if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
- die "sorry, but this binutils doesn't yet support uClibc :("
- fi
- fi
-
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.34-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.34-r2.ebuild
index d9683b91ae..c615031391 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.34-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.34-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@@ -90,18 +90,11 @@ src_unpack() {
}
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
- # This check should probably go somewhere else, like pkg_pretend.
- if [[ ${CTARGET} == *-uclibc* ]] ; then
- if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
- die "sorry, but this binutils doesn't yet support uClibc :("
- fi
- fi
-
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.35.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.35.2.ebuild
index cf54ddd023..cdb4d4b87e 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.35.2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.35.2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@@ -104,7 +104,7 @@ src_prepare() {
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
- if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
@@ -112,13 +112,6 @@ src_prepare() {
fi
fi
- # This check should probably go somewhere else, like pkg_pretend.
- if [[ ${CTARGET} == *-uclibc* ]] ; then
- if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
- die "sorry, but this binutils doesn't yet support uClibc :("
- fi
- fi
-
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.36.1-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.36.1-r2.ebuild
index 3e9086ca0f..faa27e272c 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.36.1-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.36.1-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
@@ -99,7 +99,7 @@ src_prepare() {
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
- if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
@@ -107,13 +107,6 @@ src_prepare() {
fi
fi
- # This check should probably go somewhere else, like pkg_pretend.
- if [[ ${CTARGET} == *-uclibc* ]] ; then
- if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
- die "sorry, but this binutils doesn't yet support uClibc :("
- fi
- fi
-
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.37_p1-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
new file mode 100644
index 0000000000..6ade635ea8
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=2
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ sys-devel/bc
+ )
+ nls? ( sys-devel/gettext )
+ sys-devel/flex
+ virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered. #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Fix locale issues if possible #122216
+ if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+ einfo "Fixing misc issues in configure files"
+ for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+ ebegin " Updating ${f/${S}\/}"
+ patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+ || eerror "Please file a bug about this"
+ eend $?
+ done
+ fi
+
+ # Fix conflicts with newer glibc #272594
+ if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+ sed -i 's:\:get_line:g' libiberty/testsuite/test-demangle.c
+ fi
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}"
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ if use default-gold; then
+ myconf+=( --enable-gold=default )
+ fi
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches
+ # the bi-arch logic in toolchain.eclass. #446946
+ # We used to do it for everyone, but it's slow on 32bit arches. #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+ # on everyone in alpha (for now), we'll just enable it when possible
+ has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+ has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.27) offer a configure flag now.
+ --enable-relro
+ # Newer versions (>=2.24) make this an explicit option. #497268
+ --enable-install-libiberty
+ # Available from 2.35 on
+ --enable-textrel-check=warning
+ # Works better than vapier's patch... #808787
+ --enable-new-dtags
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ ${EXTRA_ECONF}
+ # Disable modules that are in a combined binutils/gdb tree. #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across
+ # {native,cross}/binutils, binutils-libs. #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+ )
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ echo ./configure "${myconf[@]}"
+ "${S}"/configure "${myconf[@]}" || die
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}"
+ # see Note [tooldir hack for ldscripts]
+ emake tooldir="${EPREFIX}${TOOLPATH}" all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake info
+ fi
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}"
+
+ # bug 637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}"
+ # see Note [tooldir hack for ldscripts]
+ emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH} #171905
+ cd "${ED}"/${LIBPATH}
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH}
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-}
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/${LIBPATH}/lib
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}"
+ dodoc README
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.37_p1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.38-r1.ebuild
similarity index 95%
rename from sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.37_p1.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.38-r1.ebuild
index 5d38540bce..0041aec7eb 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.37_p1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.38-r1.ebuild
@@ -1,14 +1,14 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -19,7 +19,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=0
+PATCH_VER=3
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -32,7 +32,6 @@ else
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
- # live ebuild
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
@@ -82,13 +81,16 @@ src_unpack() {
EGIT_CHECKOUT_DIR=${S}
git-r3_src_unpack
else
- unpack ${P}.tar.xz
+ unpack ${P/-hppa64/}.tar.xz
cd "${WORKDIR}" || die
unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
# _p patch versions are Gentoo specific tarballs ...
- S=${WORKDIR}/${P%_p?}
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
fi
cd "${WORKDIR}" || die
@@ -103,7 +105,7 @@ src_prepare() {
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
- if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
@@ -111,13 +113,6 @@ src_prepare() {
fi
fi
- # This check should probably go somewhere else, like pkg_pretend.
- if [[ ${CTARGET} == *-uclibc* ]] ; then
- if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
- die "sorry, but this binutils doesn't yet support uClibc :("
- fi
- fi
-
# Make sure our explicit libdir paths don't get clobbered. #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
@@ -175,6 +170,8 @@ src_configure() {
# Keep things sane
strip-flags
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@@ -276,6 +273,15 @@ src_configure() {
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
)
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.38-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.38-r2.ebuild
new file mode 100644
index 0000000000..b4b21afc9d
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.38-r2.ebuild
@@ -0,0 +1,480 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc emacs +gold multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ sys-devel/bc
+ )
+ nls? ( sys-devel/gettext )
+ sys-devel/flex
+ virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered. #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Fix locale issues if possible #122216
+ if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+ einfo "Fixing misc issues in configure files"
+ for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+ ebegin " Updating ${f/${S}\/}"
+ patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+ || eerror "Please file a bug about this"
+ eend $?
+ done
+ fi
+
+ # Fix conflicts with newer glibc #272594
+ if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
+ sed -i 's:\:get_line:g' libiberty/testsuite/test-demangle.c
+ fi
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}"
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ if use default-gold; then
+ myconf+=( --enable-gold=default )
+ fi
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches
+ # the bi-arch logic in toolchain.eclass. #446946
+ # We used to do it for everyone, but it's slow on 32bit arches. #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
+ # on everyone in alpha (for now), we'll just enable it when possible
+ has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
+ has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ # (--disable-silent-rules should get passed automatically w/ econf which we use
+ # in >= 2.39, so can drop it then.)
+ --disable-silent-rules
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.27) offer a configure flag now.
+ --enable-relro
+ # Newer versions (>=2.24) make this an explicit option. #497268
+ --enable-install-libiberty
+ # Available from 2.35 on
+ --enable-textrel-check=warning
+ # Works better than vapier's patch... #808787
+ --enable-new-dtags
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ ${EXTRA_ECONF}
+ # Disable modules that are in a combined binutils/gdb tree. #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across
+ # {native,cross}/binutils, binutils-libs. #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+ )
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ echo ./configure "${myconf[@]}"
+ "${S}"/configure "${myconf[@]}" || die
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}"
+ # see Note [tooldir hack for ldscripts]
+ emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake V=1 info
+ fi
+
+ ! is_cross && use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}"
+
+ # bug 637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k V=1 check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}"
+ # see Note [tooldir hack for ldscripts]
+ emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH} #171905
+ cd "${ED}"/${LIBPATH}
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH}
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-}
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/${LIBPATH}/lib
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}"
+ dodoc README
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ if ! is_cross && use emacs ; then
+ elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
+ elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+
+ ! is_cross && use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+
+ ! is_cross && use emacs && elisp-site-regen
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.39.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.39.ebuild
new file mode 100644
index 0000000000..a97dadc161
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-2.39.ebuild
@@ -0,0 +1,494 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+
+DESCRIPTION="Tools necessary to build programs"
+HOMEPAGE="https://sourceware.org/binutils/"
+LICENSE="GPL-3+"
+IUSE="cet default-gold doc emacs gold multitarget +nls pgo +plugins static-libs test vanilla"
+REQUIRED_USE="default-gold? ( gold )"
+
+# Variables that can be set here (ignored for live ebuilds)
+# PATCH_VER - the patchset version
+# Default: empty, no patching
+# PATCH_BINUTILS_VER - the binutils version in the patchset name
+# - Default: PV
+# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
+# for the patchsets
+
+PATCH_VER=3
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+ SLOT=${PV}
+else
+ PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+ PATCH_DEV=${PATCH_DEV:-dilfridge}
+ SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
+ [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+ SLOT=$(ver_cut 1-2)
+ # live ebuild
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~loong"
+fi
+
+#
+# The cross-compile logic
+#
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+#
+# The dependencies
+#
+RDEPEND="
+ >=sys-devel/binutils-config-3
+ sys-libs/zlib
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( sys-apps/texinfo )
+ test? (
+ dev-util/dejagnu
+ sys-devel/bc
+ )
+ nls? ( sys-devel/gettext )
+ sys-devel/flex
+ virtual/yacc
+"
+
+RESTRICT="!test? ( test )"
+
+MY_BUILDDIR=${WORKDIR}/build
+
+src_unpack() {
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/binutils-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patch || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ S=${WORKDIR}/binutils
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P/-hppa64/}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
+
+ # _p patch versions are Gentoo specific tarballs ...
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
+ fi
+
+ cd "${WORKDIR}" || die
+ mkdir -p "${MY_BUILDDIR}" || die
+}
+
+src_prepare() {
+ local patchsetname
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
+ fi
+
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if ! use vanilla; then
+ einfo "Applying binutils patchset ${patchsetname}"
+ eapply "${WORKDIR}/patch"
+ einfo "Done."
+ fi
+ fi
+
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
+ sed -i \
+ -e 's:@bfdlibdir@:@libdir@:g' \
+ -e 's:@bfdincludedir@:@includedir@:g' \
+ {bfd,opcodes}/Makefile.in || die
+
+ # Fix locale issues if possible, bug #122216
+ if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
+ einfo "Fixing misc issues in configure files"
+ for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
+ ebegin " Updating ${f/${S}\/}"
+ patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
+ || eerror "Please file a bug about this"
+ eend $?
+ done
+ fi
+
+ # Apply things from PATCHES and user dirs
+ default
+
+ # Run misc portage update scripts
+ gnuconfig_update
+ elibtoolize --portage --no-uclibc
+}
+
+toolchain-binutils_bugurl() {
+ printf "https://bugs.gentoo.org/"
+}
+toolchain-binutils_pkgversion() {
+ printf "Gentoo ${PV}"
+ [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}"
+}
+
+src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ # Setup some paths
+ LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
+ INCPATH=${LIBPATH}/include
+ DATAPATH=/usr/share/binutils-data/${CTARGET}/${PV}
+ if is_cross ; then
+ TOOLPATH=/usr/${CHOST}/${CTARGET}
+ else
+ TOOLPATH=/usr/${CTARGET}
+ fi
+ BINPATH=${TOOLPATH}/binutils-bin/${PV}
+
+ # Make sure we filter $LINGUAS so that only ones that
+ # actually work make it through, bug #42033
+ strip-linguas -u */po
+
+ # Keep things sane
+ strip-flags
+
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
+ local x
+ echo
+ for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
+ einfo "$(printf '%10s' ${x}:) ${!x}"
+ done
+ echo
+
+ cd "${MY_BUILDDIR}" || die
+ local myconf=()
+
+ if use plugins ; then
+ myconf+=( --enable-plugins )
+ fi
+ # enable gold (installed as ld.gold) and ld's plugin architecture
+ if use gold ; then
+ myconf+=( --enable-gold )
+ if use default-gold; then
+ myconf+=( --enable-gold=default )
+ fi
+ fi
+
+ if use nls ; then
+ myconf+=( --without-included-gettext )
+ else
+ myconf+=( --disable-nls )
+ fi
+
+ myconf+=( --with-system-zlib )
+
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
+ case $(tc-arch) in
+ ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
+ esac
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
+
+ is_cross && myconf+=(
+ --with-sysroot="${EPREFIX}"/usr/${CTARGET}
+ --enable-poison-system-directories
+ )
+
+ myconf+=( --enable-secureplt )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ myconf+=(
+ --prefix="${EPREFIX}"/usr
+ --host=${CHOST}
+ --target=${CTARGET}
+ --datadir="${EPREFIX}"${DATAPATH}
+ --datarootdir="${EPREFIX}"${DATAPATH}
+ --infodir="${EPREFIX}"${DATAPATH}/info
+ --mandir="${EPREFIX}"${DATAPATH}/man
+ --bindir="${EPREFIX}"${BINPATH}
+ --libdir="${EPREFIX}"${LIBPATH}
+ --libexecdir="${EPREFIX}"${LIBPATH}
+ --includedir="${EPREFIX}"${INCPATH}
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.27) offer a configure flag now.
+ --enable-relro
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
+ --enable-install-libiberty
+ # Available from 2.35 on
+ --enable-textrel-check=warning
+
+ # Available from 2.39 on
+ --enable-warn-execstack
+ --enable-warn-rwx-segments
+ # TODO: Available from 2.39+ on but let's try the warning on for a bit
+ # first... (--enable-warn-execstack)
+ # Could put it under USE=hardened?
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
+ --enable-new-dtags
+
+ --disable-jansson
+ --disable-werror
+ --with-bugurl="$(toolchain-binutils_bugurl)"
+ --with-pkgversion="$(toolchain-binutils_pkgversion)"
+ $(use_enable static-libs static)
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # Change SONAME to avoid conflict across
+ # {native,cross}/binutils, binutils-libs. bug #666100
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+ )
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
+
+ # Prevent makeinfo from running if doc is unset.
+ if ! use doc ; then
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
+
+ # only build info pages if the user wants them
+ if use doc ; then
+ emake V=1 info
+ fi
+
+ ! is_cross && use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
+
+ # we nuke the manpages when we're left with junk
+ # (like when we bootstrap, no perl -> no manpages)
+ find . -name '*.1' -a -size 0 -delete
+}
+
+src_test() {
+ cd "${MY_BUILDDIR}" || die
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k V=1 check
+}
+
+src_install() {
+ local x d
+
+ cd "${MY_BUILDDIR}" || die
+
+ # see Note [tooldir hack for ldscripts]
+ emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
+ use static-libs || find "${ED}" -name '*.la' -delete
+
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
+ for d in ../* ; do
+ [[ ${d} == ../${PV} ]] && continue
+ mv ${d}/* . || die
+ rmdir ${d} || die
+ done
+
+ # Now we collect everything intp the proper SLOT-ed dirs
+ # When something is built to cross-compile, it installs into
+ # /usr/$CHOST/ by default ... we have to 'fix' that :)
+ if is_cross ; then
+ cd "${ED}"/${BINPATH} || die
+ for x in * ; do
+ mv ${x} ${x/${CTARGET}-} || die
+ done
+
+ if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH}
+ mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/
+ rm -r "${ED}"/usr/${CHOST}/{include,lib}
+ fi
+ fi
+
+ insinto ${INCPATH}
+ local libiberty_headers=(
+ # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
+ demangle.h
+ dyn-string.h
+ fibheap.h
+ hashtab.h
+ libiberty.h
+ objalloc.h
+ splay-tree.h
+ )
+ doins "${libiberty_headers[@]/#/${S}/include/}"
+ if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
+ fi
+
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CTARGET}"
+ VER="${PV}"
+ LIBPATH="${EPREFIX}${LIBPATH}"
+ EOF
+ newins "${T}"/env.d ${CTARGET}-${PV}
+
+ # Handle documentation
+ if ! is_cross ; then
+ cd "${S}" || die
+ dodoc README
+
+ docinto bfd
+ dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
+ docinto binutils
+ dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
+ docinto gas
+ dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
+ docinto gprof
+ dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
+ docinto ld
+ dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
+ docinto libiberty
+ dodoc libiberty/ChangeLog* libiberty/README
+
+ docinto opcodes
+ dodoc opcodes/ChangeLog*
+ fi
+
+ if ! is_cross && use emacs ; then
+ elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
+ elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
+
+ # Trim all empty dirs
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
+
+pkg_postinst() {
+ # Make sure this ${CTARGET} has a binutils version selected
+ [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
+ binutils-config ${CTARGET}-${PV}
+
+ ! is_cross && use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ local current_profile=$(binutils-config -c ${CTARGET})
+
+ # If no other versions exist, then uninstall for this
+ # target ... otherwise, switch to the newest version
+ # Note: only do this if this version is unmerged. We
+ # rerun binutils-config if this is a remerge, as
+ # we want the mtimes on the symlinks updated (if
+ # it is the same as the current selected profile)
+ if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${PV} ]] ; then
+ local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}')
+ choice=${choice//$'\n'/ }
+ choice=${choice/* }
+ if [[ -z ${choice} ]] ; then
+ binutils-config -u ${CTARGET}
+ else
+ binutils-config ${choice}
+ fi
+ elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
+ binutils-config ${CTARGET}-${PV}
+ fi
+
+ ! is_cross && use emacs && elisp-site-regen
+}
+
+# Note [slotting support]
+# -----------------------
+# Gentoo's layout for binutils files is non-standard as Gentoo
+# supports slotted installation for binutils. Many tools
+# still expect binutils to reside in known locations.
+# binutils-config package restores symlinks into known locations,
+# like:
+# /usr/bin/${CTARGET}-
+# /usr/bin/${CHOST}/${CTARGET}/lib/ldscrips
+# /usr/include/
+#
+# Note [tooldir hack for ldscripts]
+# ---------------------------------
+# Build system does not allow ./configure to tweak every location
+# we need for slotting binutils hence all the shuffling in
+# src_install(). This note is about SCRIPTDIR define handling.
+#
+# SCRIPTDIR defines 'ldscripts/' directory location. SCRIPTDIR value
+# is set at build-time in ld/Makefile.am as: 'scriptdir = $(tooldir)/lib'
+# and hardcoded as -DSCRIPTDIR='"$(scriptdir)"' at compile time.
+# Thus we can't just move files around after compilation finished.
+#
+# Our goal is the following:
+# - at build-time set scriptdir to point to symlinked location:
+# ${TOOLPATH}: /usr/${CHOST} (or /usr/${CHOST}/${CTARGET} for cross-case)
+# - at install-time set scriptdir to point to slotted location:
+# ${LIBPATH}: /usr/$(get_libdir)/binutils/${CTARGET}/${PV}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild
index 37d8a9fa13..aa5e1dcfdf 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/binutils-9999.ebuild
@@ -1,14 +1,14 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
+inherit elisp-common libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+IUSE="cet default-gold doc emacs +gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -19,7 +19,7 @@ REQUIRED_USE="default-gold? ( gold )"
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
# for the patchsets
-PATCH_VER=1
+PATCH_VER=0
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@@ -33,7 +33,7 @@ else
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
SLOT=$(ver_cut 1-2)
# live ebuild
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
#
@@ -53,6 +53,7 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
+ emacs? ( >=app-editors/emacs-23.1:* )
"
DEPEND="${RDEPEND}"
BDEPEND="
@@ -82,13 +83,16 @@ src_unpack() {
EGIT_CHECKOUT_DIR=${S}
git-r3_src_unpack
else
- unpack ${P}.tar.xz
+ unpack ${P/-hppa64/}.tar.xz
cd "${WORKDIR}" || die
unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
# _p patch versions are Gentoo specific tarballs ...
- S=${WORKDIR}/${P%_p?}
+ local dir=${P%_p?}
+ dir=${dir/-hppa64/}
+
+ S=${WORKDIR}/${dir}
fi
cd "${WORKDIR}" || die
@@ -103,7 +107,7 @@ src_prepare() {
patchsetname="${PATCH_BINUTILS_VER}-${PATCH_VER}"
fi
- if [[ ! -z ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
+ if [[ -n ${PATCH_VER} ]] || [[ ${PV} == 9999* ]] ; then
if ! use vanilla; then
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
@@ -111,20 +115,13 @@ src_prepare() {
fi
fi
- # This check should probably go somewhere else, like pkg_pretend.
- if [[ ${CTARGET} == *-uclibc* ]] ; then
- if grep -qs 'linux-gnu' "${S}"/ltconfig ; then
- die "sorry, but this binutils doesn't yet support uClibc :("
- fi
- fi
-
- # Make sure our explicit libdir paths don't get clobbered. #562460
+ # Make sure our explicit libdir paths don't get clobbered, bug #562460
sed -i \
-e 's:@bfdlibdir@:@libdir@:g' \
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
- # Fix locale issues if possible #122216
+ # Fix locale issues if possible, bug #122216
if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then
einfo "Fixing misc issues in configure files"
for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do
@@ -135,11 +132,6 @@ src_prepare() {
done
fi
- # Fix conflicts with newer glibc #272594
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
- sed -i 's:\:get_line:g' libiberty/testsuite/test-demangle.c
- fi
-
# Apply things from PATCHES and user dirs
default
@@ -157,6 +149,11 @@ toolchain-binutils_pkgversion() {
}
src_configure() {
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
# Setup some paths
LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
@@ -169,12 +166,14 @@ src_configure() {
BINPATH=${TOOLPATH}/binutils-bin/${PV}
# Make sure we filter $LINGUAS so that only ones that
- # actually work make it through #42033
+ # actually work make it through, bug #42033
strip-linguas -u */po
# Keep things sane
strip-flags
+ use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
+
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
@@ -182,7 +181,7 @@ src_configure() {
done
echo
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
local myconf=()
if use plugins ; then
@@ -204,9 +203,10 @@ src_configure() {
myconf+=( --with-system-zlib )
- # For bi-arch systems, enable a 64bit bfd. This matches
- # the bi-arch logic in toolchain.eclass. #446946
- # We used to do it for everyone, but it's slow on 32bit arches. #438522
+ # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch
+ # logic in toolchain.eclass. bug #446946
+ #
+ # We used to do it for everyone, but it's slow on 32bit arches. bug #438522
case $(tc-arch) in
ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;;
esac
@@ -220,10 +220,7 @@ src_configure() {
--enable-poison-system-directories
)
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+
- # on everyone in alpha (for now), we'll just enable it when possible
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt )
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt )
+ myconf+=( --enable-secureplt )
# mips can't do hash-style=gnu ...
if [[ $(tc-arch) != mips ]] ; then
@@ -247,24 +244,37 @@ src_configure() {
--enable-threads
# Newer versions (>=2.27) offer a configure flag now.
--enable-relro
- # Newer versions (>=2.24) make this an explicit option. #497268
+ # Newer versions (>=2.24) make this an explicit option, bug #497268
--enable-install-libiberty
# Available from 2.35 on
--enable-textrel-check=warning
- # Works better than vapier's patch... #808787
+
+ # Available from 2.39 on
+ --enable-warn-execstack
+ --enable-warn-rwx-segments
+ # TODO: Available from 2.39+ on but let's try the warning on for a bit
+ # first... (--enable-warn-execstack)
+ # Could put it under USE=hardened?
+ #--disable-default-execstack (or is it --enable-default-execstack=no? docs are confusing)
+
+ # Things to think about
+ #--enable-deterministic-archives
+
+ # Works better than vapier's patch, bug #808787
--enable-new-dtags
+
+ --disable-jansson
--disable-werror
--with-bugurl="$(toolchain-binutils_bugurl)"
--with-pkgversion="$(toolchain-binutils_pkgversion)"
$(use_enable static-libs static)
- ${EXTRA_ECONF}
- # Disable modules that are in a combined binutils/gdb tree. #490566
+ # Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
# Strip out broken static link flags.
# https://gcc.gnu.org/PR56750
--without-stage1-ldflags
# Change SONAME to avoid conflict across
- # {native,cross}/binutils, binutils-libs. #666100
+ # {native,cross}/binutils, binutils-libs. bug #666100
--with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)
# avoid automagic dependency on (currently prefix) systems
@@ -276,8 +286,16 @@ src_configure() {
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
)
- echo ./configure "${myconf[@]}"
- "${S}"/configure "${myconf[@]}" || die
+
+ if ! is_cross ; then
+ myconf+=( $(use_enable pgo pgo-build lto) )
+
+ if use pgo ; then
+ export BUILD_CFLAGS="${CFLAGS}"
+ fi
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" || die
# Prevent makeinfo from running if doc is unset.
if ! use doc ; then
@@ -288,40 +306,44 @@ src_configure() {
}
src_compile() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
- emake tooldir="${EPREFIX}${TOOLPATH}" all
+ emake V=1 tooldir="${EPREFIX}${TOOLPATH}" all
# only build info pages if the user wants them
if use doc ; then
- emake info
+ emake V=1 info
fi
+ ! is_cross && use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
+
# we nuke the manpages when we're left with junk
# (like when we bootstrap, no perl -> no manpages)
find . -name '*.1' -a -size 0 -delete
}
src_test() {
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
- # bug 637066
+ # bug #637066
filter-flags -Wall -Wreturn-type
- emake -k check
+ emake -k V=1 check
}
src_install() {
local x d
- cd "${MY_BUILDDIR}"
+ cd "${MY_BUILDDIR}" || die
+
# see Note [tooldir hack for ldscripts]
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
- rm -rf "${ED}"/${LIBPATH}/bin
+ emake V=1 DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install
+ rm -rf "${ED}"/${LIBPATH}/bin || die
use static-libs || find "${ED}" -name '*.la' -delete
- # Newer versions of binutils get fancy with ${LIBPATH} #171905
- cd "${ED}"/${LIBPATH}
+ # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905
+ cd "${ED}"/${LIBPATH} || die
for d in ../* ; do
[[ ${d} == ../${PV} ]] && continue
mv ${d}/* . || die
@@ -332,9 +354,9 @@ src_install() {
# When something is built to cross-compile, it installs into
# /usr/$CHOST/ by default ... we have to 'fix' that :)
if is_cross ; then
- cd "${ED}"/${BINPATH}
+ cd "${ED}"/${BINPATH} || die
for x in * ; do
- mv ${x} ${x/${CTARGET}-}
+ mv ${x} ${x/${CTARGET}-} || die
done
if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then
@@ -343,6 +365,7 @@ src_install() {
rm -r "${ED}"/usr/${CHOST}/{include,lib}
fi
fi
+
insinto ${INCPATH}
local libiberty_headers=(
# Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir.
@@ -356,8 +379,8 @@ src_install() {
)
doins "${libiberty_headers[@]/#/${S}/include/}"
if [[ -d ${ED}/${LIBPATH}/lib ]] ; then
- mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/
- rm -r "${ED}"/${LIBPATH}/lib
+ mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die
+ rm -r "${ED}"/${LIBPATH}/lib || die
fi
# Generate an env.d entry for this binutils
@@ -371,24 +394,36 @@ src_install() {
# Handle documentation
if ! is_cross ; then
- cd "${S}"
+ cd "${S}" || die
dodoc README
+
docinto bfd
dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO
+
docinto binutils
dodoc binutils/ChangeLog binutils/NEWS binutils/README
+
docinto gas
dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README*
+
docinto gprof
dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl
+
docinto ld
dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO
+
docinto libiberty
dodoc libiberty/ChangeLog* libiberty/README
+
docinto opcodes
dodoc opcodes/ChangeLog*
fi
+ if ! is_cross && use emacs ; then
+ elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
+ elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+ fi
+
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
@@ -400,6 +435,8 @@ pkg_postinst() {
# Make sure this ${CTARGET} has a binutils version selected
[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
binutils-config ${CTARGET}-${PV}
+
+ ! is_cross && use emacs && elisp-site-regen
}
pkg_postrm() {
@@ -423,6 +460,8 @@ pkg_postrm() {
elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; then
binutils-config ${CTARGET}-${PV}
fi
+
+ ! is_cross && use emacs && elisp-site-regen
}
# Note [slotting support]
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/50binutils-gentoo.el b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/50binutils-gentoo.el
new file mode 100644
index 0000000000..7caa9f19a3
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/files/50binutils-gentoo.el
@@ -0,0 +1,3 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'dwarf-browse "dwarf-mode"
+ "Invoke `objdump' and put output into a `dwarf-mode' buffer." t)
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/metadata.xml
index 165a135caf..e05bf0bdd5 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/binutils/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/binutils/metadata.xml
@@ -1,5 +1,5 @@
-
+
toolchain@gentoo.org
@@ -9,6 +9,7 @@
Enable Intel Control-flow Enforcement Technology.
Set ld to point to ld.gold instead of ld.bfd
Build ld.gold linker
+ Build binutils with Profile Guided Optimization (PGO) and LTO
Enable plugin support in tools
Adds support to binutils for cross compiling (does not work with gas)
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/bison/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/bison/Manifest
index 60fc54129f..580d3f2c84 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/bison/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/bison/Manifest
@@ -1,4 +1,4 @@
DIST bison-3.7.6-patches-01.tar.xz 10600 BLAKE2B c7907a327c2bbb82a2e575a864e71400f91cd4349a84f95b187ecaadefc1bfd595a91bce6c8c47e42423cace9cf78a4041fde3fdc489a4824aa3c10ca73be7cb SHA512 8f2ddee79b9678b9fd9a7a34f26d44f7c4472d0fc55c9fef8b418d27949b6a27309b7aa5ac3f4a5ad27c90ad7d92d824ffe767c77b0ed81de6b2897c91cd7560
DIST bison-3.7.6.tar.xz 2627180 BLAKE2B 2f1015b517e46ff0870378b4d0dd489c8c737f31b2b69146bd7fbbae1e3adcdff0e4837cfdf1d238e8660ecc2b310ce87ec8940ed4989278b3df6cbb2d464e54 SHA512 6c1c9b825fbd2c94b8903f03a7e68e6832599f7bbd8d3c49864537c11b038c45a15de02fd36128d662af314334c83515bbc132df84e9acc6c651e98649c65bad
-DIST bison-3.8.1.tar.xz 2800372 BLAKE2B 0b70ee1b3ab8075540d9254cffdc1dfc9a9fb354d8b9b79dd3b097bf9a2235f892e120736e4195ad21ce8fbf3831c63b2d1a267a20a7abf85f0d72cdcdac1820 SHA512 f87978c41eca4db22de4f64feb3be92e44862d412f75dd84980045faf0f9e7f5a41b25bef8d4acd90743638eab61a7ac111444969d958fef5fe3535bac416921
DIST bison-3.8.2.tar.xz 2817324 BLAKE2B e211b61494c911f55b72a8b70b5a48cdf4000ce9e675a1f1f52735bb8f57d93a3f8075341451263af9c9c531004907ae2b62b1873e7e4664c2cd26fa3b12271c SHA512 d4d23af6671406e97257892f90651b67f2ab95219831372be032190b7156c10a3435d457857e677445df8b2327aacccc15344acbbc3808a6f332a93cce23b444
+DIST bison-3.8.2.tar.xz.sig 195 BLAKE2B b9bd21adb5115d3d3174c94223fbc9cd33afa0e9c1805008e49f77ff154fc2b656d8a9e9503dc5290658ae2948a2ca7c0dbc812f62aec268d8f8bfafb6349096 SHA512 8bb7743ca326e81a6c091b1413e3c09bd43c7eabbb80bac0638ccd52bdf7e3395cce300a86acd95f4637a9ec8a1b0e9a4d3d25d95ab0a8f03e57fd82eb87a7ac
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.7.6.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.7.6.ebuild
index a9e566e5e6..c54b973381 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.7.6.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.7.6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -13,7 +13,7 @@ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
https://dev.gentoo.org/~whissi/dist/bison/${PATCH_TAR}
https://dev.gentoo.org/~polynomial-c/dist/bison/${PATCH_TAR}"
-LICENSE="GPL-2"
+LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="examples nls static test"
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.8.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.8.1.ebuild
deleted file mode 100644
index 21002c007b..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.8.1.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic
-
-DESCRIPTION="A general-purpose (yacc-compatible) parser generator"
-HOMEPAGE="https://www.gnu.org/software/bison/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="examples nls static test"
-RESTRICT="!test? ( test )"
-
-# gettext _IS_ required in RDEPEND because >=bison-3.7 links against
-# libtextstyle.so!!! (see bug #740754)
-DEPEND="
- >=sys-devel/m4-1.4.16
- >=sys-devel/gettext-0.21
-"
-RDEPEND="${DEPEND}"
-BDEPEND="
- sys-devel/flex
- test? ( dev-lang/perl )
-"
-
-DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release
-
-src_prepare() {
- # Old logic when we needed to patch configure.ac
- # Keeping in case it's useful for future
-
- # Record date to avoid 'config.status --recheck' & regen of 'tests/package.m4'
- #touch -r configure.ac old.configure.ac || die
- #touch -r configure old.configure || die
-
- #eapply "${WORKDIR}"/patches
- #default
-
- # Restore date after patching
- #touch -r old.configure.ac configure.ac || die
- #touch -r old.configure configure || die
-
- # The makefiles make the man page depend on the configure script
- # which we patched above. Touch it to prevent regeneration.
- #touch doc/bison.1 || die #548778 #538300#9
-
- default
-
- # Avoid regenerating the info page when the timezone is diff. #574492
- sed -i '2iexport TZ=UTC' build-aux/mdate-sh || die
-}
-
-src_configure() {
- use static && append-ldflags -static
-
- local myeconfargs=(
- $(use_enable nls)
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
-
- # This one is installed by dev-util/yacc
- mv "${ED}"/usr/bin/yacc{,.bison} || die
- mv "${ED}"/usr/share/man/man1/yacc{,.bison}.1 || die
-
- # We do not need liby.a
- rm -r "${ED}"/usr/lib* || die
-
- # Examples are about 200K, so let's make them optional still for now.
- if ! use examples ; then
- rm -r "${ED}"/usr/share/doc/${PF}/examples/ || die
- fi
-}
-
-pkg_postinst() {
- local f="${EROOT}/usr/bin/yacc"
- if [[ ! -e ${f} ]] ; then
- ln -s yacc.bison "${f}"
- fi
-}
-
-pkg_postrm() {
- # clean up the dead symlink when we get unmerged #377469
- local f="${EROOT}/usr/bin/yacc"
- if [[ -L ${f} && ! -e ${f} ]] ; then
- rm -f "${f}"
- fi
-}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.8.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.8.2.ebuild
index 21002c007b..235b7ff655 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.8.2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/bison/bison-3.8.2.ebuild
@@ -1,17 +1,19 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit flag-o-matic
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/bison.asc
+inherit flag-o-matic verify-sig
DESCRIPTION="A general-purpose (yacc-compatible) parser generator"
HOMEPAGE="https://www.gnu.org/software/bison/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
-LICENSE="GPL-2"
+LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="examples nls static test"
RESTRICT="!test? ( test )"
@@ -25,6 +27,7 @@ RDEPEND="${DEPEND}"
BDEPEND="
sys-devel/flex
test? ( dev-lang/perl )
+ verify-sig? ( sec-keys/openpgp-keys-bison )
"
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) # ChangeLog-2012 ChangeLog-1998 PACKAGING README-alpha README-release
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/bison/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-devel/bison/metadata.xml
index 73dda144f9..5ed43596bb 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/bison/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/bison/metadata.xml
@@ -1,8 +1,11 @@
-
- base-system@gentoo.org
- Gentoo Base System
-
+
+ base-system@gentoo.org
+ Gentoo Base System
+
+
+ akimd/bison
+
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/Manifest
index 48756ff975..a09703da90 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/Manifest
@@ -1,3 +1,5 @@
-DIST crossdev-20210621.tar.xz 28588 BLAKE2B 33ff6069c85cbcff6bf34bf5f6dd8050bd5f9d34e3478c0200965dffd4cee46e71acf4210f533c9b22fd6fe979fa5f447d30b5aaa3a6fc0845b201a80dcb28d8 SHA512 8f8bed6ce53503fa4c2bbce4327d8e1d5ce8edab5ff698f11f312007912a2d73be56242269f798bb633ad3648f6cf936e00e019c05e5781b523059befc26f42c
-DIST crossdev-20210718.tar.xz 28640 BLAKE2B 1e9b9313a5c9a1cb4d82f00e4979794d61b9eaa0035c575ac55092c6c015d820a590c5816d212a4ffad95b96a3dd99a9b94ca7c20b78a7d7b062f16dec6ed329 SHA512 e1a37aebf759abaa30f071f43a528f9059b83456e71fd86fc8202a7eff5c506c1f34fdd260c7b91a03f491b9f2a107ce6a65c2314845a352176fcc5a27a766e2
-DIST crossdev-20211027.tar.xz 28752 BLAKE2B 058d6254c702709c18cc426fe15d7a11cb856336236837a15c0b2cb0c2389198f8b0ea9893e7cdadd6ecdabb3e75c05b64c22448324ce2ea86032cb57e92a5d9 SHA512 6c15d71fb551dcb5cb8e95d7e3b1ecb52b34e47335842408da5acc9d258c1a5fa7e4699681b9b414b1b444df98601aa8b99b2000700485ec6028c076abeafd03
+DIST crossdev-20211121.tar.xz 28700 BLAKE2B bfe637dcd3c5b6d45e289d6298de18cab4b70b5d21a817a9207b91360b489457b9ee10266a1c2641f8dfac09dffb166bf1565a7e519ba41f84c6d5c2000f5158 SHA512 5189fa7639b819dfffc8f994bb557d8d83f115b82cd61d938db77fdcf16a33cc9d0147f9708b3bed22fdc4ace27ac863436813ebad94876ae767172ac0cbb9ce
+DIST crossdev-20220205.tar.xz 29088 BLAKE2B 46e90557f0a6df49e4f6ab7be6495514a188c4366868290d3b6b879ad1e5741e1600bca237735290f7e9278d441534569853b582cd85b96581c6ae0517cb4c54 SHA512 72e7cf690d49a87b32f6fdad2462fd4156e4e35a3f0b5f30911012a2b7936bb999575f757547a7a805c0cfdd1fd0caa8b23bf61e72c4333096314043ed565f40
+DIST crossdev-20220424.tar.xz 29316 BLAKE2B 8b026c165b643262ef934fb2daec5484bc2a2e8c2cafbaca08ecb81c2870a6306dd834c9f72bca8cbe219d1b24274fef0b83a88e301e66d98a1eb0825bb2e161 SHA512 3c2ac2d9c79140c6e0aa7ac9fa7838499f003c6c9c1260abf4b0b7883d2179ef1ded5ab0ba14ca48d471edde5090e22a50fffbf25fd86a32d354a9541e4fd567
+DIST crossdev-20220617.tar.xz 29396 BLAKE2B e3b39edfb4cbd5808851b56d86646bc879ea875b5e320802d86073236474e3aa80c5dbefc42ef4799528334bfb5a2a0abb5c0b344ebdce39ec01aac59306eb84 SHA512 bdc5ea519e4cd6275e8171ff7cd35c8ae45b6240fefd278997e247c8b0758bff6563f7e2613072e179ec4735155f05236f32385fe13579c5e955f761e0859e43
+DIST crossdev-20220709.tar.xz 29408 BLAKE2B dc96be5d86b343215564c2c15e91314c5ed88c765cec4f222b08a7e942ab5fb230915a0cdc3245719c0b12b4ce579066c6a88ae8e7ef4e44b80d8f0c5ddf7663 SHA512 f27929db8b4f7036408a0db18d46eb84312e1cef279336e13a07422ed3a154f3a21821d2d5ada66c0fca37bd70750413dab87b795c957a0a81cb9f27ebce2b90
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20210621.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20211121.ebuild
similarity index 74%
rename from sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20210621.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20211121.ebuild
index 59140a11c2..fe3c418c30 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20210621.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20211121.ebuild
@@ -1,14 +1,15 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI="8"
if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/crossdev.git"
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
else
SRC_URI="mirror://gentoo/${P}.tar.xz
- https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz"
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
+ https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220205.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220205.ebuild
new file mode 100644
index 0000000000..fe3c418c30
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220205.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+if [[ ${PV} == "99999999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
+else
+ SRC_URI="mirror://gentoo/${P}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
+ https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+fi
+
+DESCRIPTION="Gentoo Cross-toolchain generator"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+RDEPEND="
+ >=sys-apps/portage-2.1
+ >=app-portage/portage-utils-0.55
+ app-shells/bash
+ sys-apps/gentoo-functions
+"
+BDEPEND="app-arch/xz-utils"
+
+src_install() {
+ default
+
+ if [[ "${PV}" == "99999999" ]] ; then
+ sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
+ fi
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20211027.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220424.ebuild
similarity index 85%
rename from sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20211027.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220424.ebuild
index 0c2fe30139..8c680c914a 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20211027.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220424.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@@ -7,8 +7,7 @@ if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
else
- SRC_URI="mirror://gentoo/${P}.tar.xz
- https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20210718.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220617.ebuild
similarity index 68%
rename from sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20210718.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220617.ebuild
index b7f11a2c01..1701b22179 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20210718.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220617.ebuild
@@ -1,14 +1,14 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=8
+EAPI="8"
if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/crossdev.git"
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
else
- SRC_URI="mirror://gentoo/${P}.tar.xz
- https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz"
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
+ https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
@@ -29,7 +29,7 @@ BDEPEND="app-arch/xz-utils"
src_install() {
default
- if [[ "${PV}" == "99999999" ]] ; then
+ if [[ ${PV} == "99999999" ]] ; then
sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
fi
}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220709.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220709.ebuild
new file mode 100644
index 0000000000..1701b22179
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-20220709.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+if [[ ${PV} == "99999999" ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
+else
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
+ https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+DESCRIPTION="Gentoo Cross-toolchain generator"
+HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Crossdev"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+RDEPEND="
+ >=sys-apps/portage-2.1
+ >=app-portage/portage-utils-0.55
+ app-shells/bash
+ sys-apps/gentoo-functions
+"
+BDEPEND="app-arch/xz-utils"
+
+src_install() {
+ default
+
+ if [[ ${PV} == "99999999" ]] ; then
+ sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
+ fi
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-99999999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-99999999.ebuild
index 0c2fe30139..1701b22179 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-99999999.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/crossdev-99999999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@@ -7,8 +7,7 @@ if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/crossdev.git"
else
- SRC_URI="mirror://gentoo/${P}.tar.xz
- https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz
https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
@@ -30,7 +29,7 @@ BDEPEND="app-arch/xz-utils"
src_install() {
default
- if [[ "${PV}" == "99999999" ]] ; then
+ if [[ ${PV} == "99999999" ]] ; then
sed -i "s:@CDEVPV@:${EGIT_VERSION}:" "${ED}"/usr/bin/crossdev || die
fi
}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/metadata.xml
index 00b311f551..a4be5df4df 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/crossdev/metadata.xml
@@ -1,12 +1,16 @@
-
- crossdev@gentoo.org
- Gentoo Crossdev Team
-
-
- embedded@gentoo.org
- Embedded Gentoo
-
+
+ crossdev@gentoo.org
+ Gentoo Crossdev Team
+
+
+ toolchain@gentoo.org
+ Gentoo Toolchain Project
+
+
+ embedded@gentoo.org
+ Embedded Gentoo
+
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r1.ebuild
index 592b017eec..309967cc2b 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
LICENSE="FLEX"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="nls static test"
RESTRICT="!test? ( test )"
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r2.ebuild
new file mode 100644
index 0000000000..b1e13e873c
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/flex/flex-2.6.4-r2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic libtool multilib-minimal toolchain-funcs
+
+DESCRIPTION="The Fast Lexical Analyzer"
+HOMEPAGE="https://github.com/westes/flex"
+SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="FLEX"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls static test"
+RESTRICT="!test? ( test )"
+
+# We want bison explicitly and not yacc in general, bug #381273
+RDEPEND="sys-devel/m4"
+BDEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bison )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.6.4-libobjdir.patch
+ "${FILESDIR}"/${PN}-2.6.4-fix-build-with-glibc2.6+.patch
+)
+
+src_prepare() {
+ default
+
+ # Disable running in the tests/ subdir as it has a bunch of built sources
+ # that cannot be made conditional (automake limitation). bug #568842
+ if ! use test ; then
+ sed -i \
+ -e '/^SUBDIRS =/,/^$/{/tests/d}' \
+ Makefile.in || die
+ fi
+
+ # Prefix always needs this
+ elibtoolize
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ if tc-is-cross-compiler ; then
+ # Similar to workaround for procps:
+ # - bug #705800
+ # - https://sourceforge.net/p/psmisc/bugs/71/
+ # - https://lists.gnu.org/archive/html/autoconf/2011-04/msg00019.html
+ export ac_cv_func_malloc_0_nonnull=yes \
+ ac_cv_func_realloc_0_nonnull=yes
+ fi
+
+ # Do not install shared libs, #503522
+ ECONF_SOURCE="${S}" econf \
+ CC_FOR_BUILD="$(tc-getBUILD_CC)" \
+ --disable-shared \
+ $(use_enable nls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake -C src -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake -C src DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc ONEWS
+ find "${ED}" -name '*.la' -type f -delete || die
+ rm "${ED}"/usr/share/doc/${PF}/COPYING || die
+
+ dosym flex /usr/bin/lex
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild
index 6d93f7de87..d59534f90b 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild
@@ -8,7 +8,7 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
else
SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
DESCRIPTION="Utility to manage compilers"
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest
index 1bfa55c4fe..fd60395545 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/Manifest
@@ -1,2 +1,36 @@
+DIST gcc-10-20220811.tar.xz 71753800 BLAKE2B 3aa402b185da2e0ea9d262c561a72acc7dd801ea62ca4a8d7a3b053adc5a94dc9b7ecb657b782961505e907cded25bb28a3495d0b975f68fab5385bcc5d9dccc SHA512 cd6fa0673c3bdea1fe857529ec4c847f9306a4380def895b361e70202984bc5bac820b8a9f0d7fdcf9a39258c804fe556b567258aa7ee19b84849eef8a61801d
+DIST gcc-10-20220818.tar.xz 71755772 BLAKE2B b5cf59eb8dec7cc3bdd2317265d3568611ce170a18a35b0e3f1dc7c4510f46d1ecbdcc18fdda01b6af77c78aae7abb3de3def167b16a6292a4d08b8d94ad1f12 SHA512 e0e6b0e1be301ceb839ac05f0e5f495fd2932ea36e9d1308ead87f22e87c9ff50eaf4b9749ff1ab805977e6493201c31ba5e05e0f784675fa566eface85f9b93
+DIST gcc-10.3.0-musl-patches-1.tar.bz2 2999 BLAKE2B 3e36bbf2f93fdce15e20f807fa262f7a7abbde85b6f6b4e1383f6eccd8a53d876687d56cde83a80cde8a50e15bec407a1212aa0c85520892563e3d5ef7aaca98 SHA512 21483912a7b152f27db82d837a4cf91f2552d5fe238702aeca0c0dd8c7d3695bc70d8794c94a19106df28e053baf14c38433ca8e38e849082b76273cb51f2384
DIST gcc-10.3.0-patches-3.tar.bz2 18935 BLAKE2B 13eaf1e055b5b63069aed1575ed93f6bc822b5e3f2181ddfc88f4e7ff801f58997cd131b2efd79b90469b1f861db994feb2adcaecacf165442078f76e233fd9a SHA512 c3d6a6f32863cc0ff7c877314ff0c00a892e473f64d16b82d46b4a77aa97c3e7a575492d27f0d423acb2621c86c9a49bca0e26e45bda9e697495444fcac85084
DIST gcc-10.3.0.tar.xz 76692288 BLAKE2B ac7898f5eb8a7c5f151a526d1bb38913a68b50a65e4d010ac09fa20b6c801c671c790d780f23ccb8e4ecdfc686f4aa588082ccc9eb5c80c7b0e30788f824c1eb SHA512 2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86
+DIST gcc-10.4.0-musl-patches-1.tar.xz 3808 BLAKE2B 804d1fcc451dcd03be71240dd498ec2d179869571d44012967c48dccf5a478dd8c55000a964a80fdd5584d739a777dee1c83241cffce514ef002df2572854a67 SHA512 83e4a9c0f7062baf0c606a2bcc56a818494991403d7577dea65f04bbc25bdb786a5889b80d45d80e7f4be07c1aef786802cbfcfafd1a17ec255a2d4e93a77570
+DIST gcc-10.4.0-patches-5.tar.xz 17056 BLAKE2B f336d69a8ad105b8c4a84e8248a5b8a88175d3f1d67d32c6bee1780d252d86947059bd624992e6292610e86c9012f4d901a1a54df0d184dd023d404a0707700e SHA512 aa8fb42f20587f8519e7b06037da4d8f7d386b63e228b239a0445a51df4e401940fcd81482381d966622054aef3e0db06d1def5c74ac3d3dcc9c75c3b966c758
+DIST gcc-10.4.0.tar.xz 75018092 BLAKE2B ec1169025d3896b70ab80a4b8ce5040763a95529fc7e120c6bc3a3eb1db5cf938ebde347c1e595a8ff7d4081e79ded6252702d7a1a09648449b7a0783188e434 SHA512 440c08ca746da450d9a1b35e8fd2305cb27e7e6987cd9d0f7d375f3b1fc9e4b0bd7acb3cd7bf795e72fcbead59cdef5b6c152862f5d35cd9fbfe6902101ce648
+DIST gcc-10.5.0-musl-patches-1.tar.xz 3816 BLAKE2B 5995f934a40665d877342853fde8b414eed8770c72e6b11b295b7e7b3c9d38d7407dff63b5751f4449f6fa842c02e87f156cc868e7436a8313f7c8514242d255 SHA512 b93cc54cd7b78fdc487df7c449b03bbfd10094e45f3f8eef20cd69f27a68a14817fe662a2ec119b384eea2dad0491b70f838d010457e386700030b76457afad6
+DIST gcc-10.5.0-patches-0.tar.xz 16188 BLAKE2B 3fe3163c4960ff02eb792b2d00b9b20e1c2b44ad2d2e79661ffa0a5795b1bb631bce83c506f485765a7b971e6d391ebc1803c327f0d8d06e457610f5d6074c90 SHA512 fde1fec92df535416221827d48daf7d498f675da5697bc15bb4e17ccfedf6e6705dd28f57a3c9ebc8065b49328246fa5aa1fd90bd88bc27fe2b7b3e924f0df15
+DIST gcc-11-20220812.tar.xz 75781320 BLAKE2B f7776dcc0168cd0b624760deab9185b36e2f5718cdacb7cff911813791ed31321b34b5f14ee6e3264c61a95c5cd8cf80c93e6e80f6fdac5f49818e0f5c242486 SHA512 d2fbc18dcac84951c541d90a78719254429b133de05e4f6f37e3d3c160695ea5e2e6563cd78b90bdce29cb2e465aabe4215ec1262bb74c23eba2be57be074070
+DIST gcc-11-20220819.tar.xz 75783200 BLAKE2B f047e2839932eb648f43e80cd80d940262f618093f340a51143eb857323b47a14725d733587dec06808c356cb153d0f35cf210806f5f8990e290f78dcb277568 SHA512 aa1418df17221d999ae4d3dd4fcab0f9c7a481e67dae98231b82bbc04f4df06b2add85e664e68e39616255644aa0dfb2df95cad485ec3f02e9db58740e37d8ca
+DIST gcc-11.3.0-musl-patches-1.tar.xz 3856 BLAKE2B f511f8b4c0696771d906beee9645b5d009ea4b673602baa1ca562d6f23c5b0caf2012aae93578671624617c4286e3937d79a7383d6a03bb438c5b774a06fe8e6 SHA512 cd375ff2affb213475acaabf02989b1f05d719d972970ea0304d20a816986807390893d1401826f3b497787642f35d90a244195f8e466db41e8d768366057334
+DIST gcc-11.3.0-patches-7.tar.xz 15184 BLAKE2B 426f00feaa982a35d2c459e7a2c2e9d29b4b467ac3625ebd72bb31077c75bbf0c028137df03921c52ddc97a14d92c49777bd3f27b47a7b47d8a05e2d106b6bdb SHA512 bec8bf26b3e50633a5a2e0bb75ffeaba86becb704c14365ff3342e8d651ab75bb3ceec7808d88a25989b8c7182398184b95b6d1267aaef9aa828f687e4895e9d
+DIST gcc-11.3.0.tar.xz 81141364 BLAKE2B 7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469 SHA512 f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7
+DIST gcc-11.4.0-musl-patches-0.tar.xz 3844 BLAKE2B f3f1be6718e3cf08e553a1a2319a85e13368279849f6f3ab89ad7abe505316afacf5084846c0cb133bdcb5c918244644242c194e6ce55455a26e67b3983d73ef SHA512 a81db52d21de364137461dcff7e1af696df4a02fa26452f90439ae4af14ccbffe68eb4ee93ae56257490ab8aa36b4bff37c4e1f2cf4dd4624b3a6fb4cb50b7ac
+DIST gcc-11.4.0-patches-2.tar.xz 14224 BLAKE2B d3030c19a7bd8bd082fd39b35c3e80883ae541ab28232513ba60095fe81f5fe1fbdc54829a1556b2d278328033f6eb8a81e9ee268a6020b554388a60842b02e6 SHA512 60aa19f00fb29b7c8a68c73de274e24559dc896f551d47153ea511b202941caa950c0aff62ad28d057a8ed16f2aec2c06e681e7286d65ab3610b6948d7bb840a
+DIST gcc-12-20220625.tar.xz 79092788 BLAKE2B 491da523abc0a63bbceaa6c76b251a5b6c224e1684b5db4e6155fdcab4b0d8d505376d30a13e1b0331f37558aac311477bbb3179b63da850acae436b642c9ee1 SHA512 0527c6d69cd53e8aba3464746b7989e3128af74818864a2e5b4be66313203d32a84201440a254da8de72842b0ebbbccf1ec14c6a121cb09f9454358b0a37b8f9
+DIST gcc-12.0.0-musl-patches-4.tar.xz 4456 BLAKE2B 80ae755b52c31d57eb737b3ec5e70d96e7e20f6720664cd94573b1c6cd079a0e29f73277c27b2f2570706da5239006dabd44f834824c515f6615ed5dc39c273f SHA512 cf917f40133d2b8090e98880e6c87d38129f44bcb454f4d707ef57967635a6fb571d7b85b7cb854421bc9aa88e48767a47aad99c767f9415899f97922d61c497
+DIST gcc-12.0.0-patches-5.tar.xz 9820 BLAKE2B cdebb6fa59e594f95cc4b028d329c0fed3ffa1731a4ca1a2954b7760f4a674e773cfe5888fb2c63a619d5d80ec464d98a94870bfe2e3ea34370afce7f67526bb SHA512 a9c27b0188fd842e88d6a831cdf1f9c6d0cada4ec260b5f7e67f3d8fe0f439fb0d2c82469de9fecebd657043babf3e63a24ee53776be2617bb90e1d3dd3f521e
+DIST gcc-12.1.0-musl-patches-5.tar.xz 4656 BLAKE2B b8dead8e796df2563cc7bfd4ad95f71f7cfbd51bc0d2bccb7479d2856cc3731b55f5e23b548c5f5f37790aae269815bbba6ee6596c5183847eed0bb1878bf340 SHA512 480e3e34e3f7e7ae27319fa9c51913125b2d4f41b0994c6df4c5c6f008d3ffdacbe059cd1ee643c2b9248a0c69db90867a076b0456c8d6649a1a7e9b62ff6800
+DIST gcc-12.1.0-musl-patches-6.tar.xz 3840 BLAKE2B 5d8ce4dcebd081fae485d3e1367c06c185e07c110b0cfe9598b71209c55adf96a26e198ab91fb3dfb33ddb2d8abd211a518dd74f5113cae1e3a4f90db32bb746 SHA512 b666ac0e9bef1b74dc5cc616ddb13dc40d9ecd1f5ae48b877cc1003356952a9afd800327d4210c732deb94554403d9b8730d2037bec380e413fc9a6cb59ecf23
+DIST gcc-12.1.0-patches-8.tar.xz 12020 BLAKE2B 6138ef4d76a682ecfd05ba7c80d8f5db791ea24420d944b7f55b8aa55e7a42d02c0d20d0c25ebba92cdf85fdeb3dad7c7e2676d4a39197862bb90cfc9151ce48 SHA512 d2784967ca580bdc9308bc4b2449eb23601aab46bfcca10f4e7db2267e04950e4d9ffe4d0091fb916149a4982786c80959a069e0da07638bfdcf9d5b8926627b
+DIST gcc-12.1.0-patches-9.tar.xz 12536 BLAKE2B ceb045b2a5c5a2a3047d73296fa1057421ef58c7f793d1f031f43dbd1a6faf49bdf1956e96a4f8e34c4d3fde2c26fcc9b146c223d8b1b3e1f944c2ec8574b786 SHA512 b899ec2d6da65df0f32838be3c89dbb1dc6b423133aa5121635547a1aa18b5d52b920e62522143682c0818baf185ebacb75ab84383ef0ad9768ba567807da5f4
+DIST gcc-12.1.0.tar.xz 82701928 BLAKE2B dca5df8fea680dbeda721742cce5c97de7eb4be490a32a158e06b88e2b9dd092150b7cfe490bb69e48e2f75d8bba231c8a54cd46b48ddcdc01bf9553ab57019d SHA512 2121d295292814a6761edf1fba08c5f633ebe16f52b80e7b73a91050e71e1d2ed98bf17eebad263e191879561c02b48906c53faa4c4670c486a26fc75df23900
+DIST gcc-12.2.0-RC-20220812.tar.xz 84732336 BLAKE2B de38eab480965e44d64ccda40070aadb0e892732b6fd4cd80feb5636aff2b14ee0ca2fb0ed38fb1ba46d83c6173a60069a9335cc0f321451edaac387c832056d SHA512 74d6f7c9cb1070920ae85533b6db986c3a784f74a3f5eac113c483230b78737c33bc6f10a2221ace7f9c8af0e3824390241da73d367dd77e5832205a47a47940
+DIST gcc-12.2.0-musl-patches-1.tar.xz 3844 BLAKE2B 004432806696f7d0a32366270ac45695e858abee73a255e44dc6e0a225339e4cad40aab0d51dfe9a55d5aa4b4001f5726064bb2eea3212a0874b2d27e229abd7 SHA512 c354edcd641a9dfaf902a0ff4c44c75065d0cf1c36bbf6c3c35c2e23bff22b8f70bcf4458a5a0ef86371e9f2fafca8a54ca822e35820ff442c9458a2819c3606
+DIST gcc-12.2.0-patches-1.tar.xz 12864 BLAKE2B a5ae0a85dfc1b6f0bd968f0d5262ebed14ec9cdb3249e3a4c571578c54eda0e53708ee7fe8e03e506366c7f3cf7926eced9b390d9dee948c1249298c0fabd9fb SHA512 f3d793b89a2a0385d596162fb0c653d4acdf21ae418cb792c1786a01fde0391bd0719715dbf07d53636f127168f5cd99108a1dc11cf6cea889b7d82385bcc258
+DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
+DIST gcc-13-20220814.tar.xz 79486896 BLAKE2B 1e0a6d894b2a63241c7d005ce6e0628b4fe7fdf18be976ec2ee4d87c8f312693131fb5979a6a3845e923ea30dbe637f5bcb0112d09e99d611d3d14563054c079 SHA512 5cd9cd814bf09a24bd263a33db2a55e82c0601cd662f90926e4e7e0379546ee688d463ecb913243db1a9647e134d4f41eb99b2ff0ac8741ab5d3650a36669463
+DIST gcc-13-20220821.tar.xz 79521000 BLAKE2B d31999dfd204e502c5b10de3ebbbe16b6455c1a8edf9888e08e0e972a52d02176eef13fce06fa4bb803d24f41fbcaee433488c04bd46475c4679554969dfb61f SHA512 992900e0f7e5aba35f8b735d3613cc0ae49151bf90b1c4789ba96580322c6c69766dcb07dbe6f18d6f9cb87dd64bd5603b9283dcfe1a4a143cc52239c883611d
+DIST gcc-13.0.0-patches-1.tar.xz 11064 BLAKE2B 82a7ad193dac00475931840bcee82ef7a51718a74af224b03a41f8349e34c2a64a3eb29985b4e2bffde958c58782242eccaedaa54d950e8d51d8bb6f45868e0e SHA512 e04b510f529dd3187a08ae9cb9a894a3d3d30af81f13c43cc082fda7d26c44a3bf19d36ec02024b2ade8b8c193e9730246abeadee603c41b5873c5b785709921
+DIST gcc-8.5.0-patches-2.tar.bz2 16921 BLAKE2B 619a47f74edf05fa01c9de59d0ff7abb027a01cf0bdec91ac41046166192f4eae561684136c4a6a5e077f64754bb5b0710905129f31b0def21d88f92e6bba7fb SHA512 b6095d4570895e2c4dd58fed5756194aea27391b813e5e2de42b2749cb318c4bea2087eb0ff92c70e7f98ae4482c49d476db57be83d7beb19fd462aa61714ab2
+DIST gcc-8.5.0.tar.xz 63841008 BLAKE2B aa81a1a730fd7371360f6abed6ba78b5843fd18c58d5de5687acc320741b9e430e85df3535a1ef7a26051409be8d2f0945f503e5968480d919103123a99d4b12 SHA512 92f599680e6b7fbce88bcdda810f468777d541e5fddfbb287f7977d51093de2a5178bd0e6a08dfe37090ea10a0508a43ccd00220041abbbec33f1179bfc174d8
+DIST gcc-9.5.0-patches-1.tar.xz 13772 BLAKE2B 2e2e84a28a729cd271a23716ff3fe08b7209b72254af279f04dd15dbd39482fb7d905dc9293dc326536e14bca9a53397bd7e1c4b617ed8cbe42bcf617fcce3fb SHA512 50e292e665bfae18bf71c0714074025b4f7cb87042862071815874f7c5b241acac3b8f60d85b8970b11978103c2e7616c02d789f6c3b091d7b736b65c535b743
+DIST gcc-9.5.0.tar.xz 72462752 BLAKE2B 69e39314ee6bb46e3be491ba9c3cbc4914cb716f732c6d3f2b14d9382750b40c4f14b5d3051225b81f936ef8297b0ba8cb5439512e961dae5815d3bee2b0bfdb SHA512 cdd144ce4f747e051480410afc8506c90a57cb45da89071ddae377b1453bca3014422455ade9fe4563ebe51f4b6348cbc0c61905a9b8801cd597d51ad0ec62b3
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch
new file mode 100644
index 0000000000..d06410650b
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/803371
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80196
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017
+--- a/configure
++++ b/configure
+@@ -17044,7 +17044,7 @@ else
+ fi
+
+
+-RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
++RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ar" >&5
+ $as_echo_n "checking where to find the target ar... " >&6; }
+--- a/configure.ac
++++ b/configure.ac
+@@ -3529,7 +3529,7 @@ ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip)
+ ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres)
+ ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc)
+
+-RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
++RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++"
+
+ GCC_TARGET_TOOL(ar, AR_FOR_TARGET, AR, [binutils/ar])
+ GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new])
+
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.3.0-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.3.0-r2.ebuild
index 0fc4ea78dc..d62162f1a6 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.3.0-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.3.0-r2.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
+TOOLCHAIN_PATCH_DEV="slyfox"
PATCH_VER="3"
MUSL_VER="1"
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.4.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.4.0.ebuild
new file mode 100644
index 0000000000..a4652e8625
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.4.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_PATCH_SUFFIX="xz"
+#TOOLCHAIN_GCC_RC=1
+PATCH_GCC_VER="10.4.0"
+PATCH_VER="5"
+MUSL_VER="1"
+MUSL_GCC_VER="10.4.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+fi
+
+RDEPEND=""
+BDEPEND="${CATEGORY}/binutils"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ if has_version '>=sys-libs/glibc-2.32-r1'; then
+ rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
+ fi
+
+ toolchain_src_prepare
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.4.1_p20220811.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.4.1_p20220811.ebuild
new file mode 100644
index 0000000000..bb60337891
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.4.1_p20220811.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_SUFFIX="xz"
+TOOLCHAIN_PATCH_DEV="sam"
+#TOOLCHAIN_GCC_RC=1
+PATCH_GCC_VER="10.5.0"
+PATCH_VER="0"
+MUSL_VER="1"
+MUSL_GCC_VER="10.5.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+#fi
+
+RDEPEND=""
+BDEPEND="${CATEGORY}/binutils"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ if has_version '>=sys-libs/glibc-2.32-r1'; then
+ rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
+ fi
+
+ toolchain_src_prepare
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.4.1_p20220818.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.4.1_p20220818.ebuild
new file mode 100644
index 0000000000..bb60337891
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.4.1_p20220818.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_SUFFIX="xz"
+TOOLCHAIN_PATCH_DEV="sam"
+#TOOLCHAIN_GCC_RC=1
+PATCH_GCC_VER="10.5.0"
+PATCH_VER="0"
+MUSL_VER="1"
+MUSL_GCC_VER="10.5.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+#fi
+
+RDEPEND=""
+BDEPEND="${CATEGORY}/binutils"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ if has_version '>=sys-libs/glibc-2.32-r1'; then
+ rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
+ fi
+
+ toolchain_src_prepare
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.5.9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.5.9999.ebuild
new file mode 100644
index 0000000000..6cba90ba4e
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-10.5.9999.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_SUFFIX="xz"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="10.5.0"
+MUSL_GCC_VER="10.5.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+RDEPEND=""
+BDEPEND="${CATEGORY}/binutils"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ if has_version '>=sys-libs/glibc-2.32-r1'; then
+ rm -v "${WORKDIR}/patch/23_all_disable-riscv32-ABIs.patch" || die
+ fi
+
+ toolchain_src_prepare
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.3.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.3.0.ebuild
new file mode 100644
index 0000000000..f599396850
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.3.0.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+TOOLCHAIN_PATCH_DEV="sam"
+TOOLCHAIN_PATCH_SUFFIX="xz"
+PATCH_VER="7"
+PATCH_GCC_VER="11.3.0"
+MUSL_VER="1"
+MUSL_GCC_VER="11.3.0"
+
+inherit toolchain
+
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.3.1_p20220812.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.3.1_p20220812.ebuild
new file mode 100644
index 0000000000..79b1ee62b7
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.3.1_p20220812.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_SUFFIX="xz"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="2"
+PATCH_GCC_VER="11.4.0"
+MUSL_VER="0"
+MUSL_GCC_VER="11.4.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+#fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.3.1_p20220819.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.3.1_p20220819.ebuild
new file mode 100644
index 0000000000..79b1ee62b7
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.3.1_p20220819.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_SUFFIX="xz"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="2"
+PATCH_GCC_VER="11.4.0"
+MUSL_VER="0"
+MUSL_GCC_VER="11.4.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+#fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.4.9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.4.9999.ebuild
new file mode 100644
index 0000000000..de29705ca3
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-11.4.9999.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+TOOLCHAIN_PATCH_SUFFIX="xz"
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="11.4.0"
+MUSL_GCC_VER="11.4.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.1.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.1.0.ebuild
new file mode 100644
index 0000000000..d2fce9d328
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.1.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="5"
+PATCH_GCC_VER="12.0.0"
+MUSL_VER="4"
+MUSL_GCC_VER="12.0.0"
+
+inherit toolchain
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~loong"
+fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+
+src_prepare() {
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild
new file mode 100644
index 0000000000..51819ad527
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.1.1_p20220625.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="8"
+PATCH_GCC_VER="12.1.0"
+MUSL_VER="5"
+MUSL_GCC_VER="12.1.0"
+
+inherit toolchain
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+
+src_prepare() {
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.1.1_p20220812.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.1.1_p20220812.ebuild
new file mode 100644
index 0000000000..9be0f30fd1
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.1.1_p20220812.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_GCC_RC=1
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="9"
+PATCH_GCC_VER="12.1.0"
+MUSL_VER="6"
+MUSL_GCC_VER="12.1.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+#if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+# KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+#fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+
+src_prepare() {
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.2.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.2.0.ebuild
new file mode 100644
index 0000000000..aa3dfbf98f
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.2.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_VER="1"
+PATCH_GCC_VER="12.2.0"
+MUSL_VER="1"
+MUSL_GCC_VER="12.2.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+
+src_prepare() {
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.3.9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.3.9999.ebuild
new file mode 100644
index 0000000000..914addefed
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-12.3.9999.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="12.2.0"
+MUSL_GCC_VER="12.2.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+elif [[ -n ${TOOLCHAIN_GCC_RC} ]] ; then
+ # Cheesy hack for RCs
+ MY_PV=$(ver_cut 1).$((($(ver_cut 2) + 1))).$((($(ver_cut 3) - 1)))-RC-$(ver_cut 5)
+ MY_P=${PN}-${MY_PV}
+ GCC_TARBALL_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${MY_PV}/${MY_P}.tar.xz"
+ TOOLCHAIN_SET_S=no
+ S="${WORKDIR}"/${MY_P}
+fi
+
+inherit toolchain
+
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND=">=${CATEGORY}/binutils-2.30[cet(-)?]"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.0.0_pre20220814.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.0.0_pre20220814.ebuild
new file mode 100644
index 0000000000..641ab05e81
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.0.0_pre20220814.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="xen0n"
+PATCH_VER="1"
+PATCH_GCC_VER="13.0.0"
+MUSL_GCC_VER="13.0.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=$(($(ver_cut 3) - 9998))
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=master
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~loong"
+fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND="${CATEGORY}/binutils[cet(-)?]"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.0.0_pre20220821.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.0.0_pre20220821.ebuild
new file mode 100644
index 0000000000..641ab05e81
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.0.0_pre20220821.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="xen0n"
+PATCH_VER="1"
+PATCH_GCC_VER="13.0.0"
+MUSL_GCC_VER="13.0.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=$(($(ver_cut 3) - 9998))
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=master
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~loong"
+fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND="${CATEGORY}/binutils[cet(-)?]"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.0.9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.0.9999.ebuild
new file mode 100644
index 0000000000..1210755732
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-13.0.9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="13.1.0"
+MUSL_GCC_VER="13.1.0"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ MY_PV_3=$(($(ver_cut 3) - 9998))
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ MY_PV_3=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=master
+
+# Don't keyword live ebuilds
+if ! tc_is_live && [[ -z ${TOOLCHAIN_USE_GIT_PATCHES} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+fi
+
+# Technically only if USE=hardened *too* right now, but no point in complicating it further.
+# If GCC is enabling CET by default, we need glibc to be built with support for it.
+# bug #830454
+RDEPEND="elibc_glibc? ( sys-libs/glibc[cet(-)?] )"
+DEPEND="${RDEPEND}"
+BDEPEND="${CATEGORY}/binutils[cet(-)?]"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+
+ eapply_user
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-8.5.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-8.5.0-r1.ebuild
new file mode 100644
index 0000000000..ff79926837
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-8.5.0-r1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+TOOLCHAIN_PATCH_DEV="slyfox"
+PATCH_VER="2"
+
+inherit toolchain
+
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.13 )
+ >=${CATEGORY}/binutils-2.20"
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
+fi
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-9.5.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-9.5.0.ebuild
new file mode 100644
index 0000000000..133de20067
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/gcc-9.5.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+TOOLCHAIN_PATCH_DEV="sam"
+PATCH_GCC_VER="9.5.0"
+PATCH_VER="1"
+
+if [[ $(ver_cut 3) == 9999 ]] ; then
+ MY_PV_2=$(ver_cut 2)
+ if [[ ${MY_PV_2} == 0 ]] ; then
+ MY_PV_2=0
+ else
+ MY_PV_2=$(($(ver_cut 2) - 1))
+ fi
+
+ # e.g. 12.2.9999 -> 12.1.1
+ TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+fi
+
+inherit toolchain
+# Needs to be after inherit (for now?), bug #830908
+EGIT_BRANCH=releases/gcc-$(ver_cut 1)
+
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+
+RDEPEND=""
+BDEPEND="${CATEGORY}/binutils"
+
+src_prepare() {
+ local p upstreamed_patches=(
+ # add them here
+ )
+ for p in "${upstreamed_patches[@]}"; do
+ rm -v "${WORKDIR}/patch/${p}" || die
+ done
+
+ toolchain_src_prepare
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/metadata.xml
index 8730f85e65..b6eef667b0 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/gcc/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gcc/metadata.xml
@@ -1,43 +1,34 @@
-
- toolchain@gentoo.org
- Gentoo Toolchain Project
-
-
-
- cpe:/a:gnu:gcc
- dgcc
-
+
+ toolchain@gentoo.org
+ Gentoo Toolchain Project
+
+
+
+ cpe:/a:gnu:gcc
+ dgcc
+
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/Manifest
index 61bb66f324..653a9cf078 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/Manifest
@@ -1 +1,2 @@
-DIST gettext-0.21.tar.gz 24181849 BLAKE2B 2eae99d0916b00b2af6fbc6bf7e309076519a10fea16cd49e7aa29fe8aec1ee7c784c6277281b764dc4abacf400cd3fe461129586303c8cd337db15c76cb4b87 SHA512 bbe590c5dd3580c75bf30ff768da99a88eb8d466ec1ac9eea20be4cab4357ecf72448e6b81b47425e39d50fa6320ba426632914d7898dfebb4f159abc39c31d1
+DIST gettext-0.21.tar.xz 9714352 BLAKE2B e36418323c79f582d13777083b455ae76ccb29e41a8259a2f4d6d9f5d8e2ac7c8ecc4df1b1fa2e9838c819cb27345fe254772398bdb88b3315410866048f755a SHA512 f7e2968651879f8444d43a176a149db9f9411f4a03132a7f3b37c2ed97e3978ae6888169c995c1953cb78943b6e3573811abcbb8661b6631edbbe067b2699ddf
+DIST gettext-0.21.tar.xz.sig 819 BLAKE2B 22a6e5f6e8a6322e24db9c1f575754bccbf6c7cff7cd14cb51ae8f5cf17cd7b677d8ecfc6b876e1b6f8d62077d568cbf57930e1d8accc5306e6869d3c6560bf4 SHA512 67c9515ad5e11773a28599d517dd84131e4afd878d67e97f505cd024e290518ca9cffff7446c62f88b56aea2c7234d11811738e8e2a076b2159f24c2f6809703
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r3.ebuild
similarity index 82%
rename from sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r1.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r3.ebuild
index bab939d0eb..0dc67c518d 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gettext/gettext-0.21-r3.ebuild
@@ -1,20 +1,23 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Note: Keep version bumps in sync with dev-libs/libintl.
EAPI=7
-inherit mono-env libtool java-pkg-opt-2 multilib-minimal
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gettext.asc
+inherit mono-env libtool java-pkg-opt-2 multilib-minimal verify-sig
DESCRIPTION="GNU locale utilities"
HOMEPAGE="https://www.gnu.org/software/gettext/"
-if [[ "${PV}" == *_rc* ]] ; then
- SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.bz2"
+if [[ ${PV} == *_rc* ]] ; then
+ SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz"
+ SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${P/_/-}.tar.xz.sig )"
S="${WORKDIR}/${P/_/-}"
else
- SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+ SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
fi
# Only libasprintf is under the LGPL (and libintl is in a sep package),
# so put that license behind USE=cxx.
@@ -35,15 +38,15 @@ DEPEND=">=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
dev-libs/expat
acl? ( virtual/acl )
ncurses? ( sys-libs/ncurses:0= )
- java? ( >=virtual/jdk-1.8:= )"
+ java? ( virtual/jdk:1.8 )"
RDEPEND="${DEPEND}
!git? ( cvs? ( dev-vcs/cvs ) )
git? ( dev-vcs/git )
- java? ( >=virtual/jre-1.8 )"
+ java? ( virtual/jre:1.8 )"
BDEPEND="
!git? ( cvs? ( dev-vcs/cvs ) )
git? ( dev-vcs/git )
-"
+ verify-sig? ( sec-keys/openpgp-keys-gettext )"
PDEPEND="emacs? ( app-emacs/po-mode )"
MULTILIB_WRAPPED_HEADERS=(
@@ -73,9 +76,7 @@ pkg_setup() {
src_prepare() {
java-pkg-opt-2_src_prepare
-
default
-
elibtoolize
}
@@ -105,7 +106,7 @@ multilib_src_configure() {
$(use_enable cxx libasprintf)
$(use_with git)
$(usex git --without-cvs $(use_with cvs))
- $(use_enable java)
+ $(multilib_native_use_enable java)
$(use_enable ncurses curses)
$(use_enable nls)
$(use_enable openmp)
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/Manifest
index 035f2b70be..0625142aef 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/Manifest
@@ -1 +1,2 @@
DIST gnuconfig-20210107.tar.xz 65944 BLAKE2B 209952ca349c9859b695df5a4f8b49df689cba47b439e715108cb66ccef7ec3742162113a2ee4948a85a96b44c45d4d553f9e41c15823403f451fea6ea61bd36 SHA512 e1485b7b719994441f49b18a88f922405f74aff2ba1df16050802a311fb5438e598d989fdb7fa008734e5ec0e567e7e90486f8bc6655787bc053ad8a89650213
+DIST gnuconfig-20220508.tar.xz 87616 BLAKE2B 80b981cc85153af1cdf5ba8ca3f4e22843443ee062dacf0fa104749cebb4d25e28c83a1ba82ae326457b4cd58fe17e0f28423e9b1d0cbd3ff53b72dbc3e414b3 SHA512 c77363d30733b509d9e2a795189d0a7a556f87c6d2333ad5b376175bd8df34c48777d27e85b766c7b557f151ee2d877c6cf94940dedb4d85793427daeed5c7cd
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-20210107.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-20210107.ebuild
index e1bf1fb4f4..f0894f34d0 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-20210107.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-20210107.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -9,7 +9,7 @@ if [[ ${PV} == "99999999" ]] ; then
inherit git-r3
else
SRC_URI="https://dev.gentoo.org/~polynomial-c/dist/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
S="${WORKDIR}"
fi
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-20220508.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-20220508.ebuild
new file mode 100644
index 0000000000..1d1a7649fe
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-20220508.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+if [[ ${PV} == 99999999 ]] ; then
+ EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git"
+
+ inherit git-r3
+else
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ S="${WORKDIR}"
+fi
+
+DESCRIPTION="Updated config.sub and config.guess file from GNU"
+HOMEPAGE="https://savannah.gnu.org/projects/config"
+
+LICENSE="GPL-3+-with-autoconf-exception"
+SLOT="0"
+
+maint_pkg_create() {
+ cd "${S}" || die
+
+ emake ChangeLog
+ local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog)
+ [[ ${#ver} != 8 ]] && die "invalid version '${ver}'"
+
+ cp "${FILESDIR}"/${PV}/*.patch . || die
+
+ local tar="${T}/gnuconfig-${ver}.tar.xz"
+ tar -Jcf "${tar}" ./* || die "creating tar failed"
+ einfo "Packaged tar now available:"
+ einfo "$(du -b "${tar}")"
+}
+
+src_unpack() {
+ if [[ ${PV} == 99999999 ]] ; then
+ git-r3_src_unpack
+ maint_pkg_create
+ else
+ unpack ${A}
+ fi
+}
+
+src_prepare() {
+ default
+
+ eapply "${S}"/*.patch
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ insinto /usr/share/${PN}
+ doins config.{sub,guess}
+ fperms +x /usr/share/${PN}/config.{sub,guess}
+ dodoc ChangeLog
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-99999999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
index de2a73f412..3c5c54ade8 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/gnuconfig/gnuconfig-99999999.ebuild
@@ -1,15 +1,15 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
-if [[ ${PV} == "99999999" ]] ; then
+if [[ ${PV} == 99999999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/r/config.git"
inherit git-r3
else
- SRC_URI="https://dev.gentoo.org/~whissi/dist/${PN}/${P}.tar.xz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+ SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
S="${WORKDIR}"
fi
@@ -18,12 +18,11 @@ HOMEPAGE="https://savannah.gnu.org/projects/config"
LICENSE="GPL-3+-with-autoconf-exception"
SLOT="0"
-IUSE=""
maint_pkg_create() {
- cd "${S}"
+ cd "${S}" || die
- make ChangeLog || die
+ emake ChangeLog
local ver=$(gawk '{ gsub(/-/, "", $1); print $1; exit }' ChangeLog)
[[ ${#ver} != 8 ]] && die "invalid version '${ver}'"
@@ -36,7 +35,7 @@ maint_pkg_create() {
}
src_unpack() {
- if [[ ${PV} == "99999999" ]] ; then
+ if [[ ${PV} == 99999999 ]] ; then
git-r3_src_unpack
maint_pkg_create
else
@@ -46,11 +45,10 @@ src_unpack() {
src_prepare() {
default
+
eapply "${S}"/*.patch
}
-src_compile() { :;}
-
src_test() {
emake check
}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/libtool/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/libtool/Manifest
index 4f2d5bac18..123e05bfb2 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/libtool/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/libtool/Manifest
@@ -1 +1,2 @@
DIST libtool-2.4.6.tar.xz 973080 BLAKE2B 0865af9f8701ca9dc62eec8294a088d24f4a3ff541bc76acfe7b69f70637d7e8261a17d69f7d54a4177f974c429be68467883a1560edb539061966cbf7d4a356 SHA512 a6eef35f3cbccf2c9e2667f44a476ebc80ab888725eb768e91a3a6c33b8c931afc46eb23efaee76c8696d3e4eed74ab1c71157bcb924f38ee912c8a90a6521a4
+DIST libtool-2.4.7.tar.xz 1016040 BLAKE2B 5e022586337637dd634bd40578ad944bec6e3b8de41f95d55777b90cc88cbc4badb3d76cbf0e638166ece1ea7de828e83590e1e6bac30c1e4b1c254a11a742f2 SHA512 47f4c6de40927254ff9ba452612c0702aea6f4edc7e797f0966c8c6bf0340d533598976cdba17f0bdc64545572e71cd319bbb587aa5f47cd2e7c1d96f873a3da
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/libtool/libtool-2.4.7.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/libtool/libtool-2.4.7.ebuild
new file mode 100644
index 0000000000..09853e34e5
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/libtool/libtool-2.4.7.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Please bump with dev-libs/libltdl.
+
+# bug #225559
+LIBTOOLIZE="true"
+WANT_LIBTOOL="none"
+inherit autotools prefix
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git"
+ inherit git-r3
+else
+ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+fi
+
+DESCRIPTION="A shared library tool for developers"
+HOMEPAGE="https://www.gnu.org/software/libtool/"
+
+LICENSE="GPL-2"
+SLOT="2"
+IUSE="vanilla"
+
+# Pull in libltdl directly until we convert packages to the new dep.
+RDEPEND="
+ sys-devel/gnuconfig
+ >=sys-devel/autoconf-2.69:*
+ >=sys-devel/automake-1.13:*
+ >=dev-libs/libltdl-2.4.7"
+DEPEND="${RDEPEND}"
+[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man"
+
+PATCHES=(
+ # bug #109105
+ "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch
+ # bug #581314
+ "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch
+
+ "${FILESDIR}"/${PN}-2.4.6-mint.patch
+ "${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
+ "${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
+)
+
+src_prepare() {
+ if [[ ${PV} == *9999 ]] ; then
+ eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch # bug #650876
+ ./bootstrap || die
+ else
+ PATCHES+=(
+ "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch # bug #650876
+ )
+ fi
+
+ # WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway
+ chmod +w build-aux/ltmain.sh || die
+
+ if use vanilla ; then
+ eapply_user
+ return 0
+ else
+ default
+ fi
+
+ if use prefix ; then
+ # seems that libtool has to know about EPREFIX a little bit
+ # better, since it fails to find prefix paths to search libs
+ # from, resulting in some packages building static only, since
+ # libtool is fooled into thinking that libraries are unavailable
+ # (argh...). This could also be fixed by making the gcc wrapper
+ # return the correct result for -print-search-dirs (doesn't
+ # include prefix dirs ...).
+ eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch
+ eprefixify m4/libtool.m4
+ fi
+
+ pushd libltdl >/dev/null || die
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ popd >/dev/null || die
+ AT_NOELIBTOOLIZE=yes eautoreconf
+
+ # Make sure timestamps don't trigger a rebuild of man pages. #556512
+ if [[ ${PV} != *9999 ]] ; then
+ touch doc/*.1 || die
+ export HELP2MAN=false
+ fi
+}
+
+src_configure() {
+ # the libtool script uses bash code in it and at configure time, tries
+ # to find a bash shell. if /bin/sh is bash, it uses that. this can
+ # cause problems for people who switch /bin/sh on the fly to other
+ # shells, so just force libtool to use /bin/bash all the time.
+ export CONFIG_SHELL="$(type -P bash)"
+
+ # Do not bother hardcoding the full path to sed.
+ # Just rely on $PATH. bug #574550
+ export ac_cv_path_SED="$(basename "$(type -P sed)")"
+
+ [[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g"
+
+ ECONF_SOURCE="${S}" econf ${myconf} --disable-ltdl-install
+}
+
+src_install() {
+ default
+
+ local x
+ while read -d $'\0' -r x ; do
+ ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die
+ done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0)
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/libtool/libtool-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/libtool/libtool-9999.ebuild
index ea6a7173be..65f0d1aab0 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/libtool/libtool-9999.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/libtool/libtool-9999.ebuild
@@ -1,9 +1,12 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-LIBTOOLIZE="true" #225559
+# Please bump with dev-libs/libltdl.
+
+# bug #225559
+LIBTOOLIZE="true"
WANT_LIBTOOL="none"
inherit autotools prefix
@@ -27,12 +30,16 @@ RDEPEND="
sys-devel/gnuconfig
>=sys-devel/autoconf-2.69:*
>=sys-devel/automake-1.13:*
- dev-libs/libltdl:0"
+ >=dev-libs/libltdl-2.4.7"
DEPEND="${RDEPEND}"
[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man"
PATCHES=(
- "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch #109105
+ # bug #109105
+ "${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch
+ # bug #581314
+ "${FILESDIR}"/${PN}-2.4.6-ppc64le.patch
+
"${FILESDIR}"/${PN}-2.4.6-mint.patch
"${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
"${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
@@ -40,11 +47,11 @@ PATCHES=(
src_prepare() {
if [[ ${PV} == *9999 ]] ; then
- eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch #650876
+ eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch # bug #650876
./bootstrap || die
else
PATCHES+=(
- "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch #650876
+ "${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch # bug #650876
)
fi
@@ -89,11 +96,13 @@ src_configure() {
# shells, so just force libtool to use /bin/bash all the time.
export CONFIG_SHELL="$(type -P bash)"
- # Do not bother hardcoding the full path to sed. Just rely on $PATH. #574550
+ # Do not bother hardcoding the full path to sed.
+ # Just rely on $PATH. bug #574550
export ac_cv_path_SED="$(basename "$(type -P sed)")"
[[ ${CHOST} == *-darwin* ]] && local myconf="--program-prefix=g"
- ECONF_SOURCE=${S} econf ${myconf} --disable-ltdl-install
+
+ ECONF_SOURCE="${S}" econf ${myconf} --disable-ltdl-install
}
src_install() {
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/m4/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/m4/Manifest
index bc43b9b6b9..90afb460c0 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/m4/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/m4/Manifest
@@ -1,2 +1,3 @@
DIST m4-1.4.19-test-198-sysval-r1.patch.gz 6292 BLAKE2B 62f52c8bb75e7b8f11e487906f1ce47069ea6d3095fd6532aa6b47bcd8109b7cd733fde26915d449a1cfc326f27f5ed83ba29a5a80687b8b9bdb73c8d87e96b8 SHA512 c3e7d4c1631e401c6b5477c22fd5de837188acf9d72551b116c665a927d1799b1fb249e90c9fb4f6f2f328ee84b2e4dd0bf54f684139997c19ee5b69a3e9284d
DIST m4-1.4.19.tar.xz 1654908 BLAKE2B 08694485a49c542761fa9a7db4d7609f4dfb08a5c6b785b57f2e14cf1f696c2a1c788bb5eb934e8159a632b63ff071dfe42511d0109d7b1828f46d33c8bf416a SHA512 47f595845c89709727bda0b3fc78e3188ef78ec818965b395532e7041cabe9e49677ee4aca3d042930095a7f8df81de3da1026b23b6897be471f6cf13ddd512b
+DIST m4-1.4.19.tar.xz.sig 488 BLAKE2B 99e89b1ed0bf158d29a652392fb122e23227e895c75a8c63057ebe33f11b433ab205ae99a991578a89df8c3e723fc00669d8cdb290fbc86eaa6c704b112e4370 SHA512 d6ac9c6a54c57e9b53fb3e34a60d49df2f46a6e494da0a0c9ae8246b984e68a853b5d8c42677c1a0485c3f36b0bce10a481d3775c0edc1dbdfb27b43545bc31e
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/m4/files/loong-fix-build.patch b/sdk_container/src/third_party/portage-stable/sys-devel/m4/files/loong-fix-build.patch
new file mode 100644
index 0000000000..d524335792
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/m4/files/loong-fix-build.patch
@@ -0,0 +1,30 @@
+[xen0n: this is https://github.com/sunhaiyong1978/CLFS-for-LoongArch/blob/1.0/patches/stack-direction-add-loongarch.patch with line number tweak, and change to generated file added as well.]
+From: Sun Haiyong
+Date: Tue, 31 Aug 2021 11:11:52 +0800
+Subject: [PATCH] stack-direction: Add support for loongarch CPU
+
+* m4/stack-direction.m4 (SV_STACK_DIRECTION): When the CPU is loongarch,
+set "sv_cv_stack_direction" to "-1" .
+--- a/m4/stack-direction.m4
++++ b/m4/stack-direction.m4
+@@ -31,6 +31,7 @@ AC_DEFUN([SV_STACK_DIRECTION],
+ i?86 | x86_64 | \
+ i860 | \
+ ia64 | \
++ loongarch* | \
+ m32r | \
+ m68* | \
+ m88k | \
+--- a/configure
++++ b/configure
+@@ -46399,6 +46399,7 @@ else $as_nop
+ i?86 | x86_64 | \
+ i860 | \
+ ia64 | \
++ loongarch* | \
+ m32r | \
+ m68* | \
+ m88k | \
+--
+2.17.2
+
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/m4/files/ppc-musl.patch b/sdk_container/src/third_party/portage-stable/sys-devel/m4/files/ppc-musl.patch
index d7d8255a44..4aff0ba1cf 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/m4/files/ppc-musl.patch
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/m4/files/ppc-musl.patch
@@ -1,7 +1,8 @@
-Needed to fix build on ppc + musl. Doesn't seem to yet be in upstream gnulib.
+Needed to fix build on ppc + musl. Should pop up in next gnulib sync in release (different patch).
https://www.openwall.com/lists/musl/2017/11/05/2
https://github.com/void-linux/void-packages/blob/master/srcpkgs/grep/patches/ppc-musl.patch
+https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=2d830e4a792fcd9f614ed08a7f18584b8b21d23b
--- a/lib/sigsegv.c
+++ b/lib/sigsegv.c
@@ -221,8 +221,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/m4/m4-1.4.19.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/m4/m4-1.4.19.ebuild
index a30e5e2621..fcfe153e59 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/m4/m4-1.4.19.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/m4/m4-1.4.19.ebuild
@@ -3,17 +3,21 @@
EAPI=7
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/m4.asc
+inherit verify-sig
+
DESCRIPTION="GNU macro processor"
HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
-if [[ "${PV}" == *_beta* ]] ; then
+if [[ ${PV} == *_beta* ]] ; then
MY_P="${PN}-1.4.18d"
- #SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
SRC_URI="https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz"
+ SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz.sig )"
S="${WORKDIR}/${MY_P}"
else
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~floppym/dist/${P}-test-198-sysval-r1.patch.gz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+ SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
LICENSE="GPL-3"
@@ -29,13 +33,34 @@ RDEPEND="
DEPEND="${RDEPEND}"
# Remember: cannot dep on autoconf since it needs us
BDEPEND="app-arch/xz-utils
- nls? ( sys-devel/gettext )"
+ nls? ( sys-devel/gettext )
+ verify-sig? ( sec-keys/openpgp-keys-m4 )"
PATCHES=(
"${FILESDIR}"/ppc-musl.patch
+ "${FILESDIR}"/loong-fix-build.patch
"${WORKDIR}"/${P}-test-198-sysval-r1.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() {
+ default
+
+ # touch generated files after patching m4, to avoid activating maintainer
+ # mode
+ # remove when loong-fix-build.patch is no longer necessary
+ touch ./aclocal.m4 ./lib/config.hin ./configure ./doc/stamp-vti || die
+ find . -name Makefile.in -exec touch {} + || die
+}
+
src_configure() {
local -a myeconfargs=(
--enable-changeword
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/make/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/make/Manifest
deleted file mode 100644
index 34d9f6842b..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/make/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST make-4.3.tar.gz 2317073 BLAKE2B 5a82ce1f30eb034366ac3b87d2ec6698aae17d7b1a611941cf42136b2453b34236ab55382eab0a593c43cee8b036ba4a054f966c41ba766fdbd2862942be5dff SHA512 9a1185cc468368f4ec06478b1cfa343bf90b5cd7c92c0536567db0315b0ee909af53ecce3d44cfd93dd137dbca1ed13af5713e8663590c4fdd21ea635d78496b
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch b/sdk_container/src/third_party/portage-stable/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch
deleted file mode 100644
index d2f60ec91c..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/make/files/make-3.82-darwin-library_search-dylib.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Fixed default libpatttern on Darwin, imported from prefix overlay.
-Got merged upstream:
-https://savannah.gnu.org/bugs/?37197
---- a/default.c
-+++ b/default.c
-@@ -509,7 +509,11 @@
- #ifdef __MSDOS__
- ".LIBPATTERNS", "lib%.a $(DJDIR)/lib/lib%.a",
- #else
-+#ifdef __APPLE__
-+ ".LIBPATTERNS", "lib%.dylib lib%.a",
-+#else
- ".LIBPATTERNS", "lib%.so lib%.a",
-+#endif
- #endif
- #endif
-
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/make/files/make-4.2-default-cxx.patch b/sdk_container/src/third_party/portage-stable/sys-devel/make/files/make-4.2-default-cxx.patch
deleted file mode 100644
index 4d592086a6..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/make/files/make-4.2-default-cxx.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/default.c b/default.c
-index 3d865c7..e8b3ed6 100644
---- a/default.c
-+++ b/default.c
-@@ -530,7 +530,7 @@ static const char *default_variables[] =
- "OBJC", "gcc",
- #else
- "CC", "cc",
-- "CXX", "g++",
-+ "CXX", "c++",
- "OBJC", "cc",
- #endif
-
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/make/make-4.3.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/make/make-4.3.ebuild
deleted file mode 100644
index bd0a3434e1..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/make/make-4.3.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic
-
-DESCRIPTION="Standard tool to compile source trees"
-HOMEPAGE="https://www.gnu.org/software/make/make.html"
-if [[ "$(ver_cut 3)" -ge 90 ]] ; then
- SRC_URI="https://alpha.gnu.org/gnu//make/${P}.tar.gz"
-else
- SRC_URI="mirror://gnu//make/${P}.tar.gz"
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-LICENSE="GPL-3+"
-SLOT="0"
-IUSE="guile nls static"
-
-DEPEND="guile? ( >=dev-scheme/guile-1.8:= )"
-BDEPEND="nls? ( sys-devel/gettext )"
-RDEPEND="${DEPEND}
- nls? ( virtual/libintl )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.82-darwin-library_search-dylib.patch
- "${FILESDIR}"/${PN}-4.2-default-cxx.patch
-)
-
-src_prepare() {
- # sources were moved into src directory
- cd src || die
- default
-}
-
-src_configure() {
- use static && append-ldflags -static
- local myeconfargs=(
- --program-prefix=g
- $(use_with guile)
- $(use_enable nls)
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- dodoc AUTHORS NEWS README*
- if [[ ${USERLAND} == "GNU" ]] ; then
- # we install everywhere as 'gmake' but on GNU systems,
- # symlink 'make' to 'gmake'
- dosym gmake /usr/bin/make
- dosym gmake.1 /usr/share/man/man1/make.1
- fi
-}
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/make/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-devel/make/metadata.xml
deleted file mode 100644
index 1e62dd9102..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-devel/make/metadata.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- base-system@gentoo.org
- Gentoo Base System
-
-
- cpe:/a:gnu:make
-
-
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/patch/Manifest b/sdk_container/src/third_party/portage-stable/sys-devel/patch/Manifest
index 15f0b1675c..612a9aae3b 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/patch/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/patch/Manifest
@@ -1 +1,2 @@
DIST patch-2.7.6.tar.xz 783756 BLAKE2B e3dd2d155a94c39cb60eafc26677e84de14c3a6d5814dff69de091ded52f21862490970254297795f2c42a0c3203f7e88a8f65bb66968f8dfd6e066bf53f2dfb SHA512 fcca87bdb67a88685a8a25597f9e015f5e60197b9a269fa350ae35a7991ed8da553939b4bbc7f7d3cfd863c67142af403b04165633acbce4339056a905e87fbd
+DIST patch-2.7.6.tar.xz.sig 801 BLAKE2B 8f2decb10402ecf0208d05ea7cce3bae565d31ee2bb2a118367c117d25b158d8bd525cae654ec0c0e2c036cc8f47a331edc1bb10b100683ade64dfa3b651988b SHA512 1302a1110dcda4f3d83b5263415d72be55c46dae0efb1c123e9c346154e09def5657004bbe7249e2d014555349410e7a5217140dd8852331235f75bcc757351b
diff --git a/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r4.ebuild b/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r4.ebuild
index 30d831025c..25e164eeee 100644
--- a/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r4.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-devel/patch/patch-2.7.6-r4.ebuild
@@ -3,21 +3,24 @@
EAPI="7"
-inherit flag-o-matic
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/patch.asc
+inherit flag-o-matic verify-sig
DESCRIPTION="Utility to apply diffs to files"
HOMEPAGE="https://www.gnu.org/software/patch/patch.html"
SRC_URI="mirror://gnu/patch/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )"
LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="static test xattr"
RESTRICT="!test? ( test )"
RDEPEND="xattr? ( sys-apps/attr )"
-DEPEND="${RDEPEND}
- test? ( sys-apps/ed )"
+DEPEND="${RDEPEND}"
+BDEPEND="test? ( sys-apps/ed )
+ verify-sig? ( sec-keys/openpgp-keys-patch )"
PATCHES=(
"${FILESDIR}"/${P}-fix-test-suite.patch
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest
index ff13826946..b78ee356a7 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest
@@ -4,5 +4,10 @@ DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7e
DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348
DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84
DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9
-DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24
+DIST binutils-2.37_p1-patches-2.tar.xz 31956 BLAKE2B 39c48628d0e2d7f3a8cf11be391b51dc64c7a534a3e64950fd992907c34fa36bebdf95cc5a184dd5b35e134e0c20376b5883abbf96ae57403c55377e615a6790 SHA512 c927aafa8c87e3b68ad28da5a17edf5647591ec26feeb56c743bc6637ffb10832b50ec6fd8442e80e40628b624e31b2f0f0b5f1193e77dc7e5442df0cb8cc8f1
DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28
+DIST binutils-2.38-patches-3.tar.xz 189068 BLAKE2B 5b14c90ab7dba253e92ad57b3a702fcbf48739dd0121ce8f739d88331da820ce44c35e16ac4bee394525c3a46bce980e9e1bbf4cbc9ce8a14fc324bc8fa059e7 SHA512 099266a8ef4272fd7f7552071e1892d114ed564a38b700df32e058ed691c6bfcd6f2454f649461f9c36594ea819a35d1e4cd2418609a2407be2a4f8885e500e3
+DIST binutils-2.38-patches-4.tar.xz 193852 BLAKE2B 5a83e20008e58464ed563a6817a367e50684c59d08c47345cc546054269c42463d1651441720f865851e4e182e917df1a095c68e64226e0351b64e975d524096 SHA512 6657e547bb02898632cc45a8f1894be098aa7472b6725b65f95393e621abb127e468b4e50310720bf03f7e8d0a68bc2c47af76fc43aaa8f32b2e4a149c0c6290
+DIST binutils-2.38.tar.xz 23651408 BLAKE2B 19ede396ec97b88e632aded2f69f4684cc5053109e06c3c4a1934944e3f0ceaa9e4a2604528a440189771f778cb5d75edd510163970eeea31afba87fa256feba SHA512 8bf0b0d193c9c010e0518ee2b2e5a830898af206510992483b427477ed178396cd210235e85fd7bd99a96fc6d5eedbeccbd48317a10f752b7336ada8b2bb826d
+DIST binutils-2.39-patches-3.tar.xz 57332 BLAKE2B 08bdcd35afb6310c5f61e8a93f60c624ff461a612d8b473b2cfc1d8eb94eedb311af0b39b5f8ac425f3676d8e1addd13a4b223983de2f6d579e50daec08d3881 SHA512 f8a1a908866637a39a3ad55d47304f3320ab663d299d8d231a873008a50bb2a09c89a2482394c017a2a73c2cfc48ed944e99b422fd5db19f829e45ff071bb659
+DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild
index de8fcddd33..7e32691cab 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.34-r2.ebuild
@@ -37,7 +37,7 @@ MULTILIB_WRAPPED_HEADERS=(
)
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
index cf18b9ed65..49b5b73255 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild
@@ -39,7 +39,7 @@ MULTILIB_WRAPPED_HEADERS=(
)
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild
index 46715c3766..14ef733b10 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild
@@ -37,7 +37,7 @@ MULTILIB_WRAPPED_HEADERS=(
)
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.37_p1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild
similarity index 93%
rename from sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.37_p1.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild
index bfff1b5055..bb7895a3dc 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.37_p1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.37_p1-r2.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PATCH_VER=0
+PATCH_VER=2
PATCH_DEV=dilfridge
inherit libtool toolchain-funcs multilib-minimal
@@ -22,7 +22,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
LICENSE="|| ( GPL-3 LGPL-3 )"
SLOT="0/${PV%_p?}"
IUSE="64-bit-bfd cet multitarget nls static-libs"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
BDEPEND="nls? ( sys-devel/gettext )"
DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
@@ -38,7 +38,7 @@ MULTILIB_WRAPPED_HEADERS=(
)
src_prepare() {
- if [[ ! -z ${PATCH_VER} ]] ; then
+ if [[ -n ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch
fi
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.38-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.38-r1.ebuild
new file mode 100644
index 0000000000..e4d12985ba
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.38-r1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PATCH_VER=3
+PATCH_DEV=dilfridge
+
+inherit libtool toolchain-funcs multilib-minimal
+
+MY_PN="binutils"
+MY_P="${MY_PN}-${PV}"
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-dilfridge}
+
+DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
+HOMEPAGE="https://sourceware.org/binutils/"
+SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+LICENSE="|| ( GPL-3 LGPL-3 )"
+SLOT="0/${PV%_p?}"
+IUSE="64-bit-bfd cet multitarget nls static-libs"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+BDEPEND="nls? ( sys-devel/gettext )"
+DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
+# Need a newer binutils-config that'll reset include/lib symlinks for us.
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-config-5
+"
+
+S="${WORKDIR}/${MY_P%_p?}"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/bfd.h
+)
+
+src_prepare() {
+ if [[ -n ${PATCH_VER} ]] ; then
+ einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+ eapply "${WORKDIR}/patch"/*.patch
+ fi
+
+ # Fix cross-compile relinking issue, bug #626402
+ elibtoolize
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # somehow libtool/configure is messed up and (custom patch at
+ # upstream?) and misdetects (basically assumes) nm can be called
+ # with -B arg -- can't run eautoreconf (fails), so patch up
+ # manually, this would break any target that needs -B to nm
+ sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
+ libctf/configure || die
+ fi
+
+ default
+}
+
+pkgversion() {
+ printf "Gentoo ${PVR}"
+ [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.24) make this an explicit option. #497268
+ --enable-install-libiberty
+ --disable-werror
+ --with-bugurl="https://bugs.gentoo.org/"
+ --with-pkgversion="$(pkgversion)"
+ $(use_enable static-libs static)
+ # The binutils eclass enables this flag for all bi-arch builds,
+ # but other tools often don't care about that support. Put it
+ # beyond a flag if people really want it, but otherwise leave
+ # it disabled as it can slow things down on 32bit arches. #438522
+ $(use_enable 64-bit-bfd)
+ # This only disables building in the zlib subdir.
+ # For binutils itself, it'll use the system version. #591516
+ --without-zlib
+ --with-system-zlib
+ # We only care about the libs, so disable programs. #528088
+ --disable-{binutils,etc,ld,gas,gold,gprof}
+ # Disable modules that are in a combined binutils/gdb tree. #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # We pull in all USE-flags that change ABI in an incompatible
+ # way. #666100
+ # USE=multitarget change size of global arrays
+ # USE=64-bit-bfd changes data structures of exported API
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+ )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ use nls \
+ && myconf+=( --without-included-gettext ) \
+ || myconf+=( --disable-nls )
+
+ if [[ ${CHOST} == *-darwin* ]] && use nls ; then
+ # fix underlinking in opcodes
+ sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
+ "${S}"/opcodes/Makefile.in || die
+ fi
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+
+ # Prevent makeinfo from running as we don't build docs here.
+ # bug #622652
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+}
+
+multilib_src_install() {
+ default
+ # Provide libiberty.h directly.
+ dosym libiberty/libiberty.h /usr/include/libiberty.h
+}
+
+multilib_src_install_all() {
+ use static-libs || find "${ED}"/usr -name '*.la' -delete
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild
new file mode 100644
index 0000000000..2264a08a19
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.38-r2.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PATCH_VER=4
+PATCH_DEV=dilfridge
+
+inherit libtool toolchain-funcs multilib-minimal
+
+MY_PN="binutils"
+MY_P="${MY_PN}-${PV}"
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-dilfridge}
+
+DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
+HOMEPAGE="https://sourceware.org/binutils/"
+SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+LICENSE="|| ( GPL-3 LGPL-3 )"
+SLOT="0/${PV%_p?}"
+IUSE="64-bit-bfd cet multitarget nls static-libs"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+BDEPEND="nls? ( sys-devel/gettext )"
+DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
+# Need a newer binutils-config that'll reset include/lib symlinks for us.
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-config-5
+"
+
+S="${WORKDIR}/${MY_P%_p?}"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/bfd.h
+)
+
+src_prepare() {
+ if [[ -n ${PATCH_VER} ]] ; then
+ einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+ eapply "${WORKDIR}/patch"/*.patch
+ fi
+
+ # Fix cross-compile relinking issue, bug #626402
+ elibtoolize
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # somehow libtool/configure is messed up and (custom patch at
+ # upstream?) and misdetects (basically assumes) nm can be called
+ # with -B arg -- can't run eautoreconf (fails), so patch up
+ # manually, this would break any target that needs -B to nm
+ sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
+ libctf/configure || die
+ fi
+
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ default
+}
+
+pkgversion() {
+ printf "Gentoo ${PVR}"
+ [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.24) make this an explicit option. #497268
+ --enable-install-libiberty
+ --disable-werror
+ --with-bugurl="https://bugs.gentoo.org/"
+ --with-pkgversion="$(pkgversion)"
+ $(use_enable static-libs static)
+ # The binutils eclass enables this flag for all bi-arch builds,
+ # but other tools often don't care about that support. Put it
+ # beyond a flag if people really want it, but otherwise leave
+ # it disabled as it can slow things down on 32bit arches. #438522
+ $(use_enable 64-bit-bfd)
+ # This only disables building in the zlib subdir.
+ # For binutils itself, it'll use the system version. #591516
+ --without-zlib
+ --with-system-zlib
+ # We only care about the libs, so disable programs. #528088
+ --disable-{binutils,etc,ld,gas,gold,gprof}
+ # Disable modules that are in a combined binutils/gdb tree. #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # We pull in all USE-flags that change ABI in an incompatible
+ # way. #666100
+ # USE=multitarget change size of global arrays
+ # USE=64-bit-bfd changes data structures of exported API
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+ )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ use nls \
+ && myconf+=( --without-included-gettext ) \
+ || myconf+=( --disable-nls )
+
+ if [[ ${CHOST} == *-darwin* ]] && use nls ; then
+ # fix underlinking in opcodes
+ sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
+ "${S}"/opcodes/Makefile.in || die
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running as we don't build docs here.
+ # bug #622652
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+}
+
+multilib_src_compile() {
+ emake V=1
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install
+
+ # Provide libiberty.h directly.
+ dosym libiberty/libiberty.h /usr/include/libiberty.h
+}
+
+multilib_src_install_all() {
+ use static-libs || find "${ED}"/usr -name '*.la' -delete
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.39.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.39.ebuild
new file mode 100644
index 0000000000..68c12ebf98
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.39.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PATCH_VER=3
+PATCH_DEV=dilfridge
+
+inherit libtool toolchain-funcs multilib-minimal
+
+MY_PN="binutils"
+MY_P="${MY_PN}-${PV}"
+PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
+PATCH_DEV=${PATCH_DEV:-dilfridge}
+
+DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
+HOMEPAGE="https://sourceware.org/binutils/"
+SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz
+ https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
+
+LICENSE="|| ( GPL-3 LGPL-3 )"
+SLOT="0/${PV%_p?}"
+IUSE="64-bit-bfd cet multitarget nls static-libs"
+#KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+BDEPEND="nls? ( sys-devel/gettext )"
+DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]"
+# Need a newer binutils-config that'll reset include/lib symlinks for us.
+RDEPEND="${DEPEND}
+ >=sys-devel/binutils-config-5
+"
+
+S="${WORKDIR}/${MY_P%_p?}"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/bfd.h
+)
+
+src_prepare() {
+ if [[ -n ${PATCH_VER} ]] ; then
+ einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}"
+ eapply "${WORKDIR}/patch"/*.patch
+ fi
+
+ # Fix cross-compile relinking issue, bug #626402
+ elibtoolize
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # somehow libtool/configure is messed up and (custom patch at
+ # upstream?) and misdetects (basically assumes) nm can be called
+ # with -B arg -- can't run eautoreconf (fails), so patch up
+ # manually, this would break any target that needs -B to nm
+ sed -i -e 's/lt_cv_path_NM="$tmp_nm -B"/lt_cv_path_NM="$tmp_nm"/' \
+ libctf/configure || die
+ fi
+
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ default
+}
+
+pkgversion() {
+ printf "Gentoo ${PVR}"
+ [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ --enable-obsolete
+ --enable-shared
+ --enable-threads
+ # Newer versions (>=2.24) make this an explicit option. #497268
+ --enable-install-libiberty
+ --disable-werror
+ --with-bugurl="https://bugs.gentoo.org/"
+ --with-pkgversion="$(pkgversion)"
+ $(use_enable static-libs static)
+ # The binutils eclass enables this flag for all bi-arch builds,
+ # but other tools often don't care about that support. Put it
+ # beyond a flag if people really want it, but otherwise leave
+ # it disabled as it can slow things down on 32bit arches. #438522
+ $(use_enable 64-bit-bfd)
+ # This only disables building in the zlib subdir.
+ # For binutils itself, it'll use the system version. #591516
+ --without-zlib
+ --with-system-zlib
+ # We only care about the libs, so disable programs. #528088
+ --disable-{binutils,etc,ld,gas,gold,gprof,gprofng}
+ # Disable modules that are in a combined binutils/gdb tree. #490566
+ --disable-{gdb,libdecnumber,readline,sim}
+ # Strip out broken static link flags.
+ # https://gcc.gnu.org/PR56750
+ --without-stage1-ldflags
+ # We pull in all USE-flags that change ABI in an incompatible
+ # way. #666100
+ # USE=multitarget change size of global arrays
+ # USE=64-bit-bfd changes data structures of exported API
+ --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def)
+
+ # avoid automagic dependency on (currently prefix) systems
+ # systems with debuginfod library, bug #754753
+ --without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+ )
+
+ # mips can't do hash-style=gnu ...
+ if [[ $(tc-arch) != mips ]] ; then
+ myconf+=( --enable-default-hash-style=gnu )
+ fi
+
+ use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd )
+
+ use nls \
+ && myconf+=( --without-included-gettext ) \
+ || myconf+=( --disable-nls )
+
+ if [[ ${CHOST} == *-darwin* ]] && use nls ; then
+ # fix underlinking in opcodes
+ sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \
+ "${S}"/opcodes/Makefile.in || die
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+
+ # Prevent makeinfo from running as we don't build docs here.
+ # bug #622652
+ sed -i \
+ -e '/^MAKEINFO/s:=.*:= true:' \
+ Makefile || die
+}
+
+multilib_src_compile() {
+ emake V=1
+}
+
+multilib_src_install() {
+ emake V=1 DESTDIR="${D}" install
+
+ # Provide libiberty.h directly.
+ dosym libiberty/libiberty.h /usr/include/libiberty.h
+}
+
+multilib_src_install_all() {
+ use static-libs || find "${ED}"/usr -name '*.la' -delete
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/metadata.xml
index f1528f82ed..e1153400ac 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/metadata.xml
@@ -1,5 +1,5 @@
-
+
toolchain@gentoo.org
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.12-CVE-2022-37434.patch b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.12-CVE-2022-37434.patch
new file mode 100644
index 0000000000..1ef3b909e4
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/files/zlib-1.2.12-CVE-2022-37434.patch
@@ -0,0 +1,55 @@
+https://bugs.gentoo.org/863851
+https://github.com/madler/zlib/commit/eff308af425b67093bab25f80f1ae950166bece1
+https://github.com/madler/zlib/commit/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d (see https://github.com/curl/curl/issues/9271)
+
+From eff308af425b67093bab25f80f1ae950166bece1 Mon Sep 17 00:00:00 2001
+From: Mark Adler
+Date: Sat, 30 Jul 2022 15:51:11 -0700
+Subject: [PATCH] Fix a bug when getting a gzip header extra field with
+ inflate().
+
+If the extra field was larger than the space the user provided with
+inflateGetHeader(), and if multiple calls of inflate() delivered
+the extra header data, then there could be a buffer overflow of the
+provided space. This commit assures that provided space is not
+exceeded.
+--- a/inflate.c
++++ b/inflate.c
+@@ -763,9 +763,10 @@ int flush;
+ copy = state->length;
+ if (copy > have) copy = have;
+ if (copy) {
++ len = state->head->extra_len - state->length;
+ if (state->head != Z_NULL &&
+- state->head->extra != Z_NULL) {
+- len = state->head->extra_len - state->length;
++ state->head->extra != Z_NULL &&
++ len < state->head->extra_max) {
+ zmemcpy(state->head->extra + len, next,
+ len + copy > state->head->extra_max ?
+ state->head->extra_max - len : copy);
+
+From 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d Mon Sep 17 00:00:00 2001
+From: Mark Adler
+Date: Mon, 8 Aug 2022 10:50:09 -0700
+Subject: [PATCH] Fix extra field processing bug that dereferences NULL
+ state->head.
+
+The recent commit to fix a gzip header extra field processing bug
+introduced the new bug fixed here.
+--- a/inflate.c
++++ b/inflate.c
+@@ -763,10 +763,10 @@ int flush;
+ copy = state->length;
+ if (copy > have) copy = have;
+ if (copy) {
+- len = state->head->extra_len - state->length;
+ if (state->head != Z_NULL &&
+ state->head->extra != Z_NULL &&
+- len < state->head->extra_max) {
++ (len = state->head->extra_len - state->length) <
++ state->head->extra_max) {
+ zmemcpy(state->head->extra + len, next,
+ len + copy > state->head->extra_max ?
+ state->head->extra_max - len : copy);
+
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.11-r4.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.11-r4.ebuild
index bc2fe9834e..f81dba33f7 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.11-r4.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.11-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -14,6 +14,7 @@ CYGWINPATCHES=(
DESCRIPTION="Standard (de)compression library"
HOMEPAGE="https://zlib.net/"
SRC_URI="https://zlib.net/${P}.tar.gz
+ https://zlib.net/fossils/${P}.tar.gz
http://www.gzip.org/zlib/${P}.tar.gz
http://www.zlib.net/current/beta/${P}.tar.gz
elibc_Cygwin? ( ${CYGWINPATCHES[*]} )"
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.11-r5.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.11-r5.ebuild
index 5173a430e6..c24cdc4a35 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.11-r5.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.11-r5.ebuild
@@ -14,6 +14,7 @@ CYGWINPATCHES=(
DESCRIPTION="Standard (de)compression library"
HOMEPAGE="https://zlib.net/"
SRC_URI="https://zlib.net/${P}.tar.gz
+ https://zlib.net/fossils/${P}.tar.gz
http://www.gzip.org/zlib/${P}.tar.gz
http://www.zlib.net/current/beta/${P}.tar.gz
elibc_Cygwin? ( ${CYGWINPATCHES[*]} )"
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r2.ebuild
index ca6e222f45..5741a146d6 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r2.ebuild
@@ -16,6 +16,7 @@ CYGWINPATCHES=(
DESCRIPTION="Standard (de)compression library"
HOMEPAGE="https://zlib.net/"
SRC_URI="https://zlib.net/${P}.tar.gz
+ https://zlib.net/fossils/${P}.tar.gz
https://www.gzip.org/zlib/${P}.tar.gz
https://www.zlib.net/current/beta/${P}.tar.gz
verify-sig? ( https://zlib.net/${P}.tar.gz.asc )
@@ -23,7 +24,7 @@ SRC_URI="https://zlib.net/${P}.tar.gz
LICENSE="ZLIB"
SLOT="0/1" # subslot = SONAME
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="minizip static-libs"
RDEPEND="!sys-libs/zlib-ng[compat]"
diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r3.ebuild
similarity index 83%
rename from sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r1.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r3.ebuild
index 267b24c0d1..1117652b53 100644
--- a/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-libs/zlib/zlib-1.2.12-r3.ebuild
@@ -1,8 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
+# Worth keeping an eye on 'develop' branch upstream for possible backports.
AUTOTOOLS_AUTO_DEPEND="no"
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/madler.asc
inherit autotools multilib-minimal usr-ldscript verify-sig
@@ -15,6 +16,7 @@ CYGWINPATCHES=(
DESCRIPTION="Standard (de)compression library"
HOMEPAGE="https://zlib.net/"
SRC_URI="https://zlib.net/${P}.tar.gz
+ https://zlib.net/fossils/${P}.tar.gz
https://www.gzip.org/zlib/${P}.tar.gz
https://www.zlib.net/current/beta/${P}.tar.gz
verify-sig? ( https://zlib.net/${P}.tar.gz.asc )
@@ -22,7 +24,7 @@ SRC_URI="https://zlib.net/${P}.tar.gz
LICENSE="ZLIB"
SLOT="0/1" # subslot = SONAME
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="minizip static-libs"
RDEPEND="!sys-libs/zlib-ng[compat]"
@@ -31,14 +33,24 @@ BDEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )
verify-sig? ( sec-keys/openpgp-keys-madler )"
PATCHES=(
- # bug #658536
+ # Don't install unexpected & unused crypt.h header (which would clash with other pkgs)
+ # Pending upstream. bug #658536
"${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch
- # bug #831628
+ # Respect AR, RANLIB, NM during build. Pending upstream. bug #831628
"${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
+ # Respect LDFLAGS during configure tests. Pending upstream
+ "${FILESDIR}"/${PN}-1.2.12-use-LDFLAGS-in-configure.patch
+
# Fix broken CC logic
- "${FILESDIR}"/${PN}-1.2.12-fix-CC-logic-in-configure.patch
+ "${FILESDIR}"/${P}-fix-CC-logic-in-configure.patch
+
+ # Backport for Java (and others), bug #836370
+ "${FILESDIR}"/${P}-CRC-buggy-input.patch
+
+ # bug #863851
+ "${FILESDIR}"/${P}-CVE-2022-37434.patch
)
src_prepare() {
diff --git a/sdk_container/src/third_party/portage-stable/virtual/libcrypt/libcrypt-2.ebuild b/sdk_container/src/third_party/portage-stable/virtual/libcrypt/libcrypt-2.ebuild
index 968fec179c..24ce4f07a7 100644
--- a/sdk_container/src/third_party/portage-stable/virtual/libcrypt/libcrypt-2.ebuild
+++ b/sdk_container/src/third_party/portage-stable/virtual/libcrypt/libcrypt-2.ebuild
@@ -8,7 +8,7 @@ inherit multilib-build
DESCRIPTION="Virtual for libcrypt.so"
SLOT="0/2"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="static-libs"
RDEPEND="
diff --git a/sdk_container/src/third_party/portage-stable/virtual/pkgconfig/pkgconfig-2-r1.ebuild b/sdk_container/src/third_party/portage-stable/virtual/pkgconfig/pkgconfig-2-r1.ebuild
index b48048d49d..398283de28 100644
--- a/sdk_container/src/third_party/portage-stable/virtual/pkgconfig/pkgconfig-2-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/virtual/pkgconfig/pkgconfig-2-r1.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="Virtual for the pkg-config implementation"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RDEPEND=">=dev-util/pkgconf-1.3.7[pkg-config(+)]"
diff --git a/sdk_container/src/third_party/portage-stable/virtual/yacc/yacc-0.ebuild b/sdk_container/src/third_party/portage-stable/virtual/yacc/yacc-0.ebuild
index 07a155cc5a..d6275036ab 100644
--- a/sdk_container/src/third_party/portage-stable/virtual/yacc/yacc-0.ebuild
+++ b/sdk_container/src/third_party/portage-stable/virtual/yacc/yacc-0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -6,6 +6,6 @@ EAPI=7
DESCRIPTION="Virtual for yacc (yet another compiler compiler)"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
RDEPEND="|| ( sys-devel/bison dev-util/byacc dev-util/yacc )"