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-r9.ebuild | |
parent | 7218e1b46bceac05841e90472501742d905fb3fc (diff) |
gentoo resync : 20.03.2021
Diffstat (limited to 'net-analyzer/netcat/netcat-110-r9.ebuild')
-rw-r--r-- | net-analyzer/netcat/netcat-110-r9.ebuild | 56 |
1 files changed, 39 insertions, 17 deletions
diff --git a/net-analyzer/netcat/netcat-110-r9.ebuild b/net-analyzer/netcat/netcat-110-r9.ebuild index 78f65ab4a9e0..2653de68f200 100644 --- a/net-analyzer/netcat/netcat-110-r9.ebuild +++ b/net-analyzer/netcat/netcat-110-r9.ebuild @@ -1,17 +1,19 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -inherit eutils toolchain-funcs flag-o-matic +inherit toolchain-funcs flag-o-matic PATCH_VER="1.0" MY_P=nc${PV} -DESCRIPTION="the network swiss army knife" -HOMEPAGE="http://nc110.sourceforge.net/" +DESCRIPTION="The network swiss army knife" +HOMEPAGE="https://nc110.sourceforge.io" SRC_URI="mirror://sourceforge/nc110/${MY_P}.tgz ftp://sith.mimuw.edu.pl/pub/users/baggins/IPv6/nc-v6-20000918.patch.gz - mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2" + mirror://gentoo/${P}-patches-${PATCH_VER}.tar.bz2 +" +S="${WORKDIR}" LICENSE="netcat" SLOT="0" @@ -20,26 +22,46 @@ IUSE="crypt ipv6 static" LIB_DEPEND="crypt? ( dev-libs/libmix[static-libs(+)] )" RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" -DEPEND="${RDEPEND} - static? ( ${LIB_DEPEND} )" - -S=${WORKDIR} +DEPEND=" + ${RDEPEND} + static? ( ${LIB_DEPEND} ) +" src_prepare() { - epatch "${DISTDIR}"/nc-v6-20000918.patch.gz patch + default + + eapply "${WORKDIR}"/nc-v6-20000918.patch + sed -i 's:#define HAVE_BIND:#undef HAVE_BIND:' netcat.c - sed -i 's:#define FD_SETSIZE 16:#define FD_SETSIZE 1024:' netcat.c #34250 - [[ ${CHOST} == *-solaris* ]] && \ - sed -i 's:gethostbyname2(\([^)]\+\)):getipnodebyname(\1, AI_DEFAULT, NULL):' netcat.c + # bug 34250 + sed -i 's:#define FD_SETSIZE 16:#define FD_SETSIZE 1024:' netcat.c + + if [[ ${CHOST} == *-solaris* ]] ; then + sed -i 's:gethostbyname2(\([^)]\+\)):getipnodebyname(\1, AI_DEFAULT, NULL):' netcat.c || die + fi } src_compile() { export XLIBS="" export XFLAGS="-DLINUX -DTELNET -DGAPING_SECURITY_HOLE" - use ipv6 && XFLAGS="${XFLAGS} -DINET6" - use static && export STATIC="-static" - use crypt && XFLAGS="${XFLAGS} -DAESCRYPT" && XLIBS="${XLIBS} -lmix" - [[ ${CHOST} == *-solaris* ]] && XLIBS="${XLIBS} -lnsl -lsocket" + + if use ipv6 ; then + XFLAGS+=" -DINET6" + fi + + if use static ; then + export STATIC="-static" + fi + + if use crypt ; then + XFLAGS+=" -DAESCRYPT" + XLIBS+=" -lmix" + fi + + if [[ ${CHOST} == *-solaris* ]] ; then + XLIBS+=" -lnsl -lsocket" + fi + emake -e CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}" nc } |