summaryrefslogtreecommitdiff
path: root/net-analyzer/nmap
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nmap')
-rw-r--r--net-analyzer/nmap/Manifest2
-rw-r--r--net-analyzer/nmap/files/nmap-7.94-topport.patch31
-rw-r--r--net-analyzer/nmap/nmap-7.94-r1.ebuild189
3 files changed, 222 insertions, 0 deletions
diff --git a/net-analyzer/nmap/Manifest b/net-analyzer/nmap/Manifest
index 54c5ddf91f0a..22c54672ded5 100644
--- a/net-analyzer/nmap/Manifest
+++ b/net-analyzer/nmap/Manifest
@@ -1,9 +1,11 @@
AUX nls.m4 1217 BLAKE2B 4a59d8f5b7de12a687901faf8911fc726ed296dae916d71026539035cd7f40c4caa57c58b48f2693ec7d5c9e1e1905a9299f41a2789639c9cd453188c9a2398a SHA512 2278c46eff2af70549fe3e3a56670e18fa177b0fb5d09addc5c936df9b4fb07a2b91e379fd9bc6d2477d2ea7e35e24dc4235890cd818e3cabab2955c8e0822a1
AUX nmap-7.94-autoconf-2.72.patch 868 BLAKE2B 27600a391fd3dd5a0f6c4a79836a3b6c15350e3b196178c1066a51d68bd9afe59606f0c89d37a88746f9aea4264aa9afaaadba0302869873199b2b4ab44faed1 SHA512 2b7d18d1f0e0b5ab2adde0d9579775ca5463ff003e109267b8cfffc10aa88d8a55284aea148141a15e9c5c9465d06461e9ae824a4cc88e3b47ff6c6a8c73ac11
+AUX nmap-7.94-topport.patch 1084 BLAKE2B b61f9c8170318d3b2889062eadf9499b52046e56389dd09108e3bc6d66446511cf15eef991ac01081471c58ab7747e09cbd6b853c141470a2cbcafea8cccf146 SHA512 92c49df70d7c03f864bdecd4829e6d0deff9cce48a73f9e901953e5f0a4053e3bea629ce9f7923eec46a0ba82f31f41d8eff8dfb38642c771042ee7e894664b5
DIST nmap-7.94-patches.tar.xz 4112 BLAKE2B 0720242bf507f2a1502cf854592d94a57a33d5ac1e520c752e548092f91bbffeb0f6f762f4da27ff445419ff3845060242aa43aba53d0161ae2bebccf728cc97 SHA512 d47e2215e1923af65e3a392c3d990d650e68135f139013c311a26d12cfd0b27d9d5c3cbc27bb8583251a353a6284fb9d518373f17624db242be7060b8bfa0ba5
DIST nmap-7.94.tar.bz2 11102195 BLAKE2B 5819b458b50e33f6a507ad3c32a731c13e730c40d31a61731c3cfcd41fad8e3fdfcbb721ef46b05a80e406d0a646d0966d4b645551711144822551ef374a443a SHA512 a55cddf9c1d9272243d01251eb3315b26f232d0596818857083222a385398618b428dc2bd8282c3e832527e135a74aeb020ca8609d83d8337342f5d8a04d7f2c
DIST nmap-7.94.tar.bz2.asc 198 BLAKE2B 38a363499fe236f675238ecf015a7e597d66cdd84eef13bed4986b4081c4f1f7a288121e3666e0f31a9282fd84f30cbceb65341f1c173086c7421a8ea719afe9 SHA512 dcbaf88e9ead21f303a7ee5390de0d2bd67477c2628858dc3380b0ac7d73d4d1b330f3b303ff32b0cb9a22eaa37af535bd7aa622531451e404a8c9a256a98eec
DIST nmap-7.95-patches.tar.xz 4144 BLAKE2B d2c6d1b811538ff21c5f4654562a2adaf216f3437c08d4b787892ca2d8b1500376eb7cc794357d0262bf18d23ffd5f356192ba48b6748dc8365cdc601fecdc9c SHA512 3bfc7ba506bc8623c2b62a7ef386621e1b066ed27d3ba1a6909b336c87c6894c9a972fd847ddf5278752c201e905af1deb71f91d264d82b17e3878fd4de1a2a2
+EBUILD nmap-7.94-r1.ebuild 4320 BLAKE2B 340472b8b0e4f15b08be5012bd4e2928ddbd39363ea18598653aa0887ec7c55e3ca43d728e0e0e5553a6462adc434627350b5bb4f01951eec0db36e36919fcd9 SHA512 86df89dcf1b1f863331036f610106fc85586f55c57406aadceb3dfcb3dbdbdf9cc95501cdb67d97ce125ae71c9de2ceac95e06a6b299990dc93078df3d07511e
EBUILD nmap-7.94.ebuild 4273 BLAKE2B 7381e2af77c91ed3f92482378db5d2d8b293f1a0bc70f6b89daf35497e1bed31c86d5721e74948f844534207a766df2e17fff071a2dc340a4117f61553f2023b SHA512 2095deebce00a84f4201da919d1a5cdf6dbc344a5c03d69519909721374d637d1ef474d1a23c0c52e58ac96948093f2e67fb8c50f0ada1ac54d5fcc1931fe222
EBUILD nmap-9999.ebuild 4235 BLAKE2B ebd3c6d771ca1ce106f00659fc147582656936e8a3b4623e1b49f480a03e5b59adcde642e8fca300fbf832a437b30ca45ce59295d00e74bbeb46aa5887bdbe5b SHA512 7d8bacabb8ae950a91981ca3eebb27da77dc306b017e1c6cb756d393110014cde7a62b285ecab2f276e2d72b5f57f7690f29f1d630ddfee3bcb1183230c6347a
MISC metadata.xml 888 BLAKE2B 0fa642ab34c24d35347876c96e2ab28de71d153202b14ef551c8222a808218c34fa990857cbc7273ac2551e5fe2d6afc27124a47de979872f46e30b0451d9c56 SHA512 214887e52ca334207125fb3fa534ec8f4ae4d9985c93695e798cf21625b7d3113852a2e835bbcccf833ae01c1e89e8be0ffb31d409db7ebdbc4920c3e3416a6c
diff --git a/net-analyzer/nmap/files/nmap-7.94-topport.patch b/net-analyzer/nmap/files/nmap-7.94-topport.patch
new file mode 100644
index 000000000000..0ba568d317e3
--- /dev/null
+++ b/net-analyzer/nmap/files/nmap-7.94-topport.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/918874
+https://github.com/nmap/nmap/issues/2655
+https://github.com/nmap/nmap/issues/2679
+https://github.com/nmap/nmap/commit/edad9c059ca45bccab8c0f41fe6fc6546c60153a
+
+From edad9c059ca45bccab8c0f41fe6fc6546c60153a Mon Sep 17 00:00:00 2001
+From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
+Date: Thu, 20 Jul 2023 16:21:23 +0000
+Subject: [PATCH] Add missing braces. Fixes #2679
+
+---
+ services.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/services.cc b/services.cc
+index a0899c7509..2a709dca97 100644
+--- a/services.cc
++++ b/services.cc
+@@ -496,9 +496,10 @@ void gettoppts(double level, const char *portlist, struct scan_lists * ports, co
+ if (sctpmax && strcmp(current->s_proto, "sctp") == 0
+ && (!ptsdata_initialized ||
+ is_port_member(ptsdata.sctp_ports, ptsdata.sctp_count, current))
+- )
++ ) {
+ ports->sctp_ports[ports->sctp_count++] = current->s_port;
+- sctpmax--;
++ sctpmax--;
++ }
+ break;
+ default:
+ break;
diff --git a/net-analyzer/nmap/nmap-7.94-r1.ebuild b/net-analyzer/nmap/nmap-7.94-r1.ebuild
new file mode 100644
index 000000000000..9050bebb7efe
--- /dev/null
+++ b/net-analyzer/nmap/nmap-7.94-r1.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-4 )
+LUA_REQ_USE="deprecated"
+PYTHON_COMPAT=( python3_{10..11} )
+PLOCALES="de es fr hi hr hu id it ja pl pt_BR pt_PR ro ru sk zh"
+PLOCALE_BACKUP="en"
+inherit autotools lua-single plocale python-single-r1 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 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+fi
+
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-7.94-patches.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/libpcre
+ net-libs/libpcap
+ ndiff? ( ${PYTHON_DEPS} )
+ libssh2? (
+ net-libs/libssh2[zlib]
+ sys-libs/zlib
+ )
+ nls? ( virtual/libintl )
+ nse? (
+ ${LUA_DEPS}
+ sys-libs/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 )
+"
+
+if [[ ${PV} != *9999* ]] ; then
+ BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-nmap )"
+fi
+
+PATCHES=(
+ "${WORKDIR}"/${PN}-7.94-patches
+ "${FILESDIR}"/${PN}-7.94-autoconf-2.72.patch
+ "${FILESDIR}"/${PN}-7.94-topport.patch
+)
+
+pkg_setup() {
+ python-single-r1_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}"
+
+ 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)"
+}
+
+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
+
+ if use ndiff || use zenmap ; then
+ python_optimize
+ fi
+
+ use symlink && dosym /usr/bin/ncat /usr/bin/nc
+}