1 |
commit: 4b3b89a166b295db16dcbee179bae41eefd8c324 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 27 00:00:44 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 27 00:05:32 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b3b89a1 |
7 |
|
8 |
net-analyzer/nmap: migrate to lua-single.eclass |
9 |
|
10 |
The live ebuild, the latest release currently in the tree and the latest |
11 |
release available under the GPL. In all three cases, upstream build |
12 |
scripts require version 5.3 of Lua and while they do not use pkgconfig, |
13 |
they check for versioned files/directories first. |
14 |
|
15 |
IUSE=system-lua is still there but defaults to enabled now. |
16 |
|
17 |
Bug: https://bugs.gentoo.org/253269 |
18 |
Closes: https://bugs.gentoo.org/752774 |
19 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
20 |
|
21 |
.../nmap/{nmap-9999.ebuild => nmap-7.80-r2.ebuild} | 54 ++++++++++++++++------ |
22 |
.../nmap/{nmap-9999.ebuild => nmap-7.91-r1.ebuild} | 23 +++++---- |
23 |
net-analyzer/nmap/nmap-9999.ebuild | 18 ++++++-- |
24 |
3 files changed, 69 insertions(+), 26 deletions(-) |
25 |
|
26 |
diff --git a/net-analyzer/nmap/nmap-9999.ebuild b/net-analyzer/nmap/nmap-7.80-r2.ebuild |
27 |
similarity index 62% |
28 |
copy from net-analyzer/nmap/nmap-9999.ebuild |
29 |
copy to net-analyzer/nmap/nmap-7.80-r2.ebuild |
30 |
index 00bb4385aaa..7b40515497d 100644 |
31 |
--- a/net-analyzer/nmap/nmap-9999.ebuild |
32 |
+++ b/net-analyzer/nmap/nmap-7.80-r2.ebuild |
33 |
@@ -2,17 +2,21 @@ |
34 |
# Distributed under the terms of the GNU General Public License v2 |
35 |
|
36 |
EAPI=7 |
37 |
-inherit autotools flag-o-matic git-r3 toolchain-funcs |
38 |
+ |
39 |
+LUA_COMPAT=( lua5-3 ) |
40 |
+LUA_REQ_USE="deprecated" |
41 |
+ |
42 |
+inherit autotools desktop flag-o-matic lua-single toolchain-funcs |
43 |
|
44 |
DESCRIPTION="Network exploration tool and security / port scanner" |
45 |
HOMEPAGE="https://nmap.org/" |
46 |
+SRC_URI="https://nmap.org/dist/${P}.tar.bz2" |
47 |
|
48 |
-EGIT_REPO_URI="https://github.com/nmap/nmap" |
49 |
- |
50 |
-LICENSE="NPSL" |
51 |
+LICENSE="GPL-2" |
52 |
SLOT="0" |
53 |
-IUSE="ipv6 libressl libssh2 ncat nping +nse ssl system-lua" |
54 |
-REQUIRED_USE="system-lua? ( nse )" |
55 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
56 |
+IUSE="ipv6 libressl libssh2 ncat nmap-update nping +nse ssl +system-lua" |
57 |
+REQUIRED_USE="system-lua? ( nse ${LUA_REQUIRED_USE} )" |
58 |
|
59 |
RDEPEND=" |
60 |
dev-libs/liblinear:= |
61 |
@@ -22,12 +26,16 @@ RDEPEND=" |
62 |
net-libs/libssh2[zlib] |
63 |
sys-libs/zlib |
64 |
) |
65 |
+ nmap-update? ( |
66 |
+ dev-libs/apr |
67 |
+ dev-vcs/subversion |
68 |
+ ) |
69 |
nse? ( sys-libs/zlib ) |
70 |
ssl? ( |
71 |
!libressl? ( dev-libs/openssl:0= ) |
72 |
libressl? ( dev-libs/libressl:= ) |
73 |
) |
74 |
- system-lua? ( >=dev-lang/lua-5.2:*[deprecated] ) |
75 |
+ system-lua? ( ${LUA_DEPS} ) |
76 |
" |
77 |
DEPEND="${RDEPEND}" |
78 |
|
79 |
@@ -36,14 +44,17 @@ PATCHES=( |
80 |
"${FILESDIR}"/${PN}-5.21-python.patch |
81 |
"${FILESDIR}"/${PN}-6.46-uninstaller.patch |
82 |
"${FILESDIR}"/${PN}-6.25-liblua-ar.patch |
83 |
+ "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch |
84 |
"${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch |
85 |
"${FILESDIR}"/${PN}-7.25-libpcre.patch |
86 |
"${FILESDIR}"/${PN}-7.31-libnl.patch |
87 |
"${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch |
88 |
- "${FILESDIR}"/${PN}-7.91-no-FORTIFY_SOURCE.patch |
89 |
- "${FILESDIR}"/${PN}-9999-netutil-else.patch |
90 |
) |
91 |
|
92 |
+pkg_setup() { |
93 |
+ use system-lua && lua-single_pkg_setup |
94 |
+} |
95 |
+ |
96 |
src_prepare() { |
97 |
rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die |
98 |
|
99 |
@@ -54,6 +65,11 @@ src_prepare() { |
100 |
sed -i \ |
101 |
-e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \ |
102 |
Makefile.in || die |
103 |
+ # Fix desktop files wrt bug #432714 |
104 |
+ sed -i \ |
105 |
+ -e 's|^Categories=.*|Categories=Network;System;Security;|g' \ |
106 |
+ zenmap/install_scripts/unix/zenmap-root.desktop \ |
107 |
+ zenmap/install_scripts/unix/zenmap.desktop || die |
108 |
|
109 |
cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die |
110 |
|
111 |
@@ -72,22 +88,26 @@ src_configure() { |
112 |
$(use_enable ipv6) \ |
113 |
$(use_with libssh2) \ |
114 |
$(use_with ncat) \ |
115 |
+ --without-ndiff \ |
116 |
+ $(use_with nmap-update) \ |
117 |
$(use_with nping) \ |
118 |
$(use_with ssl openssl) \ |
119 |
+ --without-zenmap \ |
120 |
$(usex libssh2 --with-zlib) \ |
121 |
- $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \ |
122 |
$(usex nse --with-zlib) \ |
123 |
+ $(usex nse --with-liblua=$(usex system-lua yes included '' '') --without-liblua) \ |
124 |
--cache-file="${S}"/config.cache \ |
125 |
--with-libdnet=included \ |
126 |
- --with-pcre=/usr \ |
127 |
- --without-ndiff \ |
128 |
- --without-zenmap |
129 |
+ --with-pcre=/usr |
130 |
+ # Commented out because configure does weird things |
131 |
+ # --with-liblinear=/usr \ |
132 |
} |
133 |
|
134 |
src_compile() { |
135 |
local directory |
136 |
for directory in . libnetutil nsock/src \ |
137 |
$(usex ncat ncat '') \ |
138 |
+ $(usex nmap-update nmap-update '') \ |
139 |
$(usex nping nping '') |
140 |
do |
141 |
emake -C "${directory}" makefile.dep |
142 |
@@ -104,6 +124,14 @@ src_install() { |
143 |
STRIP=: \ |
144 |
nmapdatadir="${EPREFIX}"/usr/share/nmap \ |
145 |
install |
146 |
+ if use nmap-update;then |
147 |
+ LC_ALL=C emake -j1 \ |
148 |
+ -C nmap-update \ |
149 |
+ DESTDIR="${D}" \ |
150 |
+ STRIP=: \ |
151 |
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \ |
152 |
+ install |
153 |
+ fi |
154 |
|
155 |
dodoc CHANGELOG HACKING docs/README docs/*.txt |
156 |
} |
157 |
|
158 |
diff --git a/net-analyzer/nmap/nmap-9999.ebuild b/net-analyzer/nmap/nmap-7.91-r1.ebuild |
159 |
similarity index 79% |
160 |
copy from net-analyzer/nmap/nmap-9999.ebuild |
161 |
copy to net-analyzer/nmap/nmap-7.91-r1.ebuild |
162 |
index 00bb4385aaa..3b611d01445 100644 |
163 |
--- a/net-analyzer/nmap/nmap-9999.ebuild |
164 |
+++ b/net-analyzer/nmap/nmap-7.91-r1.ebuild |
165 |
@@ -2,17 +2,21 @@ |
166 |
# Distributed under the terms of the GNU General Public License v2 |
167 |
|
168 |
EAPI=7 |
169 |
-inherit autotools flag-o-matic git-r3 toolchain-funcs |
170 |
+ |
171 |
+LUA_COMPAT=( lua5-3 ) |
172 |
+LUA_REQ_USE="deprecated" |
173 |
+ |
174 |
+inherit autotools flag-o-matic lua-single toolchain-funcs |
175 |
|
176 |
DESCRIPTION="Network exploration tool and security / port scanner" |
177 |
HOMEPAGE="https://nmap.org/" |
178 |
- |
179 |
-EGIT_REPO_URI="https://github.com/nmap/nmap" |
180 |
+SRC_URI="https://nmap.org/dist/${P}.tar.bz2" |
181 |
|
182 |
LICENSE="NPSL" |
183 |
SLOT="0" |
184 |
-IUSE="ipv6 libressl libssh2 ncat nping +nse ssl system-lua" |
185 |
-REQUIRED_USE="system-lua? ( nse )" |
186 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
187 |
+IUSE="ipv6 libressl libssh2 ncat nping +nse ssl +system-lua" |
188 |
+REQUIRED_USE="system-lua? ( nse ${LUA_REQUIRED_USE} )" |
189 |
|
190 |
RDEPEND=" |
191 |
dev-libs/liblinear:= |
192 |
@@ -27,7 +31,7 @@ RDEPEND=" |
193 |
!libressl? ( dev-libs/openssl:0= ) |
194 |
libressl? ( dev-libs/libressl:= ) |
195 |
) |
196 |
- system-lua? ( >=dev-lang/lua-5.2:*[deprecated] ) |
197 |
+ system-lua? ( ${LUA_DEPS} ) |
198 |
" |
199 |
DEPEND="${RDEPEND}" |
200 |
|
201 |
@@ -41,9 +45,12 @@ PATCHES=( |
202 |
"${FILESDIR}"/${PN}-7.31-libnl.patch |
203 |
"${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch |
204 |
"${FILESDIR}"/${PN}-7.91-no-FORTIFY_SOURCE.patch |
205 |
- "${FILESDIR}"/${PN}-9999-netutil-else.patch |
206 |
) |
207 |
|
208 |
+pkg_setup() { |
209 |
+ use system-lua && lua-single_pkg_setup |
210 |
+} |
211 |
+ |
212 |
src_prepare() { |
213 |
rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die |
214 |
|
215 |
@@ -75,7 +82,7 @@ src_configure() { |
216 |
$(use_with nping) \ |
217 |
$(use_with ssl openssl) \ |
218 |
$(usex libssh2 --with-zlib) \ |
219 |
- $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \ |
220 |
+ $(usex nse --with-liblua=$(usex system-lua yes included '' '') --without-liblua) \ |
221 |
$(usex nse --with-zlib) \ |
222 |
--cache-file="${S}"/config.cache \ |
223 |
--with-libdnet=included \ |
224 |
|
225 |
diff --git a/net-analyzer/nmap/nmap-9999.ebuild b/net-analyzer/nmap/nmap-9999.ebuild |
226 |
index 00bb4385aaa..782f91bf13e 100644 |
227 |
--- a/net-analyzer/nmap/nmap-9999.ebuild |
228 |
+++ b/net-analyzer/nmap/nmap-9999.ebuild |
229 |
@@ -2,7 +2,11 @@ |
230 |
# Distributed under the terms of the GNU General Public License v2 |
231 |
|
232 |
EAPI=7 |
233 |
-inherit autotools flag-o-matic git-r3 toolchain-funcs |
234 |
+ |
235 |
+LUA_COMPAT=( lua5-3 ) |
236 |
+LUA_REQ_USE="deprecated" |
237 |
+ |
238 |
+inherit autotools flag-o-matic git-r3 lua-single toolchain-funcs |
239 |
|
240 |
DESCRIPTION="Network exploration tool and security / port scanner" |
241 |
HOMEPAGE="https://nmap.org/" |
242 |
@@ -11,8 +15,8 @@ EGIT_REPO_URI="https://github.com/nmap/nmap" |
243 |
|
244 |
LICENSE="NPSL" |
245 |
SLOT="0" |
246 |
-IUSE="ipv6 libressl libssh2 ncat nping +nse ssl system-lua" |
247 |
-REQUIRED_USE="system-lua? ( nse )" |
248 |
+IUSE="ipv6 libressl libssh2 ncat nping +nse ssl +system-lua" |
249 |
+REQUIRED_USE="system-lua? ( nse ${LUA_REQUIRED_USE} )" |
250 |
|
251 |
RDEPEND=" |
252 |
dev-libs/liblinear:= |
253 |
@@ -27,7 +31,7 @@ RDEPEND=" |
254 |
!libressl? ( dev-libs/openssl:0= ) |
255 |
libressl? ( dev-libs/libressl:= ) |
256 |
) |
257 |
- system-lua? ( >=dev-lang/lua-5.2:*[deprecated] ) |
258 |
+ system-lua? ( ${LUA_DEPS} ) |
259 |
" |
260 |
DEPEND="${RDEPEND}" |
261 |
|
262 |
@@ -44,6 +48,10 @@ PATCHES=( |
263 |
"${FILESDIR}"/${PN}-9999-netutil-else.patch |
264 |
) |
265 |
|
266 |
+pkg_setup() { |
267 |
+ use system-lua && lua-single_pkg_setup |
268 |
+} |
269 |
+ |
270 |
src_prepare() { |
271 |
rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die |
272 |
|
273 |
@@ -75,7 +83,7 @@ src_configure() { |
274 |
$(use_with nping) \ |
275 |
$(use_with ssl openssl) \ |
276 |
$(usex libssh2 --with-zlib) \ |
277 |
- $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \ |
278 |
+ $(usex nse --with-liblua=$(usex system-lua yes included '' '') --without-liblua) \ |
279 |
$(usex nse --with-zlib) \ |
280 |
--cache-file="${S}"/config.cache \ |
281 |
--with-libdnet=included \ |