Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/openbsd-netcat/
Date: Sun, 25 Sep 2022 01:15:05
Message-Id: 1664068493.5b7eab8e3728c5a7da7f99b29fe455876ee6003d.sam@gentoo
1 commit: 5b7eab8e3728c5a7da7f99b29fe455876ee6003d
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 25 01:14:48 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 25 01:14:53 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b7eab8e
7
8 net-analyzer/openbsd-netcat: add 1.218_p5
9
10 Closes: https://bugs.gentoo.org/717382
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 net-analyzer/openbsd-netcat/Manifest | 2 +
14 .../openbsd-netcat/openbsd-netcat-1.218_p5.ebuild | 69 ++++++++++++++++++++++
15 2 files changed, 71 insertions(+)
16
17 diff --git a/net-analyzer/openbsd-netcat/Manifest b/net-analyzer/openbsd-netcat/Manifest
18 index d79bf2758872..8d8c74dd8b1d 100644
19 --- a/net-analyzer/openbsd-netcat/Manifest
20 +++ b/net-analyzer/openbsd-netcat/Manifest
21 @@ -2,3 +2,5 @@ DIST netcat-openbsd_1.190-2.debian.tar.xz 34836 BLAKE2B 3ff4390c07d05e8d1a19c869
22 DIST netcat-openbsd_1.190.orig.tar.gz 22384 BLAKE2B c3e83106f53a0214f71c805b1dfe6b66718dfca217f713a0d7016cb0a3c75c78580fbdd277bd7b5324371145c4b986ebb867e6f779cd61ffecb8e732ebabcb84 SHA512 32310813391f63b8283dc4a63e52821e464ecbfcd0ea995e8e15047c6252a86b31eb4725dc69b778594c43d6ce0cc081aa0f00d7cda0587c91941f20b93a33fe
23 DIST netcat-openbsd_1.195-2.debian.tar.xz 35984 BLAKE2B eedac24eedc243ad1d58576be76f4f98392e1f455863fa3cdc06bde2714612819b7dfa98dd45c1739a65680469460410f5e4b2f4144f4c24fea04b59dda4d0da SHA512 2a5cc6d04112fdde007be4b9adb3aee44060570c0cb2ae0e33e54af3d37c0b2ff4d6c96edf1f16047365106c7c3720195b38417af3c332226c9be81d49caa552
24 DIST netcat-openbsd_1.195.orig.tar.gz 22480 BLAKE2B 53c750c168d7ea5dc2ca653598e42700e2b3ee888d946a09503a22fa3bcbc2c73658f38787314bef628d609ad370223f6889b7019760bf51817f73fc570e1dcc SHA512 ea95cda028f2759835ea8832db0174c178b002d5a917f4c51594445a5377a30d6114ac261071eea98d3d0b60ae1ec72102609db1625dbc5a6e57c67e28d2ff51
25 +DIST netcat-openbsd_1.218-5.debian.tar.xz 52052 BLAKE2B 38ccde34bfa6f1873a8e38fa7355f94bc74cdeb125fd4081fd68819a685d49a4c8a6cc7ed243d49df2d38c7536f4ac680d598bd4c28a938bc4750c89376d2961 SHA512 a230eb143e32fe80ee108325bb81c4e163d48982b484bf4a93ef266e9eed12890e7e294c2fe3dd2ce91fe5aec7de2f1407bf25dc938c2565bfb3e0759555dddc
26 +DIST netcat-openbsd_1.218.orig.tar.gz 22964 BLAKE2B 2dba29cc93ef5295ec24db7632454564fa640fba139116d2732aff465c9a4b37238f65d51ad727f9b29d304b73ce05282b82ec468444c63f5611a90a1384ac62 SHA512 a830f0e3efdff01ba1bb0b344f49d545b9c184001cd641e523a6d24670b97d52dc723318660a5ec8f3215cb57ebe62ca4c06387000b6c8b6495a5c653a4206c6
27
28 diff --git a/net-analyzer/openbsd-netcat/openbsd-netcat-1.218_p5.ebuild b/net-analyzer/openbsd-netcat/openbsd-netcat-1.218_p5.ebuild
29 new file mode 100644
30 index 000000000000..e877bbe04ee7
31 --- /dev/null
32 +++ b/net-analyzer/openbsd-netcat/openbsd-netcat-1.218_p5.ebuild
33 @@ -0,0 +1,69 @@
34 +# Copyright 1999-2022 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=8
38 +
39 +inherit toolchain-funcs
40 +
41 +MY_PV=$(ver_cut 1-2)
42 +DESCRIPTION="The OpenBSD network swiss army knife"
43 +HOMEPAGE="https://cvsweb.openbsd.org/src/usr.bin/nc/ https://salsa.debian.org/debian/netcat-openbsd"
44 +SRC_URI="
45 + mirror://debian/pool/main/n/netcat-openbsd/netcat-openbsd_${MY_PV}.orig.tar.gz
46 + mirror://debian/pool/main/n/netcat-openbsd/netcat-openbsd_${MY_PV}-$(ver_cut 4).debian.tar.xz
47 +"
48 +S="${WORKDIR}"/netcat-openbsd-${MY_PV}
49 +
50 +LICENSE="BSD"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos"
53 +
54 +RDEPEND="
55 + !net-analyzer/netcat
56 + !net-analyzer/netcat6
57 + !elibc_Darwin? ( dev-libs/libbsd )
58 +"
59 +BDEPEND="virtual/pkgconfig"
60 +
61 +src_prepare() {
62 + local i
63 + for i in $(<"${WORKDIR}"/debian/patches/series) ; do
64 + PATCHES+=( "${WORKDIR}"/debian/patches/${i} )
65 + done
66 +
67 + if [[ ${CHOST} == *-darwin* ]] ; then
68 + # This undoes some of the Debian/Linux changes
69 + PATCHES+=( "${FILESDIR}"/${PN}-1.195-darwin.patch )
70 +
71 + if [[ ${CHOST##*-darwin} -lt 20 ]] ; then
72 + PATCHES+=( "${FILESDIR}"/${PN}-1.190-darwin13.patch )
73 + fi
74 + fi
75 +
76 + if use elibc_musl ; then
77 + PATCHES+=( "${FILESDIR}"/${PN}-1.105-musl-b64_ntop.patch )
78 + fi
79 +
80 + default
81 +}
82 +
83 +src_compile() {
84 + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
85 +}
86 +
87 +src_install() {
88 + dobin nc
89 + doman nc.1
90 +
91 + cd "${WORKDIR}"/debian || die
92 + newdoc netcat-openbsd.README.Debian README
93 + dodoc -r examples
94 +}
95 +
96 +pkg_postinst() {
97 + if use kernel_linux ; then
98 + ewarn "SO_REUSEPORT is introduced in linux 3.9. If your running kernel is older"
99 + ewarn "and kernel header is newer, nc will not listen correctly. Matching the header"
100 + ewarn "to the running kernel will do. See bug #490246 for details."
101 + fi
102 +}