Upgraded packages to latest upstream

Upgraded dev-libs/libgpg-error to v1.46-r1

BUG=None
TEST=presubmit
RELEASE_NOTE=Upgraded dev-libs/libgpg-error to v1.46-r1.

Change-Id: I2b0938021490a2c56fad942b991e5db0022b864a
Reviewed-on: https://cos-review.googlesource.com/c/third_party/overlays/portage-stable/+/44520
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Chenglong Tang <chenglongtang@google.com>
diff --git a/dev-libs/libgpg-error/Manifest b/dev-libs/libgpg-error/Manifest
index 7c18d4d..3bbfa2c 100644
--- a/dev-libs/libgpg-error/Manifest
+++ b/dev-libs/libgpg-error/Manifest
@@ -1 +1,2 @@
-DIST libgpg-error-1.36.tar.bz2 920542 BLAKE2B 81684f6e47192c50cfa408977d53dc3812befca28733b531d51dffa0a6799a47366a50f64755557a7b3111a179ac4aba9e6a527418461cdbcccea80ae6bed4fa SHA512 6e5f853f77dc04f0091d94b224cab8e669042450f271b78d0ea0219658d059c9cab1ab0eaa020a4227f451520b417fc340b85971a6f5e144fa69be57e15df346
+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
diff --git a/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5-support.patch b/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5-support.patch
deleted file mode 100644
index 17e8816..0000000
--- a/dev-libs/libgpg-error/files/libgpg-error-1.36-gawk5-support.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001
-From: NIIBE Yutaka <gniibe@fsij.org>
-Date: Mon, 15 Apr 2019 15:10:44 +0900
-Subject: [PATCH] awk: Prepare for Gawk 5.0.
-
-* src/Makefile.am: Use pkg_namespace (instead of namespace).
-* src/mkerrnos.awk: Likewise.
-* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
-* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
-
---
-
-In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
-which only allows escaping specific characters.
-
-GnuPG-bug-id: 4459
-Reported-by: Marius Schamschula
-Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
----
- lang/cl/mkerrcodes.awk |  2 +-
- src/Makefile.am        |  2 +-
- src/mkerrcodes.awk     |  2 +-
- src/mkerrcodes1.awk    |  2 +-
- src/mkerrcodes2.awk    |  2 +-
- src/mkerrnos.awk       |  2 +-
- src/mkstrtable.awk     | 10 +++++-----
- 7 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
-index ae29043..9a1fc18 100644
---- a/lang/cl/mkerrcodes.awk
-+++ b/lang/cl/mkerrcodes.awk
-@@ -122,7 +122,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/Makefile.am b/src/Makefile.am
-index ce1b882..f2590cb 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile
- 
- errnos-sym.h: Makefile mkstrtable.awk errnos.in
- 	$(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
--		-v prefix=GPG_ERR_ -v namespace=errnos_ \
-+		-v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
- 		$(srcdir)/errnos.in >$@
- 
- 
-diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
-index 46d436c..e9c857c 100644
---- a/src/mkerrcodes.awk
-+++ b/src/mkerrcodes.awk
-@@ -85,7 +85,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
-index a771a73..4578e29 100644
---- a/src/mkerrcodes1.awk
-+++ b/src/mkerrcodes1.awk
-@@ -81,7 +81,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
-index ea58503..188f7a4 100644
---- a/src/mkerrcodes2.awk
-+++ b/src/mkerrcodes2.awk
-@@ -91,7 +91,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
-index f79df66..15b1aad 100644
---- a/src/mkerrnos.awk
-+++ b/src/mkerrnos.awk
-@@ -83,7 +83,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
-index c9de9c1..285e45f 100644
---- a/src/mkstrtable.awk
-+++ b/src/mkstrtable.awk
-@@ -77,7 +77,7 @@
- #
- # The variable prefix can be used to prepend a string to each message.
- #
--# The variable namespace can be used to prepend a string to each
-+# The variable pkg_namespace can be used to prepend a string to each
- # variable and macro name.
- 
- BEGIN {
-@@ -102,7 +102,7 @@ header {
-       print "/* The purpose of this complex string table is to produce";
-       print "   optimal code with a minimum of relocations.  */";
-       print "";
--      print "static const char " namespace "msgstr[] = ";
-+      print "static const char " pkg_namespace "msgstr[] = ";
-       header = 0;
-     }
-   else
-@@ -110,7 +110,7 @@ header {
- }
- 
- !header {
--  sub (/\#.+/, "");
-+  sub (/#.+/, "");
-   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
- 
-   if (/^$/)
-@@ -150,7 +150,7 @@ END {
-   else
-     print "  gettext_noop (\"" last_msgstr "\");";
-   print "";
--  print "static const int " namespace "msgidx[] =";
-+  print "static const int " pkg_namespace "msgidx[] =";
-   print "  {";
-   for (i = 0; i < coded_msgs; i++)
-     print "    " pos[i] ",";
-@@ -158,7 +158,7 @@ END {
-   print "  };";
-   print "";
-   print "static GPG_ERR_INLINE int";
--  print namespace "msgidxof (int code)";
-+  print pkg_namespace "msgidxof (int code)";
-   print "{";
-   print "  return (0 ? 0";
- 
--- 
-2.21.0
-
diff --git a/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch b/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch
new file mode 100644
index 0000000..043099c
--- /dev/null
+++ b/dev-libs/libgpg-error/files/libgpg-error-1.44-remove_broken_check.patch
@@ -0,0 +1,22 @@
+This breaks our multilib builds:
+
+  Confirm gpg-error-config works... no
+  ***  Please report to <https://bugs.gnupg.org> with gpg-error-config-test.log
+
+--- 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-test.sh
+-	@echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)"
+-	@if ./gpg-error-config-test.sh --old-new; then \
+-	  echo "good";                                         \
+-	else                                                   \
+-	  echo "no";                                           \
+-	  echo "***  Please report to <https://bugs.gnupg.org> with gpg-error-config-test.log"; \
+-	  exit 1; \
+-	fi
+ 	cp gpg-error-config-old $@
+ 
+ install-data-local:
diff --git a/dev-libs/libgpg-error/libgpg-error-1.36.ebuild b/dev-libs/libgpg-error/libgpg-error-1.36.ebuild
deleted file mode 100644
index c5a807d..0000000
--- a/dev-libs/libgpg-error/libgpg-error-1.36.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools libtool multilib-minimal toolchain-funcs prefix
-
-DESCRIPTION="Contains error handling functions used by GnuPG software"
-HOMEPAGE="http://www.gnupg.org/related_software/libgpg-error"
-SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2 LGPL-2.1"
-SLOT="0"
-KEYWORDS="*"
-IUSE="common-lisp nls static-libs"
-
-RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}"
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/gpg-error-config
-)
-MULTILIB_WRAPPED_HEADERS=(
-	/usr/include/gpg-error.h
-	/usr/include/gpgrt.h
-)
-
-PATCHES=( "${FILESDIR}/${PN}-1.36-gawk5-support.patch" )
-
-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() {
-	ECONF_SOURCE="${S}" econf \
-		$(multilib_is_native_abi || echo --disable-languages) \
-		$(use_enable common-lisp languages) \
-		$(use_enable nls) \
-		$(use_enable static-libs static) \
-		--enable-threads \
-		CC_FOR_BUILD="$(tc-getBUILD_CC)" \
-		$("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	find "${D}" -name '*.la' -delete || die
-}
diff --git a/dev-libs/libgpg-error/libgpg-error-1.46-r1.ebuild b/dev-libs/libgpg-error/libgpg-error-1.46-r1.ebuild
new file mode 100644
index 0000000..a8e2ea6
--- /dev/null
+++ b/dev-libs/libgpg-error/libgpg-error-1.46-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# 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+=" mirror://gnupg/${PN}/${P}.tar.bz2.sig"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="*"
+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 )
+	verify-sig? ( sec-keys/openpgp-keys-gnupg )
+"
+
+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.44-remove_broken_check.patch"
+)
+
+src_prepare() {
+	default
+
+	if use prefix ; then
+		# don't hardcode /usr/xpg4/bin/sh as shell on Solaris
+		sed -i -e 's/solaris\*/disabled/' configure.ac || die
+	fi
+
+	# 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)
+		$(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')
+	)
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+	einstalldocs
+	find "${ED}" -type f -name '*.la' -delete || die
+}
diff --git a/dev-libs/libgpg-error/metadata.xml b/dev-libs/libgpg-error/metadata.xml
index 552088c..0c03a7f 100644
--- a/dev-libs/libgpg-error/metadata.xml
+++ b/dev-libs/libgpg-error/metadata.xml
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
 	<maintainer type="project">
-		<email>crypto@gentoo.org</email>
-		<name>Crypto</name>
+		<email>base-system@gentoo.org</email>
+		<name>Gentoo Base System</name>
 	</maintainer>
 	<use>
 		<flag name="common-lisp">Install common-lisp files</flag>