diff options
author | Sam James <sam@gentoo.org> | 2022-09-25 02:14:48 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-09-25 02:14:53 +0100 |
commit | 5b7eab8e3728c5a7da7f99b29fe455876ee6003d (patch) | |
tree | 6c02c6a3254832b36ea00894a786cf2903a31066 /net-analyzer/openbsd-netcat/openbsd-netcat-1.218_p5.ebuild | |
parent | net-misc/websocat: add 1.11.0 (diff) | |
download | gentoo-5b7eab8e3728c5a7da7f99b29fe455876ee6003d.tar.gz gentoo-5b7eab8e3728c5a7da7f99b29fe455876ee6003d.tar.bz2 gentoo-5b7eab8e3728c5a7da7f99b29fe455876ee6003d.zip |
net-analyzer/openbsd-netcat: add 1.218_p5
Closes: https://bugs.gentoo.org/717382
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer/openbsd-netcat/openbsd-netcat-1.218_p5.ebuild')
-rw-r--r-- | net-analyzer/openbsd-netcat/openbsd-netcat-1.218_p5.ebuild | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.218_p5.ebuild b/net-analyzer/openbsd-netcat/openbsd-netcat-1.218_p5.ebuild new file mode 100644 index 000000000000..e877bbe04ee7 --- /dev/null +++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.218_p5.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_PV=$(ver_cut 1-2) +DESCRIPTION="The OpenBSD network swiss army knife" +HOMEPAGE="https://cvsweb.openbsd.org/src/usr.bin/nc/ https://salsa.debian.org/debian/netcat-openbsd" +SRC_URI=" + mirror://debian/pool/main/n/netcat-openbsd/netcat-openbsd_${MY_PV}.orig.tar.gz + mirror://debian/pool/main/n/netcat-openbsd/netcat-openbsd_${MY_PV}-$(ver_cut 4).debian.tar.xz +" +S="${WORKDIR}"/netcat-openbsd-${MY_PV} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" + +RDEPEND=" + !net-analyzer/netcat + !net-analyzer/netcat6 + !elibc_Darwin? ( dev-libs/libbsd ) +" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + local i + for i in $(<"${WORKDIR}"/debian/patches/series) ; do + PATCHES+=( "${WORKDIR}"/debian/patches/${i} ) + done + + if [[ ${CHOST} == *-darwin* ]] ; then + # This undoes some of the Debian/Linux changes + PATCHES+=( "${FILESDIR}"/${PN}-1.195-darwin.patch ) + + if [[ ${CHOST##*-darwin} -lt 20 ]] ; then + PATCHES+=( "${FILESDIR}"/${PN}-1.190-darwin13.patch ) + fi + fi + + if use elibc_musl ; then + PATCHES+=( "${FILESDIR}"/${PN}-1.105-musl-b64_ntop.patch ) + fi + + default +} + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dobin nc + doman nc.1 + + cd "${WORKDIR}"/debian || die + newdoc netcat-openbsd.README.Debian README + dodoc -r examples +} + +pkg_postinst() { + if use kernel_linux ; then + ewarn "SO_REUSEPORT is introduced in linux 3.9. If your running kernel is older" + ewarn "and kernel header is newer, nc will not listen correctly. Matching the header" + ewarn "to the running kernel will do. See bug #490246 for details." + fi +} |