commit: 97f9d18fac684c7356aed555b7261de775f134ba
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sat Mar 6 21:37:50 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 16 18:50:20 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97f9d18f
net-analyzer/netcat: EAPI 7
Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-analyzer/netcat/netcat-110.20180111-r1.ebuild | 56 +++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/net-analyzer/netcat/netcat-110.20180111-r1.ebuild
b/net-analyzer/netcat/netcat-110.20180111-r1.ebuild
new file mode 100644
index 00000000000..176dfce1e77
--- /dev/null
+++ b/net-analyzer/netcat/netcat-110.20180111-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs flag-o-matic
+
+MY_P="nc${PV}"
+DESCRIPTION="the network swiss army knife"
+HOMEPAGE="https://nc110.sourceforge.io"
+SRC_URI="mirror://sourceforge/nc110/${MY_P}.tar.xz"
+
+LICENSE="netcat"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390
~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc64-solaris ~x64-solaris"
+IUSE="ipv6 static"
+
+S="${WORKDIR}/nc110"
+
+src_prepare() {
+ default
+ sed -i \
+ -e '/#define HAVE_BIND/s:#define:#undef:' \
+ -e '/#define FD_SETSIZE 16/s:16:1024: #34250' \
+ netcat.c || die
+ if [[ ${CHOST} == *-solaris* ]]; then
+ sed -i 's:gethostbyname2 *(\([^)]\+\)):getipnodebyname (\1,
AI_DEFAULT, NULL):' netcat.c || die
+ fi
+}
+
+src_configure() {
+ if ! use ipv6; then
+ sed -i '/#define INET6/d' generic.h || die
+ fi
+ append-cppflags -DTELNET -DGAPING_SECURITY_HOLE
+}
+
+src_compile() {
+ local xlibs
+ [[ ${CHOST} == *-solaris* ]] && xlibs+=" -lnsl -lsocket"
+ emake \
+ LD="$(tc-getCC) ${LDFLAGS}" \
+ DFLAGS="${CPPFLAGS}" \
+ XFLAGS="${CFLAGS}" \
+ STATIC=$(usex static '-static' '') \
+ XLIBS="${xlibs}" \
+ nc
+}
+
+src_install() {
+ dobin nc
+ dodoc README* netcat.blurb
+ doman nc.1
+ docinto scripts
+ dodoc scripts/*
+}