diff --git a/net/ndpi/Makefile b/net/ndpi/Makefile index f2c83a9aa510..b7e66d6a7c41 100644 --- a/net/ndpi/Makefile +++ b/net/ndpi/Makefile @@ -1,53 +1,52 @@ PORTNAME= ndpi -PORTVERSION= 4.8.d20240223 -PORTREVISION= 1 +PORTVERSION= 4.10.d20240807 PORTEPOCH= 1 CATEGORIES= net MAINTAINER= madpilot@FreeBSD.org COMMENT= NTOP-maintained superset of the popular OpenDPI library WWW= https://www.ntop.org/products/deep-packet-inspection/ndpi/ LICENSE= LGPL3+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= librrd.so:databases/rrdtool \ libjson-c.so:devel/json-c \ libgcrypt.so:security/libgcrypt \ libgpg-error.so:security/libgpg-error USES= autoreconf compiler:c++11-lang cpe libtool localbase:ldflags pathfix \ pkgconfig CPE_VENDOR= ntop USE_LDCONFIG= yes CONFIGURE_ARGS= --with-pic --with-local-libgcrypt CPPFLAGS= -I${LOCALBASE}/include/json-c LIBS= -ljson-c MAKE_ENV= EXAMPLESDIR="${EXAMPLESDIR_REL}" GNU_CONFIGURE= yes INSTALL_TARGET= install-strip USE_GITHUB= yes GH_ACCOUNT= ntop GH_PROJECT= nDPI -GH_TAGNAME= 467c27c +GH_TAGNAME= b07d0ae PLIST_SUB= MAJOR_VER=${PORTVERSION:R:R} VER=${PORTVERSION:R} post-configure: @${REINPLACE_CMD} -e 's/#define PACKAGE/#define NDPI_PACKAGE/g' \ -e 's/#define VERSION/#define NDPI_VERSION/g' \ ${WRKSRC}/configure post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libndpi.so.${PORTVERSION:R}.0 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ndpiReader ${RM} ${STAGEDIR}${PREFIX}/lib/libndpi.so \ ${STAGEDIR}${PREFIX}/lib/libndpi.so.${PORTVERSION:R:R} ${RLN} ${STAGEDIR}${PREFIX}/lib/libndpi.so.${PORTVERSION:R}.0 \ ${STAGEDIR}${PREFIX}/lib/libndpi.so ${RLN} ${STAGEDIR}${PREFIX}/lib/libndpi.so.${PORTVERSION:R}.0 \ ${STAGEDIR}${PREFIX}/lib/libndpi.so.${PORTVERSION:R:R} .include diff --git a/net/ndpi/distinfo b/net/ndpi/distinfo index bda184439dc3..bba61143de7e 100644 --- a/net/ndpi/distinfo +++ b/net/ndpi/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1709883780 -SHA256 (ntop-nDPI-4.8.d20240223-467c27c_GH0.tar.gz) = 367fb5ed5484f98eeb713856acd1142aab14441576d7581ad0fd9db1dd184cec -SIZE (ntop-nDPI-4.8.d20240223-467c27c_GH0.tar.gz) = 39479466 +TIMESTAMP = 1723128522 +SHA256 (ntop-nDPI-4.10.d20240807-b07d0ae_GH0.tar.gz) = 5810013650d53505c39a8f0ef695b681d8cfbf65198511397f7cff52a31df8a1 +SIZE (ntop-nDPI-4.10.d20240807-b07d0ae_GH0.tar.gz) = 38579260 diff --git a/net/ndpi/files/patch-example_Makefile.in b/net/ndpi/files/patch-example_Makefile.in index 64aa6fdc0624..d0051b797c65 100644 --- a/net/ndpi/files/patch-example_Makefile.in +++ b/net/ndpi/files/patch-example_Makefile.in @@ -1,74 +1,77 @@ ---- example/Makefile.in.orig 2023-10-23 09:45:30 UTC +--- example/Makefile.in.orig 2024-08-07 09:36:14 UTC +++ example/Makefile.in -@@ -1,54 +1,28 @@ CXX=@CXX@ +@@ -1,57 +1,28 @@ CXX=@CXX@ AR=@AR@ CC=@CC@ CXX=@CXX@ +-ifneq ($(OS),Windows_NT) +-OS := $(shell uname) +-endif -ifeq ($(OS),Darwin) -CC=clang -fno-color-diagnostics -endif BUILD_MINGW=@BUILD_MINGW@ BUILD_MINGW_X64=@BUILD_MINGW_X64@ DISABLE_NPCAP=@DISABLE_NPCAP@ EXE_SUFFIX=@EXE_SUFFIX@ SRCHOME=../src -ifneq ($(OS),Windows_NT) -CFLAGS+=-fPIC -DPIC -endif -CFLAGS+=-I$(SRCHOME)/include @NDPI_CFLAGS@ @PCAP_INC@ @GPROF_CFLAGS@ -+CFLAGS+=-fPIC -DPIC -I$(SRCHOME)/include @NDPI_CFLAGS@ @PCAP_INC@ @CFLAGS@ @GPROF_CFLAGS@ ++CFLAGS+=-fPIC -DPIC -I$(SRCHOME)/include @NDPI_CFLAGS@ @PCAP_INC@ @GPROF_CFLAGS@ LDFLAGS+=@NDPI_LDFLAGS@ LIBNDPI=$(SRCHOME)/lib/libndpi.a LIBS=$(LIBNDPI) @PCAP_LIB@ @ADDITIONAL_LIBS@ @LIBS@ @GPROF_LIBS@ HEADERS=reader_util.h $(SRCHOME)/include/ndpi_api.h \ $(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h PREFIX?=@prefix@ +EXAMPLESDIR?=share/examples/ndpi -ifneq ($(BUILD_MINGW),) - -ifeq ($(DISABLE_NPCAP),0) -CFLAGS+=-I@srcdir@/../windows/WpdPack/Include -I@srcdir@/../windows/WpdPack/Include/pcap -else -CFLAGS+=-DDISABLE_NPCAP -endif - -ifeq ($(DISABLE_NPCAP),0) - -ifneq ($(BUILD_MINGW_X64),) -LIBS+=@srcdir@/../windows/WpdPack/Lib/x64/wpcap.lib -else -LIBS+=@srcdir@/../windows/WpdPack/Lib/wpcap.lib -endif - -endif - -LIBS+=-Wl,-Bstatic -lpthread -Wl,-Bdynamic -else LIBS+=-pthread -endif CFLAGS+=-pthread all: ndpiReader$(EXE_SUFFIX) @DPDK_TARGET@ EXECUTABLE_SOURCES := ndpiReader.c ndpiSimpleIntegration.c -COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c )) +COMMON_SOURCES = reader_util.c libndpiReader.a: $(COMMON_SOURCES:%.c=%.o) $(LIBNDPI) $(AR) rsv libndpiReader.a $(COMMON_SOURCES:%.c=%.o) -@@ -64,10 +38,10 @@ install: ndpiReader$(EXE_SUFFIX) +@@ -67,10 +38,10 @@ install: ndpiReader$(EXE_SUFFIX) install: ndpiReader$(EXE_SUFFIX) mkdir -p $(DESTDIR)$(PREFIX)/bin/ - mkdir -p $(DESTDIR)$(PREFIX)/share/ndpi + mkdir -p $(DESTDIR)$(PREFIX)/$(EXAMPLESDIR)/ cp ndpiReader$(EXE_SUFFIX) $(DESTDIR)$(PREFIX)/bin/ - cp protos.txt $(DESTDIR)$(PREFIX)/share/ndpi/ndpiProtos.txt - cp mining_hosts.txt $(DESTDIR)$(PREFIX)/share/ndpi/ndpiCustomCategory.txt -+ cp protos.txt $(DESTDIR)$(PREFIX)/$(EXAMPLESDIR)/ndpiProtos.txt -+ cp mining_hosts.txt $(DESTDIR)$(PREFIX)/$(EXAMPLESDIR)/ndpiCustomCategory.txt ++ cp protos.txt $(DESTDIR)$(PREFIX)/$(EXAMPLESDIR)//ndpiProtos.txt ++ cp mining_hosts.txt $(DESTDIR)$(PREFIX)/$(EXAMPLESDIR)//ndpiCustomCategory.txt [ -f ndpiSimpleIntegration$(EXE_SUFFIX) ] && cp ndpiSimpleIntegration$(EXE_SUFFIX) $(DESTDIR)$(PREFIX)/bin/ndpiSimpleIntegration$(EXE_SUFFIX) || true [ -f build/app/ndpiReader.dpdk ] && cp build/app/ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true [ -f ndpiReader.dpdk ] && cp ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true diff --git a/net/ndpi/files/patch-src_lib_Makefile.in b/net/ndpi/files/patch-src_lib_Makefile.in index 3e2dfac5cf62..df5ce3968804 100644 --- a/net/ndpi/files/patch-src_lib_Makefile.in +++ b/net/ndpi/files/patch-src_lib_Makefile.in @@ -1,49 +1,53 @@ ---- src/lib/Makefile.in.orig 2023-11-02 19:51:08 UTC +--- src/lib/Makefile.in.orig 2024-08-07 09:36:14 UTC +++ src/lib/Makefile.in -@@ -14,15 +14,12 @@ includedir = @includedir@/ndpi +@@ -14,13 +14,7 @@ includedir = @includedir@/ndpi PREFIX = @prefix@ libdir = @libdir@ includedir = @includedir@/ndpi -ifneq ($(OS),Windows_NT) +-OS := $(shell uname) +-endif +-ifneq ($(OS),Windows_NT) -CFLAGS += -fPIC -DPIC -endif -CFLAGS += -I. -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION @NDPI_CFLAGS@ @GPROF_CFLAGS@ @CUSTOM_NDPI@ @ADDITIONAL_INCS@ -+CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION @NDPI_CFLAGS@ @CFLAGS@ @GPROF_CFLAGS@ @CUSTOM_NDPI@ @ADDITIONAL_INCS@ ++CFLAGS += -fPIC -DPIC -I. -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION @NDPI_CFLAGS@ @GPROF_CFLAGS@ @CUSTOM_NDPI@ @ADDITIONAL_INCS@ + CFLAGS_ndpi_bitmap.c := -Wno-unused-function + CFLAGS_ndpi_bitmap64_fuse.c := -Wno-unused-function + CFLAGS_third_party/src/gcrypt_light.c := -Wno-unused-function -Wno-unused-parameter +@@ -29,8 +23,8 @@ LIBS = @ADDITIONAL_LIBS@ @LIBS@ @GPROF_LIBS@ LDFLAGS += @NDPI_LDFLAGS@ LIBS = @ADDITIONAL_LIBS@ @LIBS@ @GPROF_LIBS@ -OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) $(patsubst third_party/src/hll/%.c, third_party/src/hll/%.o, $(wildcard third_party/src/hll/*.c)) $(patsubst ./%.c, ./%.o, $(wildcard ./*.c)) --HEADERS = $(wildcard ../include/*.h) $(wildcard ../include/*.h) +-HEADERS = $(wildcard ../include/*.h) $(wildcard *.h) +OBJECTS != ls protocols/*.c | sed 's/\(.*\)\.c$$/\1.o/' && ls third_party/src/*.c | sed -e 's/\(.*\)\.c$$/\1.o/' -e '/gcrypt_light/d' && ls third_party/src/hll/*.c | sed -e 's/\(.*\)\.c$$/\1.o/' && ls ./*.c | sed 's/\(.*\)\.c$$/\1.o/' +HEADERS != ls ../include/*.h NDPI_VERSION_MAJOR = @NDPI_MAJOR@ NDPI_LIB_STATIC = libndpi.a NDPI_LIB_SHARED_BASE = libndpi.so -@@ -30,27 +27,7 @@ USE_HOST_LIBGCRYPT = @USE_HOST_LIBGCRYPT@ +@@ -38,24 +32,7 @@ USE_HOST_LIBGCRYPT = @USE_HOST_LIBGCRYPT@ NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED) USE_HOST_LIBGCRYPT = @USE_HOST_LIBGCRYPT@ -ifneq ($(USE_HOST_LIBGCRYPT),0) -TMP_OBJS := $(OBJECTS) -OBJECTS = $(filter-out third_party/src/gcrypt_light.o,$(TMP_OBJS)) -endif - --ifneq ($(OS),Windows_NT) --OS := $(shell uname) --endif -BUILD_MINGW = @BUILD_MINGW@ - -ifeq ($(OS),Darwin) -CC=clang -fno-color-diagnostics -SONAME_FLAG= -else -ifneq ($(BUILD_MINGW),) -NDPI_LIB_SHARED_BASE = libndpi -NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE)-@NDPI_VERSION_SHORT@.dll -else SONAME_FLAG=-Wl,-soname,$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR) -endif -endif all: $(NDPI_LIBS) diff --git a/net/ndpi/pkg-plist b/net/ndpi/pkg-plist index b16b93502e74..9ab6015bf616 100644 --- a/net/ndpi/pkg-plist +++ b/net/ndpi/pkg-plist @@ -1,23 +1,22 @@ bin/ndpiReader include/ndpi/ndpi_api.h include/ndpi/ndpi_classify.h include/ndpi/ndpi_config.h include/ndpi/ndpi_define.h include/ndpi/ndpi_encryption.h include/ndpi/ndpi_includes.h include/ndpi/ndpi_includes_OpenBSD.h include/ndpi/ndpi_main.h include/ndpi/ndpi_patricia_typedefs.h include/ndpi/ndpi_protocol_ids.h -include/ndpi/ndpi_protocols.h +include/ndpi/ndpi_replace_printf.h include/ndpi/ndpi_typedefs.h include/ndpi/ndpi_unix.h -include/ndpi/ndpi_utils.h include/ndpi/ndpi_win32.h lib/libndpi.a lib/libndpi.so lib/libndpi.so.%%MAJOR_VER%% lib/libndpi.so.%%VER%%.0 libdata/pkgconfig/libndpi.pc %%EXAMPLESDIR%%/ndpiCustomCategory.txt %%EXAMPLESDIR%%/ndpiProtos.txt