diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
commit | 5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch) | |
tree | 66e860a5099bcad013f1cf667255dc372a7c11b3 /net-analyzer/netcat/netcat-110.20180111-r1.ebuild | |
parent | 7218e1b46bceac05841e90472501742d905fb3fc (diff) |
gentoo resync : 20.03.2021
Diffstat (limited to 'net-analyzer/netcat/netcat-110.20180111-r1.ebuild')
-rw-r--r-- | net-analyzer/netcat/netcat-110.20180111-r1.ebuild | 56 |
1 files changed, 56 insertions, 0 deletions
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 000000000000..5127d1c620fd --- /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/* +} |