public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-misc/netkit-talk/, net-misc/netkit-talk/files/
@ 2021-08-25  2:30 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2021-08-25  2:30 UTC (permalink / raw
  To: gentoo-commits

commit:     aca1eba3dca5d534284f38d850bb6733d961fcc0
Author:     Matt Smith <matt <AT> offtopica <DOT> uk>
AuthorDate: Sat Aug 21 17:24:43 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 25 02:30:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aca1eba3

net-misc/netkit-talk: EAPI 7

Migrate away from epatch and bump to EAPI 7.

Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Matt Smith <matt <AT> offtopica.uk>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../netkit-talk/files/netkit-talk-0.17-ipv6.patch  | 56 ++++++++++++++++++++++
 ...k-0.17-r6.ebuild => netkit-talk-0.17-r7.ebuild} | 21 ++++----
 2 files changed, 66 insertions(+), 11 deletions(-)

diff --git a/net-misc/netkit-talk/files/netkit-talk-0.17-ipv6.patch b/net-misc/netkit-talk/files/netkit-talk-0.17-ipv6.patch
new file mode 100644
index 00000000000..f426bf7dfad
--- /dev/null
+++ b/net-misc/netkit-talk/files/netkit-talk-0.17-ipv6.patch
@@ -0,0 +1,56 @@
+--- a/talkd/talkd.c
++++ b/talkd/talkd.c
+@@ -164,13 +164,14 @@
+ 	const char *theirip;
+ 
+ 	struct hostent *hp;
++	struct sockaddr_in6 addr;
+ 	struct sockaddr_in sn;
+ 	int cc, i, ok;
+ 	socklen_t addrlen;
+ 
+-	addrlen = sizeof(sn);
++	addrlen = sizeof(addr);
+ 	cc = recvfrom(0, inbuf, sizeof(inbuf), 0,
+-		      (struct sockaddr *)&sn, &addrlen);
++		      (struct sockaddr *)&addr, &addrlen);
+ 	if (cc<0) {
+ 		if (errno==EINTR || errno==EAGAIN) {
+ 			return;
+@@ -185,14 +186,30 @@
+ 	 */
+ 	lastmsgtime = time(NULL);
+ 
+-	if (addrlen!=sizeof(sn)) {
+-		syslog(LOG_WARNING, "recvfrom: bogus address length");
+-		return;
+-	}
+-	if (sn.sin_family!=AF_INET) {
++        sn.sin_family = AF_INET;
++	switch (addr.sin6_family)
++	{
++        case AF_INET:
++            sn.sin_addr=((struct sockaddr_in*)&addr)->sin_addr;
++            sn.sin_port=((struct sockaddr_in*)&addr)->sin_port;
++            break;
++	case AF_INET6:
++            // addr must be ::FFFF:x.x.x.x
++            if (addr.sin6_addr.s6_addr32[0]!=0 ||
++                addr.sin6_addr.s6_addr32[1]!=0 ||
++                addr.sin6_addr.s6_addr16[5]!=0xffff ||
++                addr.sin6_addr.s6_addr16[4]!=0)
++            {
++                syslog(LOG_WARNING, "IPv6 address family not supported by talkd");
++                return;
++            }
++            sn.sin_port=addr.sin6_port;
++            sn.sin_addr.s_addr=addr.sin6_addr.s6_addr32[3];
++            break;
++        default:
+ 		syslog(LOG_WARNING, "recvfrom: bogus address family");
+ 		return;
+-	}
++        }
+ 
+ 	/* 
+ 	 * If we get here we have an address we can reply to, although

diff --git a/net-misc/netkit-talk/netkit-talk-0.17-r6.ebuild b/net-misc/netkit-talk/netkit-talk-0.17-r7.ebuild
similarity index 77%
rename from net-misc/netkit-talk/netkit-talk-0.17-r6.ebuild
rename to net-misc/netkit-talk/netkit-talk-0.17-r7.ebuild
index c76f72b3442..585a64aabea 100644
--- a/net-misc/netkit-talk/netkit-talk-0.17-r6.ebuild
+++ b/net-misc/netkit-talk/netkit-talk-0.17-r7.ebuild
@@ -1,12 +1,12 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-inherit epatch toolchain-funcs
+inherit toolchain-funcs
 
 MY_P=netkit-ntalk-${PV}
-S=${WORKDIR}/netkit-ntalk-${PV}
+S="${WORKDIR}"/netkit-ntalk-${PV}
 
 DESCRIPTION="Netkit - talkd"
 HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/"
@@ -17,19 +17,18 @@ SLOT="0"
 KEYWORDS="~alpha amd64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86"
 IUSE="ipv6"
 
-COMMON_DEPEND=">=sys-libs/ncurses-5.2:="
-DEPEND="
-	${COMMON_DEPEND}
-	virtual/pkgconfig
-"
+DEPEND=">=sys-libs/ncurses-5.2:="
+BDEPEND="virtual/pkgconfig"
 RDEPEND="
-	${COMMON_DEPEND}
+	${DEPEND}
 	virtual/inetd
 "
 
+PATCHES=( "${FILESDIR}"/${P}-time.patch )
+
 src_prepare() {
-	epatch "${FILESDIR}"/${P}-time.patch
-	use ipv6 && epatch "${FILESDIR}"/${P}-ipv6.diff
+	default
+	use ipv6 && eapply "${FILESDIR}"/${P}-ipv6.patch
 	sed -i configure -e '/^LDFLAGS=/d' || die
 }
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-25  2:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-25  2:30 [gentoo-commits] repo/gentoo:master commit in: net-misc/netkit-talk/, net-misc/netkit-talk/files/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox