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: Fri, 30 Sep 2016 09:15:49
Message-Id: 1475226848.b81b83eab7b3a68c2e7eacae58ffdd8689ebce9a.jer@gentoo
1 commit: b81b83eab7b3a68c2e7eacae58ffdd8689ebce9a
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 30 09:14:08 2016 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 30 09:14:08 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b81b83ea
7
8 net-analyzer/nmap: Version bump.
9
10 Package-Manager: portage-2.3.1
11
12 net-analyzer/nmap/Manifest | 1 +
13 net-analyzer/nmap/nmap-7.30.ebuild | 172 +++++++++++++++++++++++++++++++++++++
14 2 files changed, 173 insertions(+)
15
16 diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest
17 index 3b2033a..1a19fab 100644
18 --- a/net-analyzer/nmap/Manifest
19 +++ b/net-analyzer/nmap/Manifest
20 @@ -3,4 +3,5 @@ DIST nmap-7.01.tar.bz2 8922697 SHA256 cf1fcd2643ba2ef52f47acb3c18e52fa12a4ae4b72
21 DIST nmap-7.12.tar.bz2 8960599 SHA256 63df082a87c95a189865d37304357405160fc6333addcf5b84204c95e0539b04 SHA512 91156499c6f903fb565fa2b0faa74043d078493312f9489071fafc687301017afc16c7eb26c092f1fa142e78c98a436833f56a9f015cb2a17aa6f6220b6a0b98 WHIRLPOOL ed4f3b00dc5e71f841133026c9b40aa285a9e47c6fd4ee012d235c22c6193039d19256b42708b5e38fe94840d7b4535cc78a4e6681f66a2fed3eb251070d0fde
22 DIST nmap-7.25BETA1.tar.bz2 8580974 SHA256 6866457809b598f8e85c9e8c79773f1821de29cc1b6f574cc7fed4ad8c01c178 SHA512 6d2fc83186086ea8d01003b8d79af0b45788378ef32c5e8f9b14561db5adfc407e388df044f1e3420f4f3d21115bc1623da0b6a926bd3d20816265cb10efe092 WHIRLPOOL 18bfca4d494c59fa6625ecb1e5ad7a7f838236c73269c9e0b2094e57d047ba1095284e26d4cbfb1a85a797af4b7f4abf02ffbc89c4664c6a5aea3912d4c3fb94
23 DIST nmap-7.25BETA2.tar.bz2 8874592 SHA256 6c66a150c9e346ccdca0aa16ef8c2a5310449444fe15cf5ec3f3a151978378d0 SHA512 0a40267d578ac7ff461783a4b22e584a7c3fee42c321843fce24dd6cddabc068cc7acd0fc8fd85f3952ed05033792adcb28e2919ed70f5fb30826a81c4777fe0 WHIRLPOOL 4c165d45afe0295f5cdb68cd90e7e7d5951ffb31115b3aedc37722872b130adab088cae851c12db0d213aabecfbdcda2b1dae48c6a01bdd8e5d98148c084c98d
24 +DIST nmap-7.30.tar.bz2 9003761 SHA256 ba38a042ec67e315d903d28a4976b74999da94c646667c0c63f31e587d6d8d0f SHA512 effef6d1d3f333a8c9a628a2acc0d0faec5967ef09a7d831a4d8d287f224167305e54f575e571eebb0f30544675bf27c834fdaf468db00cdb3fcad14e392303c WHIRLPOOL d20627c806131fcec6583f8d2eb3504f669d2165391d5ba17bdf86be3417cc5ca783ff5d1552735bbeb75ac34d236ca36cfe754c29596ec8703a6b669a91aa55
25 DIST nmap-logo-64.png 3289 SHA256 4c72ff1eeffeeaa1039b251d9f2d675936e65db686fe3b57a35c2183ce67a8aa SHA512 fb102d12aaeebc8a97543ecd653a3606e86996ad679bc26d6e6e274ad05ec3e9f92521289d1a24153c521b699e8c0cfa65d8856bb49af53ee4837268bbc6b5d3 WHIRLPOOL 6093aadcb9880587e17d39d45fcbe57bb62777f220655e6ed5b5f900ce49cb8c5a53e24d7db0de6f8909eb0f8981f7565e6ae9b9bf9283a4ccccb0526eab5313
26
27 diff --git a/net-analyzer/nmap/nmap-7.30.ebuild b/net-analyzer/nmap/nmap-7.30.ebuild
28 new file mode 100644
29 index 00000000..1fe61b5
30 --- /dev/null
31 +++ b/net-analyzer/nmap/nmap-7.30.ebuild
32 @@ -0,0 +1,172 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=5
38 +
39 +PYTHON_COMPAT=( python2_7 )
40 +PYTHON_REQ_USE="sqlite,xml"
41 +inherit autotools eutils flag-o-matic python-single-r1 toolchain-funcs
42 +
43 +MY_P=${P/_beta/BETA}
44 +
45 +DESCRIPTION="A utility for network discovery and security auditing"
46 +HOMEPAGE="http://nmap.org/"
47 +SRC_URI="
48 + http://nmap.org/dist/${MY_P}.tar.bz2
49 + https://dev.gentoo.org/~jer/nmap-logo-64.png
50 +"
51 +
52 +LICENSE="GPL-2"
53 +SLOT="0"
54 +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"
55 +
56 +IUSE="ipv6 libressl +nse system-lua ncat ndiff nls nmap-update nping ssl zenmap"
57 +NMAP_LINGUAS=( de fr hi hr it ja pl pt_BR ru zh )
58 +IUSE+=" ${NMAP_LINGUAS[@]/#/linguas_}"
59 +
60 +REQUIRED_USE="
61 + system-lua? ( nse )
62 + ndiff? ( ${PYTHON_REQUIRED_USE} )
63 + zenmap? ( ${PYTHON_REQUIRED_USE} )
64 +"
65 +
66 +RDEPEND="
67 + dev-libs/liblinear:=
68 + dev-libs/libpcre
69 + || ( >=net-libs/libpcap-1.8.0 <net-libs/libpcap-1.8.0[ipv6?] )
70 + zenmap? (
71 + dev-python/pygtk:2[${PYTHON_USEDEP}]
72 + ${PYTHON_DEPS}
73 + )
74 + system-lua? ( >=dev-lang/lua-5.2[deprecated] )
75 + ndiff? ( ${PYTHON_DEPS} )
76 + nls? ( virtual/libintl )
77 + nmap-update? ( dev-libs/apr dev-vcs/subversion )
78 + ssl? (
79 + !libressl? ( dev-libs/openssl:0= )
80 + libressl? ( dev-libs/libressl:= )
81 + )
82 +"
83 +DEPEND="
84 + ${RDEPEND}
85 + nls? ( sys-devel/gettext )
86 +"
87 +
88 +S="${WORKDIR}/${MY_P}"
89 +
90 +pkg_setup() {
91 + if use ndiff || use zenmap; then
92 + python-single-r1_pkg_setup
93 + fi
94 +}
95 +
96 +src_unpack() {
97 + # prevent unpacking the logo
98 + unpack ${MY_P}.tar.bz2
99 +}
100 +
101 +src_prepare() {
102 + epatch \
103 + "${FILESDIR}"/${PN}-5.10_beta1-string.patch \
104 + "${FILESDIR}"/${PN}-5.21-python.patch \
105 + "${FILESDIR}"/${PN}-6.46-uninstaller.patch \
106 + "${FILESDIR}"/${PN}-6.47-no-libnl.patch \
107 + "${FILESDIR}"/${PN}-6.25-liblua-ar.patch \
108 + "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch \
109 + "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch \
110 + "${FILESDIR}"/${PN}-7.25-libpcre.patch
111 +
112 + if use nls; then
113 + local lingua=''
114 + for lingua in ${NMAP_LINGUAS[@]}; do
115 + if ! use linguas_${lingua}; then
116 + rm -r zenmap/share/zenmap/locale/${lingua} || die
117 + rm zenmap/share/zenmap/locale/${lingua}.po || die
118 + fi
119 + done
120 + else
121 + # configure/make ignores --disable-nls
122 + for lingua in ${NMAP_LINGUAS[@]}; do
123 + rm -r zenmap/share/zenmap/locale/${lingua} || die
124 + rm zenmap/share/zenmap/locale/${lingua}.po || die
125 + done
126 + fi
127 +
128 + sed -i \
129 + -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
130 + Makefile.in || die
131 +
132 + sed -i \
133 + -e '/rm -f $@/d' \
134 + $(find . -name Makefile.in) \
135 + || die
136 +
137 + # Fix desktop files wrt bug #432714
138 + sed -i \
139 + -e '/^Encoding/d' \
140 + -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
141 + zenmap/install_scripts/unix/zenmap-root.desktop \
142 + zenmap/install_scripts/unix/zenmap.desktop || die
143 +
144 + epatch_user
145 +
146 + eautoreconf
147 +}
148 +
149 +src_configure() {
150 + # The bundled libdnet is incompatible with the version available in the
151 + # tree, so we cannot use the system library here.
152 + econf \
153 + $(use_enable ipv6) \
154 + $(use_enable nls) \
155 + $(use_with zenmap) \
156 + $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
157 + $(use_with ncat) \
158 + $(use_with ndiff) \
159 + $(use_with nmap-update) \
160 + $(use_with nping) \
161 + $(use_with ssl openssl) \
162 + --with-libdnet=included \
163 + --with-pcre=/usr
164 + # --with-liblinear=/usr \
165 + # Commented because configure does weird things, while autodetection works
166 +}
167 +
168 +src_compile() {
169 + local directory
170 + for directory in . libnetutil nsock/src \
171 + $(usex ncat ncat '') \
172 + $(usex nmap-update nmap-update '') \
173 + $(usex nping nping '')
174 + do
175 + emake -C "${directory}" makefile.dep
176 + done
177 +
178 + emake \
179 + AR=$(tc-getAR) \
180 + RANLIB=$(tc-getRANLIB)
181 +}
182 +
183 +src_install() {
184 + LC_ALL=C emake -j1 \
185 + DESTDIR="${D}" \
186 + STRIP=: \
187 + nmapdatadir="${EPREFIX}"/usr/share/nmap \
188 + install
189 + if use nmap-update;then
190 + LC_ALL=C emake -j1 \
191 + -C nmap-update \
192 + DESTDIR="${D}" \
193 + STRIP=: \
194 + nmapdatadir="${EPREFIX}"/usr/share/nmap \
195 + install
196 + fi
197 +
198 + dodoc CHANGELOG HACKING docs/README docs/*.txt
199 +
200 + if use zenmap; then
201 + doicon "${DISTDIR}/nmap-logo-64.png"
202 + python_optimize
203 + fi
204 +}