nmap: use git as source and bump to PCRE2 support commit
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 25 Oct 2023 03:51:57 +0000 (05:51 +0200)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Sun, 28 Apr 2024 20:21:36 +0000 (22:21 +0200)
Use git as source and bump version to PCRE2 support commit.

Move nmap to PCRE2 library as PCRE is EOL and won't receive any security
update in the future.

Patch 001-Use-correct-HAVE_-macros-for-Lua-5.4.-Fixes-2648.patch has
been merged upstream and can be dropped.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
net/nmap/Makefile
net/nmap/patches/001-Use-correct-HAVE_-macros-for-Lua-5.4.-Fixes-2648.patch [deleted file]

index d13dad50d9cc037ae368c33eb0c4cfe217e9e56f..d27e0b4093a64948229f30fc5538507a27bb0c97 100644 (file)
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=nmap
-PKG_VERSION:=7.94
+PKG_VERSION:=7.94
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Nuno Gonçalves <nunojpg@gmail.com>
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://nmap.org/dist/
-PKG_HASH:=d71be189eec43d7e099bac8571509d316c4577ca79491832ac3e1217bc8f92cc
+# Restore PKG_VERSION and revert to using release as soon as NMAP publish a new
+# version that supports PCRE2.
+# PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+# PKG_SOURCE_URL:=https://nmap.org/dist/
+# PKG_HASH:=d71be189eec43d7e099bac8571509d316c4577ca79491832ac3e1217bc8f92cc
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/nmap/nmap
+PKG_SOURCE_DATE:=2023-08-28
+PKG_SOURCE_VERSION:=7dcea0187a9b8bccd552487de91512c97c791e3d
+PKG_MIRROR_HASH:=3a086013df4759f394c93a23254689fddd2dcbb06574d4898ea276bdabdf5bff
+
 PKG_LICENSE:=NPSL-0.94-or-NPSL-0.95
 PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:nmap:nmap
@@ -32,7 +41,7 @@ PYTHON3_PKG_FORCE_DISTUTILS_SETUP:=1
 include $(INCLUDE_DIR)/package.mk
 include ../../lang/python/python3-package.mk
 
-NMAP_DEPENDS:=+libpcap +libstdcpp +zlib +libpcre
+NMAP_DEPENDS:=+libpcap +libstdcpp +zlib +libpcre2
 NCAT_DEPENDS:=+libpcap
 NPING_DEPENDS:=+libpcap +libpthread +libstdcpp
 SSL_DEPENDS:=+libopenssl +ca-certs
@@ -60,7 +69,7 @@ endef
 
 define Package/nmap-full
 $(call Package/nmap/default)
-  DEPENDS:=$(NMAP_DEPENDS) +libopenssl +liblua5.4 +libssh2
+  DEPENDS:=$(NMAP_DEPENDS) $(SSL_DEPENDS) +liblua5.4 +libssh2
   VARIANT:=full
   TITLE:=Nmap (with OpenSSL and scripting support)
 endef
@@ -81,7 +90,7 @@ endef
 
 define Package/ncat-full
 $(call Package/nmap/default)
-  DEPENDS:=$(NCAT_DEPENDS) +libopenssl +liblua5.4
+  DEPENDS:=$(NCAT_DEPENDS) $(SSL_DEPENDS) +liblua5.4
   VARIANT:=full
   TITLE:=Ncat (with OpenSSL and scripting support)
 endef
diff --git a/net/nmap/patches/001-Use-correct-HAVE_-macros-for-Lua-5.4.-Fixes-2648.patch b/net/nmap/patches/001-Use-correct-HAVE_-macros-for-Lua-5.4.-Fixes-2648.patch
deleted file mode 100644 (file)
index fbac9bf..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From b9263f056ab3acd666d25af84d399410560d48ac Mon Sep 17 00:00:00 2001
-From: dmiller <dmiller@e0a8ed71-7df4-0310-8962-fdc924857419>
-Date: Tue, 30 May 2023 18:33:07 +0000
-Subject: [PATCH] Use correct HAVE_ macros for Lua 5.4. Fixes #2648
-
----
- ncat/config.h.in | 4 ++--
- nmap_config.h.in | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
---- a/ncat/config.h.in
-+++ b/ncat/config.h.in
-@@ -191,7 +191,7 @@
- /* Defines for locating Lua */
- #undef LUA_INCLUDED
--#undef HAVE_LUA5_3_LUA_H
--#undef HAVE_LUA_5_3_LUA_H
-+#undef HAVE_LUA5_4_LUA_H
-+#undef HAVE_LUA_5_4_LUA_H
- #undef HAVE_LUA_H
- #undef HAVE_LUA_LUA_H
---- a/nmap_config.h.in
-+++ b/nmap_config.h.in
-@@ -172,8 +172,8 @@ extern "C" int gethostname (char *, unsi
- #undef HAVE_PCAP_SET_IMMEDIATE_MODE
- /* Various possibilities for lua.h */
--#undef HAVE_LUA5_3_LUA_H
--#undef HAVE_LUA_5_3_LUA_H
-+#undef HAVE_LUA5_4_LUA_H
-+#undef HAVE_LUA_5_4_LUA_H
- #undef HAVE_LUA_H
- #undef HAVE_LUA_LUA_H