c-ares: upgraded package to upstream

Upgraded net-dns/c-ares to version 1.17.2 on amd64

BUG=chromium:1238480
TEST=emerge-${BOARD} c-ares && CQ passes

Change-Id: I0db7119866278b7a8f064d3a325c772e2cdddd1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/3093168
Tested-by: Allen Webb <allenwebb@google.com>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Allen Webb <allenwebb@google.com>
diff --git a/metadata/md5-cache/net-dns/c-ares-1.16.1 b/metadata/md5-cache/net-dns/c-ares-1.16.1
deleted file mode 100644
index 7867400..0000000
--- a/metadata/md5-cache/net-dns/c-ares-1.16.1
+++ /dev/null
@@ -1,13 +0,0 @@
-BDEPEND=>=app-portage/elt-patches-20170815
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=!<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=C library that resolves names asynchronously
-EAPI=7
-HOMEPAGE=https://c-ares.haxx.se/
-IUSE=static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
-KEYWORDS=*
-LICENSE=MIT
-SLOT=0/2
-SRC_URI=https://c-ares.haxx.se/download/c-ares-1.16.1.tar.gz
-_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	eutils	fcb2aa98e1948b835b5ae66ca52868c5	libtool	f143db5a74ccd9ca28c1234deffede96	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
-_md5_=a4702d4f439c7ff653da3fd3b0e65f6a
diff --git a/metadata/md5-cache/net-dns/c-ares-1.17.2 b/metadata/md5-cache/net-dns/c-ares-1.17.2
new file mode 100644
index 0000000..969fd67
--- /dev/null
+++ b/metadata/md5-cache/net-dns/c-ares-1.17.2
@@ -0,0 +1,14 @@
+BDEPEND=>=app-portage/elt-patches-20170815
+DEFINED_PHASES=compile configure install test
+DEPEND=!<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
+DESCRIPTION=C library that resolves names asynchronously
+EAPI=7
+HOMEPAGE=https://c-ares.haxx.se/
+IUSE=static-libs test abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 abi_arm_32 abi_arm_64
+KEYWORDS=*
+LICENSE=MIT
+RESTRICT=!test? ( test )
+SLOT=0/2
+SRC_URI=https://c-ares.haxx.se/download/c-ares-1.17.2.tar.gz
+_eclasses_=autotools	d0e5375d47f4c809f406eb892e531513	libtool	f143db5a74ccd9ca28c1234deffede96	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multilib-build	1979aa0ff4d356d32507ca4650d9f37d	multilib-minimal	8bddda43703ba94d8341f4e247f97566	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb
+_md5_=bcd9fe7343dbd7e2555e5b578fb32726
diff --git a/net-dns/c-ares/Manifest b/net-dns/c-ares/Manifest
index 4ebd15a..99b1551 100644
--- a/net-dns/c-ares/Manifest
+++ b/net-dns/c-ares/Manifest
@@ -1 +1,2 @@
-DIST c-ares-1.16.1.tar.gz 1374637 BLAKE2B 0d87538f5d6cac5b6b9c92d6ba5525af0e580e6506bee9270318f0951aaccdc7e135b446381e8150241d367789ccf2f73dbb333d45de4dbb5a87af05483063a8 SHA512 4ac2a5d5c6da74eb1d6155c4eadc7127ab1b53a8d13caec41bd6172db5417a79f3ab022e77ba37d8b13da6893d7ced5fd8baf5cc3950a4154b4de8743ad31471
+DIST c-ares-1.17.1.tar.gz 1518701 BLAKE2B 31dac21ecae231e2a201dc1ba954c1a0663a06f93eb8e7e033ca3c6d385f53e07af0b04854739f1ee8a7f0693f67f620143e152ef092b49342c62279a0480905 SHA512 b11887bcc9274d368088e1a8b6aca62414f20675cf0bc58e948f54fa04c327c39dd23cefe7509eec6397db14b550a3f6b77f5c18b3d735b3eef48ce2da1dcd00
+DIST c-ares-1.17.2.tar.gz 1538276 BLAKE2B c6f5ad65ca75f8467b624daf3caaee2f35d6e4714ce46ebe1bbf79447feecf8615915b00fa5e7bd1e97c6232864e06c53a792fbadf36a5399883529769273e24 SHA512 f625e0ef8508af6475d3e83b51ab29be8a4878e2a87e7f518bea046b76a74bfde7043ca6ec2a9e714c898ab9e5d4a5a678c3347a9f9eb68980438f7ca8ae3fc8
diff --git a/net-dns/c-ares/c-ares-1.16.1.ebuild b/net-dns/c-ares/c-ares-1.16.1.ebuild
deleted file mode 100644
index ea691d2..0000000
--- a/net-dns/c-ares/c-ares-1.16.1.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools eutils multilib-minimal
-
-DESCRIPTION="C library that resolves names asynchronously"
-HOMEPAGE="https://c-ares.haxx.se/"
-SRC_URI="https://${PN}.haxx.se/download/${P}.tar.gz"
-
-LICENSE="MIT"
-KEYWORDS="*"
-IUSE="static-libs"
-
-# Subslot = SONAME of libcares.so.2
-SLOT="0/2"
-
-DOCS=( AUTHORS CHANGES NEWS README.md RELEASE-NOTES TODO )
-
-MULTILIB_WRAPPED_HEADERS=(
-	/usr/include/ares_build.h
-)
-
-src_prepare() {
-	eapply "${FILESDIR}"/${PN}-1.12.0-remove-tests.patch
-	eapply_user
-	eautoreconf
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE=${S} \
-	econf \
-		--enable-nonblocking \
-		--enable-symbol-hiding \
-		$(use_enable static-libs static)
-}
-
-multilib_src_install_all() {
-	einstalldocs
-	find "${ED}" -name "*.la" -delete || die
-}
diff --git a/net-dns/c-ares/c-ares-1.17.2.ebuild b/net-dns/c-ares/c-ares-1.17.2.ebuild
new file mode 100644
index 0000000..0dd4656
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.17.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="https://c-ares.haxx.se/"
+SRC_URI="https://${PN}.haxx.se/download/${P}.tar.gz"
+
+# Subslot = SONAME of libcares.so.2
+SLOT="0/2"
+LICENSE="MIT"
+KEYWORDS="*"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+DOCS=( AUTHORS CHANGES NEWS README.md RELEASE-NOTES TODO )
+
+MULTILIB_WRAPPED_HEADERS=(
+	/usr/include/ares_build.h
+)
+
+multilib_src_configure() {
+	# Needed for running unit tests only
+	# Violates sandbox and tests pass fine without
+	ax_cv_uts_namespace=no \
+	ax_cv_user_namespace=no \
+	ECONF_SOURCE="${S}" \
+	econf \
+		--enable-nonblocking \
+		--enable-symbol-hiding \
+		$(use_enable static-libs static) \
+		$(use_enable test tests)
+}
+
+multilib_src_test() {
+	cd "${BUILD_DIR}"/test || die
+
+	# We're skipping the "real" network tests with the filter
+	# see https://github.com/c-ares/c-ares/tree/main/test
+	./arestest --gtest_filter=-*Live* || die "arestest failed!"
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	find "${ED}" -name "*.la" -delete || die
+}
diff --git a/net-dns/c-ares/files/c-ares-1.12.0-remove-tests.patch b/net-dns/c-ares/files/c-ares-1.12.0-remove-tests.patch
deleted file mode 100644
index 826eb85..0000000
--- a/net-dns/c-ares/files/c-ares-1.12.0-remove-tests.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naur c-ares-1.12.0.orig/configure.ac c-ares-1.12.0/configure.ac
---- c-ares-1.12.0.orig/configure.ac	2016-09-29 07:43:01.000000000 -0400
-+++ c-ares-1.12.0/configure.ac	2016-10-14 03:10:36.253342032 -0400
-@@ -837,10 +837,6 @@
- fi
- AC_MSG_RESULT([$build_tests])
- 
--if test "x$build_tests" = "xyes" ; then
--  AC_CONFIG_SUBDIRS([test])
--fi
--
- AC_CONFIG_FILES([Makefile libcares.pc])
- AC_OUTPUT
- XC_AMEND_DISTCLEAN(['.'])