From 358a7757b4c68cd58ed9b51de11e3bdbcf0e5780 Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 30 Dec 2022 04:46:15 +0000 Subject: net-libs/udns: fix build w/ clang 16 Closes: https://bugs.gentoo.org/874759 Signed-off-by: Sam James --- .../udns/files/udns-0.4-configure-clang16.patch | 24 +++++++++++ net-libs/udns/udns-0.4-r1.ebuild | 46 ++++++++++++++++++++++ net-libs/udns/udns-0.4.ebuild | 42 -------------------- 3 files changed, 70 insertions(+), 42 deletions(-) create mode 100644 net-libs/udns/files/udns-0.4-configure-clang16.patch create mode 100644 net-libs/udns/udns-0.4-r1.ebuild delete mode 100644 net-libs/udns/udns-0.4.ebuild (limited to 'net-libs/udns') diff --git a/net-libs/udns/files/udns-0.4-configure-clang16.patch b/net-libs/udns/files/udns-0.4-configure-clang16.patch new file mode 100644 index 000000000000..6b2dcda26ca0 --- /dev/null +++ b/net-libs/udns/files/udns-0.4-configure-clang16.patch @@ -0,0 +1,24 @@ +https://bugs.gentoo.org/874759 +--- a/configure ++++ b/configure +@@ -65,9 +65,9 @@ ac_prog_ranlib_v + + ac_ign ac_yesno "for getopt()" ac_have GETOPT ac_link < ++#include + extern int optind; + extern char *optarg; +-extern int getopt(int, char **, char *); + int main(int argc, char **argv) { + getopt(argc, argv, "abc"); + return optarg ? optind : 0; +@@ -75,7 +75,8 @@ int main(int argc, char **argv) { + EOF + + if ac_library_find_v 'socket and connect' "" "-lsocket -lnsl" < ++int main() { socket(0, 0, 0); connect(0, 0, 0); return 0; } + EOF + then : + else diff --git a/net-libs/udns/udns-0.4-r1.ebuild b/net-libs/udns/udns-0.4-r1.ebuild new file mode 100644 index 000000000000..f8f8c3675854 --- /dev/null +++ b/net-libs/udns/udns-0.4-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edo toolchain-funcs + +DESCRIPTION="Async-capable DNS stub resolver library" +HOMEPAGE="http://www.corpit.ru/mjt/udns.html" +SRC_URI="http://www.corpit.ru/mjt/udns/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ~hppa ppc ~ppc64 sparc x86" +IUSE="ipv6 static +tools" + +PATCHES=( + "${FILESDIR}"/${PN}-0.4-configure-clang16.patch +) + +src_configure() { + # Uses non-standard configure script, econf doesn't work + CC="$(tc-getCC)" edo ./configure $(use_enable ipv6) +} + +src_compile() { + emake $(usex tools shared sharedlib) +} + +src_install() { + dolib.so libudns.so.0 + dosym libudns.so.0 /usr/$(get_libdir)/libudns.so + + if use tools; then + newbin dnsget_s dnsget + newbin ex-rdns_s ex-rdns + newbin rblcheck_s rblcheck + fi + + doheader udns.h + + doman udns.3 + use tools && doman dnsget.1 rblcheck.1 + + dodoc NEWS NOTES TODO +} diff --git a/net-libs/udns/udns-0.4.ebuild b/net-libs/udns/udns-0.4.ebuild deleted file mode 100644 index da981b2165e9..000000000000 --- a/net-libs/udns/udns-0.4.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit toolchain-funcs - -DESCRIPTION="Async-capable DNS stub resolver library" -HOMEPAGE="http://www.corpit.ru/mjt/udns.html" -SRC_URI="http://www.corpit.ru/mjt/udns/${P}.tar.gz" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="amd64 ~hppa ppc ~ppc64 sparc x86" -IUSE="ipv6 static +tools" - -src_configure() { - # Uses non-standard configure script, econf doesn't work - CC="$(tc-getCC)" ./configure $(use_enable ipv6) || die "Configure failed" -} - -src_compile() { - emake $(usex tools shared sharedlib) -} - -src_install() { - dolib.so libudns.so.0 - dosym libudns.so.0 /usr/$(get_libdir)/libudns.so - - if use tools; then - newbin dnsget_s dnsget - newbin ex-rdns_s ex-rdns - newbin rblcheck_s rblcheck - fi - - doheader udns.h - - doman udns.3 - use tools && doman dnsget.1 rblcheck.1 - - dodoc NEWS NOTES TODO -} -- cgit v1.2.3-65-gdbad