summaryrefslogtreecommitdiff
path: root/net-dns/getdns
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/getdns')
-rw-r--r--net-dns/getdns/Manifest6
-rw-r--r--net-dns/getdns/files/getdns-1.7.3-cmake-linking.patch40
-rw-r--r--net-dns/getdns/files/stubby-0.4.3-install-dir.patch28
-rw-r--r--net-dns/getdns/getdns-1.7.3.ebuild97
-rw-r--r--net-dns/getdns/metadata.xml1
5 files changed, 171 insertions, 1 deletions
diff --git a/net-dns/getdns/Manifest b/net-dns/getdns/Manifest
index bfeb097ddc30..dd135f240349 100644
--- a/net-dns/getdns/Manifest
+++ b/net-dns/getdns/Manifest
@@ -1,8 +1,12 @@
AUX getdns-1.4.2-stubby.service.patch 568 BLAKE2B f2e605116f924b109bf2cd734c8eb79314aeb02b0e30e2fd8d62117b44a74f20e64b1b527253a09525ad9ab26aa2a64a51940773064de87e295d1831dfe9e51b SHA512 67c88787d48662d5c555cd2cdff5916a2211aaf45a13b41e0a909d703dcbc66cb3de834cc94b7c3d292d16a99d024b07098b4e0bb1c790e48201ca9ffb598bd2
AUX getdns-1.7.2-clang16.patch 1488 BLAKE2B 992a4f97808880d5ed959cf4f0a04776ba162f5d55dbd56d2c0dc47bcc3e617da2b366b895a7891ed9a3126054272fa0d98277c840c4d853f05c2290b42a5253 SHA512 106db48bb52ff482909b89eaf51781880bf7a60c483b7b7fe8e67bb448038876f2343f21152ae3bd2c9115f133eb094290520f3803da1322d5b59abb85ddfef5
+AUX getdns-1.7.3-cmake-linking.patch 2216 BLAKE2B cee478b3630cf8c7923b257deaf33ec000cfc5609061f1359ffb2fbccb860a1690ef6d07e079b0d33d5e1fe8c80e06559927489d6dbff89bc8e14c93687573ff SHA512 5c0ae491be3c1bca32202253703b1ce494f3c0d80fce943849aee6b2946968121409585d2e8ba45a98c434089126282e95c777c80665772bba69abe578589d37
+AUX stubby-0.4.3-install-dir.patch 1306 BLAKE2B 09c80b51371ec96748c84848a1c6a81fa82f5ff7cea50f91f5af2400462ac970639e15bf90ec739e3d73d2752627daa5f3992d0f70dc79d9ea69d5ca06c0fd0f SHA512 4362d96e35156d52020168f847ee97c384fd2d46e0698101b8cfb999d04d362abe077da48dfd4aac8596332c2d142b802dda5ad10a42a2befe1fd43017ea0f2d
AUX stubby.confd-r1 546 BLAKE2B 2f81b79b290264701ee75029ee61e006e7f6e2425ebd8090e2f07d4aed4903b88e07576893f653a8704f5181b3fb67f51327e41fef909bc56f5022bf124a4183 SHA512 10793c0ab9081c083dd702b57ffd864aa5a6d76f678eeb704b577188c0a00536f39f2dbb960d8333564b99981a5e2d4414802ffa8506b7cb41fc517680e2b78c
AUX stubby.initd-r2 625 BLAKE2B 83737407d4ba1d64edabd346868e8401438a9b90b7ddea2d11387ca2dd4d27b68b53039dbf83c60d54c63e9e72171421c40ecaefd5b9b6d8bd4a09eb2a6dcb54 SHA512 0149fd219af720102988663f58f730228f8684267daaf279bcb80fbf70aba3d3d8cd41e745af2b3afbae6270259232dcc5bada0f58c935e6157620c06c53f347
AUX stubby.logrotate 90 BLAKE2B 8417a72ee319a12a38b94dcbd38617925539ec4971443097be155012ca7eefadb558c9ea01af03e77f1c28441f06fce73f01c2bfbbe9d305ec56b728b5eb886c SHA512 1dc35b1d0572de915304e632d9b4e6f3017deb3c906d93fad532564d70b961c5595194ac8e11d1888710ff3b5cf9512e1a1a5007d10128dde31875bee8c9e0e0
DIST getdns-1.7.2.tar.gz 702969 BLAKE2B 668a754200b816790f39a772d89c28e14bc5dbd041e07d9e53605ad44d63d6637078b66881c35dda62ed61622142797cc8f0041522e076cf551651fca688053a SHA512 6c4a75a4696c46ec8bd9e9659a93fd81f3490b43da28a4c95f99a766027c7588fc493a8ac51563afb8f975c0e5b77d5ea67014d80e78ee2bb17fba1d1073d19f
+DIST getdns-1.7.3.tar.gz 703262 BLAKE2B 830063fc6f882a624fb7a6bb36fcb4f049a83ddd4515a906152a76d0247f4397b1e12ace7ce07053e7a42432c4f3683fe999ff36d8ede13a005ebecd14a78326 SHA512 d5725a24378b6fe0018daefdaba5565d2d4d51109ef66609fc34270a0a69accb95f5f895d0cdfc5caca51d2ec586db126f367439f05aed12507395af26739e2f
EBUILD getdns-1.7.2-r1.ebuild 2236 BLAKE2B 207ea6b862e871a5d1913f031729adcc56d1d1bc4386aa7cfb2952e0f5add4fa726691d5b81641fa06f62f32524b85d367f399e69836bd6b5b81032248bc7238 SHA512 e9b9d96348c9a8a3853b3474b0d3207a8fd45346fa06a056d5c534389005d0ea2ffe25f76396a04bd521d117c59582d170c849c868856137b7c44c6fcd147ff4
-MISC metadata.xml 661 BLAKE2B 2eddca7fcdeb24c4522ba4a753fccdffaee7f706666b0b5193ede93f3da969021e0f533aea8da71a1587ffbf3f4d826e220fa8bfec2b90ec6a6d89b66d337eac SHA512 b7d258232ddb38b60196ba61dec4c78b760ebe2bbc654ba2c2c838f8931510910e4662de0003f4364d76072fabff2cd83f63f1688412bb60f4de0c40ecde32a2
+EBUILD getdns-1.7.3.ebuild 2355 BLAKE2B f542306f0cdb61961bc27c102a41d2966c7902e2250203a1eafd11416165621ed42fa48f8418ff49523466fc23e81020ea529f8e0573bd4a519fd7ca9bc9553e SHA512 5ce8d918100ba1b4645457c99a7241d6adc4becf1e516305d4b75975d156fcf2e839b3761b7eb7e0301b517e953698f3346f9189143a28f443c3ddd1106f83a9
+MISC metadata.xml 723 BLAKE2B 57f6b447b5d9c981d204567758b6946cbe11a0f5528255724faf71d3367eb993204b135105cd9cfcd5ca55d453e2dacabfd48fcdf001686f48c18fdc12e8030a SHA512 432f002ddc1ee5d641d93524e6a520857335270d398352d72201e16fa3b9bd6618feec118b04a635dbb5417883fa3be2ba3c238ebcf85baa15d2c6ad570314b6
diff --git a/net-dns/getdns/files/getdns-1.7.3-cmake-linking.patch b/net-dns/getdns/files/getdns-1.7.3-cmake-linking.patch
new file mode 100644
index 000000000000..18e9e51d3285
--- /dev/null
+++ b/net-dns/getdns/files/getdns-1.7.3-cmake-linking.patch
@@ -0,0 +1,40 @@
+diff -ur a/cmake/modules/FindGnuTLS.cmake b/cmake/modules/FindGnuTLS.cmake
+--- a/cmake/modules/FindGnuTLS.cmake 2024-10-16 21:33:11.113665484 +0200
++++ b/cmake/modules/FindGnuTLS.cmake 2024-10-16 21:33:40.923835214 +0200
+@@ -38,8 +38,8 @@
+
+ if (PkgGnuTLS_FOUND AND PkgGnuTLSDane_FOUND)
+ set(GNUTLS_INCLUDE_DIR ${PkgGnuTLS_INCLUDE_DIRS} $PkgGnuTLSDane_INCLUDE_DIRS} CACHE FILEPATH "GnuTLS include path")
+- set(NETTLE_LIBRARIES ${PkgGnuTLS_LIBRARIES} ${PkgGnuTLSDane_LIBRARIES} CACHE STRING "GnuTLS libraries")
+- set(NETTLE_VERSION ${PkgGnuTLS_VERSION})
++ set(GNUTLS_LIBRARIES ${PkgGnuTLS_LIBRARIES} ${PkgGnuTLSDane_LIBRARIES} CACHE STRING "GnuTLS libraries")
++ set(GNUTLS_VERSION ${PkgGnuTLS_VERSION})
+ add_library(GnuTLS::GnuTLS ALIAS PkgConfig::PkgGnuTLS)
+ add_library(GnuTLS::Dane ALIAS PkgConfig::PkgGnuTLSDane)
+ set(GnuTLS_FOUND ON)
+diff -ur a/cmake/modules/FindNettle.cmake b/cmake/modules/FindNettle.cmake
+--- a/cmake/modules/FindNettle.cmake 2024-10-16 21:05:17.521591723 +0200
++++ b/cmake/modules/FindNettle.cmake 2024-10-16 21:50:42.414650647 +0200
+@@ -34,12 +34,20 @@
+ if(PKG_CONFIG_FOUND)
+ pkg_check_modules(PkgNettle IMPORTED_TARGET GLOBAL nettle)
+ pkg_check_modules(PkgHogweed IMPORTED_TARGET GLOBAL QUIET hogweed)
++ if (UNIX)
++ pkg_check_modules(PkgGmp IMPORTED_TARGET GLOBAL QUIET gmp)
++ endif ()
+ endif()
+
+-if(PkgNettle_FOUND AND PkHogweed_FOUND)
++if(PkgNettle_FOUND AND PkgHogweed_FOUND)
+ set(NETTLE_INCLUDE_DIR ${PkgNettle_INCLUDE_DIRS} ${PkgHogweed_INCLUDE_DIRS} CACHE FILEPATH "Nettle include path")
+- set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES} CACHE STRING "Nettle libraries")
++ if (PkgGmp_FOUND)
++ set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES} ${PkgGmp_LIBRARIES} CACHE STRING "Nettle libraries")
++ else ()
++ set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES} CACHE STRING "Nettle libraries")
++ endif ()
+ set(NETTLE_VERSION ${PkgNettle_VERSION})
++ set_target_properties(PkgConfig::PkgNettle PROPERTIES INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}")
+ add_library(Nettle::Nettle ALIAS PkgConfig::PkgNettle)
+ add_library(Nettle::Hogweed ALIAS PkgConfig::PkgHogweed)
+ set(Nettle_FOUND ON)
diff --git a/net-dns/getdns/files/stubby-0.4.3-install-dir.patch b/net-dns/getdns/files/stubby-0.4.3-install-dir.patch
new file mode 100644
index 000000000000..51f846e3aa95
--- /dev/null
+++ b/net-dns/getdns/files/stubby-0.4.3-install-dir.patch
@@ -0,0 +1,28 @@
+diff -ur a/stubby/CMakeLists.txt b/stubby/CMakeLists.txt
+--- a/stubby/CMakeLists.txt 2024-10-14 20:08:06.950985143 +0200
++++ b/stubby/CMakeLists.txt 2024-10-14 20:09:29.408454887 +0200
+@@ -58,13 +58,6 @@
+ else ()
+ set(RUNSTATEDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run")
+ endif ()
+-install(DIRECTORY
+- DESTINATION ${RUNSTATEDIR}
+- DIRECTORY_PERMISSIONS
+- OWNER_READ OWNER_WRITE OWNER_EXECUTE
+- GROUP_READ GROUP_EXECUTE
+- WORLD_READ WORLD_EXECUTE
+- )
+ set(STUBBYCONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/stubby")
+
+ find_package(Libyaml REQUIRED)
+@@ -187,8 +180,8 @@
+ if (ENABLE_WINDOWS_SERVICE)
+ install(TARGETS stubres LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ endif ()
+-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/stubby.1 DESTINATION share/man/man1)
+-install(FILES AUTHORS COPYING ChangeLog NEWS README.md DESTINATION share/doc/stubby)
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/stubby.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
++install(FILES AUTHORS COPYING ChangeLog NEWS README.md DESTINATION ${CMAKE_INSTALL_DOCDIR}/stubby)
+
+ # Ensure the file gets CRLF line endings on Windows.
+ file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/stubby.yml INPUT ${CMAKE_CURRENT_SOURCE_DIR}/stubby.yml.example)
diff --git a/net-dns/getdns/getdns-1.7.3.ebuild b/net-dns/getdns/getdns-1.7.3.ebuild
new file mode 100644
index 000000000000..e86d32e2ef54
--- /dev/null
+++ b/net-dns/getdns/getdns-1.7.3.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+_SRCURI_P="${P/%_beta1/-beta.1}"
+
+inherit cmake fcaps systemd tmpfiles
+
+DESCRIPTION="Modern asynchronous DNS API"
+HOMEPAGE="https://getdnsapi.net/"
+SRC_URI="https://getdnsapi.net/releases/${_SRCURI_P//./-}/${_SRCURI_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples +getdns-query +getdns-server-mon gnutls +idn libev libevent libuv minimal static-libs stubby test +unbound"
+
+S="${WORKDIR}/${_SRCURI_P}"
+
+# https://bugs.gentoo.org/661760
+# https://github.com/getdnsapi/getdns/issues/407
+# (As of 1.7.0, seems to need network)
+RESTRICT="test"
+#RESTRICT="!test? ( test )"
+
+DEPEND="
+ dev-libs/libbsd
+ dev-libs/libyaml
+ dev-libs/openssl:=
+ idn? ( net-dns/libidn2:= )
+ gnutls? (
+ net-libs/gnutls:0=[dane,openssl]
+ dev-libs/nettle:0=
+ )
+ libev? ( dev-libs/libev:= )
+ libevent? ( dev-libs/libevent:= )
+ libuv? ( dev-libs/libuv:= )
+ test? ( dev-libs/check )
+ !minimal? ( >=net-dns/unbound-1.5.9:= )
+"
+RDEPEND="
+ ${DEPEND}
+ stubby? (
+ acct-group/stubby
+ acct-user/stubby
+ sys-libs/libcap
+ )
+"
+BDEPEND="
+ doc? ( app-text/doxygen )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4.2-stubby.service.patch"
+ "${FILESDIR}/${PN}-1.7.3-cmake-linking.patch"
+ "${FILESDIR}/stubby-0.4.3-install-dir.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_RUNSTATEDIR=/var/run/stubby
+ -DBUILD_DOXYGEN=$(usex doc)
+ -DBUILD_GETDNS_QUERY=$(usex getdns-query)
+ -DBUILD_GETDNS_SERVER_MON=$(usex getdns-server-mon)
+ -DBUILD_STUBBY=$(usex stubby)
+ -DENABLE_STATIC=$(usex static-libs)
+ -DBUILD_TESTING:BOOL=$(usex test)
+ -DENABLE_UNBOUND_EVENT_API=$(usex unbound)
+ -DENABLE_STUB_ONLY=$(usex minimal)
+ -DUSE_GNUTLS=$(usex gnutls)
+ -DUSE_LIBEV=$(usex libev)
+ -DUSE_LIBEVENT2=$(usex libevent)
+ -DUSE_LIBIDN2=$(usex idn)
+ -DUSE_LIBUV=$(usex libuv)
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ if use stubby; then
+ newinitd "${FILESDIR}"/stubby.initd-r2 stubby
+ newconfd "${FILESDIR}"/stubby.confd-r1 stubby
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/stubby.logrotate stubby
+ systemd_dounit "${S}"/stubby/systemd/stubby.service
+ dotmpfiles "${S}"/stubby/systemd/stubby.conf
+ fi
+}
+
+pkg_postinst() {
+ if use stubby; then
+ fcaps cap_net_bind_service=ei usr/bin/stubby
+ tmpfiles_process stubby.conf
+ fi
+}
diff --git a/net-dns/getdns/metadata.xml b/net-dns/getdns/metadata.xml
index 115e5fa205a5..9e9856efb041 100644
--- a/net-dns/getdns/metadata.xml
+++ b/net-dns/getdns/metadata.xml
@@ -10,5 +10,6 @@
<flag name="libevent">Enable <pkg>dev-libs/libevent</pkg> support</flag>
<flag name="libev">Enable <pkg>dev-libs/libev</pkg> support</flag>
<flag name="libuv">Enable <pkg>dev-libs/libuv</pkg> support</flag>
+ <flag name="minimal">Only build stub resolution mode</flag>
</use>
</pkgmetadata>