diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list
index 690835af8c..492026c301 100644
--- a/.github/workflows/portage-stable-packages-list
+++ b/.github/workflows/portage-stable-packages-list
@@ -124,6 +124,7 @@ dev-lang/perl
dev-lang/python
dev-lang/python-exec
dev-lang/python-exec-conf
+dev-lang/yasm
dev-libs/boost
dev-libs/cJSON
@@ -134,18 +135,28 @@ dev-libs/glib
dev-libs/gmp
dev-libs/gobject-introspection
dev-libs/gobject-introspection-common
+dev-libs/inih
dev-libs/jsoncpp
dev-libs/libaio
+dev-libs/libassuan
+dev-libs/libbsd
+dev-libs/libgcrypt
+dev-libs/libgpg-error
dev-libs/libksba
dev-libs/libltdl
dev-libs/libnl
+dev-libs/libpcre
dev-libs/libpcre2
+dev-libs/libpipeline
dev-libs/libtasn1
+dev-libs/libusb
dev-libs/libuv
dev-libs/libxml2
dev-libs/libxslt
dev-libs/nettle
dev-libs/oniguruma
+dev-libs/popt
+dev-libs/userspace-rcu
dev-perl/File-Slurp
dev-perl/Locale-gettext
@@ -339,6 +350,7 @@ sys-apps/file
sys-apps/findutils
sys-apps/gawk
sys-apps/gentoo-functions
+sys-apps/gptfdisk
sys-apps/help2man
sys-apps/i2c-tools
sys-apps/iucode_tool
diff --git a/changelog/updates/2023-05-10-sys-packages-dev-glob.md b/changelog/updates/2023-05-10-sys-packages-dev-glob.md
new file mode 100644
index 0000000000..f74b5c5492
--- /dev/null
+++ b/changelog/updates/2023-05-10-sys-packages-dev-glob.md
@@ -0,0 +1,10 @@
+- inih ([56](https://github.com/benhoyt/inih/releases/tag/r56))
+- libbsd ([0.11.7](https://lists.freedesktop.org/archives/libbsd/2022-October/000337.html))
+- libgcrypt ([1.10.1](https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=blob;f=NEWS;h=03132c2a115e35783a782c64777cf5f5b1a2825f;hb=ae0e567820c37f9640440b3cff77d7c185aa6742))
+- libgpg-error ([1.46](https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=NEWS;h=14b0ba97d6ba2b10b3178f2e4a3e24bfc2355bb3;hb=ea031873aa9642831017937fd33e9009d514ee07))
+- libpcre (8.45)
+- libpipeline ([1.5.7](https://gitlab.com/libpipeline/libpipeline/-/tags/1.5.7))
+- libusb ([1.0.26](https://github.com/libusb/libusb/blob/v1.0.26/ChangeLog))
+- popt ([1.19](https://github.com/rpm-software-management/popt/releases/tag/popt-1.19-release))
+- userspace-rcu ([0.14.0](https://github.com/urcu/userspace-rcu/blob/v0.13.2/ChangeLog))
+- gptfdisk ([1.0.9](https://sourceforge.net/p/gptfdisk/code/ci/1d46f3723bc25f5598266f7d9a3548af3cee0c77/tree/NEWS))
diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords
index 2ddb50adb3..d2fe2687cc 100644
--- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords
+++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords
@@ -19,7 +19,9 @@
=dev-lang/rust-1.69.0 ~amd64 ~arm64
=virtual/rust-1.69.0 ~amd64 ~arm64
-=dev-libs/libgcrypt-1.9.4 ~amd64 ~arm64
+# Keep versions on both arches in sync.
+=dev-libs/libbsd-0.11.7-r2 ~arm64
+=dev-libs/libgcrypt-1.10.1-r3 ~arm64
# Required for CVE-2023-28484 and CVE-2023-29469
=dev-libs/libxml2-2.10.4 ~amd64 ~arm64
diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use
index 111c60f4ce..1018a36143 100644
--- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use
+++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.use
@@ -14,8 +14,6 @@ net-misc/curl kerberos telnet
net-misc/iputils arping tracepath
sys-devel/gettext -git
-sys-apps/gptfdisk -icu
-
# for profile migration, needs to be enabled despite the fact it's
# enabled by default in the ebuild, because berkdb is disabled
# globally in make.defaults.
diff --git a/sdk_container/src/third_party/portage-stable/dev-lang/yasm/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-lang/yasm/metadata.xml
index d6e3b023f6..d73a43c853 100644
--- a/sdk_container/src/third_party/portage-stable/dev-lang/yasm/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/dev-lang/yasm/metadata.xml
@@ -1,8 +1,11 @@
-
- base-system@gentoo.org
- Gentoo Base System
-
+
+ base-system@gentoo.org
+ Gentoo Base System
+
+
+ yasm/yasm
+
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/inih/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/inih/Manifest
index e19e85d2c8..99f535bd88 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/inih/Manifest
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/inih/Manifest
@@ -1 +1 @@
-DIST inih-53.tar.gz 16984 BLAKE2B 1242e6273c9dd9a11ea026a3495a487b2aa72d8e01f34304d8568c88897ae9c9bb425246f992dc16f4dc2210ec14c597d0ef595cec84ff98a5d6101ee5a643b9 SHA512 99bc40c294b521e9973184bfb30d60c129735991f33b387b3d023827a34672b0489eadf91e38895ea725168dbc7b27bb02c1975debe7573b4b209d0e947b2100
+DIST inih-56.tar.gz 18458 BLAKE2B 51935959a9eb4e393b17302f0932a232963883680f10d404c63d5f2ebbd3bf0b740f44edfa1b2541d0e130016eb853ebedf68a1c40797f658496e2a8c966af3d SHA512 ff3e0910990f73e5b21fddc84737ab346279f201c86c7ad864c6cad9de5bde57c3e0a433b9b8f3585b7d86feaae2ea074185f92891dcadc98c274c1c0745d2d2
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/inih/inih-53.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/inih/inih-56-r1.ebuild
similarity index 51%
rename from sdk_container/src/third_party/portage-stable/dev-libs/inih/inih-53.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-libs/inih/inih-56-r1.ebuild
index 0c65d26f16..e287c82e01 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/inih/inih-53.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/inih/inih-56-r1.ebuild
@@ -1,37 +1,30 @@
-# Copyright 2020-2021 Gentoo Authors
+# Copyright 2020-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit meson-multilib
+# Tests not wired up to meson and don't seem to be intended for downstream use yet
+# e.g. hardcoding gcc, just a shell script
+
+inherit meson
DESCRIPTION="inih (INI not invented here) simple .INI file parser"
HOMEPAGE="https://github.com/benhoyt/inih"
-
SRC_URI="https://github.com/benhoyt/inih/archive/r${PV}.tar.gz -> ${P}.tar.gz"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+S="${WORKDIR}"/inih-r${PV}
LICENSE="BSD"
SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="static-libs"
+DOCS=( README.md )
-S="${WORKDIR}/inih-r${PV}"
-
-multilib_src_configure() {
+src_configure() {
local emesonargs=(
- -Ddefault_library=$(usex static-libs both shared)
+ -Ddefault_library=shared
-Ddistro_install=true
-Dwith_INIReader=true
)
meson_src_configure
}
-
-multilib_src_install_all() {
- local DOCS=(
- LICENSE.txt
- README.md
- )
- einstalldocs
-}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/Manifest
index 29c8687e0d..6b903682dc 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/Manifest
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/Manifest
@@ -1,3 +1 @@
-DIST libassuan-2.5.3.tar.bz2 572348 BLAKE2B ae3a5a9a03e85d62cf87271cd4a0718a2b89a4f90ea814837913e4b2bb6e5af9746e766d99685cc0cc3a801efaee597e491a2bc03d42ac26059580ea4680fd7a SHA512 e7ccb651ea75b07b2e687d48d86d0ab83cba8e2af7f30da2aec794808e13e6ec93f21d607db50d3431f1c23cb3a07a2793b71170e69fa2f5a82cffb81961f617
-DIST libassuan-2.5.4.tar.bz2 574039 BLAKE2B 2eec42c47840741a4726fc35c3ed04300e5fbcd37f808b121534aeaa04d0d0f609a30ad48cfbe33a81ee4b2ebbb822b9a48a5c602268f1b802bf5d7d19d72e9c SHA512 764993d5311c24f0c0f970016e903e1a16783a2050c42072dbc1bc4f350f119e53b0be17ed6df25a0086bc9f8c25ee4f3134330577968480997263f95e05594f
DIST libassuan-2.5.5.tar.bz2 572263 BLAKE2B 24952e97c757b97c387ab4c2c4bf7b040f2874e9326c129805c7f5326fa14d80e083b0842e336a635531a2c8d4a66d428c816bae6b175f1c4518add1ffa3554d SHA512 70117f77aa43bbbe0ed28da5ef23834c026780a74076a92ec775e30f851badb423e9a2cb9e8d142c94e4f6f8a794988c1b788fd4bd2271e562071adf0ab16403
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.3.ebuild
deleted file mode 100644
index 345ce33518..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.3.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit libtool
-
-DESCRIPTION="IPC library used by GnuPG and GPGME"
-HOMEPAGE="https://www.gnupg.org/related_software/libassuan/index.en.html"
-SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-3 LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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"
-
-# Note: On each bump, update dep bounds on each version from configure.ac!
-RDEPEND=">=dev-libs/libgpg-error-1.8"
-DEPEND="${RDEPEND}"
-
-src_prepare() {
- default
-
- if [[ ${CHOST} == *-solaris* ]] ; then
- elibtoolize
-
- # fix standards conflict
- sed -i \
- -e '/_XOPEN_SOURCE/s/500/600/' \
- -e 's/_XOPEN_SOURCE_EXTENDED/_NO&/' \
- -e 's/__EXTENSIONS__/_NO&/' \
- configure || die
- fi
-}
-
-src_configure() {
- local myeconfargs=(
- --disable-static
- GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
- $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
- # ppl need to use libassuan-config for --cflags and --libs
- find "${ED}" -type f -name '*.la' -delete || die
-}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.4.ebuild
deleted file mode 100644
index bdc2724f1d..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.4.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit libtool
-
-DESCRIPTION="IPC library used by GnuPG and GPGME"
-HOMEPAGE="https://www.gnupg.org/related_software/libassuan/index.en.html"
-SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-3 LGPL-2.1"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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"
-
-# Note: On each bump, update dep bounds on each version from configure.ac!
-RDEPEND=">=dev-libs/libgpg-error-1.17"
-DEPEND="${RDEPEND}"
-
-src_prepare() {
- default
-
- if [[ ${CHOST} == *-solaris* ]] ; then
- elibtoolize
-
- # fix standards conflict
- sed -i \
- -e '/_XOPEN_SOURCE/s/500/600/' \
- -e 's/_XOPEN_SOURCE_EXTENDED/_NO&/' \
- -e 's/__EXTENSIONS__/_NO&/' \
- configure || die
- fi
-}
-
-src_configure() {
- local myeconfargs=(
- --disable-static
- GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
- $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
- # ppl need to use libassuan-config for --cflags and --libs
- find "${ED}" -type f -name '*.la' -delete || die
-}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.5.ebuild
index 684fa24b72..f428bc5943 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.5.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/libassuan-2.5.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -11,10 +11,11 @@ SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
LICENSE="GPL-3 LGPL-2.1"
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 ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
# Note: On each bump, update dep bounds on each version from configure.ac!
-RDEPEND=">=dev-libs/libgpg-error-1.17"
+# We need >= 1.28 for gpgrt_malloc
+RDEPEND=">=dev-libs/libgpg-error-1.28"
DEPEND="${RDEPEND}"
src_prepare() {
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/metadata.xml
index 7f2a3782fd..2a5683490a 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libassuan/metadata.xml
@@ -1,11 +1,11 @@
-
- Lars Wendler
- polynomial-c@gentoo.org
-
-
+
+ base-system@gentoo.org
+ Gentoo Base System
+
+
In an ideal world, Assuan is irrelevant. Assuan's primary use is to
allow a client to interact with a non-persistent server. Using Assuan,
this is accomplished by forking a subprocess and communicating with it
@@ -15,5 +15,5 @@ across several transactions: not only is there a penalty for an
increased number of context switches, but also a significant amount of
data is MEMCPYed from the client to a file descriptor and from the file
descriptor to the server.
-
+
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/Manifest
index c47ce9ccb0..82a7043fed 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/Manifest
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/Manifest
@@ -1,2 +1,2 @@
-DIST libbsd-0.11.3.tar.xz 399712 BLAKE2B 1af04b8fcbc0bfa59fba549639d61a33ac934fe7ee42b506d1b0452e0b836b0bfdd3d8739de90465be46fe6a9d326a2d11bcf72280aa19ccba81db5da6d63d89 SHA512 a7015ea1ffa3766b1a4690526a25231898ad8275149b31fb6801082450172249997c36165626d101ffce53b59767a46676eebc0806426922fe4e773a0376c1f5
-DIST libbsd-0.11.5.tar.xz 409972 BLAKE2B 00c89ad1be351e7851538eac2744f5aef87b5937330d514d17af8a20a04bc6eab0e2bda61d0080da1d1439306b3b191ab68b4bc4cd8558ff0adfe402bfbf5b52 SHA512 c52c19eddd53630aca14f9f6221f7b84aa9cc798b4bb91e867822b161793313aab872ac1c0350d29312a72fee6e2061f3910ff918b724ec171d8c9de5837c841
+DIST libbsd-0.11.7.tar.xz 418508 BLAKE2B 2ff0aa951c5b37a58ab101aade52d077d52f3695bb8535c99dec89659775501d93af16f164fef946776f445ee88a276d00870f64cb3fef58942ce26af6d2eaa9 SHA512 51fda4724f41dd8a4628afd58c21236a7588d9045e337e06eeabf83805a9aaaa53705441ca901ad11f1c65f18e881523bdc97721a7d3d6a5cced27f2450d09a2
+DIST libbsd-0.11.7.tar.xz.asc 833 BLAKE2B 925cd4f5b68c0dccceb476cb188bb5a8185ad77895b9b458ff6819ae241dbd8cbf1c18dd12d10b90b3a9ea3f9e065b44566d1a908d0c111ecbd435434b922a66 SHA512 bdcce69ee261039900896c5be48659f1b6b809f3a6e8a5220aac30a6687926ac29e478a3ea737727d077d6575ee11b86eed896932568fdd261a9aaeb46d695b6
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-0.11.7-musl-lfs.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-0.11.7-musl-lfs.patch
new file mode 100644
index 0000000000..41cc27e752
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-0.11.7-musl-lfs.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/905912
+https://gitlab.freedesktop.org/libbsd/libbsd/-/merge_requests/24
+
+From c36c29f014b0ef56a3aef984fa40b0e100b6f419 Mon Sep 17 00:00:00 2001
+From: Khem Raj
+Date: Thu, 15 Dec 2022 09:02:22 -0800
+Subject: [PATCH] funopen: Replace off64_t with off_t in funopen_seek
+
+AC_SYS_LARGEFILE in configure.ac is setting needed defines to make
+64bit off_t on relevant platforms.
+
+Fixes build on musl
+
+| ../../../../../../../../workspace/sources/libbsd/src/funopen.c:68:28: error: unknown type name 'off64_t'; did you mean 'off_t'?
+| funopen_seek(void *cookie, off64_t *offset, int whence)
+| ^~~~~~~
+| off_t
+
+Signed-off-by: Khem Raj
+--- a/src/funopen.c
++++ b/src/funopen.c
+@@ -65,7 +65,7 @@ funopen_write(void *cookie, const char *buf, size_t size)
+ }
+
+ static int
+-funopen_seek(void *cookie, off64_t *offset, int whence)
++funopen_seek(void *cookie, off_t *offset, int whence)
+ {
+ struct funopen_cookie *cookiewrap = cookie;
+ off_t soff = *offset;
+--
+GitLab
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-build-Fix-version-script-linker-support-detection.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-build-Fix-version-script-linker-support-detection.patch
new file mode 100644
index 0000000000..2e45429021
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/files/libbsd-build-Fix-version-script-linker-support-detection.patch
@@ -0,0 +1,36 @@
+From dec783dce5a7131e232a06e63a544645b5463dd8 Mon Sep 17 00:00:00 2001
+From: Guillem Jover
+Date: Sun, 12 Feb 2023 23:55:09 +0100
+Subject: [PATCH] build: Fix version script linker support detection
+
+When the linker uses --no-undefined-version either specified by the user
+or as the default behavior (such as with newer clang >= 16 releases),
+a missing symbol definition will cause a linker error if that symbol is
+listed in the version script.
+
+Upstream commit: https://gitlab.freedesktop.org/libbsd/libbsd/-/commit/dec783dce5a7131e232a06e63a544645b5463dd8
+
+---
+ configure.ac | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 17d113c..7d17a93 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,7 +33,11 @@ AC_CACHE_CHECK([if ld supports --version-script flag],
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+ AC_LINK_IFELSE([
+- AC_LANG_PROGRAM([], [])
++ AC_LANG_PROGRAM([[
++extern int symbol(void);
++int symbol(void) { return 0; }
++]], [[
++]])
+ ], [
+ libbsd_cv_version_script=yes
+ ], [
+--
+2.39.1.615.ga0422de7ea.dirty
+
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.3.ebuild
deleted file mode 100644
index 1551e7d7f7..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.3.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-minimal
-
-DESCRIPTION="Library to provide useful functions commonly found on BSD systems"
-HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd"
-SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
-
-LICENSE="BSD BSD-2 BSD-4 ISC"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="static-libs"
-
-RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}
- >=sys-kernel/linux-headers-3.17
-"
-
-pkg_setup() {
- local f="${EROOT}/usr/$(get_libdir)/${PN}.a"
- if ! has_version ${CATEGORY}/${PN}; then
- if [[ -e ${f} ]]; then
- eerror "${m}"
- die "You need to remove ${f} by hand or re-emerge sys-libs/glibc first."
- fi
- fi
-}
-
-multilib_src_configure() {
- # The build system will install libbsd-ctor.a despite of USE="-static-libs"
- # which is correct, see:
- # https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8
- ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
- find "${ED}" -type f -name "*.la" -delete || die
-}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7-r2.ebuild
new file mode 100644
index 0000000000..cc3316c69e
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/guillemjover.asc
+inherit autotools multilib multilib-minimal verify-sig
+
+DESCRIPTION="Library to provide useful functions commonly found on BSD systems"
+HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd"
+SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc )"
+
+LICENSE="BSD BSD-2 BSD-4 ISC"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ >=sys-kernel/linux-headers-3.17
+"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-guillemjover )"
+
+PATCHES=(
+ "${FILESDIR}/libbsd-build-Fix-version-script-linker-support-detection.patch"
+ "${FILESDIR}/libbsd-0.11.7-musl-lfs.patch"
+)
+
+src_prepare() {
+ default
+
+ # Drop on next release, only needed for lld patch
+ eautoreconf
+}
+
+multilib_src_configure() {
+ # The build system will install libbsd-ctor.a despite USE="-static-libs"
+ # which is correct, see:
+ # https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8
+ ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ find "${ED}" -type f -name "*.la" -delete || die
+
+ # ld scripts on standalone prefix (RAP) systems should have the prefix
+ # stripped from any paths, as the sysroot is automatically prepended.
+ local ldscript=${ED}/usr/$(get_libdir)/${PN}$(get_libname)
+ if use prefix && ! use prefix-guest && grep -qIF "ld script" "${ldscript}" 2>/dev/null; then
+ sed -i "s|${EPREFIX}/|/|g" "${ldscript}" || die
+ fi
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.5.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7.ebuild
similarity index 64%
rename from sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.5.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7.ebuild
index 55d75e728b..f01b8521ce 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.5.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/libbsd-0.11.7.ebuild
@@ -3,24 +3,27 @@
EAPI=8
-inherit multilib-minimal
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/guillemjover.asc
+inherit multilib-minimal verify-sig
DESCRIPTION="Library to provide useful functions commonly found on BSD systems"
HOMEPAGE="https://libbsd.freedesktop.org/wiki/ https://gitlab.freedesktop.org/libbsd/libbsd"
SRC_URI="https://${PN}.freedesktop.org/releases/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( https://${PN}.freedesktop.org/releases/${P}.tar.xz.asc )"
LICENSE="BSD BSD-2 BSD-4 ISC"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="static-libs"
RDEPEND="app-crypt/libmd[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}
>=sys-kernel/linux-headers-3.17
"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-guillemjover )"
multilib_src_configure() {
- # The build system will install libbsd-ctor.a despite of USE="-static-libs"
+ # The build system will install libbsd-ctor.a despite USE="-static-libs"
# which is correct, see:
# https://gitlab.freedesktop.org/libbsd/libbsd/commit/c5b959028734ca2281250c85773d9b5e1d259bc8
ECONF_SOURCE="${S}" econf $(use_enable static-libs static)
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/metadata.xml
index 822dbca255..f7d2c3e6ba 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libbsd/metadata.xml
@@ -1,11 +1,16 @@
+
+ base-system@gentoo.org
+ Gentoo Base System
+
freedesktop-bugs@gentoo.org
Gentoo Freedesktop Project
cpe:/a:libbsd:libbsd
+ libbsd/libbsd
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/Manifest
index 5a23e33ec5..b32b0bd853 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/Manifest
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/Manifest
@@ -1,3 +1,6 @@
-DIST libgcrypt-1.8.7.tar.bz2 2985660 BLAKE2B cb2132b826f3f3af240e6c9ac5fd992808aa17ce64144d17452591a5b1e402564af82c021b58f5fd620ebeb5894ac9654835f6d8376ec05ee41fc02189dd6825 SHA512 6309d17624d8029848990d225d5924886c951cef691266c8e010fbbb7f678972cee70cbb91d370ad0bcdc8c8761402a090c2c853c9427ec79293624a59da5060
-DIST libgcrypt-1.8.8.tar.bz2 2987685 BLAKE2B 7b590c06d91403f1bbfa108379b3747271e9c83acc5547a4d43ef9ada9b0b7c78654cdc24f6cd0db012d50628ae4ec9320dcb63a901ec2dadde6a7ed56dbed7e SHA512 9861f3b5da3cb013eb79efbf2859864f8c2c11b41484b051c981c45cc0bf1569202838226da10ebddeb7a7b7f39ebd3a95f107b9bf6f908074ccc9a51ea94db8
+DIST libgcrypt-1.10.1.tar.bz2 3778457 BLAKE2B 46f30459891183b6d9ec18f1c7907fee0ad156c7dd75044f3db2b4d1c19dc6f30b2dfa6f85bc82adc9243aaba913e40fb6faf77d2226ca5a33897220d032437a SHA512 e5ca7966624fff16c3013795836a2c4377f0193dbb4ac5ad2b79654b1fa8992e17d83816569a402212dc8367a7980d4141f5d6ac282bae6b9f02186365b61f13
+DIST libgcrypt-1.10.1.tar.bz2.sig 119 BLAKE2B 5261d7dbfd5d82b2d3fa2ebf864a9ef0c7c978dd66a71c078df7bbb3b63f5d85180e5f909f43a49712fc16c45f7aabaa6bc30ed82a39ffc9a5d483ea6a94d162 SHA512 b156ae05079776698bc95ba5a9e48e95de8f716aa1760ef4b2e7cb8518ccec660337fc7823f865bde870461800d472fd8e458d03a7095b6bb614f6dd96f796d8
+DIST libgcrypt-1.10.2.tar.bz2 3795164 BLAKE2B c86b29648664aae3fb694b20ad258828d2cecbb09db2b83df00fbdebd5d74228c92015c50f659c250cb0768ccaef7949294d9b7cdcd47e1387b7dce81d35da19 SHA512 3a850baddfe8ffe8b3e96dc54af3fbb9e1dab204db1f06b9b90b8fbbfb7fb7276260cd1e61ba4dde5a662a2385385007478834e62e95f785d2e3d32652adb29e
+DIST libgcrypt-1.10.2.tar.bz2.sig 119 BLAKE2B 3753134a1ed1fd2bfd2c64f175c3745db02791359646b3f0229c80ce4ccedbb147ee889a6b8c4fe4bf7e9067d804ee18a8411cd347026cd1656ad1d4d5686bec SHA512 9350444a0bcfa49217815a831f2286ccea470311673257bd809eb5dedbe97d2a5543b0bc7fb752312df69adeb7ac5f064e433f2545a8bf3e494027986cd8020c
DIST libgcrypt-1.9.4.tar.bz2 3239704 BLAKE2B b8244bc12a68955797b0c2b474ac5c95df1014231f7180a2ffa113e3aacedc98eed60ee1e4b30b032a5fcd6a04855ae07142c223906d5db9c28328a71e014f33 SHA512 d0e117ac73c94d70e9521ee1e6328691498cc8328f8c4e21338096908f5c04c7b838966eb63d59494565f4e19f506c07dab4f4d922150d75610d9f7b57abbf60
+DIST libgcrypt-1.9.4.tar.bz2.sig 119 BLAKE2B 4012c22259a9fd56f9da6c87d60077cea0dbfef85d4d4ad1ff6a2375ddefafc4cd03ee9083d18e080c14c95887b495062af886732a9593bcf1b8f187d21073fe SHA512 4aee16449b4b50dac62bd80217e769f32f43fb7cd994402b7d9cffbb1934b2771041c8c0c41a63ced9c8d9408025f9c5608ffc7f00e5e9a9b92a07cb5118a98a
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10-build-Allow-build-with-Oz.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10-build-Allow-build-with-Oz.patch
new file mode 100644
index 0000000000..c54499e15d
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10-build-Allow-build-with-Oz.patch
@@ -0,0 +1,50 @@
+https://bugs.gentoo.org/902765
+https://dev.gnupg.org/T6432
+https://dev.gnupg.org/rC7edf1abb9a0d892a80cbf7ab42f64b2720671ee9
+
+From 7edf1abb9a0d892a80cbf7ab42f64b2720671ee9 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka
+Date: Mon, 3 Apr 2023 14:00:15 +0900
+Subject: [PATCH] build: Allow build with -Oz.
+
+* cipher/Makefile.am [ENABLE_O_FLAG_MUNGING]: Support -Oz.
+* random/Makefile.am [ENABLE_O_FLAG_MUNGING]: Support -Oz.
+
+--
+
+GnuPG-bug-id: 6432
+Signed-off-by: NIIBE Yutaka
+---
+ cipher/Makefile.am | 2 +-
+ random/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cipher/Makefile.am b/cipher/Makefile.am
+index cf1fbe85..e67b1ee2 100644
+--- a/cipher/Makefile.am
++++ b/cipher/Makefile.am
+@@ -165,7 +165,7 @@ gost-s-box$(EXEEXT_FOR_BUILD): gost-s-box.c
+
+
+ if ENABLE_O_FLAG_MUNGING
+-o_flag_munging = sed -e 's/-O\([2-9sg][2-9sg]*\)/-O1/' -e 's/-Ofast/-O1/g'
++o_flag_munging = sed -e 's/-O\([2-9sgz][2-9sgz]*\)/-O1/' -e 's/-Ofast/-O1/g'
+ else
+ o_flag_munging = cat
+ endif
+diff --git a/random/Makefile.am b/random/Makefile.am
+index af978570..0c935a05 100644
+--- a/random/Makefile.am
++++ b/random/Makefile.am
+@@ -56,7 +56,7 @@ jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h
+
+ # The rndjent module needs to be compiled without optimization. */
+ if ENABLE_O_FLAG_MUNGING
+-o_flag_munging = sed -e 's/-O\([1-9sg][1-9sg]*\)/-O0/g' -e 's/-Ofast/-O0/g'
++o_flag_munging = sed -e 's/-O\([1-9sgz][1-9sgz]*\)/-O0/g' -e 's/-Ofast/-O0/g'
+ else
+ o_flag_munging = cat
+ endif
+--
+2.40.0
+
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10.1-configure-clang16.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10.1-configure-clang16.patch
new file mode 100644
index 0000000000..fa80c999a3
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10.1-configure-clang16.patch
@@ -0,0 +1,134 @@
+https://lists.gnupg.org/pipermail/gcrypt-devel/2022-December/005410.html
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1211,7 +1211,8 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for ARM assembly implementat
+ /* Test if '.type' and '.size' are supported. */
+ ".size asmfunc,.-asmfunc;\n\t"
+ ".type asmfunc,%function;\n\t"
+- );]], [ asmfunc(); ] )],
++ );
++ void asmfunc(void);]], [ asmfunc(); ] )],
+ [gcry_cv_gcc_arm_platform_as_ok=yes])
+ fi])
+ if test "$gcry_cv_gcc_arm_platform_as_ok" = "yes" ; then
+@@ -1238,7 +1239,8 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for ARMv8/Aarch64 assembly i
+ "eor x0, x0, x30, ror #12;\n\t"
+ "add x0, x0, x30, asr #12;\n\t"
+ "eor v0.16b, v0.16b, v31.16b;\n\t"
+- );]], [ asmfunc(); ] )],
++ );
++ void asmfunc(void);]], [ asmfunc(); ] )],
+ [gcry_cv_gcc_aarch64_platform_as_ok=yes])
+ fi])
+ if test "$gcry_cv_gcc_aarch64_platform_as_ok" = "yes" ; then
+@@ -1267,7 +1269,8 @@ AC_CACHE_CHECK([whether GCC assembler supports for CFI directives],
+ ".cfi_restore_state\n\t"
+ ".long 0\n\t"
+ ".cfi_endproc\n\t"
+- );]])],
++ );
++ void asmfunc(void)]])],
+ [gcry_cv_gcc_asm_cfi_directives=yes])])
+ if test "$gcry_cv_gcc_asm_cfi_directives" = "yes" ; then
+ AC_DEFINE(HAVE_GCC_ASM_CFI_DIRECTIVES,1,
+@@ -1666,7 +1669,8 @@ if test $amd64_as_feature_detection = yes; then
+ [gcry_cv_gcc_as_const_division_ok],
+ [gcry_cv_gcc_as_const_division_ok=no
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+- [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), %ebp;\n\t");]],
++ [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), %ebp;\n\t");
++ void fn(void);]],
+ [fn();])],
+ [gcry_cv_gcc_as_const_division_ok=yes])])
+ if test "$gcry_cv_gcc_as_const_division_ok" = "no" ; then
+@@ -1679,7 +1683,8 @@ if test $amd64_as_feature_detection = yes; then
+ [gcry_cv_gcc_as_const_division_with_wadivide_ok],
+ [gcry_cv_gcc_as_const_division_with_wadivide_ok=no
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+- [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), %ebp;\n\t");]],
++ [[__asm__(".text\n\tfn:\n\t xorl \$(123456789/12345678), %ebp;\n\t");
++ void fn(void);]],
+ [fn();])],
+ [gcry_cv_gcc_as_const_division_with_wadivide_ok=yes])])
+ if test "$gcry_cv_gcc_as_const_division_with_wadivide_ok" = "no" ; then
+@@ -1715,7 +1720,8 @@ if test $amd64_as_feature_detection = yes; then
+ * and "-Wa,--divide" workaround failed, this causes assembly
+ * to be disable on this machine. */
+ "xorl \$(123456789/12345678), %ebp;\n\t"
+- );]], [ asmfunc(); ])],
++ );
++ void asmfunc(void);]], [ asmfunc(); ])],
+ [gcry_cv_gcc_amd64_platform_as_ok=yes])
+ fi])
+ if test "$gcry_cv_gcc_amd64_platform_as_ok" = "yes" ; then
+@@ -1734,7 +1740,8 @@ if test $amd64_as_feature_detection = yes; then
+ ".globl asmfunc\n\t"
+ "asmfunc:\n\t"
+ "xorq \$(1234), %rbp;\n\t"
+- );]], [ asmfunc(); ])],
++ );
++ void asmfunc(void);]], [ asmfunc(); ])],
+ [gcry_cv_gcc_win64_platform_as_ok=yes])])
+ if test "$gcry_cv_gcc_win64_platform_as_ok" = "yes" ; then
+ AC_DEFINE(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS,1,
+@@ -1767,7 +1774,8 @@ AC_CACHE_CHECK([whether GCC assembler is compatible for Intel syntax assembly im
+ "sub eax, [esp + 4];\n\t"
+ "add dword ptr [esp + eax], 0b10101;\n\t"
+ ".att_syntax prefix\n\t"
+- );]], [ actest(); ])],
++ );
++ void actest(void);]], [ actest(); ])],
+ [gcry_cv_gcc_platform_as_ok_for_intel_syntax=yes])
+ fi])
+ if test "$gcry_cv_gcc_platform_as_ok_for_intel_syntax" = "yes" ; then
+@@ -1832,6 +1840,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports NEON instructions],
+ "vadd.u64 %q0, %q1;\n\t"
+ "vadd.s64 %d3, %d2, %d3;\n\t"
+ );
++ void testfn(void);
+ ]], [ testfn(); ])],
+ [gcry_cv_gcc_inline_asm_neon=yes])
+ fi])
+@@ -1879,6 +1888,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch32 Crypto Extension i
+
+ "vmull.p64 q0, d0, d0;\n\t"
+ );
++ void testfn(void);
+ ]], [ testfn(); ])],
+ [gcry_cv_gcc_inline_asm_aarch32_crypto=yes])
+ fi])
+@@ -1907,6 +1917,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch64 NEON instructions]
+ "dup v0.8b, w0;\n\t"
+ "ld4 {v0.8b,v1.8b,v2.8b,v3.8b},[x0],\#32;\n\t"
+ );
++ void testfn(void);
+ ]], [ testfn(); ])],
+ [gcry_cv_gcc_inline_asm_aarch64_neon=yes])
+ fi])
+@@ -1955,6 +1966,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports AArch64 Crypto Extension i
+ "pmull v0.1q, v0.1d, v31.1d;\n\t"
+ "pmull2 v0.1q, v0.2d, v31.2d;\n\t"
+ );
++ void testfn(void);
+ ]], [ testfn(); ])],
+ [gcry_cv_gcc_inline_asm_aarch64_crypto=yes])
+ fi])
+@@ -2050,6 +2062,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports PowerPC AltiVec/VSX/crypto
+ "vshasigmad %v0, %v1, 0, 15;\n"
+ "vpmsumd %v11, %v11, %v11;\n"
+ );
++ void testfn(void);
+ ]], [ testfn(); ] )],
+ [gcry_cv_gcc_inline_asm_ppc_altivec=yes])
+ fi])
+@@ -2075,6 +2088,7 @@ AC_CACHE_CHECK([whether GCC inline assembler supports PowerISA 3.00 instructions
+ "testfn:\n"
+ "stxvb16x %r1,%v12,%v30;\n"
+ );
++ void testfn(void);
+ ]], [ testfn(); ])],
+ [gcry_cv_gcc_inline_asm_ppc_arch_3_00=yes])
+ fi])
+
+
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10.1-fix-no-asm-hppa.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10.1-fix-no-asm-hppa.patch
new file mode 100644
index 0000000000..e665749db3
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10.1-fix-no-asm-hppa.patch
@@ -0,0 +1,35 @@
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=c0692324fe8b3806eefc5017767917dca9cd94d0
+https://dev.gnupg.org/T5976
+https://bugs.gentoo.org/832871
+
+From c0692324fe8b3806eefc5017767917dca9cd94d0 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka
+Date: Tue, 17 May 2022 10:44:55 +0900
+Subject: [PATCH] mpi: Allow building with --disable-asm for HPPA.
+
+* mpi/longlong.h [__hppa] (udiv_qrnnd): Only define
+when assembler is enabled.
+
+--
+
+GnuPG-bug-id: 5976
+Signed-off-by: NIIBE Yutaka
+--- a/mpi/longlong.h
++++ b/mpi/longlong.h
+@@ -430,14 +430,14 @@ extern UDItype __udiv_qrnnd ();
+ # define UMUL_TIME 40
+ # define UDIV_TIME 80
+ # endif
+-# ifndef LONGLONG_STANDALONE
++# if !defined(LONGLONG_STANDALONE) && !defined(ASM_DISABLED)
+ # define udiv_qrnnd(q, r, n1, n0, d) \
+ do { USItype __r; \
+ (q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \
+ (r) = __r; \
+ } while (0)
+ extern USItype __udiv_qrnnd ();
+-# endif /* !LONGLONG_STANDALONE */
++# endif /* !LONGLONG_STANDALONE && !ASM_DISABLED */
+ # define count_leading_zeros(count, x) \
+ do { \
+ USItype __tmp; \
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10.2-darwin.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10.2-darwin.patch
new file mode 100644
index 0000000000..6153f1840b
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.10.2-darwin.patch
@@ -0,0 +1,20 @@
+https://dev.gnupg.org/T6442
+
+Patch as suggested by Werned in https://dev.gnupg.org/T6442#169396
+
+--- a/random/rndgetentropy.c
++++ b/random/rndgetentropy.c
+@@ -94,8 +94,13 @@
+ * and might not be applicable on other FIPS modules not running
+ * RHEL kernel.
+ */
++#ifdef GRND_RANDOM
+ nbytes = length < 32 ? length : 32;
+ ret = getrandom (buffer, nbytes, GRND_RANDOM);
++#else
++ ret = -1;
++ gpg_err_set_errno (ENOSYS);
++#endif
+ }
+ else
+ {
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch
deleted file mode 100644
index 22bfac3104..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.6.1-uscore.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-The version taken from GnuPG 1.4 assumes any cross-compiled package have
-prefixed underscores, which is not the case; by using libtool's own macro,
-we can avoid the whole issue.
-
---- libgcrypt-1.6.1/configure.ac
-+++ libgcrypt-1.6.1/configure.ac
-@@ -1022,7 +1022,7 @@
- # Check whether underscores in symbols are required. This needs to be
- # done before setting up the assembler stuff.
- #
--GNUPG_SYS_SYMBOL_UNDERSCORE()
-+LT_SYS_SYMBOL_USCORE
-
-
- #################################
---- libgcrypt-1.6.1/mpi/config.links
-+++ libgcrypt-1.6.1/mpi/config.links
-@@ -362,7 +362,7 @@
-
- # Make sysdep.h
- echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
--if test x$ac_cv_sys_symbol_underscore = xyes; then
-+if test x$sys_symbol_underscore = xyes; then
- cat <>./mpi/sysdep.h
- #if __STDC__
- #define C_SYMBOL_NAME(name) _##name
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.9.4-arm-neon-compile-fix.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.9.4-arm-neon-compile-fix.patch
new file mode 100644
index 0000000000..a42b0e8900
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.9.4-arm-neon-compile-fix.patch
@@ -0,0 +1,44 @@
+https://lists.gnupg.org/pipermail/gcrypt-devel/2022-January/005224.html
+
+From bc0b82ad8201a4d7bffa3cf0f5504b72c1011cb1 Mon Sep 17 00:00:00 2001
+From: Sam James
+Date: Tue, 18 Jan 2022 12:44:22 +0000
+Subject: [PATCH] cipher/cipher-gcm: fix build failure on ARM NEON
+
+'features' is only defined when relevant CPU features are found, but
+one of the uses below its definition checked for GCM_USE_ARM_NEON which
+wasn't in the guard above it.
+
+i.e. We used to only define 'features' when:
+- GCM_USE_INTEL_PCLMUL
+- GCM_USE_ARM_PMULL
+- GCM_USE_S390X_CRYPTO
+- GCM_USE_PPC_VPMSUM
+- GCM_USE_S390X_CRYPTO
+- GCM_USE_PPC_VPMSUM
+is set.
+
+We were missing GCM_USE_ARM_NEON so when we check for GCM_USE_ARM_NEON
+below, it'd fail as features wasn't defined.
+
+Bug: https://bugs.gentoo.org/831397
+---
+ cipher/cipher-gcm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/cipher/cipher-gcm.c b/cipher/cipher-gcm.c
+index a039c5e9..22834f35 100644
+--- a/cipher/cipher-gcm.c
++++ b/cipher/cipher-gcm.c
+@@ -583,7 +583,8 @@ static void
+ setupM (gcry_cipher_hd_t c)
+ {
+ #if defined(GCM_USE_INTEL_PCLMUL) || defined(GCM_USE_ARM_PMULL) || \
+- defined(GCM_USE_S390X_CRYPTO) || defined(GCM_USE_PPC_VPMSUM)
++ defined(GCM_USE_ARM_NEON) || defined(GCM_USE_S390X_CRYPTO) || \
++ defined(GCM_USE_PPC_VPMSUM)
+ unsigned int features = _gcry_get_hw_features ();
+ #endif
+
+--
+2.34.1
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.9.4-no-fgrep-libgcrypt-config.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.9.4-no-fgrep-libgcrypt-config.patch
new file mode 100644
index 0000000000..738eac1631
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-1.9.4-no-fgrep-libgcrypt-config.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/868384
+--- a/src/libgcrypt-config.in
++++ b/src/libgcrypt-config.in
+@@ -154,7 +154,7 @@ if test "$echo_cflags" = "yes"; then
+
+ tmp=""
+ for i in $includes $cflags_final; do
+- if echo "$tmp" | fgrep -v -- "$i" >/dev/null; then
++ if echo "$tmp" | grep -F -v -- "$i" >/dev/null; then
+ tmp="$tmp $i"
+ fi
+ done
+@@ -178,7 +178,7 @@ if test "$echo_libs" = "yes"; then
+
+ tmp=""
+ for i in $libdirs $libs_final; do
+- if echo "$tmp" | fgrep -v -- "$i" >/dev/null; then
++ if echo "$tmp" | grep -F -v -- "$i" >/dev/null; then
+ tmp="$tmp $i"
+ fi
+ done
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-powerpc-darwin.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-powerpc-darwin.patch
new file mode 100644
index 0000000000..f1c7cf9e95
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/files/libgcrypt-powerpc-darwin.patch
@@ -0,0 +1,16 @@
+Drop guard for CPU detection, configure won't get this wrong, and this
+check fails on some PPC platforms where these guards aren't set (due to
+different kernel/libc).
+
+--- a/src/hwf-ppc.c
++++ b/src/hwf-ppc.c
+@@ -33,9 +33,6 @@
+ #include "g10lib.h"
+ #include "hwf-common.h"
+
+-#if !defined (__powerpc__) && !defined (__powerpc64__)
+-# error Module build for wrong CPU.
+-#endif
+
+
+ #if defined(HAVE_SYS_AUXV_H) && defined(HAVE_ELF_AUX_INFO) && \
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild
new file mode 100644
index 0000000000..fdaaf606e1
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.1-r2.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
+inherit autotools flag-o-matic linux-info multilib-minimal toolchain-funcs verify-sig
+
+DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
+HOMEPAGE="https://www.gnupg.org/"
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0/20" # subslot = soname major version
+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="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc +getentropy static-libs"
+
+# Build system only has --disable-arm-crypto-support right now
+# If changing this, update src_configure logic too.
+# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions,
+# but this looks like it might change in future. This is just a safety check
+# in case people somehow do have a CPU which only supports some. They must
+# for now disable them all if that's the case.
+REQUIRED_USE="
+ cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 )
+ cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 )
+ cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )
+ cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 )
+ cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec )
+"
+
+RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]
+ getentropy? (
+ kernel_linux? (
+ elibc_glibc? ( >=sys-libs/glibc-2.25 )
+ elibc_musl? ( >=sys-libs/musl-1.1.20 )
+ )
+ )"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( virtual/texi2dvi )
+ verify-sig? ( sec-keys/openpgp-keys-gnupg )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-multilib-syspath.patch
+ "${FILESDIR}"/${PN}-powerpc-darwin.patch
+ "${FILESDIR}"/${PN}-1.10.1-fix-no-asm-hppa.patch
+ "${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/libgcrypt-config
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} == buildonly ]]; then
+ return
+ fi
+ if use kernel_linux && use getentropy; then
+ unset KV_FULL
+ get_running_version
+ if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then
+ eerror "The getentropy function requires the getrandom syscall."
+ eerror "This was introduced in Linux 3.17."
+ eerror "Your system is currently running Linux ${KV_FULL}."
+ eerror "Disable the 'getentropy' USE flag or upgrade your kernel."
+ die "Kernel is too old for getentropy"
+ fi
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ if [[ ${CHOST} == *86*-solaris* ]] ; then
+ # ASM code uses GNU ELF syntax, divide in particular, we need to
+ # allow this via ASFLAGS, since we don't have a flag-o-matic
+ # function for that, we'll have to abuse cflags for this
+ append-cflags -Wa,--divide
+ fi
+
+ if [[ ${CHOST} == powerpc* ]] ; then
+ # ./configure does a lot of automagic, prevent that
+ # generic ppc32+ppc64 altivec
+ use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no
+ use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no
+ # power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support
+ use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no
+ # power9 vector extension, aka arch 3.00 ISA
+ use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no
+ fi
+
+ # Workaround for GCC < 11.3 bug
+ # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29
+ # https://dev.gnupg.org/T5581
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124
+ if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
+ append-flags -fno-tree-loop-vectorize
+ fi
+
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
+ local myeconfargs=(
+ CC_FOR_BUILD="$(tc-getBUILD_CC)"
+
+ --enable-noexecstack
+ $(use_enable cpu_flags_arm_neon neon-support)
+ # See REQUIRED_USE comment above
+ $(use_enable cpu_flags_arm_aes arm-crypto-support)
+ $(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support)
+ $(use_enable cpu_flags_x86_aes aesni-support)
+ $(use_enable cpu_flags_x86_avx avx-support)
+ $(use_enable cpu_flags_x86_avx2 avx2-support)
+ $(use_enable cpu_flags_x86_padlock padlock-support)
+ $(use_enable cpu_flags_x86_sha shaext-support)
+ $(use_enable cpu_flags_x86_sse4_1 sse41-support)
+ # required for sys-power/suspend[crypt], bug 751568
+ $(use_enable static-libs static)
+
+ # disabled due to various applications requiring privileges
+ # after libgcrypt drops them (bug #468616)
+ --without-capabilities
+
+ # http://trac.videolan.org/vlc/ticket/620
+ $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
+ # causes bus-errors on sparc64-solaris
+ $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
+
+ $(use asm || echo "--disable-asm")
+
+ GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
+ )
+
+ if use kernel_linux; then
+ # --enable-random=getentropy requires getentropy/getrandom.
+ # --enable-random=linux enables legacy code that tries getrandom
+ # and falls back to reading /dev/random.
+ myeconfargs+=( --enable-random=$(usex getentropy getentropy linux) )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
+ $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
+}
+
+multilib_src_install_all() {
+ default
+ find "${ED}" -type f -name '*.la' -delete || die
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.1-r3.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.1-r3.ebuild
new file mode 100644
index 0000000000..617627a993
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.1-r3.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
+inherit autotools flag-o-matic linux-info multilib-minimal toolchain-funcs verify-sig
+
+DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
+HOMEPAGE="https://www.gnupg.org/"
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0/20" # subslot = soname major version
+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="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc +getentropy static-libs"
+
+# Build system only has --disable-arm-crypto-support right now
+# If changing this, update src_configure logic too.
+# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions,
+# but this looks like it might change in future. This is just a safety check
+# in case people somehow do have a CPU which only supports some. They must
+# for now disable them all if that's the case.
+REQUIRED_USE="
+ cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 )
+ cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 )
+ cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )
+ cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 )
+ cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec )
+"
+
+RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]
+ getentropy? (
+ kernel_linux? (
+ elibc_glibc? ( >=sys-libs/glibc-2.25 )
+ elibc_musl? ( >=sys-libs/musl-1.1.20 )
+ )
+ )"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( virtual/texi2dvi )
+ verify-sig? ( sec-keys/openpgp-keys-gnupg )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-multilib-syspath.patch
+ "${FILESDIR}"/${PN}-powerpc-darwin.patch
+ "${FILESDIR}"/${PN}-1.10.1-fix-no-asm-hppa.patch
+ "${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
+ "${FILESDIR}"/${PN}-1.10.1-configure-clang16.patch
+ "${FILESDIR}"/libgcrypt-1.10-build-Allow-build-with-Oz.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/libgcrypt-config
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} == buildonly ]]; then
+ return
+ fi
+ if use kernel_linux && use getentropy; then
+ unset KV_FULL
+ get_running_version
+ if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then
+ eerror "The getentropy function requires the getrandom syscall."
+ eerror "This was introduced in Linux 3.17."
+ eerror "Your system is currently running Linux ${KV_FULL}."
+ eerror "Disable the 'getentropy' USE flag or upgrade your kernel."
+ die "Kernel is too old for getentropy"
+ fi
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ if [[ ${CHOST} == *86*-solaris* ]] ; then
+ # ASM code uses GNU ELF syntax, divide in particular, we need to
+ # allow this via ASFLAGS, since we don't have a flag-o-matic
+ # function for that, we'll have to abuse cflags for this
+ append-cflags -Wa,--divide
+ fi
+
+ if [[ ${CHOST} == powerpc* ]] ; then
+ # ./configure does a lot of automagic, prevent that
+ # generic ppc32+ppc64 altivec
+ use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no
+ use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no
+ # power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support
+ use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no
+ # power9 vector extension, aka arch 3.00 ISA
+ use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no
+ fi
+
+ # Workaround for GCC < 11.3 bug
+ # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29
+ # https://dev.gnupg.org/T5581
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124
+ if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) &&
+ (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
+ append-flags -fno-tree-loop-vectorize
+ fi
+
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
+ local myeconfargs=(
+ CC_FOR_BUILD="$(tc-getBUILD_CC)"
+
+ --enable-noexecstack
+ $(use_enable cpu_flags_arm_neon neon-support)
+ # See REQUIRED_USE comment above
+ $(use_enable cpu_flags_arm_aes arm-crypto-support)
+ $(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support)
+ $(use_enable cpu_flags_x86_aes aesni-support)
+ $(use_enable cpu_flags_x86_avx avx-support)
+ $(use_enable cpu_flags_x86_avx2 avx2-support)
+ $(use_enable cpu_flags_x86_padlock padlock-support)
+ $(use_enable cpu_flags_x86_sha shaext-support)
+ $(use_enable cpu_flags_x86_sse4_1 sse41-support)
+ # required for sys-power/suspend[crypt], bug 751568
+ $(use_enable static-libs static)
+
+ # disabled due to various applications requiring privileges
+ # after libgcrypt drops them (bug #468616)
+ --without-capabilities
+
+ # http://trac.videolan.org/vlc/ticket/620
+ $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
+ # causes bus-errors on sparc64-solaris
+ $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
+
+ $(use asm || echo "--disable-asm")
+
+ GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
+ )
+
+ if use kernel_linux; then
+ # --enable-random=getentropy requires getentropy/getrandom.
+ # --enable-random=linux enables legacy code that tries getrandom
+ # and falls back to reading /dev/random.
+ myeconfargs+=( --enable-random=$(usex getentropy getentropy linux) )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
+ $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
+}
+
+multilib_src_install_all() {
+ default
+ find "${ED}" -type f -name '*.la' -delete || die
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild
new file mode 100644
index 0000000000..fa948f3360
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.10.2.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
+inherit autotools flag-o-matic linux-info multilib-minimal toolchain-funcs verify-sig
+
+DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
+HOMEPAGE="https://www.gnupg.org/"
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0/20" # subslot = soname major version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc +getentropy static-libs"
+
+# Build system only has --disable-arm-crypto-support right now
+# If changing this, update src_configure logic too.
+# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions,
+# but this looks like it might change in future. This is just a safety check
+# in case people somehow do have a CPU which only supports some. They must
+# for now disable them all if that's the case.
+REQUIRED_USE="
+ cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 )
+ cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 )
+ cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )
+ cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 )
+ cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec )
+"
+
+RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]
+ getentropy? (
+ kernel_linux? (
+ elibc_glibc? ( >=sys-libs/glibc-2.25 )
+ elibc_musl? ( >=sys-libs/musl-1.1.20 )
+ )
+ )"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( virtual/texi2dvi )
+ verify-sig? ( sec-keys/openpgp-keys-gnupg )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-multilib-syspath.patch
+ "${FILESDIR}"/${PN}-powerpc-darwin.patch
+ "${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
+ "${FILESDIR}"/${P}-darwin.patch # upstream T6442
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/libgcrypt-config
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} == buildonly ]]; then
+ return
+ fi
+ if use kernel_linux && use getentropy; then
+ unset KV_FULL
+ get_running_version
+ if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then
+ eerror "The getentropy function requires the getrandom syscall."
+ eerror "This was introduced in Linux 3.17."
+ eerror "Your system is currently running Linux ${KV_FULL}."
+ eerror "Disable the 'getentropy' USE flag or upgrade your kernel."
+ die "Kernel is too old for getentropy"
+ fi
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ if [[ ${CHOST} == *86*-solaris* ]] ; then
+ # ASM code uses GNU ELF syntax, divide in particular, we need to
+ # allow this via ASFLAGS, since we don't have a flag-o-matic
+ # function for that, we'll have to abuse cflags for this
+ append-cflags -Wa,--divide
+ fi
+
+ if [[ ${CHOST} == powerpc* ]] ; then
+ # ./configure does a lot of automagic, prevent that
+ # generic ppc32+ppc64 altivec
+ use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no
+ use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no
+ # power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support
+ use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no
+ # power9 vector extension, aka arch 3.00 ISA
+ use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no
+ fi
+
+ # Workaround for GCC < 11.3 bug
+ # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29
+ # https://dev.gnupg.org/T5581
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124
+ if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) &&
+ (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
+ append-flags -fno-tree-loop-vectorize
+ fi
+
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
+ local myeconfargs=(
+ CC_FOR_BUILD="$(tc-getBUILD_CC)"
+
+ --enable-noexecstack
+ $(use_enable cpu_flags_arm_neon neon-support)
+ # See REQUIRED_USE comment above
+ $(use_enable cpu_flags_arm_aes arm-crypto-support)
+ $(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support)
+ $(use_enable cpu_flags_x86_aes aesni-support)
+ $(use_enable cpu_flags_x86_avx avx-support)
+ $(use_enable cpu_flags_x86_avx2 avx2-support)
+ $(use_enable cpu_flags_x86_padlock padlock-support)
+ $(use_enable cpu_flags_x86_sha shaext-support)
+ $(use_enable cpu_flags_x86_sse4_1 sse41-support)
+ # required for sys-power/suspend[crypt], bug 751568
+ $(use_enable static-libs static)
+
+ # disabled due to various applications requiring privileges
+ # after libgcrypt drops them (bug #468616)
+ --without-capabilities
+
+ # http://trac.videolan.org/vlc/ticket/620
+ $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
+ # causes bus-errors on sparc64-solaris
+ $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
+
+ $(use asm || echo "--disable-asm")
+
+ GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
+ )
+
+ if use kernel_linux; then
+ # --enable-random=getentropy requires getentropy/getrandom.
+ # --enable-random=linux enables legacy code that tries getrandom
+ # and falls back to reading /dev/random.
+ myeconfargs+=( --enable-random=$(usex getentropy getentropy linux) )
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
+ $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
+}
+
+multilib_src_install_all() {
+ default
+ find "${ED}" -type f -name '*.la' -delete || die
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild
deleted file mode 100644
index 104cd442af..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
-HOMEPAGE="https://www.gnupg.org/"
-SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1 MIT"
-SLOT="0/20" # subslot = soname major version
-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"
-IUSE="doc o-flag-munging static-libs"
-
-RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="doc? ( virtual/texi2dvi )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.6.1-uscore.patch
- "${FILESDIR}"/${PN}-multilib-syspath.patch
-)
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/libgcrypt-config
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-multilib_src_configure() {
- if [[ ${CHOST} == *86*-solaris* ]] ; then
- # ASM code uses GNU ELF syntax, divide in particular, we need to
- # allow this via ASFLAGS, since we don't have a flag-o-matic
- # function for that, we'll have to abuse cflags for this
- append-cflags -Wa,--divide
- fi
- local myeconfargs=(
- CC_FOR_BUILD="$(tc-getBUILD_CC)"
- --enable-noexecstack
- # required for sys-power/suspend[crypt], bug 751568
- $(use_enable static-libs static)
- $(use_enable o-flag-munging O-flag-munging)
-
- # disabled due to various applications requiring privileges
- # after libgcrypt drops them (bug #468616)
- --without-capabilities
-
- # http://trac.videolan.org/vlc/ticket/620
- # causes bus-errors on sparc64-solaris
- $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
- $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
-
- GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config"
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
- $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
-}
-
-multilib_src_compile() {
- default
- multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
- multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
-}
-
-multilib_src_install_all() {
- default
- find "${D}" -type f -name '*.la' -delete || die
-}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.8.8.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.8.8.ebuild
deleted file mode 100644
index 45f5a784c6..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.8.8.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
-HOMEPAGE="https://www.gnupg.org/"
-SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1 MIT"
-SLOT="0/20" # subslot = soname major version
-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"
-IUSE="doc o-flag-munging static-libs"
-
-RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="doc? ( virtual/texi2dvi )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.6.1-uscore.patch
- "${FILESDIR}"/${PN}-multilib-syspath.patch
-)
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/libgcrypt-config
-)
-
-src_prepare() {
- default
-
- eautoreconf
-}
-
-multilib_src_configure() {
- if [[ ${CHOST} == *86*-solaris* ]] ; then
- # ASM code uses GNU ELF syntax, divide in particular, we need to
- # allow this via ASFLAGS, since we don't have a flag-o-matic
- # function for that, we'll have to abuse cflags for this
- append-cflags -Wa,--divide
- fi
-
- local myeconfargs=(
- CC_FOR_BUILD="$(tc-getBUILD_CC)"
-
- --enable-noexecstack
- # disabled due to various applications requiring privileges
- # after libgcrypt drops them (bug #468616)
- --without-capabilities
-
- # required for sys-power/suspend[crypt], bug 751568
- $(use_enable static-libs static)
- $(use_enable o-flag-munging O-flag-munging)
-
- # http://trac.videolan.org/vlc/ticket/620
- # causes bus-errors on sparc64-solaris
- $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
- $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
-
- GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
- )
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
- $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
-}
-
-multilib_src_compile() {
- default
-
- multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
-
- multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
-}
-
-multilib_src_install_all() {
- default
-
- find "${ED}" -type f -name '*.la' -delete || die
-}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.9.4-r2.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.9.4-r2.ebuild
new file mode 100644
index 0000000000..cd55a6e154
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.9.4-r2.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs verify-sig
+
+DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
+HOMEPAGE="https://www.gnupg.org/"
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
+
+LICENSE="LGPL-2.1 MIT"
+SLOT="0/20" # subslot = soname major version
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc static-libs"
+
+# Build system only has --disable-arm-crypto-support right now
+# If changing this, update src_configure logic too.
+# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions,
+# but this looks like it might change in future. This is just a safety check
+# in case people somehow do have a CPU which only supports some. They must
+# for now disable them all if that's the case.
+REQUIRED_USE="
+ cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 )
+ cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 )
+ cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )
+ cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 )
+ cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec )
+"
+
+RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( virtual/texi2dvi )
+ verify-sig? ( sec-keys/openpgp-keys-gnupg )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-multilib-syspath.patch
+ "${FILESDIR}"/${PN}-powerpc-darwin.patch
+ "${FILESDIR}"/${PN}-1.9.4-arm-neon-compile-fix.patch
+ "${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/libgcrypt-config
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ if [[ ${CHOST} == *86*-solaris* ]] ; then
+ # ASM code uses GNU ELF syntax, divide in particular, we need to
+ # allow this via ASFLAGS, since we don't have a flag-o-matic
+ # function for that, we'll have to abuse cflags for this
+ append-cflags -Wa,--divide
+ fi
+
+ if [[ ${CHOST} == powerpc* ]] ; then
+ # ./configure does a lot of automagic, prevent that
+ # generic ppc32+ppc64 altivec
+ use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no
+ use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no
+ # power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support
+ use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no
+ # power9 vector extension, aka arch 3.00 ISA
+ use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no
+ fi
+
+ # Workaround for GCC < 11.3 bug
+ # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29
+ # https://dev.gnupg.org/T5581
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124
+ if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then
+ append-flags -fno-tree-loop-vectorize
+ fi
+
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
+ local myeconfargs=(
+ CC_FOR_BUILD="$(tc-getBUILD_CC)"
+
+ --enable-noexecstack
+ $(use_enable cpu_flags_arm_neon neon-support)
+ # See REQUIRED_USE comment above
+ $(use_enable cpu_flags_arm_aes arm-crypto-support)
+ $(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support)
+ $(use_enable cpu_flags_x86_aes aesni-support)
+ $(use_enable cpu_flags_x86_avx avx-support)
+ $(use_enable cpu_flags_x86_avx2 avx2-support)
+ $(use_enable cpu_flags_x86_padlock padlock-support)
+ $(use_enable cpu_flags_x86_sha shaext-support)
+ $(use_enable cpu_flags_x86_sse4_1 sse41-support)
+ # required for sys-power/suspend[crypt], bug 751568
+ $(use_enable static-libs static)
+
+ # disabled due to various applications requiring privileges
+ # after libgcrypt drops them (bug #468616)
+ --without-capabilities
+
+ # http://trac.videolan.org/vlc/ticket/620
+ $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
+ # causes bus-errors on sparc64-solaris
+ $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
+
+ $(use asm || echo "--disable-asm")
+
+ GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
+ $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
+}
+
+multilib_src_compile() {
+ default
+ multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
+}
+
+multilib_src_install_all() {
+ default
+ find "${ED}" -type f -name '*.la' -delete || die
+}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild
deleted file mode 100644
index 584154b6ff..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
-HOMEPAGE="https://www.gnupg.org/"
-SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1 MIT"
-SLOT="0/20" # subslot = soname major version
-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"
-IUSE="+asm cpu_flags_arm_neon cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc o-flag-munging static-libs"
-
-RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="doc? ( virtual/texi2dvi )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-multilib-syspath.patch
-)
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/libgcrypt-config
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-multilib_src_configure() {
- if [[ ${CHOST} == *86*-solaris* ]] ; then
- # ASM code uses GNU ELF syntax, divide in particular, we need to
- # allow this via ASFLAGS, since we don't have a flag-o-matic
- # function for that, we'll have to abuse cflags for this
- append-cflags -Wa,--divide
- fi
- local myeconfargs=(
- CC_FOR_BUILD="$(tc-getBUILD_CC)"
-
- --enable-noexecstack
- $(use_enable cpu_flags_arm_neon neon-support)
- $(use_enable cpu_flags_x86_aes aesni-support)
- $(use_enable cpu_flags_x86_avx avx-support)
- $(use_enable cpu_flags_x86_avx2 avx2-support)
- $(use_enable cpu_flags_x86_padlock padlock-support)
- $(use_enable cpu_flags_x86_sha shaext-support)
- $(use_enable cpu_flags_x86_sse4_1 sse41-support)
- # required for sys-power/suspend[crypt], bug 751568
- $(use_enable static-libs static)
- $(use_enable o-flag-munging O-flag-munging)
-
- # disabled due to various applications requiring privileges
- # after libgcrypt drops them (bug #468616)
- --without-capabilities
-
- # http://trac.videolan.org/vlc/ticket/620
- # causes bus-errors on sparc64-solaris
- $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
- $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
-
- $(use asm || echo "--disable-asm")
-
- GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \
- $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
-}
-
-multilib_src_compile() {
- default
- multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
- multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf
-}
-
-multilib_src_install_all() {
- default
- find "${ED}" -type f -name '*.la' -delete || die
-}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/metadata.xml
index afd8e678af..33d811c69f 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgcrypt/metadata.xml
@@ -1,10 +1,6 @@
-
- zlogene@gentoo.org
- Mikle Kolyada
-
base-system@gentoo.org
Gentoo Base System
@@ -14,6 +10,6 @@
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/Manifest
index 26f4a58b08..0d24db09ec 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/Manifest
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/Manifest
@@ -1,4 +1,4 @@
-DIST gen-lock-obj-1.38.sh 2643 BLAKE2B 5040b027a95f10bac4a0ba463c8bb8387514ca9136e019fc647183456593df27473eb79af1d79e803984dd2b93166c286809b376968584cc320679de95fcfbba SHA512 d60999a08f70f5bcf1b66099c5d7b5f715dbd881bd0d75dbdde3a8932e9b064166f0524a45ae88b5b182c620aee526e14095ffdee68403b5d3b087b4dc4c0c2c
-DIST libgpg-error-1.38.tar.bz2 957637 BLAKE2B 9532402466748503805366b94c82c9adfe5b448f885c26b33ebf7ba9957161ca046b4057f5ca862224accb9f2af731652a55d20e7a4ab69107190a58c8e11ad6 SHA512 b936a4738c2cee111d855b1ba3ec433da8c77799a87d1f71275f974f871ebfa593c9db06ea53f0490b6cd6b94bef34f6052a587a4d13d839ec0128500c2dd9de
-DIST libgpg-error-1.41.tar.bz2 967117 BLAKE2B 9dc95bc09f55915d904e0f956ecf9281615028b8b8d876dbc786b752068fefea56adfb5dd5db65bad656ab664d567e56541e44a584c7f8672c30537ed05c4db0 SHA512 578d1d8090b9f6e6cbe59d9aeebec7df81aae492f75ec343f8df530950d30866fa0a7903ca050bf7bf721413f7b2708abe34f7467e2b208cc1447ffc9bd5b9a5
-DIST libgpg-error-1.42.tar.bz2 973996 BLAKE2B eb3381ec7106cfe5dca333391f473e97b03df83f247d3067e9f933ed7206f826e59d2b74b8c28d41e785ffe1c2980b680470064eb2fa2ff1ee3d8fa8be5b81a8 SHA512 f6d95712a874edefc39a7746062c8037a62801a550560c5b2eab08b5b86987c1de5be60eba5fcb56d35a37db109aa32d07b7eff2bb99800c1c47d2227421a8f4
+DIST libgpg-error-1.46.tar.bz2 1014291 BLAKE2B 6748c463256b7d0a05fe89a63c5f3abda1975d861c35821248664f2f09cd2273ef619d12408b6107a99519939ca7214f492e705c29f52f7bbdc422237281c1ca SHA512 b06223bb2b0f67d3db5d0d9ab116361a0eda175d4667352b5c0941408d37f2b0ba8e507297e480ccebb88cbba9d0a133820b896914b07d264fb3edaac7b8c99d
+DIST libgpg-error-1.46.tar.bz2.sig 238 BLAKE2B c9f48969dc5b51c4d6c0c643a510e442b883af319f4bd9db3d1f9d9b56e4003f020131ace28d5e6d3db1d3f62c63ac083f159d545e601e7c47391bd16e4411d6 SHA512 c71be3ab3b2fe6c0932faad3df42c67a861a789a09e0b084da06fbf723c37e3bf28047ff4475a9b26bf622434517235c2677a832eebb611a47330ccc7887a7cf
+DIST libgpg-error-1.47.tar.bz2 1020862 BLAKE2B bc04efa0686b1b7d7cdce045fc080c090c1abec60349b673c2e1ce27900483aea090eb6ebcb3fb49a4eed36f18156a12413d5446f739475632f4ed2a2481ff27 SHA512 bbb4b15dae75856ee5b1253568674b56ad155524ae29a075cb5b0a7e74c4af685131775c3ea2226fff2f84ef80855e77aa661645d002b490a795c7ae57b66a30
+DIST libgpg-error-1.47.tar.bz2.sig 119 BLAKE2B d23ea6c38621407c8f9f0c6bde71abd0e50c136d2e5de9a6cef64627f5d398c344a3438995a2405c4ef148ad8638ef7125f34670819957acd7d597370f1630e5 SHA512 09343016eaf7fcc455f8ce533847153a8a9b7c36f375a8ebe71ef5fc2923edf7b70842f834f52c51874e427869487b74a2286ea0112cffad0d72f79cb6d4eceb
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.38-cross_compile.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.38-cross_compile.patch
deleted file mode 100644
index 7ddd51f9a5..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.38-cross_compile.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: David Michael
-Date: Mon, 1 Jun 2020 14:24:53 +0000 (-0400)
-Subject: build: Fix cross-compiling into a separate build dir.
-X-Git-Url: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commitdiff_plain;h=013720333c6ec1d38791689bc49ba039d98e16b3
-
-build: Fix cross-compiling into a separate build dir.
-
-* configure.ac: Create the src directory before writing into it.
-* src/Makefile.am (EXTRA_DIST): Add gen-lock-obj.sh.
-
---
-
-Signed-off-by: David Michael
----
-
-diff --git a/configure.ac b/configure.ac
-index 6bd634b..1dd6489 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -598,6 +598,7 @@ if test x$cross_compiling = xyes; then
- case $host in
- *-*-linux*)
- lock_obj_h_generated=yes
-+ mkdir src
- LOCK_ABI_VERSION=1 host=$host host_alias=$host_alias \
- CC=$CC OBJDUMP=$host_alias-objdump \
- ac_ext=$ac_ext ac_objext=$ac_objext \
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 7e36d69..b2bffd2 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -102,7 +102,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
- gpg-error.vers gpg-error.def.in \
- versioninfo.rc.in gpg-error.w32-manifest.in \
- gpg-error-config-test.sh gpg-error.pc.in \
-- $(lock_obj_pub)
-+ gen-lock-obj.sh $(lock_obj_pub)
-
- BUILT_SOURCES = $(srcdir)/err-sources.h $(srcdir)/err-codes.h \
- code-to-errno.h code-from-errno.h \
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.42-cross_compile.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.42-cross_compile.patch
deleted file mode 100644
index 78d98dd7b3..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.42-cross_compile.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 33593864cd54143db594c4237bba41e14179061c Mon Sep 17 00:00:00 2001
-From: David Michael
-Date: Fri, 26 Mar 2021 16:06:50 +0900
-Subject: [PATCH] build: Fix generation of lock-obj-pub.native.h for cross
- build.
-
-* src/gen-lock-obj.sh: Capture echo output with quotes.
-
---
-
-Fixes-commit: 99ae862a96a569724f49a604ebb7d3f6d2c2d374
-Signed-off-by: David Michael
----
- src/gen-lock-obj.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh
-index a710f0c..258eec6 100755
---- a/src/gen-lock-obj.sh
-+++ b/src/gen-lock-obj.sh
-@@ -38,7 +38,7 @@
- # AWK=gawk ./gen-lock-obj.sh
- #
-
--if test -n `echo -n`; then
-+if test -n "`echo -n`"; then
- ECHO_C='\c'
- ECHO_N=''
- else
---
-2.11.0
-
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.37-remove_broken_check.patch b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch
similarity index 78%
rename from sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.37-remove_broken_check.patch
rename to sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch
index 2919a9d73b..043099c097 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.37-remove_broken_check.patch
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch
@@ -3,12 +3,12 @@ This breaks our multilib builds:
Confirm gpg-error-config works... no
*** Please report to with gpg-error-config-test.log
---- libgpg-error-1.37/src/Makefile.am
-+++ libgpg-error-1.37/src/Makefile.am
-@@ -338,14 +338,6 @@
+--- libgpg-error-1.44/src/Makefile.am
++++ libgpg-error-1.44/src/Makefile.am
+@@ -347,14 +347,6 @@
cp gpg-error.h gpgrt.h
- gpg-error-config: gpgrt-config gpg-error-config-old
+ gpg-error-config: gpgrt-config gpg-error-config-old gpg-error-config-test.sh
- @echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)"
- @if ./gpg-error-config-test.sh --old-new; then \
- echo "good"; \
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.38.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.38.ebuild
deleted file mode 100644
index e5d788d142..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.38.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools multilib-minimal toolchain-funcs prefix
-
-DESCRIPTION="Contains error handling functions used by GnuPG software"
-HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error"
-SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2
- https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob_plain;f=src/gen-lock-obj.sh;hb=libgpg-error-1.38 -> gen-lock-obj-1.38.sh"
-
-LICENSE="GPL-2 LGPL-2.1"
-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"
-IUSE="common-lisp nls static-libs"
-
-RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}"
-BDEPEND="nls? ( sys-devel/gettext )"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/gpg-error-config
-)
-MULTILIB_WRAPPED_HEADERS=(
- /usr/include/gpg-error.h
- /usr/include/gpgrt.h
-)
-
-PATCHES=(
- "${FILESDIR}/${PN}-1.37-remove_broken_check.patch"
- "${FILESDIR}/${P}-cross_compile.patch" #726520
-)
-
-src_unpack() {
- [[ ${PV} == 1.38 ]] || die "Please remove gen-lock-obj.sh from SRC_URI and drop src_unpack"
- unpack ${P}.tar.bz2
- cp "${DISTDIR}"/gen-lock-obj-1.38.sh "${S}"/src/gen-lock-obj.sh || die
- chmod +x "${S}"/src/gen-lock-obj.sh || die
-}
-
-src_prepare() {
- default
- # only necessary for as long as we run eautoreconf, configure.ac
- # uses ./autogen.sh to generate PACKAGE_VERSION, but autogen.sh is
- # not a pure /bin/sh script, so it fails on some hosts
- hprefixify -w 1 autogen.sh
- eautoreconf
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- $(multilib_is_native_abi || echo --disable-languages)
- $(use_enable common-lisp languages)
- $(use_enable nls)
- # required for sys-power/suspend[crypt], bug 751568
- $(use_enable static-libs static)
- --enable-threads
- CC_FOR_BUILD="$(tc-getBUILD_CC)"
- $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
- )
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-multilib_src_install_all() {
- einstalldocs
- find "${ED}" -type f -name '*.la' -delete || die
-}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.41.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.46-r1.ebuild
similarity index 53%
rename from sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.41.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.46-r1.ebuild
index b83de2c2f4..ca248e9c46 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.41.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.46-r1.ebuild
@@ -1,33 +1,47 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit autotools multilib-minimal toolchain-funcs prefix
+# Maintainers should:
+# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
+# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
+# (find the one for the current release then subscribe to it +
+# any subsequent ones linked within so you're covered for a while.)
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
+inherit autotools multilib-minimal toolchain-funcs prefix verify-sig
DESCRIPTION="Contains error handling functions used by GnuPG software"
HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error"
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="GPL-2 LGPL-2.1"
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="common-lisp nls static-libs"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="common-lisp nls static-libs test"
+RESTRICT="!test? ( test )"
RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}"
-BDEPEND="nls? ( sys-devel/gettext )"
+BDEPEND="
+ nls? ( sys-devel/gettext )
+ verify-sig? ( sec-keys/openpgp-keys-gnupg )
+"
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/gpg-error-config
-)
MULTILIB_WRAPPED_HEADERS=(
/usr/include/gpg-error.h
/usr/include/gpgrt.h
)
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gpg-error-config
+ /usr/bin/gpgrt-config
+)
+
PATCHES=(
- "${FILESDIR}/${PN}-1.37-remove_broken_check.patch"
+ "${FILESDIR}/${PN}-1.44-remove_broken_check.patch"
)
src_prepare() {
@@ -52,6 +66,13 @@ multilib_src_configure() {
$(use_enable nls)
# required for sys-power/suspend[crypt], bug 751568
$(use_enable static-libs static)
+ $(use_enable test tests)
+
+ # See bug #699206 and its duplicates wrt gpgme-config
+ # Upstream no longer install this by default and we should
+ # seek to disable it at some point.
+ --enable-install-gpg-error-config
+
--enable-threads
CC_FOR_BUILD="$(tc-getBUILD_CC)"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.42.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.47.ebuild
similarity index 53%
rename from sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.42.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.47.ebuild
index 2168705cf7..4ab32fea59 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.42.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/libgpg-error-1.47.ebuild
@@ -1,34 +1,47 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit autotools multilib-minimal toolchain-funcs prefix
+# Maintainers should:
+# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/
+# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159
+# (find the one for the current release then subscribe to it +
+# any subsequent ones linked within so you're covered for a while.)
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc
+inherit autotools multilib-minimal toolchain-funcs prefix verify-sig
DESCRIPTION="Contains error handling functions used by GnuPG software"
HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error"
SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )"
LICENSE="GPL-2 LGPL-2.1"
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="common-lisp nls static-libs"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="common-lisp nls static-libs test"
+RESTRICT="!test? ( test )"
RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )"
DEPEND="${RDEPEND}"
-BDEPEND="nls? ( sys-devel/gettext )"
+BDEPEND="
+ nls? ( sys-devel/gettext )
+ verify-sig? ( sec-keys/openpgp-keys-gnupg )
+"
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/gpg-error-config
-)
MULTILIB_WRAPPED_HEADERS=(
/usr/include/gpg-error.h
/usr/include/gpgrt.h
)
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gpg-error-config
+ /usr/bin/gpgrt-config
+)
+
PATCHES=(
- "${FILESDIR}/${PN}-1.37-remove_broken_check.patch"
- "${FILESDIR}/${P}-cross_compile.patch"
+ "${FILESDIR}/${PN}-1.44-remove_broken_check.patch"
)
src_prepare() {
@@ -53,6 +66,13 @@ multilib_src_configure() {
$(use_enable nls)
# required for sys-power/suspend[crypt], bug 751568
$(use_enable static-libs static)
+ $(use_enable test tests)
+
+ # See bug #699206 and its duplicates wrt gpgme-config
+ # Upstream no longer install this by default and we should
+ # seek to disable it at some point.
+ --enable-install-gpg-error-config
+
--enable-threads
CC_FOR_BUILD="$(tc-getBUILD_CC)"
$("${S}/configure" --help | grep -o -- '--without-.*-prefix')
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/metadata.xml
index 6cb5d85f10..0c03a7f547 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/libgpg-error/metadata.xml
@@ -1,9 +1,9 @@
-
- Lars Wendler
- polynomial-c@gentoo.org
+
+ base-system@gentoo.org
+ Gentoo Base System
-
+
+ urcu/userspace-rcu
+
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.13.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.13.0.ebuild
deleted file mode 100644
index 0e94ce6b9e..0000000000
--- a/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.13.0.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools
-
-DESCRIPTION="userspace RCU (read-copy-update) library"
-HOMEPAGE="https://liburcu.org/"
-SRC_URI="https://lttng.org/files/urcu/${P}.tar.bz2"
-
-LICENSE="LGPL-2.1"
-SLOT="0/8" # subslot = soname version
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86"
-IUSE="static-libs regression-test test"
-RESTRICT="!test? ( test )"
-
-DEPEND="test? ( sys-process/time )"
-
-src_prepare() {
- default
-
- # Refresh libtool (see https://github.com/gentoo/gentoo/pull/23973)
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- --enable-shared
- $(use_enable static-libs static)
- )
- econf "${myeconfargs[@]}"
-}
-
-src_install() {
- default
- find "${ED}" -type f -name "*.la" -delete || die
-}
-
-src_test() {
- default
- if use regression-test ; then
- emake -C tests/regression regtest
- fi
-}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.13.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.13.2.ebuild
similarity index 80%
rename from sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.13.1.ebuild
rename to sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.13.2.ebuild
index 392cecbc22..329e3a0718 100644
--- a/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.13.1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.13.2.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools
@@ -11,7 +11,7 @@ SRC_URI="https://lttng.org/files/urcu/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0/8" # subslot = soname version
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="static-libs test"
RESTRICT="!test? ( test )"
@@ -19,6 +19,7 @@ BDEPEND="test? ( sys-process/time )"
PATCHES=(
"${FILESDIR}"/${PN}-0.13.1-tests-no-benchmark.patch
+ "${FILESDIR}"/${PN}-0.13.1-loong.patch
)
src_prepare() {
@@ -26,6 +27,7 @@ src_prepare() {
# Needed for tests patch
# ... and refresh libtool (see https://github.com/gentoo/gentoo/pull/23973)
+ # ... and for build on loong (see https://github.com/gentoo/gentoo/pull/25189)
eautoreconf
}
diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.14.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.14.0.ebuild
new file mode 100644
index 0000000000..73701badf8
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/dev-libs/userspace-rcu/userspace-rcu-0.14.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Userspace RCU (read-copy-update) library"
+HOMEPAGE="https://liburcu.org/"
+SRC_URI="https://lttng.org/files/urcu/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0/8" # subslot = soname version
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="test? ( sys-process/time )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.13.1-tests-no-benchmark.patch
+ "${FILESDIR}"/${PN}-0.13.1-loong.patch
+ "${FILESDIR}"/${P}-c11.patch
+ "${FILESDIR}"/${P}-noreturn.patch
+)
+
+src_prepare() {
+ default
+
+ # Needed for tests patch
+ # ... and refresh libtool (see https://github.com/gentoo/gentoo/pull/23973)
+ # ... and for build on loong (see https://github.com/gentoo/gentoo/pull/25189)
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-shared
+ $(use_enable static-libs static)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_test() {
+ default
+
+ emake -C tests/regression regtest
+
+ # We don't run the benchmark tests.
+ rm tests/benchmark/test-suite.log || die
+}
+
+src_install() {
+ default
+
+ find "${ED}" -type f -name "*.la" -delete || die
+}
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/Manifest
index 668842545d..6c36fd5ef1 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/Manifest
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/Manifest
@@ -1,3 +1 @@
-DIST gptfdisk-1.0.6.tar.gz 207017 BLAKE2B d00e0f00dc8dce3b6088250aa39e05f41c96bee2218eec1dca34a160e70129d1006abc4341031994c53e77068b5de510b923c69858903627ccf786f3cc848a86 SHA512 a3bf95c813f707d9d41513295c3419916301a0e88b4c6ade70ad7d9422a507d519e092e68a3868d53092428d159bdbb248817c4f40d8ac88b0175d5afbd79dbc
-DIST gptfdisk-1.0.7.tar.gz 207723 BLAKE2B cebb0375294b4ff8f8eb522a4ae23259714d07d670a7bfbf8664586c948c1c8bee2674649a181a7c5d22f9dfe177feb7a9648ca9936c388b419faf7b52e789d8 SHA512 8a2067523479e34c76392571692b36e6c9eadcd0aca979f1ba09904930ed92a709bfdcdfa3369230a5ab2b5a751682dc7fb4645fb5f7f1c361ee8d28e104214c
-DIST gptfdisk-1.0.8.tar.gz 208958 BLAKE2B 03c74c43fead13e90ff6cd42405e15db726f527801a9e3f1d5f6a83d3fa58f0f8e58b35edc1b12b0b2e6c7849b657ce4493ac67204d25309e6f63fe7f57f766b SHA512 0818a238e57cf6de893da7c161e8aaf2d30ad917a47750de09967ce1d83d1ab6666fa043465abaffdc293d058acc3fa87f8bc93a4b03c7c5d9a9ceb8f5b07331
+DIST gptfdisk-1.0.9.tar.gz 215065 BLAKE2B 1939ffd75972a4d7f92af2bfab90c7b0223825b5478b6b808dd35af943c687d38ba81663cd7ba5e0f9400656db4dac019c13a9f75d90b7bd716568c676c24dd2 SHA512 c2489ac7e196cb53b9fdb18d0e421571eca43c366de8922c5c7f550aadf192558e7af69b181c30747d6cf607c1670126223465eaa5e231cc589402d94a4e97a2
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.6.1-spurious_mbr_warnings.patch b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.6.1-spurious_mbr_warnings.patch
deleted file mode 100644
index e60aa9feef..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.6.1-spurious_mbr_warnings.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From f063fe08e424c99f133df18bf9dce49c851bcb0a Mon Sep 17 00:00:00 2001
-From: Rod Smith
-Date: Mon, 1 Feb 2021 10:19:50 -0500
-Subject: [PATCH] Fix spurious warnings of problems on MBR disks
-
----
- NEWS | 7 +++++++
- gpt.cc | 18 +++++++++++++-----
- support.h | 2 +-
- 3 files changed, 21 insertions(+), 6 deletions(-)
-
-diff --git a/NEWS b/NEWS
-index f74bad0..a7131aa 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,3 +1,10 @@
-+1.0.7 (?/??/2021):
-+------------------
-+
-+- Fixed bug that caused spurious warnings about the partition table
-+ header claiming an invalid size of partition entries when reading
-+ some MBR disks.
-+
- 1.0.6 (1/13/2021):
- ------------------
-
-diff --git a/gpt.cc b/gpt.cc
-index 1b4e10f..842dfb1 100644
---- a/gpt.cc
-+++ b/gpt.cc
-@@ -1042,11 +1042,19 @@ int GPTData::LoadHeader(struct GPTHeader *header, DiskIO & disk, uint64_t sector
- *crcOk = CheckHeaderCRC(&tempHeader);
-
- if (tempHeader.sizeOfPartitionEntries != sizeof(GPTPart)) {
-- cerr << "Warning: Partition table header claims that the size of partition table\n";
-- cerr << "entries is " << tempHeader.sizeOfPartitionEntries << " bytes, but this program ";
-- cerr << " supports only " << sizeof(GPTPart) << "-byte entries.\n";
-- cerr << "Adjusting accordingly, but partition table may be garbage.\n";
-- tempHeader.sizeOfPartitionEntries = sizeof(GPTPart);
-+ // Print the below warning only if the CRC is OK -- but correct the
-+ // problem either way. The warning is printed only on a valid CRC
-+ // because otherwise this warning will display inappropriately when
-+ // reading MBR disks. If the CRC is invalid, then a warning about
-+ // that will be shown later, so the user will still know that
-+ // something is wrong.
-+ if (*crcOk) {
-+ cerr << "Warning: Partition table header claims that the size of partition table\n";
-+ cerr << "entries is " << tempHeader.sizeOfPartitionEntries << " bytes, but this program ";
-+ cerr << " supports only " << sizeof(GPTPart) << "-byte entries.\n";
-+ cerr << "Adjusting accordingly, but partition table may be garbage.\n";
-+ }
-+ tempHeader.sizeOfPartitionEntries = sizeof(GPTPart);
- }
-
- if (allOK && (numParts != tempHeader.numParts) && *crcOk) {
-diff --git a/support.h b/support.h
-index d87fe9a..e3e1e12 100644
---- a/support.h
-+++ b/support.h
-@@ -8,7 +8,7 @@
- #include
- #include
-
--#define GPTFDISK_VERSION "1.0.6"
-+#define GPTFDISK_VERSION "1.0.6.1"
-
- #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
- // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64
---
-2.30.1
-
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.7-remove_byteswap.patch b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.7-remove_byteswap.patch
deleted file mode 100644
index c1874d6edd..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.7-remove_byteswap.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From fded770b55fdb3a201ad515d785c17ac35705652 Mon Sep 17 00:00:00 2001
-From: Erik Larsson
-Date: Tue, 8 Jun 2021 16:11:21 +0300
-Subject: [PATCH] gptpart.cc: Remove byteswap commands in
- GPTPart::SetName(const string&).
-
-The byteswapping done in GPTPart::SetName(const string&) was reversed
-later when GPTPart::ReversePartBytes() was called.
-
-The intended design seems to have been to keep the fields in native
-endianness until just before the partition is written to disk when all
-the GPTPart data is byteswapped all at once with a call to
-GPTPart::ReversePartBytes().
-However this was defeated by leaving the original byteswaps in there and
-effectively the name was swapped back to the native-endian form. For big
-endian systems this meant that a UTF-16BE string was written to disk,
-violating the specification and causing interoperability problems.
-
-Fixed by removing these inline byteswaps in GPTPart::SetName(const
-string&).
----
- gptpart.cc | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/gptpart.cc b/gptpart.cc
-index 81bbcf0..841140a 100644
---- a/gptpart.cc
-+++ b/gptpart.cc
-@@ -242,7 +242,6 @@ void GPTPart::SetName(const string & theName) {
- // then to utf16le
- if ( uni < 0x10000 ) {
- name[ pos ] = (uint16_t) uni ;
-- if ( ! IsLittleEndian() ) ReverseBytes( name + pos , 2 ) ;
- pos ++ ;
- } // if
- else {
-@@ -252,10 +251,8 @@ void GPTPart::SetName(const string & theName) {
- } // if
- uni -= 0x10000 ;
- name[ pos ] = (uint16_t)( uni >> 10 ) | 0xd800 ;
-- if ( ! IsLittleEndian() ) ReverseBytes( name + pos , 2 ) ;
- pos ++ ;
- name[ pos ] = (uint16_t)( uni & 0x3ff ) | 0xdc00 ;
-- if ( ! IsLittleEndian() ) ReverseBytes( name + pos , 2 ) ;
- pos ++ ;
- }
- } // for
---
-2.32.0
-
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.9-libuuid.patch b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.9-libuuid.patch
new file mode 100644
index 0000000000..e7a5f68e19
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.9-libuuid.patch
@@ -0,0 +1,37 @@
+From e67faca2c0ca955f56cbd22e90941cdcbdc12597 Mon Sep 17 00:00:00 2001
+From: Rod Smith
+Date: Sat, 16 Apr 2022 09:32:04 -0400
+Subject: [PATCH] Updated guid.cc to deal with minor change in libuuid
+
+---
+ NEWS | 3 +++
+ guid.cc | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/NEWS b/NEWS
+index c7add56..3d90d9a 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,6 @@
++
++- Updated guid.cc to deal with minor change in libuuid.
++
+ 1.0.9 (4/14/2022):
+ ------------------
+
+diff --git a/guid.cc b/guid.cc
+index 1e73ab7..d3e4fd5 100644
+--- a/guid.cc
++++ b/guid.cc
+@@ -141,7 +141,7 @@ void GUIDData::Zero(void) {
+ void GUIDData::Randomize(void) {
+ int i, uuidGenerated = 0;
+
+-#ifdef _UUID_UUID_H
++#if defined (_UUID_UUID_H) || defined (_UL_LIBUUID_UUID_H)
+ uuid_generate(uuidData);
+ ReverseBytes(&uuidData[0], 4);
+ ReverseBytes(&uuidData[4], 2);
+--
+2.36.1
+
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch
new file mode 100644
index 0000000000..470defd33c
--- /dev/null
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch
@@ -0,0 +1,22 @@
+--- a/gptcl.cc
++++ b/gptcl.cc
+@@ -156,9 +156,10 @@
+
+ // Assume first non-option argument is the device filename....
+ device = (char*) poptGetArg(poptCon);
+- poptResetContext(poptCon);
+
+ if (device != NULL) {
++ device = strdup(device);
++ poptResetContext(poptCon);
+ JustLooking(); // reset as necessary
+ BeQuiet(); // Tell called functions to be less verbose & interactive
+ if (LoadPartitions((string) device)) {
+@@ -498,6 +499,7 @@
+ cerr << "Error encountered; not saving changes.\n";
+ retval = 4;
+ } // if
++ free(device);
+ } // if (device != NULL)
+ poptFreeContext(poptCon);
+ return retval;
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.6-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.6-r2.ebuild
deleted file mode 100644
index 770e93982f..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.6-r2.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic toolchain-funcs
-
-DESCRIPTION="GPT partition table manipulator for Linux"
-HOMEPAGE="https://www.rodsbooks.com/gdisk/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="kernel_linux ncurses static"
-
-# libuuid from util-linux is required.
-RDEPEND="!static? (
- dev-libs/popt
- ncurses? ( sys-libs/ncurses:=[unicode(+)] )
- kernel_linux? ( sys-apps/util-linux )
- )"
-DEPEND="
- ${RDEPEND}
- static? (
- dev-libs/popt[static-libs(+)]
- ncurses? ( sys-libs/ncurses:=[unicode(+),static-libs(+)] )
- kernel_linux? ( sys-apps/util-linux[static-libs(+)] )
- )
-"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}/${P}.1-spurious_mbr_warnings.patch"
-)
-
-src_prepare() {
- default
-
- tc-export CXX PKG_CONFIG
-
- if ! use ncurses ; then
- sed -i \
- -e '/^all:/s: cgdisk::' \
- Makefile || die
- fi
-
- sed \
- -e '/g++/s:=:?=:g' \
- -e 's:-lncursesw:$(shell $(PKG_CONFIG) --libs ncursesw):g' \
- -i Makefile || die
-
- use static && append-ldflags -static
-}
-
-src_install() {
- dosbin gdisk sgdisk $(usex ncurses cgdisk '') fixparts
- doman *.8
- dodoc NEWS README
-}
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.7-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.7-r2.ebuild
deleted file mode 100644
index 06e5ca062f..0000000000
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.7-r2.ebuild
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic toolchain-funcs
-
-DESCRIPTION="GPT partition table manipulator for Linux"
-HOMEPAGE="https://www.rodsbooks.com/gdisk/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="kernel_linux ncurses static"
-
-# libuuid from util-linux is required.
-RDEPEND="!static? (
- dev-libs/popt
- ncurses? ( sys-libs/ncurses:=[unicode(+)] )
- kernel_linux? ( sys-apps/util-linux )
- )"
-DEPEND="
- ${RDEPEND}
- static? (
- dev-libs/popt[static-libs(+)]
- ncurses? ( sys-libs/ncurses:=[unicode(+),static-libs(+)] )
- kernel_linux? ( sys-apps/util-linux[static-libs(+)] )
- )
-"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
- "${FILESDIR}/${P}-remove_byteswap.patch" #797412
-)
-
-src_prepare() {
- default
-
- tc-export CXX PKG_CONFIG
-
- if ! use ncurses ; then
- sed -i \
- -e '/^all:/s: cgdisk::' \
- Makefile || die
- fi
-
- sed \
- -e '/g++/s:=:?=:g' \
- -e 's:-lncursesw:$(shell $(PKG_CONFIG) --libs ncursesw):g' \
- -i Makefile || die
-
- use static && append-ldflags -static
-}
-
-src_install() {
- dosbin gdisk sgdisk $(usex ncurses cgdisk '') fixparts
- doman *.8
- dodoc NEWS README
-}
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.8-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.9-r2.ebuild
similarity index 74%
rename from sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.8-r1.ebuild
rename to sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.9-r2.ebuild
index c97d952825..e7ed4b517d 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.8-r1.ebuild
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/gptfdisk-1.0.9-r2.ebuild
@@ -1,18 +1,18 @@
-# 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
inherit flag-o-matic toolchain-funcs
DESCRIPTION="GPT partition table manipulator for Linux"
HOMEPAGE="https://www.rodsbooks.com/gdisk/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/${PV}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="kernel_linux ncurses static"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux"
+IUSE="ncurses static"
# libuuid from util-linux is required.
RDEPEND="!static? (
@@ -30,6 +30,11 @@ DEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}/${PN}-1.0.9-libuuid.patch" #844073
+ "${FILESDIR}/${PN}-1.0.9-popt_segv.patch" #872131
+)
+
src_prepare() {
default
diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/metadata.xml b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/metadata.xml
index c19d1a32c6..519be91819 100644
--- a/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/metadata.xml
+++ b/sdk_container/src/third_party/portage-stable/sys-apps/gptfdisk/metadata.xml
@@ -1,11 +1,11 @@
-
- polynomial-c@gentoo.org
- Lars Wendler
-
-
- gptfdisk
-
+
+ marecki@gentoo.org
+ Marek Szuba
+
+
+ gptfdisk
+