Diff nmap-7.93-r3 with a nmap-7.94

/usr/portage/net-analyzer/nmap/nmap-7.94.ebuild 2023-10-09 14:52:33.328368447 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
LUA_COMPAT=( lua5-3 )
6
LUA_COMPAT=( lua5-4 )
7 7
LUA_REQ_USE="deprecated"
8
PYTHON_COMPAT=( python3_{9..11} )
9
inherit autotools lua-single python-any-r1 toolchain-funcs
8
PYTHON_COMPAT=( python3_{10..11} )
9
PLOCALES="de es fr hi hr hu id it ja pl pt_BR pt_PR ro ru sk zh"
10
PLOCALE_BACKUP="en"
11
inherit autotools lua-single plocale python-single-r1 toolchain-funcs
10 12

  
11 13
DESCRIPTION="Network exploration tool and security / port scanner"
12 14
HOMEPAGE="https://nmap.org/"
......
25 27
	KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
26 28
fi
27 29

  
30
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-7.94-patches.tar.xz"
31

  
28 32
# https://github.com/nmap/nmap/issues/2199
29
LICENSE="|| ( NPSL-0.94 NPSL-0.95 )"
33
LICENSE="NPSL-0.95"
30 34
SLOT="0"
31
IUSE="ipv6 libssh2 ncat nping +nse ssl symlink"
35
IUSE="ipv6 libssh2 ncat ndiff nping nls +nse ssl symlink zenmap"
32 36
REQUIRED_USE="
37
	${PYTHON_REQUIRED_USE}
33 38
	nse? ( ${LUA_REQUIRED_USE} )
34 39
	symlink? ( ncat )
35 40
"
......
38 43
	dev-libs/liblinear:=
39 44
	dev-libs/libpcre
40 45
	net-libs/libpcap
46
	ndiff? ( ${PYTHON_DEPS} )
41 47
	libssh2? (
42 48
		net-libs/libssh2[zlib]
43 49
		sys-libs/zlib
44 50
	)
51
	nls? ( virtual/libintl )
45 52
	nse? (
46 53
		${LUA_DEPS}
47 54
		sys-libs/zlib
48 55
	)
49
	ssl? ( dev-libs/openssl:0= )
56
	ssl? ( dev-libs/openssl:= )
50 57
	symlink? (
51 58
		ncat? (
52 59
			!net-analyzer/netcat
53 60
			!net-analyzer/openbsd-netcat
54 61
		)
55 62
	)
63
	zenmap? (
64
		${PYTHON_DEPS}
65
		$(python_gen_cond_dep '
66
			dev-python/pygobject:3[${PYTHON_USEDEP}]
67
		')
68
	)
56 69
"
57 70
DEPEND="${RDEPEND}"
71
# Python is always needed at build time for some scripts
58 72
BDEPEND="
59 73
	${PYTHON_DEPS}
60 74
	virtual/pkgconfig
75
	nls? ( sys-devel/gettext )
61 76
"
62 77

  
63 78
if [[ ${PV} != *9999* ]] ; then
......
65 80
fi
66 81

  
67 82
PATCHES=(
68
	"${FILESDIR}"/${PN}-5.10_beta1-string.patch
69
	"${FILESDIR}"/${PN}-5.21-python.patch
70
	"${FILESDIR}"/${PN}-6.46-uninstaller.patch
71
	"${FILESDIR}"/${PN}-6.25-liblua-ar.patch
72
	"${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
73
	"${FILESDIR}"/${PN}-7.25-libpcre.patch
74
	"${FILESDIR}"/${PN}-7.31-libnl.patch
75
	"${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch
76
	"${FILESDIR}"/${PN}-7.91-no-FORTIFY_SOURCE.patch
77
	"${FILESDIR}"/${P}-openssl-1.1.patch
78
	"${FILESDIR}"/${PN}-9999-netutil-else.patch
83
	"${WORKDIR}"/${PN}-7.94-patches
79 84
)
80 85

  
81 86
pkg_setup() {
82
	python-any-r1_pkg_setup
87
	python-single-r1_pkg_setup
83 88

  
84 89
	use nse && lua-single_pkg_setup
85 90
}
86 91

  
92
src_unpack() {
93
	if [[ ${PV} == *9999 ]] ; then
94
		git-r3_src_unpack
95
	elif use verify-sig ; then
96
		# Needed for downloaded patch (which is unsigned, which is fine)
97
		verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.asc}
98
	fi
99

  
100
	default
101
}
102

  
87 103
src_prepare() {
104
	default
105

  
106
	# Drop bundled libraries
88 107
	rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
89 108

  
90 109
	cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
91 110

  
92
	default
111
	delete_disabled_locale() {
112
		# Force here as PLOCALES contains supported locales for man
113
		# pages and zenmap doesn't have all of those
114
		rm -rf zenmap/share/zenmap/locale/${1} || die
115
		rm -f zenmap/share/zenmap/locale/${1}.po || die
116
	}
117
	plocale_for_each_disabled_locale delete_disabled_locale
93 118

  
94 119
	sed -i \
95 120
		-e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
......
109 134
	export ac_cv_path_PYTHON="${PYTHON}"
110 135
	export am_cv_pathless_PYTHON="${EPYTHON}"
111 136

  
112
	# The bundled libdnet is incompatible with the version available in the
113
	# tree, so we cannot use the system library here.
114
	econf \
115
		$(use_enable ipv6) \
116
		$(use_with libssh2) \
117
		$(use_with ncat) \
118
		$(use_with nping) \
119
		$(use_with nse liblua) \
120
		$(use_with ssl openssl) \
121
		$(usex libssh2 --with-zlib) \
122
		$(usex nse --with-zlib) \
123
		--cache-file="${S}"/config.cache \
124
		--with-libdnet=included \
125
		--with-pcre="${ESYSROOT}"/usr \
126
		--without-dpdk \
127
		--without-ndiff \
128
		--without-zenmap
137
	local myeconfargs=(
138
		$(use_enable ipv6)
139
		$(use_enable nls)
140
		$(use_with libssh2)
141
		$(use_with ncat)
142
		$(use_with ndiff)
143
		$(use_with nping)
144
		$(use_with nse liblua)
145
		$(use_with ssl openssl)
146
		$(use_with zenmap)
147
		$(usex libssh2 --with-zlib)
148
		$(usex nse --with-zlib)
149
		--cache-file="${S}"/config.cache
150
		# The bundled libdnet is incompatible with the version available in the
151
		# tree, so we cannot use the system library here.
152
		--with-libdnet=included
153
		--with-pcre="${ESYSROOT}"/usr
154
		--without-dpdk
155
	)
156

  
157
	econf "${myeconfargs[@]}"
129 158
}
130 159

  
131 160
src_compile() {
......
150 179

  
151 180
	dodoc CHANGELOG HACKING docs/README docs/*.txt
152 181

  
182
	if use ndiff || use zenmap ; then
183
		python_optimize
184
	fi
185

  
153 186
	use symlink && dosym /usr/bin/ncat /usr/bin/nc
154 187
}
Thank you!