diff --git a/package/ngrep/0001-Fix-typo-in-configure-in-when-testing-for-use_pcre.patch b/package/ngrep/0001-Fix-typo-in-configure-in-when-testing-for-use_pcre.patch deleted file mode 100644 index c7f0dec360..0000000000 --- a/package/ngrep/0001-Fix-typo-in-configure-in-when-testing-for-use_pcre.patch +++ /dev/null @@ -1,24 +0,0 @@ -From b8b1e9751e1d074af0dd77c2554c1b25fd8f7abe Mon Sep 17 00:00:00 2001 -From: Romain Francoise -Date: Mon, 1 Jan 2018 18:00:34 +0100 -Subject: [PATCH] Fix typo in configure.in when testing for use_pcre - -Signed-off-by: Fabrice Fontaine -Upstream: https://github.com/jpr5/ngrep/commit/b8b1e9751e1d074af0dd77c2554c1b25fd8f7abe ---- - configure.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.in b/configure.in -index cff37e9..06c050a 100644 ---- a/configure.in -+++ b/configure.in -@@ -146,7 +146,7 @@ AC_ARG_ENABLE(pcre, - [ use_pcre="$enableval" ], - [ use_pcre="no" ]) - --if test use_pcre = yes; then -+if test $use_pcre = yes; then - USE_PCRE="1" - EXTRA_LIBS="$EXTRA_LIBS -lpcre" - else diff --git a/package/ngrep/0002-Check-for-libnet_init-in-configure-in.patch b/package/ngrep/0002-Check-for-libnet_init-in-configure-in.patch deleted file mode 100644 index 7fa2e2f3bc..0000000000 --- a/package/ngrep/0002-Check-for-libnet_init-in-configure-in.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0a51c8bc62c7b49b8d67a360daa6b1957256f4f5 Mon Sep 17 00:00:00 2001 -From: Romain Francoise -Date: Mon, 1 Jan 2018 18:01:13 +0100 -Subject: [PATCH] Check for libnet_init in configure.in - -libnet_init_packet was the old libnet 1.0 function which is now long -deprecated. - -Signed-off-by: Fabrice Fontaine -Upstream: https://github.com/jpr5/ngrep/commit/0a51c8bc62c7b49b8d67a360daa6b1957256f4f5 ---- - configure.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.in b/configure.in -index 06c050a..dbef39b 100644 ---- a/configure.in -+++ b/configure.in -@@ -174,7 +174,7 @@ dnl - AC_ARG_ENABLE(tcpkill, - [ --enable-tcpkill enable connection killing support (default off)], - [ -- AC_CHECK_LIB(net, libnet_init_packet,,echo !!! error: tcpkill feature enabled but no libnet found; exit) -+ AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit) - use_tcpkill="$enableval" - ], - [ use_tcpkill="no" ]) diff --git a/package/ngrep/0003-fix-disable-tcpkill.patch b/package/ngrep/0003-fix-disable-tcpkill.patch deleted file mode 100644 index 894cd95b0f..0000000000 --- a/package/ngrep/0003-fix-disable-tcpkill.patch +++ /dev/null @@ -1,39 +0,0 @@ -From e8522284ef326bd9f222e04c4a970ffafa56fba6 Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Sat, 3 Nov 2018 23:23:36 +0100 -Subject: [PATCH] fix --disable-tcpkill - -If the user uses --disable-tcpkill, build can fail if libnet is not -found on the system. - -To fix this, move AC_CHECK_LIB to found libnet outside AC_ARG_ENABLE - -Signed-off-by: Fabrice Fontaine -Upstream: https://github.com/jpr5/ngrep/pull/15 ---- - configure.in | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/configure.in b/configure.in -index dbef39b..7c3dd43 100644 ---- a/configure.in -+++ b/configure.in -@@ -173,13 +173,11 @@ dnl - - AC_ARG_ENABLE(tcpkill, - [ --enable-tcpkill enable connection killing support (default off)], --[ -- AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit) -- use_tcpkill="$enableval" --], -+[ use_tcpkill="$enableval" ], - [ use_tcpkill="no" ]) - - if test $use_tcpkill = yes; then -+ AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit) - USE_TCPKILL="1" - EXTRA_OBJS="$EXTRA_OBJS tcpkill.o" - EXTRA_DEFINES="$EXTRA_DEFINES $(libnet-config --defines)" --- -2.17.1 - diff --git a/package/ngrep/0004-configure.in-use-pkg-config-to-find-libnet.patch b/package/ngrep/0004-configure.in-use-pkg-config-to-find-libnet.patch deleted file mode 100644 index 71550da943..0000000000 --- a/package/ngrep/0004-configure.in-use-pkg-config-to-find-libnet.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 4788988827bf4c0d996d3e1e3b6ac52a23b97941 Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine -Date: Tue, 9 Jan 2024 21:15:47 +0100 -Subject: [PATCH] configure.in: use pkg-config to find libnet - -libnet-config is deprecated: -https://github.com/libnet/libnet/commit/1ec4a6e7d1d23811f0a14ecb51e46489a0175727 - -Signed-off-by: Fabrice Fontaine -Upstream: unsent (upstream seems dead, no commit since 5 years ---- - configure.in | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/configure.in b/configure.in -index 7c3dd43..882ff86 100644 ---- a/configure.in -+++ b/configure.in -@@ -176,12 +176,14 @@ AC_ARG_ENABLE(tcpkill, - [ use_tcpkill="$enableval" ], - [ use_tcpkill="no" ]) - -+PKG_PROG_PKG_CONFIG - if test $use_tcpkill = yes; then - AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit) - USE_TCPKILL="1" - EXTRA_OBJS="$EXTRA_OBJS tcpkill.o" -- EXTRA_DEFINES="$EXTRA_DEFINES $(libnet-config --defines)" -- EXTRA_LIBS="$EXTRA_LIBS $(libnet-config --libs)" -+ PKG_CHECK_MODULES(LIBNET, libnet) -+ EXTRA_DEFINES="$EXTRA_DEFINES $LIBNET_CFLAGS" -+ EXTRA_LIBS="$EXTRA_LIBS $LIBNET_LIBS" - else - USE_TCPKILL="0" - fi --- -2.43.0 - diff --git a/package/ngrep/0005-gcc15.patch b/package/ngrep/0005-gcc15.patch deleted file mode 100644 index e1dd7785b8..0000000000 --- a/package/ngrep/0005-gcc15.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 742424ddd76e15bd151e40834e8f1fad65900b65 Mon Sep 17 00:00:00 2001 -From: Rudi Heitbaum -Date: Mon, 9 Dec 2024 09:44:12 +0000 -Subject: [PATCH] fix build with gcc-15 - -Upstream: https://github.com/jpr5/ngrep/commit/742424ddd76e15bd151e40834e8f1fad65900b65 - -Signed-off-by: Bernd Kuhls ---- - ngrep.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ngrep.c b/ngrep.c -index 3df9389..57b4ddd 100644 ---- a/ngrep.c -+++ b/ngrep.c -@@ -146,7 +146,7 @@ struct re_pattern_buffer pattern; - - char *match_data = NULL, *bin_data = NULL; - uint16_t match_len = 0; --int8_t (*match_func)() = &blank_match_func; -+int8_t (*match_func)(unsigned char *, uint32_t, uint16_t *, uint16_t *) = &blank_match_func; - - int8_t dump_single = 0; - void (*dump_func)(unsigned char *, uint32_t, uint16_t, uint16_t) = &dump_formatted; -@@ -177,7 +177,7 @@ FD_SET delay_fds; - SOCKET delay_socket = 0; - #endif - --void (*print_time)() = NULL, (*dump_delay)() = dump_delay_proc_init; -+void (*print_time)(struct pcap_pkthdr *) = NULL, (*dump_delay)(struct pcap_pkthdr *) = dump_delay_proc_init; - - - /* diff --git a/package/ngrep/0006-Include-err.h-and-tcpkill.h-to-avoid-implicit-functi.patch b/package/ngrep/0006-Include-err.h-and-tcpkill.h-to-avoid-implicit-functi.patch deleted file mode 100644 index 6d596bfe37..0000000000 --- a/package/ngrep/0006-Include-err.h-and-tcpkill.h-to-avoid-implicit-functi.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 52515bae377f221b5473d9040f5f43ab1c672672 Mon Sep 17 00:00:00 2001 -From: Florian Weimer -Date: Mon, 19 Dec 2022 11:49:06 +0100 -Subject: [PATCH] Include and "tcpkill.h" to avoid implicit function - declarations - -Implicit function declarations are a historic language feature that -were removed from C in 1999. - -Upstream: https://github.com/jpr5/ngrep/pull/28 - -Signed-off-by: Thomas Bonnefille ---- - ngrep.c | 1 + - tcpkill.c | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/ngrep.c b/ngrep.c -index 3df9389..b2fcceb 100644 ---- a/ngrep.c -+++ b/ngrep.c -@@ -98,6 +98,7 @@ - #endif - - #include "ngrep.h" -+#include "tcpkill.h" - - - /* -diff --git a/tcpkill.c b/tcpkill.c -index 5388ec5..ac8fd2e 100644 ---- a/tcpkill.c -+++ b/tcpkill.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include - #include - --- -2.50.1 - diff --git a/package/ngrep/Config.in b/package/ngrep/Config.in index 5f87f2f79b..6decaa60a9 100644 --- a/package/ngrep/Config.in +++ b/package/ngrep/Config.in @@ -1,8 +1,12 @@ config BR2_PACKAGE_NGREP bool "ngrep" + depends on BR2_USE_WCHAR select BR2_PACKAGE_LIBPCAP - select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE2 help Network grep. https://github.com/jpr5/ngrep/ + +comment "ngrep needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/ngrep/ngrep.hash b/package/ngrep/ngrep.hash index 7dd13b3b67..7cc9872ecc 100644 --- a/package/ngrep/ngrep.hash +++ b/package/ngrep/ngrep.hash @@ -1,3 +1,3 @@ # Locally computed: -sha256 dc4dbe20991cc36bac5e97e99475e2a1522fd88c59ee2e08f813432c04c5fff3 ngrep-1.47.tar.gz -sha256 d46e593e048e0b9fc803561ed4c283f37a2d5447e4dcfa10cad29b394c2b8b9e LICENSE +sha256 6c94b31681316b7469a3ace92d2aeec7c9f490bd6782453dff2ade0e289a3348 ngrep-1.49.0.tar.gz +sha256 de8f2aca6f09c8b7d6e4dde36ece0fc71be1584ff8ce6b1ef40fbe47f054467e LICENSE diff --git a/package/ngrep/ngrep.mk b/package/ngrep/ngrep.mk index dc69a34235..7232705895 100644 --- a/package/ngrep/ngrep.mk +++ b/package/ngrep/ngrep.mk @@ -4,29 +4,29 @@ # ################################################################################ -NGREP_VERSION = 1.47 -NGREP_SITE = $(call github,jpr5,ngrep,$(subst .,_,V$(NGREP_VERSION))) +NGREP_VERSION = 1.49.0 +NGREP_SITE = $(call github,jpr5,ngrep,v$(NGREP_VERSION)) NGREP_LICENSE = BSD-4-Clause-like, BSD-3-Clause (tcpkill) NGREP_LICENSE_FILES = LICENSE NGREP_INSTALL_STAGING = YES -# We're patching configure.in -NGREP_AUTORECONF = YES ifeq ($(BR2_STATIC_LIBS),y) NGREP_CONF_ENV += LIBS=`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs` endif NGREP_CONF_OPTS = \ - --with-pcap-includes=$(STAGING_DIR)/usr/include/pcap \ - --enable-pcre \ + --with-pcap-includes=$(STAGING_DIR)/usr/include \ + --enable-pcre2 \ --disable-dropprivs \ --disable-pcap-restart +NGREP_CONF_ENV += ac_cv_path_NGREP_PCRE2_CONFIG_SCRIPT=$(STAGING_DIR)/usr/bin/pcre2-config -NGREP_DEPENDENCIES = host-pkgconf libpcap pcre +NGREP_DEPENDENCIES = host-pkgconf libpcap pcre2 ifeq ($(BR2_PACKAGE_LIBNET),y) NGREP_DEPENDENCIES += libnet NGREP_CONF_OPTS += --enable-tcpkill +NGREP_CONF_ENV += ac_cv_path_LIBNET_CONFIG_BIN=$(STAGING_DIR)/usr/bin/libnet-config else NGREP_CONF_OPTS += --disable-tcpkill endif