diff options
author | Sam James <sam@gentoo.org> | 2023-01-27 08:20:10 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-01-27 08:20:10 +0000 |
commit | 03a9f378fa9da58c379c92b872cdd7424987233c (patch) | |
tree | 6b589942d03d3ae7e39e5e60a6fbd0c58dd78125 /net-libs/ldns | |
parent | sys-devel/gcc: add 10.4.1_p20230126 (diff) | |
download | gentoo-03a9f378fa9da58c379c92b872cdd7424987233c.tar.gz gentoo-03a9f378fa9da58c379c92b872cdd7424987233c.tar.bz2 gentoo-03a9f378fa9da58c379c92b872cdd7424987233c.zip |
net-libs/ldns: fix doc build
Closes: https://bugs.gentoo.org/892065
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/ldns')
-rw-r--r-- | net-libs/ldns/files/ldns-1.8.3-configure-strict.patch | 139 | ||||
-rw-r--r-- | net-libs/ldns/files/ldns-1.8.3-docs.patch | 95 | ||||
-rw-r--r-- | net-libs/ldns/ldns-1.8.3.ebuild | 29 |
3 files changed, 250 insertions, 13 deletions
diff --git a/net-libs/ldns/files/ldns-1.8.3-configure-strict.patch b/net-libs/ldns/files/ldns-1.8.3-configure-strict.patch new file mode 100644 index 000000000000..37b809585a9b --- /dev/null +++ b/net-libs/ldns/files/ldns-1.8.3-configure-strict.patch @@ -0,0 +1,139 @@ +https://github.com/NLnetLabs/ldns/commit/59af7359ed744327aaf0deb2e6ac90fe9e191ba6 + +From 59af7359ed744327aaf0deb2e6ac90fe9e191ba6 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sat, 19 Nov 2022 01:31:57 +0000 +Subject: [PATCH] acx_nlnetlabs.m4: fix -Wstrict-prototypes + +Fix -Wstrict-prototypes as it's easy to do and avoids future warnings. Noticed +when doing Clang 16 / GCC 14 / C23 work. + +For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2], +or the (new) c-std-porting mailing list [3]. + +[0] https://lwn.net/Articles/913505/ +[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 +[2] https://wiki.gentoo.org/wiki/Modern_C_porting +[3] hosted at lists.linux.dev. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/acx_nlnetlabs.m4 ++++ b/acx_nlnetlabs.m4 +@@ -183,7 +183,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` + AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, + [ + echo '$2' > conftest.c +-echo 'void f(){}' >>conftest.c ++echo 'void f(void){}' >>conftest.c + if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then + eval "cv_prog_cc_flag_needed_$cache=no" + else +@@ -229,7 +229,7 @@ dnl DEPFLAG: set to flag that generates dependencies. + AC_DEFUN([ACX_DEPFLAG], + [ + AC_MSG_CHECKING([$CC dependency flag]) +-echo 'void f(){}' >conftest.c ++echo 'void f(void){}' >conftest.c + if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then + DEPFLAG="-MM" + else +@@ -268,7 +268,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL + #include <getopt.h> + #endif + +-int test() { ++int test(void) { + int a; + char **opts = NULL; + struct timeval tv; +@@ -305,7 +305,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL + #include <getopt.h> + #endif + +-int test() { ++int test(void) { + int a; + char **opts = NULL; + struct timeval tv; +@@ -331,7 +331,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, + [ + #include <stdbool.h> + #include <ctype.h> +-int test() { ++int test(void) { + int a = 0; + return a; + } +@@ -341,7 +341,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, + [ + #include <ctype.h> + +-int test() { ++int test(void) { + int a; + a = isascii(32); + return a; +@@ -352,7 +352,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, + [ + #include <netinet/in.h> + +-int test() { ++int test(void) { + struct in6_pktinfo inf; + int a = (int)sizeof(inf); + return a; +@@ -366,7 +366,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, + [ + #include <unistd.h> + +-int test() { ++int test(void) { + int a = setresgid(0,0,0); + a = setresuid(0,0,0); + return a; +@@ -381,7 +381,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, + #endif + #include <netdb.h> + +-int test() { ++int test(void) { + int a = 0; + char *t; + time_t time = 0; +@@ -409,7 +409,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, + #include <getopt.h> + #endif + +-int test() { ++int test(void) { + int a; + char **opts = NULL; + struct timeval tv; +@@ -809,7 +809,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko + ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, + [ + #include <stdio.h> +-int test() { ++int test(void) { + int a = fseeko(stdin, 0, 0); + return a; + } +@@ -834,7 +834,7 @@ char* (*f) () = getaddrinfo; + #ifdef __cplusplus + } + #endif +-int main() { ++int main(void) { + ; + return 0; + } +@@ -898,7 +898,7 @@ cache=`echo $1 | sed 'y%.=/+-%___p_%'` + AC_CACHE_VAL(cv_cc_deprecated_$cache, + [ + echo '$3' >conftest.c +-echo 'void f(){ $2 }' >>conftest.c ++echo 'void f(void){ $2 }' >>conftest.c + if test -z "`$CC $CPPFLAGS $CFLAGS -c conftest.c 2>&1 | grep -e deprecated -e unavailable`"; then + eval "cv_cc_deprecated_$cache=no" + else + diff --git a/net-libs/ldns/files/ldns-1.8.3-docs.patch b/net-libs/ldns/files/ldns-1.8.3-docs.patch new file mode 100644 index 000000000000..6b4e7582a441 --- /dev/null +++ b/net-libs/ldns/files/ldns-1.8.3-docs.patch @@ -0,0 +1,95 @@ +https://bugs.gentoo.org/892065 +https://github.com/NLnetLabs/ldns/commit/5d5c95a947d98dd292ba81e95ca90ba6aeccb1d0 + +From 5d5c95a947d98dd292ba81e95ca90ba6aeccb1d0 Mon Sep 17 00:00:00 2001 +From: Willem Toorop <willem@nlnetlabs.nl> +Date: Mon, 5 Sep 2022 10:01:18 +0200 +Subject: [PATCH] Fix building documentation in build directory. + +Thanks Michael Tokarev +--- a/Makefile.in ++++ b/Makefile.in +@@ -270,7 +270,7 @@ doxygen: + @if test ! -e doc/header.html ; then \ + $(INSTALL) -c -m 644 $(srcdir)/doc/header.html doc/ ; \ + fi ; +- $(doxygen) $(srcdir)/libdns.doxygen ++ $(doxygen) libdns.doxygen + + doc: manpages $(doxygen) + @$(INSTALL) -d doc +--- a/ldns/net.h.in ++++ b/ldns/net.h.in +@@ -91,13 +91,12 @@ int ldns_tcp_bgsend(ldns_buffer *qbin, const struct sockaddr_storage *to, sockle + + /** + * Sends a buffer to an ip using tcp and return the response as a ldns_pkt +- * \param[in] qbin the ldns_buffer to be send ++ * \param[out] result packet with the answer + * \param[in] qbin the ldns_buffer to be send + * \param[in] to the ip addr to send to + * \param[in] tolen length of the ip addr + * \param[in] timeout the timeout value for the network + * \param[out] answersize size of the packet +- * \param[out] result packet with the answer + * \return status + */ + ldns_status ldns_tcp_send(uint8_t **result, ldns_buffer *qbin, const struct sockaddr_storage *to, socklen_t tolen, struct timeval timeout, size_t *answersize); +--- a/libdns.doxygen.in ++++ b/libdns.doxygen.in +@@ -51,7 +51,7 @@ PROJECT_BRIEF = + # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy + # the logo to the output directory. + +-PROJECT_LOGO = doc/images/LogoInGradientBar2-y100.png ++PROJECT_LOGO = @srcdir@/doc/images/LogoInGradientBar2-y100.png + + # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path + # into which the generated documentation will be written. If a relative path is +@@ -854,12 +854,12 @@ WARN_LOGFILE = + # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING + # Note: If this tag is empty the current directory is searched. + +-INPUT = . \ +- ldns/ \ +- doc/ \ +- examples/ldns-mx.c \ +- examples/ldns-read-zone.c \ +- examples/ldns-signzone.c ++INPUT = ldns/ \ ++ @srcdir@/doc/ \ ++ @srcdir@/examples/ldns-mx.c \ ++ @srcdir@/examples/ldns-read-zone.c \ ++ @srcdir@/examples/ldns-signzone.c \ ++ @srcdir@ + + # This tag can be used to specify the character encoding of the source files + # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +@@ -936,7 +936,7 @@ EXCLUDE_SYMBOLS = + # that contain example code fragments that are included (see the \include + # command). + +-EXAMPLE_PATH = examples ++EXAMPLE_PATH = @srcdir@/examples + + # If the value of the EXAMPLE_PATH tag contains directories, you can use the + # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +@@ -956,7 +956,7 @@ EXAMPLE_RECURSIVE = NO + # that contain images that are to be included in the documentation (see the + # \image command). + +-IMAGE_PATH = doc/images ++IMAGE_PATH = @srcdir@/doc/images + + # The INPUT_FILTER tag can be used to specify a program that doxygen should + # invoke to filter for each input file. Doxygen will invoke the filter program +@@ -1798,7 +1798,7 @@ COMPACT_LATEX = NO + # The default value is: a4. + # This tag requires that the tag GENERATE_LATEX is set to YES. + +-PAPER_TYPE = a4wide ++PAPER_TYPE = a4 + + # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names + # that should be included in the LaTeX output. The package can be specified just + diff --git a/net-libs/ldns/ldns-1.8.3.ebuild b/net-libs/ldns/ldns-1.8.3.ebuild index 310606f4c952..04665c7bc53b 100644 --- a/net-libs/ldns/ldns-1.8.3.ebuild +++ b/net-libs/ldns/ldns-1.8.3.ebuild @@ -2,8 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=8 + PYTHON_COMPAT=( python3_{9,10} ) -inherit python-single-r1 multilib-minimal +inherit autotools python-single-r1 multilib-minimal DESCRIPTION="A library with the aim to simplify DNS programming in C" HOMEPAGE="https://www.nlnetlabs.nl/projects/ldns/" @@ -13,10 +14,8 @@ LICENSE="BSD" SLOT="0/3" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos ~x64-macos ~x64-solaris" IUSE="doc examples python static-libs" - -REQUIRED_USE=" - python? ( ${PYTHON_REQUIRED_USE} ) -" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +RESTRICT="test" # missing test directory BDEPEND=" python? ( dev-lang/swig ) @@ -27,30 +26,34 @@ DEPEND=" >=dev-libs/openssl-1.1.1l-r1:0=[${MULTILIB_USEDEP},static-libs?] examples? ( net-libs/libpcap ) " -RDEPEND="${DEPEND} +RDEPEND=" + ${DEPEND} !<net-dns/ldns-utils-1.8.0-r2 " -RESTRICT="test" # missing test directory - MULTILIB_CHOST_TOOLS=( /usr/bin/ldns-config ) +PATCHES=( + "${FILESDIR}/ldns-1.8.1-pkgconfig.patch" + "${FILESDIR}/${P}-docs.patch" + "${FILESDIR}/${P}-configure-strict.patch" +) + pkg_setup() { use python && python-single-r1_pkg_setup } src_prepare() { - local PATCHES=( - "${FILESDIR}/ldns-1.8.1-pkgconfig.patch" - ) default + + # Drop after 1.8.3 + eautoreconf } multilib_src_configure() { - ECONF_SOURCE=${S} \ - econf \ + ECONF_SOURCE="${S}" econf \ $(use_enable static-libs static) \ $(multilib_native_use_with python pyldns) \ $(multilib_native_use_with python pyldnsx) \ |