From cc25cdb9b5d8c035c062a0e9a3e31c1047c158a7 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 4 Jan 2023 04:29:15 +0000 Subject: net-dns/getdns: fix configure w/ clang 16 Signed-off-by: Sam James --- net-dns/getdns/files/getdns-1.7.2-clang16.patch | 55 ++++++++++++++ net-dns/getdns/getdns-1.7.2-r1.ebuild | 95 +++++++++++++++++++++++++ net-dns/getdns/getdns-1.7.2.ebuild | 94 ------------------------ 3 files changed, 150 insertions(+), 94 deletions(-) create mode 100644 net-dns/getdns/files/getdns-1.7.2-clang16.patch create mode 100644 net-dns/getdns/getdns-1.7.2-r1.ebuild delete mode 100644 net-dns/getdns/getdns-1.7.2.ebuild (limited to 'net-dns/getdns') diff --git a/net-dns/getdns/files/getdns-1.7.2-clang16.patch b/net-dns/getdns/files/getdns-1.7.2-clang16.patch new file mode 100644 index 000000000000..4b6b58f285a0 --- /dev/null +++ b/net-dns/getdns/files/getdns-1.7.2-clang16.patch @@ -0,0 +1,55 @@ +https://github.com/getdnsapi/getdns/commit/9c076ca34b9569eb60861da9a99f895a49d5a7b4 + +From 9c076ca34b9569eb60861da9a99f895a49d5a7b4 Mon Sep 17 00:00:00 2001 +From: Willem Toorop +Date: Mon, 22 Aug 2022 10:40:35 +0200 +Subject: [PATCH] Issue #526 Some gldns files need stdlib + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -262,6 +262,7 @@ check_include_file(inttypes.h HAVE_INTTYPES_H) + check_include_file(limits.h HAVE_LIMITS_H) + check_include_file(sys/limits.h HAVE_SYS_LIMITS_H) + check_include_file(stdarg.h HAVE_STDARG_H) ++check_include_file(stddef.h HAVE_STDDEF_H) + check_include_file(stdint.h HAVE_STDINT_H) + check_include_file(stdio.h HAVE_STDIO_H) + check_include_file(stdlib.h HAVE_STDLIB_H) +--- a/cmake/include/cmakeconfig.h.in ++++ b/cmake/include/cmakeconfig.h.in +@@ -15,6 +15,7 @@ + #cmakedefine HAVE_LIMITS_H 1 + #cmakedefine HAVE_SYS_LIMITS_H 1 + #cmakedefine HAVE_STDARG_H 1 ++#cmakedefine HAVE_STDDEF_H 1 + #cmakedefine HAVE_STDINT_H 1 + #cmakedefine HAVE_STDIO_H 1 + #cmakedefine HAVE_STDLIB_H 1 +@@ -241,6 +242,10 @@ + # define FD_SETSIZE 1024 + # endif + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + /* the version of the windows API enabled */ + # ifndef WINVER + # define WINVER 0x0600 // 0x0502 +@@ -307,12 +312,11 @@ + #include + #endif + +-#ifdef __cplusplus +-extern "C" { ++#ifdef HAVE_STDLIB_H ++#include + #endif + +-#if STDC_HEADERS +-#include ++#ifdef HAVE_STDDEF_H + #include + #endif + + diff --git a/net-dns/getdns/getdns-1.7.2-r1.ebuild b/net-dns/getdns/getdns-1.7.2-r1.ebuild new file mode 100644 index 000000000000..624b78286187 --- /dev/null +++ b/net-dns/getdns/getdns-1.7.2-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2023 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 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 ) + >=net-dns/unbound-1.5.9:= +" +RDEPEND=" + ${DEPEND} + stubby? ( + acct-group/stubby + acct-user/stubby + sys-libs/libcap + ) +" +BDEPEND=" + doc? ( app-doc/doxygen ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.4.2-stubby.service.patch" + "${FILESDIR}/${P}-clang16.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) + -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/getdns-1.7.2.ebuild b/net-dns/getdns/getdns-1.7.2.ebuild deleted file mode 100644 index 76268cdfdcd1..000000000000 --- a/net-dns/getdns/getdns-1.7.2.ebuild +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 1999-2022 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 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 ) - >=net-dns/unbound-1.5.9:= -" -RDEPEND=" - ${DEPEND} - stubby? ( - acct-group/stubby - acct-user/stubby - sys-libs/libcap - ) -" -BDEPEND=" - doc? ( app-doc/doxygen ) -" - -PATCHES=( - "${FILESDIR}/${PN}-1.4.2-stubby.service.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) - -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 -} -- cgit v1.2.3-65-gdbad