summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-12-27 00:00:44 +0000
committerMarek Szuba <marecki@gentoo.org>2020-12-27 00:05:32 +0000
commit4b3b89a166b295db16dcbee179bae41eefd8c324 (patch)
tree2313f5e10614550b9180b628bbea03e7a1d6371e /net-analyzer
parentdev-qt/qtdeclarative: python3_9 (diff)
downloadgentoo-4b3b89a166b295db16dcbee179bae41eefd8c324.tar.gz
gentoo-4b3b89a166b295db16dcbee179bae41eefd8c324.tar.bz2
gentoo-4b3b89a166b295db16dcbee179bae41eefd8c324.zip
net-analyzer/nmap: migrate to lua-single.eclass
The live ebuild, the latest release currently in the tree and the latest release available under the GPL. In all three cases, upstream build scripts require version 5.3 of Lua and while they do not use pkgconfig, they check for versioned files/directories first. IUSE=system-lua is still there but defaults to enabled now. Bug: https://bugs.gentoo.org/253269 Closes: https://bugs.gentoo.org/752774 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/nmap/nmap-7.80-r2.ebuild137
-rw-r--r--net-analyzer/nmap/nmap-7.91-r1.ebuild116
-rw-r--r--net-analyzer/nmap/nmap-9999.ebuild18
3 files changed, 266 insertions, 5 deletions
diff --git a/net-analyzer/nmap/nmap-7.80-r2.ebuild b/net-analyzer/nmap/nmap-7.80-r2.ebuild
new file mode 100644
index 000000000000..7b40515497d4
--- /dev/null
+++ b/net-analyzer/nmap/nmap-7.80-r2.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-3 )
+LUA_REQ_USE="deprecated"
+
+inherit autotools desktop flag-o-matic lua-single toolchain-funcs
+
+DESCRIPTION="Network exploration tool and security / port scanner"
+HOMEPAGE="https://nmap.org/"
+SRC_URI="https://nmap.org/dist/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="ipv6 libressl libssh2 ncat nmap-update nping +nse ssl +system-lua"
+REQUIRED_USE="system-lua? ( nse ${LUA_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/liblinear:=
+ dev-libs/libpcre
+ net-libs/libpcap
+ libssh2? (
+ net-libs/libssh2[zlib]
+ sys-libs/zlib
+ )
+ nmap-update? (
+ dev-libs/apr
+ dev-vcs/subversion
+ )
+ nse? ( sys-libs/zlib )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ system-lua? ( ${LUA_DEPS} )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.10_beta1-string.patch
+ "${FILESDIR}"/${PN}-5.21-python.patch
+ "${FILESDIR}"/${PN}-6.46-uninstaller.patch
+ "${FILESDIR}"/${PN}-6.25-liblua-ar.patch
+ "${FILESDIR}"/${PN}-7.25-no-FORTIFY_SOURCE.patch
+ "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
+ "${FILESDIR}"/${PN}-7.25-libpcre.patch
+ "${FILESDIR}"/${PN}-7.31-libnl.patch
+ "${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch
+)
+
+pkg_setup() {
+ use system-lua && lua-single_pkg_setup
+}
+
+src_prepare() {
+ rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
+
+ cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
+
+ default
+
+ sed -i \
+ -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
+ Makefile.in || die
+ # Fix desktop files wrt bug #432714
+ sed -i \
+ -e 's|^Categories=.*|Categories=Network;System;Security;|g' \
+ zenmap/install_scripts/unix/zenmap-root.desktop \
+ zenmap/install_scripts/unix/zenmap.desktop || die
+
+ cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
+
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # we need the original for a Darwin-specific fix, bug #604432
+ mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die
+ fi
+}
+
+src_configure() {
+ # The bundled libdnet is incompatible with the version available in the
+ # tree, so we cannot use the system library here.
+ econf \
+ $(use_enable ipv6) \
+ $(use_with libssh2) \
+ $(use_with ncat) \
+ --without-ndiff \
+ $(use_with nmap-update) \
+ $(use_with nping) \
+ $(use_with ssl openssl) \
+ --without-zenmap \
+ $(usex libssh2 --with-zlib) \
+ $(usex nse --with-zlib) \
+ $(usex nse --with-liblua=$(usex system-lua yes included '' '') --without-liblua) \
+ --cache-file="${S}"/config.cache \
+ --with-libdnet=included \
+ --with-pcre=/usr
+ # Commented out because configure does weird things
+ # --with-liblinear=/usr \
+}
+
+src_compile() {
+ local directory
+ for directory in . libnetutil nsock/src \
+ $(usex ncat ncat '') \
+ $(usex nmap-update nmap-update '') \
+ $(usex nping nping '')
+ do
+ emake -C "${directory}" makefile.dep
+ done
+
+ emake \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB)
+}
+
+src_install() {
+ LC_ALL=C emake -j1 \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ if use nmap-update;then
+ LC_ALL=C emake -j1 \
+ -C nmap-update \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+ fi
+
+ dodoc CHANGELOG HACKING docs/README docs/*.txt
+}
diff --git a/net-analyzer/nmap/nmap-7.91-r1.ebuild b/net-analyzer/nmap/nmap-7.91-r1.ebuild
new file mode 100644
index 000000000000..3b611d01445e
--- /dev/null
+++ b/net-analyzer/nmap/nmap-7.91-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-3 )
+LUA_REQ_USE="deprecated"
+
+inherit autotools flag-o-matic lua-single toolchain-funcs
+
+DESCRIPTION="Network exploration tool and security / port scanner"
+HOMEPAGE="https://nmap.org/"
+SRC_URI="https://nmap.org/dist/${P}.tar.bz2"
+
+LICENSE="NPSL"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="ipv6 libressl libssh2 ncat nping +nse ssl +system-lua"
+REQUIRED_USE="system-lua? ( nse ${LUA_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/liblinear:=
+ dev-libs/libpcre
+ net-libs/libpcap
+ libssh2? (
+ net-libs/libssh2[zlib]
+ sys-libs/zlib
+ )
+ nse? ( sys-libs/zlib )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ system-lua? ( ${LUA_DEPS} )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.10_beta1-string.patch
+ "${FILESDIR}"/${PN}-5.21-python.patch
+ "${FILESDIR}"/${PN}-6.46-uninstaller.patch
+ "${FILESDIR}"/${PN}-6.25-liblua-ar.patch
+ "${FILESDIR}"/${PN}-7.25-CXXFLAGS.patch
+ "${FILESDIR}"/${PN}-7.25-libpcre.patch
+ "${FILESDIR}"/${PN}-7.31-libnl.patch
+ "${FILESDIR}"/${PN}-7.80-ac-config-subdirs.patch
+ "${FILESDIR}"/${PN}-7.91-no-FORTIFY_SOURCE.patch
+)
+
+pkg_setup() {
+ use system-lua && lua-single_pkg_setup
+}
+
+src_prepare() {
+ rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
+
+ cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
+
+ default
+
+ sed -i \
+ -e '/^ALL_LINGUAS =/{s|$| id|g;s|jp|ja|g}' \
+ Makefile.in || die
+
+ cp libdnet-stripped/include/config.h.in{,.nmap-orig} || die
+
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # we need the original for a Darwin-specific fix, bug #604432
+ mv libdnet-stripped/include/config.h.in{.nmap-orig,} || die
+ fi
+}
+
+src_configure() {
+ # The bundled libdnet is incompatible with the version available in the
+ # tree, so we cannot use the system library here.
+ econf \
+ $(use_enable ipv6) \
+ $(use_with libssh2) \
+ $(use_with ncat) \
+ $(use_with nping) \
+ $(use_with ssl openssl) \
+ $(usex libssh2 --with-zlib) \
+ $(usex nse --with-liblua=$(usex system-lua yes included '' '') --without-liblua) \
+ $(usex nse --with-zlib) \
+ --cache-file="${S}"/config.cache \
+ --with-libdnet=included \
+ --with-pcre=/usr \
+ --without-ndiff \
+ --without-zenmap
+}
+
+src_compile() {
+ local directory
+ for directory in . libnetutil nsock/src \
+ $(usex ncat ncat '') \
+ $(usex nping nping '')
+ do
+ emake -C "${directory}" makefile.dep
+ done
+
+ emake \
+ AR=$(tc-getAR) \
+ RANLIB=$(tc-getRANLIB)
+}
+
+src_install() {
+ LC_ALL=C emake -j1 \
+ DESTDIR="${D}" \
+ STRIP=: \
+ nmapdatadir="${EPREFIX}"/usr/share/nmap \
+ install
+
+ dodoc CHANGELOG HACKING docs/README docs/*.txt
+}
diff --git a/net-analyzer/nmap/nmap-9999.ebuild b/net-analyzer/nmap/nmap-9999.ebuild
index 00bb4385aaa9..782f91bf13e1 100644
--- a/net-analyzer/nmap/nmap-9999.ebuild
+++ b/net-analyzer/nmap/nmap-9999.ebuild
@@ -2,7 +2,11 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit autotools flag-o-matic git-r3 toolchain-funcs
+
+LUA_COMPAT=( lua5-3 )
+LUA_REQ_USE="deprecated"
+
+inherit autotools flag-o-matic git-r3 lua-single toolchain-funcs
DESCRIPTION="Network exploration tool and security / port scanner"
HOMEPAGE="https://nmap.org/"
@@ -11,8 +15,8 @@ EGIT_REPO_URI="https://github.com/nmap/nmap"
LICENSE="NPSL"
SLOT="0"
-IUSE="ipv6 libressl libssh2 ncat nping +nse ssl system-lua"
-REQUIRED_USE="system-lua? ( nse )"
+IUSE="ipv6 libressl libssh2 ncat nping +nse ssl +system-lua"
+REQUIRED_USE="system-lua? ( nse ${LUA_REQUIRED_USE} )"
RDEPEND="
dev-libs/liblinear:=
@@ -27,7 +31,7 @@ RDEPEND="
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:= )
)
- system-lua? ( >=dev-lang/lua-5.2:*[deprecated] )
+ system-lua? ( ${LUA_DEPS} )
"
DEPEND="${RDEPEND}"
@@ -44,6 +48,10 @@ PATCHES=(
"${FILESDIR}"/${PN}-9999-netutil-else.patch
)
+pkg_setup() {
+ use system-lua && lua-single_pkg_setup
+}
+
src_prepare() {
rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
@@ -75,7 +83,7 @@ src_configure() {
$(use_with nping) \
$(use_with ssl openssl) \
$(usex libssh2 --with-zlib) \
- $(usex nse --with-liblua=$(usex system-lua /usr included '' '') --without-liblua) \
+ $(usex nse --with-liblua=$(usex system-lua yes included '' '') --without-liblua) \
$(usex nse --with-zlib) \
--cache-file="${S}"/config.cache \
--with-libdnet=included \