repo/gentoo:master commit in: net-analyzer/nmap/
Andreas K. Hüttel <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786804597.819c4ce8b22ff45c8f893d8eb1594db77cf01ef2.dilfridge@gentoo> |
commit: 819c4ce8b22ff45c8f893d8eb1594db77cf01ef2
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 14:36:06 2026 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 14:36:37 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=819c4ce8
net-analyzer/nmap: drop 7.95, 7.97, 7.98
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
net-analyzer/nmap/Manifest | 9 --
net-analyzer/nmap/nmap-7.95.ebuild | 206 -----------------------------------
net-analyzer/nmap/nmap-7.97.ebuild | 214 -------------------------------------
net-analyzer/nmap/nmap-7.98.ebuild | 214 -------------------------------------
4 files changed, 643 deletions(-)
diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest
index b9ee82872388..365a7fa5daa9 100644
--- a/net-analyzer/nmap/Manifest
+++ b/net-analyzer/nmap/Manifest
@@ -1,12 +1,3 @@
-DIST nmap-7.95-patches-2.tar.xz 5740 BLAKE2B 860e7702e2ae1211c4eeeb8f869730de2279a305389f54317f883d2094bfbb1efb9031a761af93bfa8ab56e06bea774dea5807d134dd64f94c2191340a21113b SHA512 e4fb7350ea7e7f2e62f089129c0962652e556fb3bdf272d78c834db299f7f92c3238344c8bd50fea7d1360460ca4768ddad7367ecfcaefdb51125c66cd6981dd
-DIST nmap-7.95.tar.bz2 11717069 BLAKE2B 4ab4912468f6c1cf7517090bc94b1bb34e665fe1b3db973e1c7bb2d05cb885545cdf3ca5c7fb548ff0012b800f5dd60ed2f2010fc9fb62ba7d6a28537287193c SHA512 fd95a8bc627a2b8b507353f761dc9fdc8e880a0dd2d75a51b9cb3ec664318796af9bb16a6ff9a1358bd77ad669c2a54e333be630f201f69287692a7d2d41c17e
-DIST nmap-7.95.tar.bz2.asc 181 BLAKE2B 31db32cb5ad42be25d4b87d8619e0865d7089618839311ada9a2c1e0c9bc89f82ca6253e8151930f152c3fac7ad820ca747ed8427d008f9b04ad2b9e0a0e2b71 SHA512 ce56893796def1b7e8ae96cce90dda073ad84d657cd15d980ee14562a07f7522d438a40ac58422b6f6de7201a9f2678413018633529cb8dcc4e580cfe678c092
-DIST nmap-7.97-patches-1.tar.xz 6236 BLAKE2B aface99574e5316191bb43a2434bc158fef5ed3b6999b671d44f6820547e1b9e1769ecee6303da2326e5980975d77acf812ee722e4bfa6c667e3eeea0d7d4d81 SHA512 e989f015deb22365b058fd111b22e63ecb0056718381cf03b298303e1f46fb0eda98eb0647898356224e6fc36544c84a2ad5c261346d3b23ba2fa6947461fd61
-DIST nmap-7.97-patches-2.tar.xz 6396 BLAKE2B e8271dc1444d0e20882df0a8a66ade5b31946a8fa4a94a0adbc8d5b8cb7b776bdc3f82e98792c53055ac0a6322a4a0ae85f13cda0169fdcc03d0a550a032c7e4 SHA512 d0bc20c9a1e38c1fa65827d584ac44c2fe762661657ec946ffc65861bda2bdc28662fe27d3a5a2ab816e2f2c6d5e9acb56819d8e84a86b58789c46e33c4e8dc1
-DIST nmap-7.97.tar.bz2 12142624 BLAKE2B affeca9f28a4ccb67b3f7154a08e587c5f80e292fc8e442f469812518e435b54d1ab125dbfd52981dc4730c41475d384092352715a2131379a7d032bd476298e SHA512 050241744c311f5fc16297e1698aded2a9fdc78eb7a0954d1c70f7713ef6e1b07f3fcbf28a6a53f43785b1ae710aadf10237d1d0bd8855c6b3c423da4d35961c
-DIST nmap-7.97.tar.bz2.asc 181 BLAKE2B ad465109377ee4d68e302b05b4464700751cf66ef5a8911ed142257cafb2a137ce0d9b82c7ef7edd14aef1a29accabacce05585005593a02301af3ca87c2370b SHA512 ac5ecae4c60a1ee27d7063740334e60791ead9cbc168bdd413017b50d13546ac4dff3852c95942806a67d8a6bec8bc269869b177fbe8825d5d104818fcb0c931
-DIST nmap-7.98.tar.bz2 12273108 BLAKE2B bbc7f4931876b2a59dc8d94b5498e72ee76084db19089820030473628f215a0a89972638f4128e46a46ffa55bd92141bfceab311fa00f4798cf111aca5ec104a SHA512 14e13689d1276f70efc8c905e8eb0a15970f4312c2ef86d8d97e9df11319735e7f7cd73f728f69cf43d27a078ef5ac1e0f39cd119d8cb9262060c42606c6cab3
-DIST nmap-7.98.tar.bz2.asc 181 BLAKE2B 6b971925581746226dc69b5b68619e0d44c6e0504ec9062c1824eb990c3307ba9e13356e1400c52bcbf25c290c15a80378cf9682c0246a72990a3bc07200dc1b SHA512 0716e747381e5a3f70ef013a04bdb12459afa57ef2a09d202e006166d23c0fe7b1391bf6b0d3a4a30839d0f5d031e269b0bcac678e42f280a77914a0ff6314af
DIST nmap-7.99-patches-1.tar.xz 6276 BLAKE2B 59574660f5418a1c9c654c78f993547b4a053cd193a2b3e29472c0a9ada8632a953e2288d488ac6897f9774cae8b88a5fd9dc1443c5900818146881bdf4856c6 SHA512 a4ccffb231bd40aa953e0220b545f4d94a595b4ebcbdf7832e1b20ee4482563d7d39aeb158ca1853264540e5e094c6523cf7ff60682d1ec106869361d4a696d6
DIST nmap-7.99.tar.bz2 13036588 BLAKE2B 76cc39c7ba28615a143eec7f6fdf009746ad1c3ca8f07a8d3fb8a707ee116bc1acbfd2e33515817dd3e64cf0b4d8c6d6674e796c06bf20a8ee73e9b38b89341a SHA512 9ff69659b76573eb10b6e472a0217032fd5fed20f0ac971b3736a4222fb6251c5fbf381ebea7ede313b8ff2feac90a848f645000c61200772d01b843594f4ba4
DIST nmap-7.99.tar.bz2.asc 181 BLAKE2B 413c84dfdd378423d35176e3fdcca2d73b833ad19eaa12fcdd50be8d365981bf1484bb329640619252b11ce81750069f124a7877d7f18d1480492257e738d4c2 SHA512 4dbb3782483d1ea2f3b0b77075e4527f994cfdcb51bdb60c5fe03204023d60ee2ba07746836dd3cccf7b42005feac62fee9cd0cf205085a066f831c224668676
diff --git a/net-analyzer/nmap/nmap-7.95.ebuild b/net-analyzer/nmap/nmap-7.95.ebuild
deleted file mode 100644
index 29a91e799688..000000000000
--- a/net-analyzer/nmap/nmap-7.95.ebuild
+++ /dev/null
@@ -1,206 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-4 )
-LUA_REQ_USE="deprecated"
-DISTUTILS_OPTIONAL=1
-DISTUTILS_SINGLE_IMPL=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{11..13} )
-PLOCALES="de es fr hi hr hu id it ja pl pt_BR pt_PR ro ru sk zh"
-PLOCALE_BACKUP="en"
-inherit autotools distutils-r1 lua-single plocale toolchain-funcs
-
-DESCRIPTION="Network exploration tool and security / port scanner"
-HOMEPAGE="https://nmap.org/"
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- EGIT_REPO_URI="https://github.com/nmap/nmap"
-
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/nmap.asc
- inherit verify-sig
-
- SRC_URI="https://nmap.org/dist/${P}.tar.bz2"
- SRC_URI+=" verify-sig? ( https://nmap.org/dist/sigs/${P}.tar.bz2.asc )"
-
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
-fi
-
-SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-7.95-patches-2.tar.xz"
-
-# https://github.com/nmap/nmap/issues/2199
-LICENSE="NPSL-0.95"
-SLOT="0"
-IUSE="ipv6 libssh2 ncat ndiff nping nls +nse ssl symlink zenmap"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- nse? ( ${LUA_REQUIRED_USE} )
- symlink? ( ncat )
-"
-
-RDEPEND="
- dev-libs/liblinear:=
- dev-libs/libpcre2
- net-libs/libpcap
- ndiff? ( ${PYTHON_DEPS} )
- libssh2? (
- net-libs/libssh2[zlib]
- virtual/zlib:=
- )
- nls? ( virtual/libintl )
- nse? (
- ${LUA_DEPS}
- virtual/zlib:=
- )
- ssl? ( dev-libs/openssl:= )
- symlink? (
- ncat? (
- !net-analyzer/netcat
- !net-analyzer/openbsd-netcat
- )
- )
- zenmap? (
- ${PYTHON_DEPS}
- $(python_gen_cond_dep '
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- ')
- )
-"
-DEPEND="${RDEPEND}"
-# Python is always needed at build time for some scripts
-BDEPEND="
- ${PYTHON_DEPS}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- zenmap? ( ${DISTUTILS_DEPS} )
-"
-
-if [[ ${PV} != *9999* ]] ; then
- BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-nmap )"
-fi
-
-PATCHES=(
- "${WORKDIR}"/${PN}-7.95-patches-2
-)
-
-pkg_setup() {
- use nse && lua-single_pkg_setup
-}
-
-src_unpack() {
- if [[ ${PV} == *9999 ]] ; then
- git-r3_src_unpack
- elif use verify-sig ; then
- # Needed for downloaded patch (which is unsigned, which is fine)
- verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- # Drop bundled libraries
- rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
-
- cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
-
- delete_disabled_locale() {
- # Force here as PLOCALES contains supported locales for man
- # pages and zenmap doesn't have all of those
- rm -rf zenmap/share/zenmap/locale/${1} || die
- rm -f zenmap/share/zenmap/locale/${1}.po || die
- }
- plocale_for_each_disabled_locale delete_disabled_locale
-
- 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() {
- export ac_cv_path_PYTHON="${PYTHON}"
- export am_cv_pathless_PYTHON="${EPYTHON}"
-
- python_setup
-
- local myeconfargs=(
- $(use_enable ipv6)
- $(use_enable nls)
- $(use_with libssh2)
- $(use_with ncat)
- $(use_with ndiff)
- $(use_with nping)
- $(use_with nse liblua)
- $(use_with ssl openssl)
- $(use_with zenmap)
- $(usex libssh2 --with-zlib)
- $(usex nse --with-zlib)
- --cache-file="${S}"/config.cache
- # The bundled libdnet is incompatible with the version available in the
- # tree, so we cannot use the system library here.
- --with-libdnet=included
- --with-pcre="${ESYSROOT}"/usr
- --without-dpdk
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- local directory
- for directory in . libnetutil nsock/src $(usev ncat) $(usev nping) ; do
- emake -C "${directory}" makefile.dep
- done
-
- emake \
- AR="$(tc-getAR)" \
- RANLIB="$(tc-getRANLIB)"
-
- if use zenmap ; then
- cd zenmap || die
- distutils-r1_src_compile
- fi
-}
-
-src_test() {
- local -x PATH="${S}:${PATH}"
-
- default
-}
-
-src_install() {
- # See bug #831713 for return of -j1
- LC_ALL=C emake \
- -j1 \
- DESTDIR="${D}" \
- STRIP=: \
- nmapdatadir="${EPREFIX}"/usr/share/nmap \
- install
-
- dodoc CHANGELOG HACKING docs/README docs/*.txt
-
- use symlink && dosym /usr/bin/ncat /usr/bin/nc
-
- if use ndiff ; then
- python_optimize
- fi
-
- if use zenmap ; then
- distutils-r1_src_install
- fi
-}
diff --git a/net-analyzer/nmap/nmap-7.97.ebuild b/net-analyzer/nmap/nmap-7.97.ebuild
deleted file mode 100644
index 467e38882499..000000000000
--- a/net-analyzer/nmap/nmap-7.97.ebuild
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-4 )
-LUA_REQ_USE="deprecated"
-DISTUTILS_OPTIONAL=1
-DISTUTILS_SINGLE_IMPL=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{11..13} )
-PLOCALES="de es fr hi hr hu id it ja pl pt_BR pt_PR ro ru sk zh"
-PLOCALE_BACKUP="en"
-inherit autotools distutils-r1 lua-single plocale toolchain-funcs
-
-DESCRIPTION="Network exploration tool and security / port scanner"
-HOMEPAGE="https://nmap.org/"
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- EGIT_REPO_URI="https://github.com/nmap/nmap"
-
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/nmap.asc
- inherit verify-sig
-
- SRC_URI="https://nmap.org/dist/${P}.tar.bz2"
- SRC_URI+=" verify-sig? ( https://nmap.org/dist/sigs/${P}.tar.bz2.asc )"
-
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
-fi
-
-SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-7.97-patches-1.tar.xz"
-
-# https://github.com/nmap/nmap/issues/2199
-LICENSE="NPSL-0.95"
-SLOT="0"
-IUSE="ipv6 libssh2 ncat ndiff nping nls +nse ssl symlink zenmap"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- nse? ( ${LUA_REQUIRED_USE} )
- symlink? ( ncat )
-"
-
-RDEPEND="
- dev-libs/liblinear:=
- dev-libs/libpcre2
- net-libs/libpcap
- ndiff? ( ${PYTHON_DEPS} )
- libssh2? (
- net-libs/libssh2[zlib]
- virtual/zlib:=
- )
- nls? ( virtual/libintl )
- nse? (
- ${LUA_DEPS}
- virtual/zlib:=
- )
- ssl? ( dev-libs/openssl:= )
- symlink? (
- ncat? (
- !net-analyzer/netcat
- !net-analyzer/openbsd-netcat
- )
- )
- zenmap? (
- ${PYTHON_DEPS}
- $(python_gen_cond_dep '
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- ')
- )
-"
-DEPEND="${RDEPEND}"
-# Python is always needed at build time for some scripts
-BDEPEND="
- ${PYTHON_DEPS}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- zenmap? ( ${DISTUTILS_DEPS} )
-"
-
-if [[ ${PV} != *9999* ]] ; then
- BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-nmap )"
-fi
-
-PATCHES=(
- "${WORKDIR}"/${PN}-7.97-patches-2
-)
-
-pkg_setup() {
- use nse && lua-single_pkg_setup
-}
-
-src_unpack() {
- if [[ ${PV} == *9999 ]] ; then
- git-r3_src_unpack
- elif use verify-sig ; then
- # Needed for downloaded patch (which is unsigned, which is fine)
- verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- # Drop bundled libraries
- rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
-
- cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
-
- delete_disabled_locale() {
- # Force here as PLOCALES contains supported locales for man
- # pages and zenmap doesn't have all of those
- rm -rf zenmap/share/zenmap/locale/${1} || die
- rm -f zenmap/share/zenmap/locale/${1}.po || die
- }
- plocale_for_each_disabled_locale delete_disabled_locale
-
- 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() {
- export ac_cv_path_PYTHON="${PYTHON}"
- export am_cv_pathless_PYTHON="${EPYTHON}"
-
- python_setup
-
- local myeconfargs=(
- $(use_enable ipv6)
- $(use_enable nls)
- $(use_with libssh2)
- $(use_with ncat)
- $(use_with ndiff)
- $(use_with nping)
- $(use_with nse liblua)
- $(use_with ssl openssl)
- $(use_with zenmap)
- $(usex libssh2 --with-zlib)
- $(usex nse --with-zlib)
- --cache-file="${S}"/config.cache
- # The bundled libdnet is incompatible with the version available in the
- # tree, so we cannot use the system library here.
- --with-libdnet=included
- --with-libpcre="${ESYSROOT}"/usr
- --without-dpdk
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- local directory
- for directory in . libnetutil nsock/src $(usev ncat) $(usev nping) ; do
- emake -C "${directory}" makefile.dep
- done
-
- emake \
- AR="$(tc-getAR)" \
- RANLIB="$(tc-getRANLIB)"
-
- if use ndiff || use zenmap ; then
- distutils-r1_src_compile
- fi
-}
-
-python_compile() {
- if use ndiff ; then
- cd "${S}"/ndiff || die
- distutils-r1_python_compile
- fi
-
- if use zenmap ; then
- cd "${S}"/zenmap || die
- distutils-r1_python_compile
- fi
-}
-
-src_test() {
- local -x PATH="${S}:${PATH}"
-
- default
-}
-
-src_install() {
- # See bug #831713 for return of -j1
- LC_ALL=C emake \
- -j1 \
- DESTDIR="${D}" \
- STRIP=: \
- nmapdatadir="${EPREFIX}"/usr/share/nmap \
- install
-
- dodoc CHANGELOG HACKING docs/README docs/*.txt
-
- use symlink && dosym /usr/bin/ncat /usr/bin/nc
-
- if use ndiff || use zenmap ; then
- distutils-r1_src_install
- python_optimize
- fi
-}
diff --git a/net-analyzer/nmap/nmap-7.98.ebuild b/net-analyzer/nmap/nmap-7.98.ebuild
deleted file mode 100644
index a8df0c50872a..000000000000
--- a/net-analyzer/nmap/nmap-7.98.ebuild
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright 1999-2026 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-4 )
-LUA_REQ_USE="deprecated"
-DISTUTILS_OPTIONAL=1
-DISTUTILS_SINGLE_IMPL=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{11..14} )
-PLOCALES="de es fr hi hr hu id it ja pl pt_BR pt_PR ro ru sk zh"
-PLOCALE_BACKUP="en"
-inherit autotools distutils-r1 lua-single plocale toolchain-funcs
-
-DESCRIPTION="Network exploration tool and security / port scanner"
-HOMEPAGE="https://nmap.org/"
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- EGIT_REPO_URI="https://github.com/nmap/nmap"
-
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/nmap.asc
- inherit verify-sig
-
- SRC_URI="https://nmap.org/dist/${P}.tar.bz2"
- SRC_URI+=" verify-sig? ( https://nmap.org/dist/sigs/${P}.tar.bz2.asc )"
-
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
-fi
-
-SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-7.97-patches-2.tar.xz"
-
-# https://github.com/nmap/nmap/issues/2199
-LICENSE="NPSL-0.95"
-SLOT="0"
-IUSE="ipv6 libssh2 ncat ndiff nping nls +nse ssl symlink zenmap"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- nse? ( ${LUA_REQUIRED_USE} )
- symlink? ( ncat )
-"
-
-RDEPEND="
- dev-libs/liblinear:=
- dev-libs/libpcre2
- net-libs/libpcap
- ndiff? ( ${PYTHON_DEPS} )
- libssh2? (
- net-libs/libssh2[zlib]
- virtual/zlib:=
- )
- nls? ( virtual/libintl )
- nse? (
- ${LUA_DEPS}
- virtual/zlib:=
- )
- ssl? ( dev-libs/openssl:= )
- symlink? (
- ncat? (
- !net-analyzer/netcat
- !net-analyzer/openbsd-netcat
- )
- )
- zenmap? (
- ${PYTHON_DEPS}
- $(python_gen_cond_dep '
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- ')
- )
-"
-DEPEND="${RDEPEND}"
-# Python is always needed at build time for some scripts
-BDEPEND="
- ${PYTHON_DEPS}
- virtual/pkgconfig
- nls? ( sys-devel/gettext )
- zenmap? ( ${DISTUTILS_DEPS} )
-"
-
-if [[ ${PV} != *9999* ]] ; then
- BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-nmap )"
-fi
-
-PATCHES=(
- "${WORKDIR}"/${PN}-7.97-patches-1
-)
-
-pkg_setup() {
- use nse && lua-single_pkg_setup
-}
-
-src_unpack() {
- if [[ ${PV} == *9999 ]] ; then
- git-r3_src_unpack
- elif use verify-sig ; then
- # Needed for downloaded patch (which is unsigned, which is fine)
- verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- # Drop bundled libraries
- rm -r liblinear/ libpcap/ libpcre/ libssh2/ libz/ || die
-
- cat "${FILESDIR}"/nls.m4 >> "${S}"/acinclude.m4 || die
-
- delete_disabled_locale() {
- # Force here as PLOCALES contains supported locales for man
- # pages and zenmap doesn't have all of those
- rm -rf zenmap/share/zenmap/locale/${1} || die
- rm -f zenmap/share/zenmap/locale/${1}.po || die
- }
- plocale_for_each_disabled_locale delete_disabled_locale
-
- 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() {
- export ac_cv_path_PYTHON="${PYTHON}"
- export am_cv_pathless_PYTHON="${EPYTHON}"
-
- python_setup
-
- local myeconfargs=(
- $(use_enable ipv6)
- $(use_enable nls)
- $(use_with libssh2)
- $(use_with ncat)
- $(use_with ndiff)
- $(use_with nping)
- $(use_with nse liblua)
- $(use_with ssl openssl)
- $(use_with zenmap)
- $(usex libssh2 --with-zlib)
- $(usex nse --with-zlib)
- --cache-file="${S}"/config.cache
- # The bundled libdnet is incompatible with the version available in the
- # tree, so we cannot use the system library here.
- --with-libdnet=included
- --with-libpcre="${ESYSROOT}"/usr
- --without-dpdk
- )
-
- econf "${myeconfargs[@]}"
-}
-
-src_compile() {
- local directory
- for directory in . libnetutil nsock/src $(usev ncat) $(usev nping) ; do
- emake -C "${directory}" makefile.dep
- done
-
- emake \
- AR="$(tc-getAR)" \
- RANLIB="$(tc-getRANLIB)"
-
- if use ndiff || use zenmap ; then
- distutils-r1_src_compile
- fi
-}
-
-python_compile() {
- if use ndiff ; then
- cd "${S}"/ndiff || die
- distutils-r1_python_compile
- fi
-
- if use zenmap ; then
- cd "${S}"/zenmap || die
- distutils-r1_python_compile
- fi
-}
-
-src_test() {
- local -x PATH="${S}:${PATH}"
-
- default
-}
-
-src_install() {
- # See bug #831713 for return of -j1
- LC_ALL=C emake \
- -j1 \
- DESTDIR="${D}" \
- STRIP=: \
- nmapdatadir="${EPREFIX}"/usr/share/nmap \
- install
-
- dodoc CHANGELOG HACKING docs/README docs/*.txt
-
- use symlink && dosym /usr/bin/ncat /usr/bin/nc
-
- if use ndiff || use zenmap ; then
- distutils-r1_src_install
- python_optimize
- fi
-}