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: Wed, 21 Mar 2018 21:00:31
Message-Id: 1521665902.f3db38bca12e575de54234854a8dd7a7a2ef8027.jer@gentoo
1 commit: f3db38bca12e575de54234854a8dd7a7a2ef8027
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Wed Mar 21 20:58:22 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 21 20:58:22 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3db38bc
7
8 net-analyzer/nmap: Version 7.70.
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 net-analyzer/nmap/Manifest | 1 +
13 net-analyzer/nmap/nmap-7.70.ebuild | 194 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 195 insertions(+)
15
16 diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest
17 index ac6015a86c8..3d383771ece 100644
18 --- a/net-analyzer/nmap/Manifest
19 +++ b/net-analyzer/nmap/Manifest
20 @@ -1,4 +1,5 @@
21 DIST nmap-7.40.tar.bz2 9043221 BLAKE2B ddbc2f9d8b96aa2ddd53bb250acb5b0829dd79caf04d599ed2257f89cc1e419a9dbf94101a5b1d5ad6815e1a94974b3c02ad81354897ba3bb032a5e3d616468d SHA512 98e37bf1c29789ea19ee4542d719ed6970c8bcc1bf92af4948a52a75273c2403329149f6b5df6368c23840d1bb3f47af9e5ce543f7a36596a33896609574f02d
22 DIST nmap-7.50.tar.bz2 9309616 BLAKE2B 79f257f4c19762729ddfe7bb950263253d98b0902d22f0bf87ff64b7400c5e0c8e8c1a6b5a8c75e3f835dedbf7087808b1bd8444126655138382ea2db1ccb748 SHA512 b74c5711f03bae363164cdb7e62923ab938c81c7bbcd080eaa2d1acc89f09eb0a7e0f5deb9628b81057c7a35ecd487a2d09dfe3b58b0db6c84cf0b39f526e5f2
23 DIST nmap-7.60.tar.bz2 10394925 BLAKE2B bb3a392292adeebe60dc9716ee61ee09a2f86703a1370ffd6a6c63969a75733660046279d122b1b529a3ea25083bde9334d5e13496ad6a9bd9d6562031b8ae09 SHA512 74ba8f6de026ade9ee6bb2252bee18a57210f8207977df7f1c04556629dcdc1e6127f33febc8a52ef88a1dac876116d590564dee4f1c23798c3ac37529991aa4
24 +DIST nmap-7.70.tar.bz2 10467371 BLAKE2B 53d751773851e45fcfa7604f8b325297f429f525bafdef91e7f693b9a9876ddb23e978c50821776b64764adb5bf36e759042cac3254bdbf36bff7048dfb6f58d SHA512 084c148b022ff6550e269d976d0077f7932a10e2ef218236fe13aa3a70b4eb6506df03329868fc68cb3ce78e4360b200f5a7a491d3145028fed679ef1c9ecae5
25 DIST nmap-logo-64.png 3289 BLAKE2B 9563f57d126e6fa38dc777391c2887112836b4f5b521311bde64d5c5a04c45a3f420abba0750f776658015c0018b2afeb381c691bc8784e4f39abc78b9c2d2c7 SHA512 fb102d12aaeebc8a97543ecd653a3606e86996ad679bc26d6e6e274ad05ec3e9f92521289d1a24153c521b699e8c0cfa65d8856bb49af53ee4837268bbc6b5d3
26
27 diff --git a/net-analyzer/nmap/nmap-7.70.ebuild b/net-analyzer/nmap/nmap-7.70.ebuild
28 new file mode 100644
29 index 00000000000..59a746de80e
30 --- /dev/null
31 +++ b/net-analyzer/nmap/nmap-7.70.ebuild
32 @@ -0,0 +1,194 @@
33 +# Copyright 1999-2018 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python2_7 )
39 +PYTHON_REQ_USE="sqlite,xml"
40 +inherit autotools flag-o-matic python-single-r1 toolchain-funcs
41 +
42 +MY_P=${P/_beta/BETA}
43 +
44 +DESCRIPTION="A utility for network discovery and security auditing"
45 +HOMEPAGE="https://nmap.org/"
46 +SRC_URI="
47 + https://nmap.org/dist/${MY_P}.tar.bz2
48 + https://dev.gentoo.org/~jer/nmap-logo-64.png
49 +"
50 +
51 +LICENSE="GPL-2"
52 +SLOT="0"
53 +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"
54 +
55 +IUSE="
56 + ipv6 libressl libssh2 ncat ndiff nls nmap-update nping +nse ssl system-lua
57 + zenmap
58 +"
59 +NMAP_LINGUAS=( de fr hi hr it ja pl pt_BR ru zh )
60 +
61 +REQUIRED_USE="
62 + system-lua? ( nse )
63 + ndiff? ( ${PYTHON_REQUIRED_USE} )
64 + zenmap? ( ${PYTHON_REQUIRED_USE} )
65 +"
66 +
67 +RDEPEND="
68 + dev-libs/liblinear:=
69 + dev-libs/libpcre
70 + net-libs/libpcap
71 + libssh2? ( net-libs/libssh2[zlib] )
72 + ndiff? ( ${PYTHON_DEPS} )
73 + nls? ( virtual/libintl )
74 + nmap-update? (
75 + dev-libs/apr
76 + dev-vcs/subversion
77 + )
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_unpack() {
111 + # prevent unpacking the logo
112 + unpack ${MY_P}.tar.bz2
113 +}
114 +
115 +src_prepare() {
116 + rm -r libpcap/ || die
117 +
118 + cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
119 +
120 + default
121 +
122 + local lingua
123 + if use nls; then
124 + for lingua in ${NMAP_LINGUAS[@]}; do
125 + if ! has ${lingua} ${LINGUAS-${lingua}}; then
126 + rm -r zenmap/share/zenmap/locale/${lingua} || die
127 + rm zenmap/share/zenmap/locale/${lingua}.po || die
128 + fi
129 + done
130 + else
131 + # configure/make ignores --disable-nls
132 + for lingua in ${NMAP_LINGUAS[@]}; do
133 + rm -r zenmap/share/zenmap/locale/${lingua} || die
134 + rm zenmap/share/zenmap/locale/${lingua}.po || die
135 + done
136 + fi
137 +
138 + sed -i \
139 + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
140 + Makefile.in || die
141 +
142 + sed -i \
143 + -e '/rm -f $@/d' \
144 + $(find . -name Makefile.in) \
145 + || die
146 +
147 + # Fix desktop files wrt bug #432714
148 + sed -i \
149 + -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
150 + zenmap/install_scripts/unix/zenmap-root.desktop \
151 + zenmap/install_scripts/unix/zenmap.desktop || die
152 +
153 + sed -i \
154 + -e '/AC_CONFIG_SUBDIRS(libz)/d' \
155 + -e '/AC_CONFIG_SUBDIRS(libssh2)/d' \
156 + configure.ac
157 +
158 + cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
159 +
160 + eautoreconf
161 +
162 + if [[ ${CHOST} == *-darwin* ]] ; then
163 + # we need the original for a Darwin-specific fix, bug #604432
164 + mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die
165 + fi
166 +}
167 +
168 +src_configure() {
169 + # The bundled libdnet is incompatible with the version available in the
170 + # tree, so we cannot use the system library here.
171 + econf \
172 + $(use_enable ipv6) \
173 + $(use_enable nls) \
174 + $(use_with libssh2) \
175 + $(use_with ncat) \
176 + $(use_with ndiff) \
177 + $(use_with nmap-update) \
178 + $(use_with nping) \
179 + $(use_with ssl openssl) \
180 + $(use_with zenmap) \
181 + $(usex libssh2 --with-zlib) \
182 + $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
183 + --cache-file="${S}"/config.cache \
184 + --with-libdnet=included \
185 + --with-pcre=/usr
186 + # Commented out because configure does weird things
187 + # --with-liblinear=/usr \
188 +}
189 +
190 +src_compile() {
191 + local directory
192 + for directory in . libnetutil nsock/src \
193 + $(usex ncat ncat '') \
194 + $(usex nmap-update nmap-update '') \
195 + $(usex nping nping '')
196 + do
197 + emake -C "${directory}" makefile.dep
198 + done
199 +
200 + emake \
201 + AR=$(tc-getAR) \
202 + RANLIB=$(tc-getRANLIB)
203 +}
204 +
205 +src_install() {
206 + LC_ALL=C emake -j1 \
207 + DESTDIR="${D}" \
208 + STRIP=: \
209 + nmapdatadir="${EPREFIX}"/usr/share/nmap \
210 + install
211 + if use nmap-update;then
212 + LC_ALL=C emake -j1 \
213 + -C nmap-update \
214 + DESTDIR="${D}" \
215 + STRIP=: \
216 + nmapdatadir="${EPREFIX}"/usr/share/nmap \
217 + install
218 + fi
219 +
220 + dodoc CHANGELOG HACKING docs/README docs/*.txt
221 +
222 + if use zenmap; then
223 + doicon "${DISTDIR}/nmap-logo-64.png"
224 + python_optimize
225 + fi
226 +}