summaryrefslogtreecommitdiff
path: root/net-misc/jwhois
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/jwhois')
-rw-r--r--net-misc/jwhois/Manifest5
-rw-r--r--net-misc/jwhois/files/jwhois-4.0-add-timeout_init-prototype.patch37
-rw-r--r--net-misc/jwhois/files/jwhois-4.0-avoid-implicit-declarations.patch44
-rw-r--r--net-misc/jwhois/jwhois-4.0-r2.ebuild38
-rw-r--r--net-misc/jwhois/metadata.xml1
5 files changed, 124 insertions, 1 deletions
diff --git a/net-misc/jwhois/Manifest b/net-misc/jwhois/Manifest
index 3ae806cfbeec..a372a8e25f08 100644
--- a/net-misc/jwhois/Manifest
+++ b/net-misc/jwhois/Manifest
@@ -1,4 +1,7 @@
+AUX jwhois-4.0-add-timeout_init-prototype.patch 1052 BLAKE2B e8c69a6eb0a8b6c382dc3ff5f3836bd6bb0ffc47bbe563252958a3a181b97a61527bafbb6e3fed03a1a4d0bf43d9243d5ee379a2229376629be6388961ddbe91 SHA512 52fb0b57f15fbab165bc6bfc39e33c3811581abe19da8a67f6f78ba497ca31c7770e1e5cfa272122a9f680d0982d78b349def1ee399b183c2d05cb0858909ba8
+AUX jwhois-4.0-avoid-implicit-declarations.patch 1424 BLAKE2B ff8be8c49b456e890f5d219c02a9392eda739eb5b227178e10c74e397e14bebfb770ea52da4e491d759b95aa6ae5bf4ea6086a4354fbb91886bdbebcd41678ba SHA512 5338654736da5a7328ea1650c8c45ed55799a107fc17c38729404ce1d7f92a63d5c777993ebd800caeded6e0c31cc7a22e167c08751bd30e6a34762b6cc315cc
AUX jwhois-4.0-connect-logic.patch 425 BLAKE2B d0896781a15e43a3b0e4e13bad2e9c2e9a6cddca5e8fa1c49b5fd79b73b39292638559a5bcfc7c63b4aa894a5c13dfeac56d006752d580d2532e1351a5d47296 SHA512 7cd437dabdc332cf5068b98a7d87380572f4e94c3fa6554b62377491018deb6aa94e36339069e5628b0965405446f8fcc41ec44c6e4f6ac8e087b06819533c83
DIST jwhois-4.0.tar.gz 493007 BLAKE2B f578f2a57a95ce78829b859c3135c5ace8431b539bb3447e54633a262996a2d1d3c9802706171437acd325d99cc62773901d7473067307a322b4805d529b0292 SHA512 5d625c3f1031a8eb8ef766ef5d47a8c1a4396d1ad3344fc9449f80dd71ad84aadf21ba67f5c2f99348f732a4df998eefe699fcec4efcadf87f579b70302a44ae
EBUILD jwhois-4.0-r1.ebuild 664 BLAKE2B 666303e775b637fef393fea99934c39b55ea91815bbd0913aa40cbb5575351753577798b9e2f0156d79bcd1db1fbeed1462a3ca06603cdf4e0c7238f3c3ea562 SHA512 d638232665d795b390bfc1b00c2cf7bee128c28419d7c5d9536b277ecd6b7ca8f1238d385da8e0f5622ed5219ab15cb4752c56b27be19ebbed75315e32b3d221
-MISC metadata.xml 341 BLAKE2B e9ac42933e764b2fd30fa1ec7fe4c7f8d819dae2fe2ce753c0ee95af1d2a877c4175ef959bb32610673a01f7e033a14ceb6f1555a579c2d71ede0fc416ccbb72 SHA512 93bcd21efdfc140768a169c78a6286a4d00b24f3cea0a1380c4b50607f4dcfe53fb1f0bec05f0ee457068c50cfbbd48557085466e31a262fcb06102e6f7895a8
+EBUILD jwhois-4.0-r2.ebuild 866 BLAKE2B 210d555bb9c31348b85903cd4da71d21565bbcb5c3f8ee3efda7f877622c0140b125111fb94407a53ea40615709be4d5998ddc54f1ef1eae71f6ac699623a545 SHA512 418c58de43cf6ada557435ded13812a61d3eb90ab21ee7df5f2d23923066f984c0eb1dbe74eccf251356903b01ae7940a92f5473c643a691c6c2a7dfe3440b02
+MISC metadata.xml 397 BLAKE2B aba6ab91f71b858ca2399d55f86685ab4973dc6dd31f7b46f718eac316a65064a774b3d830ef35e1f791236c3a2e8b29ee915970ec85d533c9ba4ceae86f84b3 SHA512 5d7f70ab21dd6d8e7378ccc1b619535cc20fd76ffb61f90a2ef06732f58fa5e91ca2d99dc91ef89c2d7c9b3b1de478757ca40dbf3c0d65c3da23df5bde42e16c
diff --git a/net-misc/jwhois/files/jwhois-4.0-add-timeout_init-prototype.patch b/net-misc/jwhois/files/jwhois-4.0-add-timeout_init-prototype.patch
new file mode 100644
index 000000000000..542c9fdd1fc2
--- /dev/null
+++ b/net-misc/jwhois/files/jwhois-4.0-add-timeout_init-prototype.patch
@@ -0,0 +1,37 @@
+From 96fdd331c21421a313b6b97cb62e0c775ddc061c Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Tue, 10 Jan 2023 12:36:30 +0100
+Subject: [PATCH 2/2] <utils.h>: Add timeout_init prototype
+
+So that it can be called from the main function. This avoids a
+compilation error with future compilers.
+---
+ include/utils.h | 1 +
+ src/utils.c | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/include/utils.h b/include/utils.h
+index 754ddff..cd98b29 100644
+--- a/include/utils.h
++++ b/include/utils.h
+@@ -28,6 +28,7 @@ char *create_string(const char *fmt, ...);
+ int split_host_from_query(struct s_whois_query *wq);
+ int make_connect(const char *, int);
+ int add_text_to_buffer(char **, const char *);
++void timeout_init(void);
+
+
+ #endif
+diff --git a/src/utils.c b/src/utils.c
+index ab01c2c..f82bd1c 100644
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -348,7 +348,7 @@ split_host_from_query(struct s_whois_query *wq)
+ * file.
+ */
+ void
+-timeout_init()
++timeout_init(void)
+ {
+ int iret;
+ char *ret = "75", *ret2;
diff --git a/net-misc/jwhois/files/jwhois-4.0-avoid-implicit-declarations.patch b/net-misc/jwhois/files/jwhois-4.0-avoid-implicit-declarations.patch
new file mode 100644
index 000000000000..fca5dd4cdd38
--- /dev/null
+++ b/net-misc/jwhois/files/jwhois-4.0-avoid-implicit-declarations.patch
@@ -0,0 +1,44 @@
+From c7c344302d81a36b20d3d26a3d13367c8ed2c80d Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Tue, 10 Jan 2023 12:31:03 +0100
+Subject: [PATCH 1/2] configure.in: C99 compatibility fix
+
+Avoid implicit declarations of inet_pton, exit. Include <arpa/inet.h>
+for the glibc declaration. Return from main instead of calling exit.
+This avoids compilation errors with future compilers.
+---
+ configure.in | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index f1cdd10..678fe7d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -119,7 +119,7 @@ AC_CHECK_LIB(inet6, main,
+ AC_CHECK_FUNCS(memcpy strtol)
+ AC_CHECK_FUNCS(strcasecmp strncasecmp getopt_long)
+ AC_HEADER_STDC([])
+-AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h netdb.h sys/time.h sys/stat.h sys/fcntl.h malloc.h locale.h stdint.h inttypes.h idna.h)
++AC_CHECK_HEADERS(sys/types.h sys/socket.h netinet/in.h netdb.h sys/time.h sys/stat.h sys/fcntl.h malloc.h locale.h stdint.h inttypes.h idna.h arpa/inet.h)
+ AC_HEADER_TIME
+
+
+@@ -139,13 +139,16 @@ AC_TRY_RUN(
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
++#ifdef HAVE_ARPA_INET_H
++#include <arpa/inet.h>
++#endif
+ int main()
+ {
+ struct in6_addr addr6;
+ if (inet_pton(AF_INET6, "::1", &addr6) < 1)
+- exit(1);
++ return 1;
+ else
+- exit(0);
++ return 0;
+ }
+ ], [
+ AC_MSG_RESULT(yes)
diff --git a/net-misc/jwhois/jwhois-4.0-r2.ebuild b/net-misc/jwhois/jwhois-4.0-r2.ebuild
new file mode 100644
index 000000000000..3b4a4a95dcbe
--- /dev/null
+++ b/net-misc/jwhois/jwhois-4.0-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+DESCRIPTION="Advanced Internet Whois client capable of recursive queries"
+HOMEPAGE="https://github.com/jonasob/jwhois/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="idn nls"
+
+RDEPEND="idn? ( net-dns/libidn )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ # bug 208875
+ "${FILESDIR}"/${P}-connect-logic.patch
+ "${FILESDIR}"/${P}-avoid-implicit-declarations.patch
+ "${FILESDIR}"/${P}-add-timeout_init-prototype.patch
+)
+
+src_configure() {
+ econf \
+ --localstatedir="${EPREFIX}"/var/cache \
+ --without-cache \
+ $(use_enable nls) \
+ $(use_with idn libidn)
+ eautoreconf
+}
+
+src_compile(){
+ emake AR="$(tc-getAR)"
+}
diff --git a/net-misc/jwhois/metadata.xml b/net-misc/jwhois/metadata.xml
index 05e015a7ce25..e8a24cb81ff8 100644
--- a/net-misc/jwhois/metadata.xml
+++ b/net-misc/jwhois/metadata.xml
@@ -7,5 +7,6 @@
</maintainer>
<upstream>
<remote-id type="savannah">jwhois</remote-id>
+ <remote-id type="github">jonasob/jwhois</remote-id>
</upstream>
</pkgmetadata>