summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Jäger <pascal.jaeger@leimstift.de>2022-10-31 23:15:13 +0100
committerSam James <sam@gentoo.org>2022-11-15 01:39:48 +0000
commita089700a7e568e433e17d2b8c2f8c712c8f6cb3c (patch)
treeb029d8fb496a99cdd0e45440d1cc450e1a624bdc /net-misc/bsdwhois
parentkde-misc/krusader: Fix build with USE=-handbook (diff)
downloadgentoo-a089700a7e568e433e17d2b8c2f8c712c8f6cb3c.tar.gz
gentoo-a089700a7e568e433e17d2b8c2f8c712c8f6cb3c.tar.bz2
gentoo-a089700a7e568e433e17d2b8c2f8c712c8f6cb3c.zip
net-misc/bsdwhois: fix build for clang16
Closes: https://bugs.gentoo.org/875029 Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de> Closes: https://github.com/gentoo/gentoo/pull/28057 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/bsdwhois')
-rw-r--r--net-misc/bsdwhois/bsdwhois-1.43.2.1-r1.ebuild36
-rw-r--r--net-misc/bsdwhois/files/bsdwhois-1.43.2.1-clang16-build.patch21
2 files changed, 57 insertions, 0 deletions
diff --git a/net-misc/bsdwhois/bsdwhois-1.43.2.1-r1.ebuild b/net-misc/bsdwhois/bsdwhois-1.43.2.1-r1.ebuild
new file mode 100644
index 000000000000..2361c19c70eb
--- /dev/null
+++ b/net-misc/bsdwhois/bsdwhois-1.43.2.1-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit autotools flag-o-matic
+
+DESCRIPTION="FreeBSD Whois Client"
+HOMEPAGE="https://www.freebsd.org/"
+SRC_URI="http://utenti.gufi.org/~drizzt/codes/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.43.2.1-musl-cdefs.patch"
+ "${FILESDIR}/${PN}-1.43.2.1-clang16-build.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # bug #875029
+ append-cppflags -D_GNU_SOURCE
+ default
+}
+
+src_install() {
+ default
+
+ mv "${ED}"/usr/share/man/man1/{whois,bsdwhois}.1 || die
+ mv "${ED}"/usr/bin/{whois,bsdwhois} || die
+}
diff --git a/net-misc/bsdwhois/files/bsdwhois-1.43.2.1-clang16-build.patch b/net-misc/bsdwhois/files/bsdwhois-1.43.2.1-clang16-build.patch
new file mode 100644
index 000000000000..7f7052322b0b
--- /dev/null
+++ b/net-misc/bsdwhois/files/bsdwhois-1.43.2.1-clang16-build.patch
@@ -0,0 +1,21 @@
+Clang16 will not allow implicit function declarations and implicit integers etc.
+This patch overhauls the source code for modern C.
+
+Bug: https://bugs.gentoo.org/875029
+
+Signed-off-by: Pascal Jäger <pascal.jaeger@leimstift.de>
+
+--- a/strnstr.c
++++ b/strnstr.c
+@@ -46,10 +46,7 @@ static char sccsid[] = "@(#)strstr.c 8.1 (Berkeley) 6/4/93";
+ * first slen characters of s.
+ */
+ char *
+-strnstr(s, find, slen)
+- const char *s;
+- const char *find;
+- size_t slen;
++strnstr(const char *s, const char *find, size_t slen)
+ {
+ char c, sc;
+ size_t len;