commit:     336e71a42ef1428122b7d12db2f3aefbdf995996
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 12 02:20:40 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 12 02:20:52 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=336e71a4

net-dns/c-ares: add 1.34.6

Bug: https://bugs.gentoo.org/967359
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-dns/c-ares/Manifest             |   2 +
 net-dns/c-ares/c-ares-1.34.6.ebuild | 110 ++++++++++++++++++++++++++++++++++++
 2 files changed, 112 insertions(+)

diff --git a/net-dns/c-ares/Manifest b/net-dns/c-ares/Manifest
index 9d82f5f4feea..ebf85fa8d01a 100644
--- a/net-dns/c-ares/Manifest
+++ b/net-dns/c-ares/Manifest
@@ -1,2 +1,4 @@
 DIST c-ares-1.34.5.tar.gz 1009261 BLAKE2B 
5e8c262acf07cb387294170bba53618db1768436a3f7bf800eb31cf7b02ef8afc737122126c742424d4675f8c4944c730b8ba84028e6cee6bf65026cd2eeb56c
 SHA512 
386709e9f405034cb16ba514f9792e89992be52b24a237e6c51f1032e4ca99a8c57b1c3038d6f0a205202a3bfb1246bb95ff0d5e6fc0ee2bba1cb17f6677f97f
 DIST c-ares-1.34.5.tar.gz.asc 228 BLAKE2B 
bb9364f7787c5286edd52d3821081618193c4c4c58782c3e3e592358b3e15ddc4e3abceb25f00969eaaa821705798b5e9eb528364b8f6d98f67a0285c4ad84f3
 SHA512 
5504670271b1dc32f5feeaf50c042d1cf1d173053c230706a0fec649d6fe8354ec6e75ef2b1c4158ed99a76a51d70e91799b1de19b284362b5080852790fcced
+DIST c-ares-1.34.6.tar.gz 1017864 BLAKE2B 
3a348cfaf4c992ba1712be73907599fd9d3e7b6d1b5498fa86259bbd8c9e102d530e89eee0f668b5b0b8164034047c187be7f8d40016d012c9e451dbf56bfbde
 SHA512 
826eecdb40942caf75da982b9ca57fbe7c3e7c23af43a908683c7c1523c46b06ebac68405c26db8bf4c8b0774ca415666866249a3bde663a71c278f4ec7b1827
+DIST c-ares-1.34.6.tar.gz.asc 228 BLAKE2B 
047ed363c58840914ec6fe6f81fe51ce6aca1293b91cf48c9f476a013f2267cd728a97d600e172ef51267f4ade63c4c4ed381ed5c37c83d541df1d4dc41f0e44
 SHA512 
864e9bb1703729db1554f68e07432de6e1f364f9bf565e1dc51dfbd4a87ae8751d9e4b1a5c607455457dc2c1054ba687f33365909d8a4888644d99c5e518bbce

diff --git a/net-dns/c-ares/c-ares-1.34.6.ebuild 
b/net-dns/c-ares/c-ares-1.34.6.ebuild
new file mode 100644
index 000000000000..9e2067a80325
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.34.6.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Both Daniel and Brad are listed as possible signers on the homepage
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/bradhouse.asc
+inherit edo flag-o-matic libtool multilib-minimal verify-sig
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="https://c-ares.org/";
+SRC_URI="
+       https://github.com/c-ares/c-ares/releases/download/v${PV}/${P}.tar.gz
+       verify-sig? ( 
https://github.com/c-ares/c-ares/releases/download/v${PV}/${P}.tar.gz.asc )
+"
+
+# ISC for lib/{bitncmp.c,inet_ntop.c,inet_net_pton.c} (bug #912405)
+LICENSE="MIT ISC"
+# Subslot = SONAME of libcares.so.2
+SLOT="0/2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos 
~x64-macos ~x64-solaris"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+       test? ( dev-cpp/gtest )
+       verify-sig? ( sec-keys/openpgp-keys-bradhouse )
+"
+
+DOCS=( AUTHORS README.md RELEASE-NOTES.md )
+
+MULTILIB_WRAPPED_HEADERS=(
+       /usr/include/ares_build.h
+)
+
+A__QA_CONFIG_IMPL_DECL_SKIP=(
+       # Checking for obsolete headers
+       malloc
+       calloc
+       free
+
+       # Non-existent on Linux
+       closesocket
+       CloseSocket
+       ioctlsocket
+       bitncmp
+       ConvertInterfaceIndexToLuid
+       ConvertInterfaceLuidToNameA
+)
+
+src_prepare() {
+       default
+       elibtoolize
+
+       if [[ ${CHOST} == *-darwin* ]] ; then
+               # warnings are default, but enable -std=c90 which doesn't define
+               # 'bool' which is a type used/assumed in macOS system headers
+               sed -i -e 's/-std=c90/& -Dbool=int/' configure{.ac,} || die
+               # sysconfig integration requires deep framework compatibility
+               # and is not really desired in Prefix
+               sed -i -e 's/__APPLE__/__DISABLED__/' \
+                       src/lib/ares_sysconfig_mac.c || die
+               sed -i -e '/elif defined(__APPLE__)/s/__APPLE__/__DISABLED__/' \
+                       src/lib/ares_sysconfig.c || die
+       fi
+}
+
+multilib_src_configure() {
+       local myeconfargs=(
+               --enable-symbol-hiding
+               $(use_enable static-libs static)
+               $(use_enable test tests)
+       )
+
+       # Needed for running unit tests only
+       # Violates sandbox and tests pass fine without
+       export ares_cv_user_namespace=no
+       export ares_cv_uts_namespace=no
+       ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+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
+       local network_tests=(
+               # Most live tests have Live in the name
+               *Live*
+               # These don't but are still in ares-test-live.cc => live
+               *GetTCPSock*
+               *TimeoutValue*
+               *GetSock*
+               *GetSock_virtualized*
+               *VerifySocketFunctionCallback*
+               # Seems flaky, even run manually
+               # 
https://github.com/c-ares/c-ares/commit/9e542a8839f81c990bb0dff14beeaf9aa6bcc18d
+               *MockUDPMaxQueriesTest.GetHostByNameParallelLookups*
+       )
+
+       # The format for disabling test1, test2, and test3 looks like:
+       # -test1:test2:test3
+       edo ./arestest --gtest_filter=-$(echo $(IFS=:; echo 
"${network_tests[*]}"))
+}
+
+multilib_src_install_all() {
+       einstalldocs
+
+       find "${ED}" -name "*.la" -delete || die
+}

Reply via email to