diff options
author | Mike Frysinger <vapier@gentoo.org> | 2018-01-11 17:26:19 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2018-01-11 17:27:14 -0500 |
commit | cb969442e87840fda81d44c2ed78d246f6aaf5ef (patch) | |
tree | f553c2edc73c93ef72ea98fc4f701a0812dc42c0 /net-analyzer/netcat/netcat-110.20180111.ebuild | |
parent | dev-tex/abntex: EAPI bump (diff) | |
download | gentoo-cb969442e87840fda81d44c2ed78d246f6aaf5ef.tar.gz gentoo-cb969442e87840fda81d44c2ed78d246f6aaf5ef.tar.bz2 gentoo-cb969442e87840fda81d44c2ed78d246f6aaf5ef.zip |
net-analyzer/netcat: version bump to 110.20180111
Diffstat (limited to 'net-analyzer/netcat/netcat-110.20180111.ebuild')
-rw-r--r-- | net-analyzer/netcat/netcat-110.20180111.ebuild | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/net-analyzer/netcat/netcat-110.20180111.ebuild b/net-analyzer/netcat/netcat-110.20180111.ebuild new file mode 100644 index 000000000000..760fe86cdf9d --- /dev/null +++ b/net-analyzer/netcat/netcat-110.20180111.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit toolchain-funcs flag-o-matic + +MY_P="nc${PV}" +DESCRIPTION="the network swiss army knife" +HOMEPAGE="http://nc110.sourceforge.net/" +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 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris ~x64-solaris" +IUSE="ipv6 static" + +S=${WORKDIR}/nc110 + +src_prepare() { + sed -i \ + -e '/#define HAVE_BIND/s:#define:#undef:' \ + -e '/#define FD_SETSIZE 16/s:16:1024: #34250' \ + netcat.c || die + [[ ${CHOST} == *-solaris* ]] && \ + sed -i 's:gethostbyname2 *(\([^)]\+\)):getipnodebyname (\1, AI_DEFAULT, NULL):' netcat.c +} + +src_configure() { + use ipv6 || sed -i '/#define INET6/d' generic.h + 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/* +} |