1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

net/ntopng,net/ndpi: Fix build due to missing symbols in certain circumstances

When building on live machines when rrdtool happens to be already
present, which often happens automatically due to the order in which
the ports system builds things locally, the ntopng port could fail
due to unreferenced symbols from glib. This was caused by ntopng
trying to unconditionally link statically to ndpi but not providing
all required static libraries references to the command line.

- Add databases/rrdtool dependency in ndpi to ensure the same
  libraries are used in both ports
- Make ntopng unconditionally use dynamic linking for ndpi too,
  avoiding the issue described above.

PR:		262756
This commit is contained in:
Guido Falsi 2022-03-25 00:46:14 +01:00
parent 6d57461b7a
commit 66e6345cf9
3 changed files with 16 additions and 2 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= ndpi
PORTVERSION= 4.2.d20220210
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net
@ -11,7 +12,8 @@ COMMENT= NTOP-maintained superset of the popular OpenDPI library
LICENSE= LGPL3+
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libjson-c.so:devel/json-c \
LIB_DEPENDS= librrd.so:databases/rrdtool \
libjson-c.so:devel/json-c \
libgcrypt.so:security/libgcrypt \
libgpg-error.so:security/libgpg-error

View File

@ -2,6 +2,7 @@
PORTNAME= ntopng
PORTVERSION= 5.2.d20220314
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net

View File

@ -1,5 +1,16 @@
--- configure.ac.in.orig 2022-02-08 09:52:25 UTC
--- configure.ac.in.orig 2022-03-14 16:15:57 UTC
+++ configure.ac.in
@@ -236,8 +236,8 @@ PKG_CHECK_MODULES([NDPI], [libndpi >= 2.0], [
PKG_CHECK_MODULES([NDPI], [libndpi >= 2.0], [
NDPI_INC=`echo $NDPI_CFLAGS | sed -e "s/[ ]*$//"`
# Use static libndpi library as building against the dynamic library fails
- NDPI_LIB="-Wl,-Bstatic $NDPI_LIBS -Wl,-Bdynamic"
- #NDPI_LIB="$NDPI_LIBS"
+ #NDPI_LIB="-Wl,-Bstatic $NDPI_LIBS -Wl,-Bdynamic"
+ NDPI_LIB="$NDPI_LIBS"
NDPI_LIB_DEP=
], [
AC_MSG_CHECKING(for nDPI source)
@@ -444,7 +444,7 @@ if test "${with_nedge+set}" != set; then
PF_RING_HOME=${HOME}/PF_RING