summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-dns/c-ares/Manifest2
-rw-r--r--net-dns/c-ares/c-ares-1.19.0.ebuild70
2 files changed, 72 insertions, 0 deletions
diff --git a/net-dns/c-ares/Manifest b/net-dns/c-ares/Manifest
index 8191d14c6a84..5c761d9503c0 100644
--- a/net-dns/c-ares/Manifest
+++ b/net-dns/c-ares/Manifest
@@ -1 +1,3 @@
DIST c-ares-1.18.1.tar.gz 1560165 BLAKE2B c03a572726c6bbb24a3e4773673d0c87f4833bb9582aed57a424eea8c965beb6e232f502b61922b124d37403d91ebfefe0db7373673fc22e0d752c4e5036eb07 SHA512 1276ec0799916019f8c0af6b55a139701bd15e0ca4a00811d07963893978bc96c107b980f0fd49f81aa70bc8b3b8cd671195ba357c390772d4c2c5643c50c5a5
+DIST c-ares-1.19.0.tar.gz 1572210 BLAKE2B d77be535dfa852bf3d91258ddf06b3c63a40123883adb83a4e5652d4b1b16801ddefefad70d83a7d6d9aa81c9c81956fef42bc778d7380d6b398ccfc9f8b82dc SHA512 a7f5988bef393afec08a225be92f6eee54a3e67170fb26cbe00dcc5c5a457b27037bbcfeccc39fb855ed72f100196958d6cbbe251bf1ccfbdd353be18f098359
+DIST c-ares-1.19.0.tar.gz.asc 488 BLAKE2B 1b8dc3ad7b916cb5ea1c95ffd12315d303f78880416836d11d2fa7d8ca93fa1ca30898e6a865af79a35e5dc4d0f4fccfcc9eae6f028d456d38ede9fe8b7edd71 SHA512 814aad5dbe2bb987035b53d977e03a73a90356200f671f36949a77e978cf8311ccc8375e63ade6fe2e1380f1f9c3b34c1ba7d48365fd5689cf5c24425ab8a129
diff --git a/net-dns/c-ares/c-ares-1.19.0.ebuild b/net-dns/c-ares/c-ares-1.19.0.ebuild
new file mode 100644
index 000000000000..862fa9b9e499
--- /dev/null
+++ b/net-dns/c-ares/c-ares-1.19.0.ebuild
@@ -0,0 +1,70 @@
+# 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/danielstenberg.asc
+inherit edo multilib-minimal verify-sig
+
+DESCRIPTION="C library that resolves names asynchronously"
+HOMEPAGE="https://c-ares.org/"
+SRC_URI="
+ https://c-ares.org/download/${P}.tar.gz
+ verify-sig? ( https://c-ares.org/download/${P}.tar.gz.asc )
+"
+
+# Subslot = SONAME of libcares.so.2
+SLOT="0/2"
+LICENSE="MIT"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-danielstenberg )"
+
+DOCS=( AUTHORS CHANGES NEWS README.md RELEASE-NOTES TODO )
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/ares_build.h
+)
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --enable-nonblocking
+ --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 ax_cv_uts_namespace=no
+ export ax_cv_user_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*
+ )
+
+ # 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
+}