diff --git a/net/ndpi/Makefile b/net/ndpi/Makefile index 95590b85af8a..0575f1a3abc1 100644 --- a/net/ndpi/Makefile +++ b/net/ndpi/Makefile @@ -1,55 +1,52 @@ # Created by: Muhammad Moinur Rahman <5u623l20@gmail.com> PORTNAME= ndpi -PORTVERSION= 4.0.d20211111 +PORTVERSION= 4.2.d20220201 PORTEPOCH= 1 CATEGORIES= net MAINTAINER= madpilot@FreeBSD.org COMMENT= NTOP-maintained superset of the popular OpenDPI library LICENSE= LGPL3+ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= 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 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= 92a1be2 +GH_TAGNAME= 8b5c6af PLIST_SUB= MAJOR_VER=${PORTVERSION:R:R} VER=${PORTVERSION:R} -post-patch: - (cd ${WRKSRC} && ${SH} autogen.sh) - 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 503b7ff3e2cb..3880cbbcc29a 100644 --- a/net/ndpi/distinfo +++ b/net/ndpi/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1640249838 -SHA256 (ntop-nDPI-4.0.d20211111-92a1be2_GH0.tar.gz) = d2ea9cbf9fa23ffe87db2081d5cb7fcd30f567477a80c6124316aaf9d63ef9c4 -SIZE (ntop-nDPI-4.0.d20211111-92a1be2_GH0.tar.gz) = 120052622 +TIMESTAMP = 1644343060 +SHA256 (ntop-nDPI-4.2.d20220201-8b5c6af_GH0.tar.gz) = 1c45ba61f0a7ce0d14178c80b4a6aeb4624e9df26afd2bfccacebe420a920aef +SIZE (ntop-nDPI-4.2.d20220201-8b5c6af_GH0.tar.gz) = 126561030 diff --git a/net/ndpi/files/patch-autogen.sh b/net/ndpi/files/patch-autogen.sh deleted file mode 100644 index 4cc3f7b8b68e..000000000000 --- a/net/ndpi/files/patch-autogen.sh +++ /dev/null @@ -1,62 +0,0 @@ ---- autogen.sh.orig 2021-07-26 07:42:48 UTC -+++ autogen.sh -@@ -5,46 +5,6 @@ NDPI_MINOR="0" - NDPI_PATCH="0" - NDPI_VERSION_SHORT="$NDPI_MAJOR.$NDPI_MINOR.$NDPI_PATCH" - --rm -f configure config.h config.h.in -- --AUTOCONF=$(command -v autoconf) --AUTOMAKE=$(command -v automake) --LIBTOOL=$(command -v libtool) --LIBTOOLIZE=$(command -v libtoolize) --AUTORECONF=$(command -v autoreconf) --PKG_CONFIG=$(command -v pkg-config) --FUZZY= -- --if test -z $AUTOCONF; then -- echo "autoconf is missing: please install it and try again" -- exit --else -- V=`autoconf --version | head -1 | cut -d ' ' -f 4` -- if [ "$V" = '2.63' ]; then -- FUZZY="dnl> " -- fi --fi -- --if test -z $AUTOMAKE; then -- echo "automake is missing: please install it and try again" -- exit --fi -- --if test -z $LIBTOOL && test -z $LIBTOOLIZE ; then -- echo "libtool and libtoolize is missing: please install it and try again" -- exit --fi -- --if test -z $AUTORECONF; then -- echo "autoreconf is missing: please install it and try again" -- exit --fi -- --if test -z $PKG_CONFIG; then -- echo "pkg-config is missing: please install it (apt-get install pkg-config) and try again" -- exit --fi -- - cat configure.seed | sed \ - -e "s/@NDPI_MAJOR@/$NDPI_MAJOR/g" \ - -e "s/@NDPI_MINOR@/$NDPI_MINOR/g" \ -@@ -52,12 +12,3 @@ cat configure.seed | sed \ - -e "s/@NDPI_VERSION_SHORT@/$NDPI_VERSION_SHORT/g" \ - -e "s/@FUZZY@/$FUZZY/g" \ - > configure.ac -- --autoreconf -ivf --cat configure | sed "s/#define PACKAGE/#define NDPI_PACKAGE/g" | sed "s/#define VERSION/#define NDPI_VERSION/g" > configure.tmp --cat configure.tmp > configure -- --echo "./configure $@" --chmod +x configure --./configure $@ -- diff --git a/net/ndpi/files/patch-example_Makefile.in b/net/ndpi/files/patch-example_Makefile.in index 39c3aeddb298..343167ead9ef 100644 --- a/net/ndpi/files/patch-example_Makefile.in +++ b/net/ndpi/files/patch-example_Makefile.in @@ -1,42 +1,47 @@ ---- example/Makefile.in.orig 2020-10-19 14:18:25 UTC +--- example/Makefile.in.orig 2022-02-01 08:14:05 UTC +++ example/Makefile.in -@@ -9,17 +9,12 @@ HEADERS=intrusion_detection.h reader_util.h $(SRCHOME) +@@ -12,28 +12,14 @@ HEADERS=intrusion_detection.h reader_util.h $(SRCHOME) $(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h OBJS=ndpiReader.o reader_util.o intrusion_detection.o PREFIX?=@prefix@ +EXAMPLESDIR?=share/examples/ndpi -ifneq ($(BUILD_MINGW),) --all: -- @echo 'Examples disabled due to mingw build.' +-SUFFIX:=.exe +-CFLAGS+=-I@srcdir@/../windows/WpdPack/Include -I@srcdir@/../windows/WpdPack/Include/pcap +-LIBS+=-Wl,-Bstatic -lpthread -Wl,-Bdynamic +- +-ifneq ($(BUILD_MINGW_X64),) +-LIBS+=@srcdir@/../windows/WpdPack/Lib/x64/wpcap.lib +-else +-LIBS+=@srcdir@/../windows/WpdPack/Lib/wpcap.lib +-endif - -else - - all: ndpiReader @DPDK_TARGET@ + LIBS+=-lpthread + +-endif +- + all: ndpiReader$(SUFFIX) @DPDK_TARGET@ EXECUTABLE_SOURCES := ndpiReader.c ndpiSimpleIntegration.c -COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c )) -+COMMON_SOURCES=intrusion_detection.c reader_util.c ++COMMON_SOURCES := reader_util.c libndpiReader.a: $(COMMON_SOURCES:%.c=%.o) $(LIBNDPI) - ar rsv libndpiReader.a $(COMMON_SOURCES:%.c=%.o) -@@ -35,10 +30,10 @@ ndpiSimpleIntegration: ndpiSimpleIntegration.o + $(AR) rsv libndpiReader.a $(COMMON_SOURCES:%.c=%.o) +@@ -49,10 +35,10 @@ ndpiSimpleIntegration$(SUFFIX): ndpiSimpleIntegration. - install: ndpiReader + install: ndpiReader$(SUFFIX) mkdir -p $(DESTDIR)$(PREFIX)/bin/ - mkdir -p $(DESTDIR)$(PREFIX)/share/ndpi + mkdir -p $(DESTDIR)$(PREFIX)/$(EXAMPLESDIR)/ - cp ndpiReader $(DESTDIR)$(PREFIX)/bin/ + cp ndpiReader$(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 + [ -f ndpiSimpleIntegration$(SUFFIX) ] && cp ndpiSimpleIntegration$(SUFFIX) $(DESTDIR)$(PREFIX)/bin/ndpiSimpleIntegration$(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 - -@@ -61,5 +56,3 @@ distdir: - distclean: clean - /bin/rm -f Makefile.dpdk - /bin/rm -f Makefile -- --endif diff --git a/net/ndpi/files/patch-tests_dga_Makefile.in b/net/ndpi/files/patch-tests_dga_Makefile.in new file mode 100644 index 000000000000..c7e09995d8c5 --- /dev/null +++ b/net/ndpi/files/patch-tests_dga_Makefile.in @@ -0,0 +1,26 @@ +--- tests/dga/Makefile.in.orig 2022-02-01 08:14:05 UTC ++++ tests/dga/Makefile.in +@@ -12,16 +12,13 @@ HEADERS=$(SRCHOME)/include/ndpi_api.h $(SRCHOME)/inclu + OBJS=dga_evaluate + PREFIX?=@prefix@ + +-ifneq ($(BUILD_MINGW),) + all: + @echo 'DGA test disabled due to mingw build.' + +-else +- + all: dga_evaluate + + EXECUTABLE_SOURCES := dga_evaluate.c +-COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c )) ++COMMON_SOURCES= + + dga_evaluate: $(LIBNDPI) dga_evaluate.o + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) dga_evaluate.o $(LIBS) -o $@ +@@ -42,5 +39,3 @@ distdir: + + distclean: clean + /bin/rm -f Makefile +- +-endif diff --git a/net/ndpi/files/patch-tests_unit_Makefile.in b/net/ndpi/files/patch-tests_unit_Makefile.in new file mode 100644 index 000000000000..d56c22da2529 --- /dev/null +++ b/net/ndpi/files/patch-tests_unit_Makefile.in @@ -0,0 +1,26 @@ +--- tests/unit/Makefile.in.orig 2022-02-01 08:14:05 UTC ++++ tests/unit/Makefile.in +@@ -12,16 +12,10 @@ HEADERS=$(SRCHOME)/include/ndpi_api.h $(SRCHOME)/inclu + OBJS=unit + PREFIX?=@prefix@ + +-ifneq ($(BUILD_MINGW),) +-all: +- @echo 'Unit tests disabled due to mingw build.' +- +-else +- + all: unit + + EXECUTABLE_SOURCES := unit.c +-COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c )) ++COMMON_SOURCES= + + unit: $(LIBNDPI) unit.o + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) unit.o $(LIBS) -o $@ +@@ -42,5 +36,3 @@ distdir: + + distclean: clean + /bin/rm -f Makefile +- +-endif