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