Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/udns/, net-libs/udns/files/
Date: Fri, 30 Dec 2022 06:33:39
Message-Id: 1672375846.358a7757b4c68cd58ed9b51de11e3bdbcf0e5780.sam@gentoo
1 commit: 358a7757b4c68cd58ed9b51de11e3bdbcf0e5780
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 30 04:46:15 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 30 04:50:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=358a7757
7
8 net-libs/udns: fix build w/ clang 16
9
10 Closes: https://bugs.gentoo.org/874759
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../udns/files/udns-0.4-configure-clang16.patch | 24 ++++++++++++++++++++++
14 .../udns/{udns-0.4.ebuild => udns-0.4-r1.ebuild} | 10 ++++++---
15 2 files changed, 31 insertions(+), 3 deletions(-)
16
17 diff --git a/net-libs/udns/files/udns-0.4-configure-clang16.patch b/net-libs/udns/files/udns-0.4-configure-clang16.patch
18 new file mode 100644
19 index 000000000000..6b2dcda26ca0
20 --- /dev/null
21 +++ b/net-libs/udns/files/udns-0.4-configure-clang16.patch
22 @@ -0,0 +1,24 @@
23 +https://bugs.gentoo.org/874759
24 +--- a/configure
25 ++++ b/configure
26 +@@ -65,9 +65,9 @@ ac_prog_ranlib_v
27 +
28 + ac_ign ac_yesno "for getopt()" ac_have GETOPT ac_link <<EOF
29 + #include <stdio.h>
30 ++#include <unistd.h>
31 + extern int optind;
32 + extern char *optarg;
33 +-extern int getopt(int, char **, char *);
34 + int main(int argc, char **argv) {
35 + getopt(argc, argv, "abc");
36 + return optarg ? optind : 0;
37 +@@ -75,7 +75,8 @@ int main(int argc, char **argv) {
38 + EOF
39 +
40 + if ac_library_find_v 'socket and connect' "" "-lsocket -lnsl" <<EOF
41 +-int main() { socket(); connect(); return 0; }
42 ++#include <sys/socket.h>
43 ++int main() { socket(0, 0, 0); connect(0, 0, 0); return 0; }
44 + EOF
45 + then :
46 + else
47
48 diff --git a/net-libs/udns/udns-0.4.ebuild b/net-libs/udns/udns-0.4-r1.ebuild
49 similarity index 84%
50 rename from net-libs/udns/udns-0.4.ebuild
51 rename to net-libs/udns/udns-0.4-r1.ebuild
52 index da981b2165e9..f8f8c3675854 100644
53 --- a/net-libs/udns/udns-0.4.ebuild
54 +++ b/net-libs/udns/udns-0.4-r1.ebuild
55 @@ -1,9 +1,9 @@
56 # Copyright 1999-2022 Gentoo Authors
57 # Distributed under the terms of the GNU General Public License v2
58
59 -EAPI=7
60 +EAPI=8
61
62 -inherit toolchain-funcs
63 +inherit edo toolchain-funcs
64
65 DESCRIPTION="Async-capable DNS stub resolver library"
66 HOMEPAGE="http://www.corpit.ru/mjt/udns.html"
67 @@ -14,9 +14,13 @@ SLOT="0"
68 KEYWORDS="amd64 ~hppa ppc ~ppc64 sparc x86"
69 IUSE="ipv6 static +tools"
70
71 +PATCHES=(
72 + "${FILESDIR}"/${PN}-0.4-configure-clang16.patch
73 +)
74 +
75 src_configure() {
76 # Uses non-standard configure script, econf doesn't work
77 - CC="$(tc-getCC)" ./configure $(use_enable ipv6) || die "Configure failed"
78 + CC="$(tc-getCC)" edo ./configure $(use_enable ipv6)
79 }
80
81 src_compile() {