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: Tue, 08 Aug 2017 12:17:11
Message-Id: 1502194625.a8e3423633e730858cfc0029cff4cbb28f8d02cb.jer@gentoo
1 commit: a8e3423633e730858cfc0029cff4cbb28f8d02cb
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 8 12:16:46 2017 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 8 12:17:05 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8e34236
7
8 net-analyzer/nmap: Version bump.
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 net-analyzer/nmap/Manifest | 1 +
13 net-analyzer/nmap/metadata.xml | 3 +-
14 net-analyzer/nmap/nmap-7.60.ebuild | 196 +++++++++++++++++++++++++++++++++++++
15 3 files changed, 199 insertions(+), 1 deletion(-)
16
17 diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest
18 index 2e0011795cc..7dbcd96d94d 100644
19 --- a/net-analyzer/nmap/Manifest
20 +++ b/net-analyzer/nmap/Manifest
21 @@ -1,3 +1,4 @@
22 DIST nmap-7.40.tar.bz2 9043221 SHA256 9e14665fffd054554d129d62c13ad95a7b5c7a046daa2290501909e65f4d3188 SHA512 98e37bf1c29789ea19ee4542d719ed6970c8bcc1bf92af4948a52a75273c2403329149f6b5df6368c23840d1bb3f47af9e5ce543f7a36596a33896609574f02d WHIRLPOOL 735133455aec227149478cb273e41d33b7dbd77a6998682b6d80bdc72c77555cd745895adfcde1c194281c258131e7fce49254e79349fe112a5f146768fd1c51
23 DIST nmap-7.50.tar.bz2 9309616 SHA256 e9a96a8e02bfc9e80c617932acc61112c23089521ee7d6b1502ecf8e3b1674b2 SHA512 b74c5711f03bae363164cdb7e62923ab938c81c7bbcd080eaa2d1acc89f09eb0a7e0f5deb9628b81057c7a35ecd487a2d09dfe3b58b0db6c84cf0b39f526e5f2 WHIRLPOOL 9fd0a9fb8de6e4e169cf7a9ce8b06b3e245f66aa3643cb6be4b1933d824091d4211d3207893f5bff5621c7746434db92a5745c3500e3ce8de1bb0c6e2820d365
24 +DIST nmap-7.60.tar.bz2 10394925 SHA256 a8796ecc4fa6c38aad6139d9515dc8113023a82e9d787e5a5fb5fa1b05516f21 SHA512 74ba8f6de026ade9ee6bb2252bee18a57210f8207977df7f1c04556629dcdc1e6127f33febc8a52ef88a1dac876116d590564dee4f1c23798c3ac37529991aa4 WHIRLPOOL ca5a10ca5a685c53fa37a72857c009333287c6559409fb1dfcc5edc5e48034b3d280f76e555e159156b5befc0167b9198673e07ccd2e6a0a80c2d3dc2395fff0
25 DIST nmap-logo-64.png 3289 SHA256 4c72ff1eeffeeaa1039b251d9f2d675936e65db686fe3b57a35c2183ce67a8aa SHA512 fb102d12aaeebc8a97543ecd653a3606e86996ad679bc26d6e6e274ad05ec3e9f92521289d1a24153c521b699e8c0cfa65d8856bb49af53ee4837268bbc6b5d3 WHIRLPOOL 6093aadcb9880587e17d39d45fcbe57bb62777f220655e6ed5b5f900ce49cb8c5a53e24d7db0de6f8909eb0f8981f7565e6ae9b9bf9283a4ccccb0526eab5313
26
27 diff --git a/net-analyzer/nmap/metadata.xml b/net-analyzer/nmap/metadata.xml
28 index bd677b0812d..37088b5933c 100644
29 --- a/net-analyzer/nmap/metadata.xml
30 +++ b/net-analyzer/nmap/metadata.xml
31 @@ -6,12 +6,13 @@
32 <name>Gentoo network monitoring and analysis project</name>
33 </maintainer>
34 <use>
35 - <flag name="system-lua">Use <pkg>dev-lang/lua</pkg> instead of the bundled liblua</flag>
36 + <flag name="libssh2">Enable SSH support through <pkg>net-libs/libssh2</pkg></flag>
37 <flag name="ncat">Install the ncat utility</flag>
38 <flag name="ndiff">Install the ndiff utility</flag>
39 <flag name="nmap-update">Install nmap-update, which uses <pkg>dev-vcs/subversion</pkg> to update nmap scripts in your home directory</flag>
40 <flag name="nping">Install the nping utility</flag>
41 <flag name="nse">Include support for the Nmap Scripting Engine (NSE)</flag>
42 + <flag name="system-lua">Use <pkg>dev-lang/lua</pkg> instead of the bundled liblua</flag>
43 <flag name="zenmap">Install the GTK+ based nmap GUI, zenmap</flag>
44 </use>
45 </pkgmetadata>
46
47 diff --git a/net-analyzer/nmap/nmap-7.60.ebuild b/net-analyzer/nmap/nmap-7.60.ebuild
48 new file mode 100644
49 index 00000000000..2e1a4c75258
50 --- /dev/null
51 +++ b/net-analyzer/nmap/nmap-7.60.ebuild
52 @@ -0,0 +1,196 @@
53 +# Copyright 1999-2017 Gentoo Foundation
54 +# Distributed under the terms of the GNU General Public License v2
55 +
56 +EAPI=6
57 +
58 +PYTHON_COMPAT=( python2_7 )
59 +PYTHON_REQ_USE="sqlite,xml"
60 +inherit autotools flag-o-matic python-single-r1 toolchain-funcs
61 +
62 +MY_P=${P/_beta/BETA}
63 +
64 +DESCRIPTION="A utility for network discovery and security auditing"
65 +HOMEPAGE="https://nmap.org/"
66 +SRC_URI="
67 + https://nmap.org/dist/${MY_P}.tar.bz2
68 + https://dev.gentoo.org/~jer/nmap-logo-64.png
69 +"
70 +
71 +LICENSE="GPL-2"
72 +SLOT="0"
73 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
74 +
75 +IUSE="
76 + ipv6 libressl libssh2 ncat ndiff nls nmap-update nping +nse ssl system-lua
77 + zenmap
78 +"
79 +NMAP_LINGUAS=( de fr hi hr it ja pl pt_BR ru zh )
80 +IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}"
81 +
82 +REQUIRED_USE="
83 + system-lua? ( nse )
84 + ndiff? ( ${PYTHON_REQUIRED_USE} )
85 + zenmap? ( ${PYTHON_REQUIRED_USE} )
86 +"
87 +
88 +RDEPEND="
89 + dev-libs/liblinear:=
90 + dev-libs/libpcre
91 + net-libs/libpcap
92 + libssh2? (
93 + net-libs/libssh2[zlib]
94 + )
95 + ndiff? ( ${PYTHON_DEPS} )
96 + nls? ( virtual/libintl )
97 + nmap-update? (
98 + dev-libs/apr
99 + dev-vcs/subversion
100 + )
101 + ssl? (
102 + !libressl? ( dev-libs/openssl:0= )
103 + libressl? ( dev-libs/libressl:= )
104 + )
105 + system-lua? ( >=dev-lang/lua-5.2:*[deprecated] )
106 + zenmap? (
107 + dev-python/pygtk:2[${PYTHON_USEDEP}]
108 + ${PYTHON_DEPS}
109 + )
110 +"
111 +DEPEND="
112 + ${RDEPEND}
113 + nls? ( sys-devel/gettext )
114 +"
115 +
116 +S="${WORKDIR}/${MY_P}"
117 +PATCHES=(
118 + "${FILESDIR}"/${PN}-5.10_beta1-string.patch
119 + "${FILESDIR}"/${PN}-5.21-python.patch
120 + "${FILESDIR}"/${PN}-6.46-uninstaller.patch
121 + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch
122 + "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch
123 + "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
124 + "${FILESDIR}"/${PN}-7.25-libpcre.patch
125 + "${FILESDIR}"/${PN}-7.31-libnl.patch
126 +)
127 +
128 +pkg_setup() {
129 + if use ndiff || use zenmap; then
130 + python-single-r1_pkg_setup
131 + fi
132 +}
133 +
134 +src_unpack() {
135 + # prevent unpacking the logo
136 + unpack ${MY_P}.tar.bz2
137 +}
138 +
139 +src_prepare() {
140 + rm -r libpcap/ || die
141 +
142 + cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
143 +
144 + default
145 +
146 + if use nls; then
147 + local lingua=''
148 + for lingua in ${NMAP_LINGUAS[@]}; do
149 + if ! use linguas_${lingua}; then
150 + rm -r zenmap/share/zenmap/locale/${lingua} || die
151 + rm zenmap/share/zenmap/locale/${lingua}.po || die
152 + fi
153 + done
154 + else
155 + # configure/make ignores --disable-nls
156 + for lingua in ${NMAP_LINGUAS[@]}; do
157 + rm -r zenmap/share/zenmap/locale/${lingua} || die
158 + rm zenmap/share/zenmap/locale/${lingua}.po || die
159 + done
160 + fi
161 +
162 + sed -i \
163 + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
164 + Makefile.in || die
165 +
166 + sed -i \
167 + -e '/rm -f $@/d' \
168 + $(find . -name Makefile.in) \
169 + || die
170 +
171 + # Fix desktop files wrt bug #432714
172 + sed -i \
173 + -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
174 + zenmap/install_scripts/unix/zenmap-root.desktop \
175 + zenmap/install_scripts/unix/zenmap.desktop || die
176 +
177 + sed -i \
178 + -e '/AC_CONFIG_SUBDIRS(libz)/d' \
179 + -e '/AC_CONFIG_SUBDIRS(libssh2)/d' \
180 + configure.ac
181 +
182 + cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
183 + eautoreconf
184 + if [[ ${CHOST} == *-darwin* ]] ; then
185 + # we need the original for a Darwin-specific fix, bug #604432
186 + mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die
187 + fi
188 +}
189 +
190 +src_configure() {
191 + # The bundled libdnet is incompatible with the version available in the
192 + # tree, so we cannot use the system library here.
193 + econf \
194 + $(use_enable ipv6) \
195 + $(use_enable nls) \
196 + $(use_with ncat) \
197 + $(use_with libssh2) \
198 + $(usex libssh2 --with-zlib) \
199 + $(use_with ndiff) \
200 + $(use_with nmap-update) \
201 + $(use_with nping) \
202 + $(use_with ssl openssl) \
203 + $(use_with zenmap) \
204 + $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
205 + --cache-file="${S}"/config.cache \
206 + --with-libdnet=included \
207 + --with-pcre=/usr
208 + # Commented out because configure does weird things
209 + # --with-liblinear=/usr \
210 +}
211 +
212 +src_compile() {
213 + local directory
214 + for directory in . libnetutil nsock/src \
215 + $(usex ncat ncat '') \
216 + $(usex nmap-update nmap-update '') \
217 + $(usex nping nping '')
218 + do
219 + emake -C "${directory}" makefile.dep
220 + done
221 +
222 + emake \
223 + AR=$(tc-getAR) \
224 + RANLIB=$(tc-getRANLIB)
225 +}
226 +
227 +src_install() {
228 + LC_ALL=C emake -j1 \
229 + DESTDIR="${D}" \
230 + STRIP=: \
231 + nmapdatadir="${EPREFIX}"/usr/share/nmap \
232 + install
233 + if use nmap-update;then
234 + LC_ALL=C emake -j1 \
235 + -C nmap-update \
236 + DESTDIR="${D}" \
237 + STRIP=: \
238 + nmapdatadir="${EPREFIX}"/usr/share/nmap \
239 + install
240 + fi
241 +
242 + dodoc CHANGELOG HACKING docs/README docs/*.txt
243 +
244 + if use zenmap; then
245 + doicon "${DISTDIR}/nmap-logo-64.png"
246 + python_optimize
247 + fi
248 +}