diff options
author | Matt Smith <matt@offtopica.uk> | 2021-08-21 18:24:43 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-08-25 03:30:29 +0100 |
commit | aca1eba3dca5d534284f38d850bb6733d961fcc0 (patch) | |
tree | 3d7ec14821d64d8ad601b25e2cef3f822dc63022 /net-misc/netkit-talk | |
parent | app-text/catdoc: Don't use $D in src_configure (diff) | |
download | gentoo-aca1eba3dca5d534284f38d850bb6733d961fcc0.tar.gz gentoo-aca1eba3dca5d534284f38d850bb6733d961fcc0.tar.bz2 gentoo-aca1eba3dca5d534284f38d850bb6733d961fcc0.zip |
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@offtopica.uk>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/netkit-talk')
-rw-r--r-- | net-misc/netkit-talk/files/netkit-talk-0.17-ipv6.patch | 56 | ||||
-rw-r--r-- | net-misc/netkit-talk/netkit-talk-0.17-r7.ebuild (renamed from net-misc/netkit-talk/netkit-talk-0.17-r6.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 000000000000..f426bf7dfadf --- /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 index c76f72b34420..585a64aabeab 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 } |