Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nmap/
Date: Sat, 10 Aug 2019 22:40:25
Message-Id: 1565476808.4a7f27421c511451f5c945f5c8bf952c5e4bf92e.jer@gentoo
1 commit: 4a7f27421c511451f5c945f5c8bf952c5e4bf92e
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 10 22:39:14 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 10 22:40:08 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a7f2742
7
8 net-analyzer/nmap: Version 7.80
9
10 Package-Manager: Portage-2.3.71, Repoman-2.3.17
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 net-analyzer/nmap/Manifest | 1 +
14 net-analyzer/nmap/nmap-7.80.ebuild | 185 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 186 insertions(+)
16
17 diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest
18 index 0d32bba7d5f..753fcf719ae 100644
19 --- a/net-analyzer/nmap/Manifest
20 +++ b/net-analyzer/nmap/Manifest
21 @@ -1,2 +1,3 @@
22 DIST nmap-7.70.tar.bz2 10467371 BLAKE2B 53d751773851e45fcfa7604f8b325297f429f525bafdef91e7f693b9a9876ddb23e978c50821776b64764adb5bf36e759042cac3254bdbf36bff7048dfb6f58d SHA512 084c148b022ff6550e269d976d0077f7932a10e2ef218236fe13aa3a70b4eb6506df03329868fc68cb3ce78e4360b200f5a7a491d3145028fed679ef1c9ecae5
23 +DIST nmap-7.80.tar.bz2 10550327 BLAKE2B 513a5589f4dd72660d290cc03b8130da2c41e4620c5a82e125e4345259b8d0f6efa8bceef47d3c0d2b5b588888b716070e05105a09b0185622aed9268715ae2c SHA512 d4384d3ebf4f3abf3588eed5433f733874ecdceb9342a718dc36db19634b0cc819d73399974eb0a9a9c9dd9e5c88473e07644ec91db28b0c072552b54430be6b
24 DIST nmap-logo-64.png 3289 BLAKE2B 9563f57d126e6fa38dc777391c2887112836b4f5b521311bde64d5c5a04c45a3f420abba0750f776658015c0018b2afeb381c691bc8784e4f39abc78b9c2d2c7 SHA512 fb102d12aaeebc8a97543ecd653a3606e86996ad679bc26d6e6e274ad05ec3e9f92521289d1a24153c521b699e8c0cfa65d8856bb49af53ee4837268bbc6b5d3
25
26 diff --git a/net-analyzer/nmap/nmap-7.80.ebuild b/net-analyzer/nmap/nmap-7.80.ebuild
27 new file mode 100644
28 index 00000000000..cf94423c0af
29 --- /dev/null
30 +++ b/net-analyzer/nmap/nmap-7.80.ebuild
31 @@ -0,0 +1,185 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +PYTHON_COMPAT=( python2_7 )
37 +PYTHON_REQ_USE="sqlite,xml"
38 +inherit autotools desktop flag-o-matic python-single-r1 toolchain-funcs user
39 +
40 +MY_P=${P/_beta/BETA}
41 +
42 +DESCRIPTION="A utility for network discovery and security auditing"
43 +HOMEPAGE="https://nmap.org/"
44 +SRC_URI="
45 + https://nmap.org/dist/${MY_P}.tar.bz2
46 + https://dev.gentoo.org/~jer/nmap-logo-64.png
47 +"
48 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
49 +
50 +LICENSE="GPL-2"
51 +SLOT="0"
52 +
53 +IUSE="
54 + ipv6 libressl libssh2 ncat ndiff nls nmap-update nping +nse ssl system-lua
55 + zenmap
56 +"
57 +NMAP_LINGUAS=( de fr hi hr it ja pl pt_BR ru zh )
58 +REQUIRED_USE="
59 + system-lua? ( nse )
60 + ndiff? ( ${PYTHON_REQUIRED_USE} )
61 + zenmap? ( ${PYTHON_REQUIRED_USE} )
62 +"
63 +RDEPEND="
64 + dev-libs/liblinear:=
65 + dev-libs/libpcre
66 + net-libs/libpcap
67 + libssh2? (
68 + net-libs/libssh2[zlib]
69 + sys-libs/zlib
70 + )
71 + ndiff? ( ${PYTHON_DEPS} )
72 + nls? ( virtual/libintl )
73 + nmap-update? (
74 + dev-libs/apr
75 + dev-vcs/subversion
76 + )
77 + nse? ( sys-libs/zlib )
78 + ssl? (
79 + !libressl? ( dev-libs/openssl:0= )
80 + libressl? ( dev-libs/libressl:= )
81 + )
82 + system-lua? ( >=dev-lang/lua-5.2:*[deprecated] )
83 + zenmap? (
84 + dev-python/pygtk:2[${PYTHON_USEDEP}]
85 + ${PYTHON_DEPS}
86 + )
87 +"
88 +DEPEND="
89 + ${RDEPEND}
90 + nls? ( sys-devel/gettext )
91 +"
92 +PATCHES=(
93 + "${FILESDIR}"/${PN}-5.10_beta1-string.patch
94 + "${FILESDIR}"/${PN}-5.21-python.patch
95 + "${FILESDIR}"/${PN}-6.46-uninstaller.patch
96 + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch
97 + "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch
98 + "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
99 + "${FILESDIR}"/${PN}-7.25-libpcre.patch
100 + "${FILESDIR}"/${PN}-7.31-libnl.patch
101 +)
102 +S="${WORKDIR}/${MY_P}"
103 +
104 +pkg_setup() {
105 + if use ndiff || use zenmap; then
106 + python-single-r1_pkg_setup
107 + fi
108 +}
109 +
110 +src_prepare() {
111 + rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
112 +
113 + cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
114 +
115 + default
116 +
117 + local lingua
118 + if use nls; then
119 + for lingua in ${NMAP_LINGUAS[@]}; do
120 + if ! has ${lingua} ${LINGUAS-${lingua}}; then
121 + rm -r zenmap/share/zenmap/locale/${lingua} || die
122 + rm zenmap/share/zenmap/locale/${lingua}.po || die
123 + fi
124 + done
125 + else
126 + # configure/make ignores --disable-nls
127 + for lingua in ${NMAP_LINGUAS[@]}; do
128 + rm -r zenmap/share/zenmap/locale/${lingua} || die
129 + rm zenmap/share/zenmap/locale/${lingua}.po || die
130 + done
131 + fi
132 +
133 + sed -i \
134 + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
135 + Makefile.in || die
136 + # Fix desktop files wrt bug #432714
137 + sed -i \
138 + -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
139 + zenmap/install_scripts/unix/zenmap-root.desktop \
140 + zenmap/install_scripts/unix/zenmap.desktop || die
141 +
142 + sed -i \
143 + -e '/AC_CONFIG_SUBDIRS(libz)/d' \
144 + -e '/AC_CONFIG_SUBDIRS(libssh2)/d' \
145 + configure.ac
146 +
147 + cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
148 +
149 + eautoreconf
150 +
151 + if [[ ${CHOST} == *-darwin* ]] ; then
152 + # we need the original for a Darwin-specific fix, bug #604432
153 + mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die
154 + fi
155 +}
156 +
157 +src_configure() {
158 + # The bundled libdnet is incompatible with the version available in the
159 + # tree, so we cannot use the system library here.
160 + econf \
161 + $(use_enable ipv6) \
162 + $(use_enable nls) \
163 + $(use_with libssh2) \
164 + $(use_with ncat) \
165 + $(use_with ndiff) \
166 + $(use_with nmap-update) \
167 + $(use_with nping) \
168 + $(use_with ssl openssl) \
169 + $(use_with zenmap) \
170 + $(usex libssh2 --with-zlib) \
171 + $(usex nse --with-zlib) \
172 + $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
173 + --cache-file="${S}"/config.cache \
174 + --with-libdnet=included \
175 + --with-pcre=/usr
176 + # Commented out because configure does weird things
177 + # --with-liblinear=/usr \
178 +}
179 +
180 +src_compile() {
181 + local directory
182 + for directory in . libnetutil nsock/src \
183 + $(usex ncat ncat '') \
184 + $(usex nmap-update nmap-update '') \
185 + $(usex nping nping '')
186 + do
187 + emake -C "${directory}" makefile.dep
188 + done
189 +
190 + emake \
191 + AR=$(tc-getAR) \
192 + RANLIB=$(tc-getRANLIB)
193 +}
194 +
195 +src_install() {
196 + LC_ALL=C emake -j1 \
197 + DESTDIR="${D}" \
198 + STRIP=: \
199 + nmapdatadir="${EPREFIX}"/usr/share/nmap \
200 + install
201 + if use nmap-update;then
202 + LC_ALL=C emake -j1 \
203 + -C nmap-update \
204 + DESTDIR="${D}" \
205 + STRIP=: \
206 + nmapdatadir="${EPREFIX}"/usr/share/nmap \
207 + install
208 + fi
209 +
210 + dodoc CHANGELOG HACKING docs/README docs/*.txt
211 +
212 + if use zenmap; then
213 + doicon "${DISTDIR}/nmap-logo-64.png"
214 + python_optimize
215 + fi
216 +}