Skip to content

Commit

Permalink
net-mgmt/netdata: Fix build with protobuf 22+
Browse files Browse the repository at this point in the history
  • Loading branch information
sunpoet committed Dec 14, 2023
1 parent 70c96b6 commit 5d2dcaa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
3 changes: 2 additions & 1 deletion net-mgmt/netdata/Makefile
Expand Up @@ -20,7 +20,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}urllib3>0:net/py-urllib3@${PY_FLAVOR} \
bash:shells/bash \
curl:ftp/curl

USES= autoreconf cpe gmake localbase:ldflags pathfix \
USES= autoreconf compiler:c++17-lang cpe gmake localbase:ldflags pathfix \
pkgconfig:both python shebangfix ssl
USE_RC_SUBR= ${PORTNAME}
SHEBANG_GLOB= *
Expand All @@ -36,6 +36,7 @@ CONFIGURE_ARGS= --disable-h2o --disable-unit-tests --with-user=netdata

INSTALL_TARGET= install-strip
CPPFLAGS+= -D_WANT_VMMETER
USE_CXXSTD= c++17

SUB_FILES= ${PORTNAME}.conf.sample
SUB_LIST= NETDATA_CACHE=${NETDATA_CACHE} \
Expand Down
27 changes: 18 additions & 9 deletions net-mgmt/netdata/files/patch-configure.ac
@@ -1,5 +1,5 @@
--- configure.ac.orig 2023-07-23 18:34:41.165387302 -0600
+++ configure.ac 2023-07-23 18:42:45.117534306 -0600
--- configure.ac.orig 2023-10-30 12:43:22 UTC
+++ configure.ac
@@ -5,11 +5,11 @@
AC_PREREQ(2.60)

Expand All @@ -16,9 +16,18 @@

AM_MAINTAINER_MODE([disable])
if test x"$USE_MAINTAINER_MODE" = xyes; then
@@ -1354,15 +1354,15 @@
@@ -243,7 +243,7 @@ fi
# C++ version check

# Check for C++17 support (optional)
-# AX_CXX_COMPILE_STDCXX(17, noext, optional)
+AX_CXX_COMPILE_STDCXX(17, noext, optional)

if test "x$HAVE_CXX17" != "x1"; then
# Check for C++11 support (optional)
@@ -1416,15 +1416,15 @@ if test "${enable_ml}" = "yes" -a "${have_uuid}" != "y
fi

# Check if submodules have not been fetched. Fail if ML was explicitly requested.
-AC_MSG_CHECKING([if git submodules are present for machine learning functionality])
-if test -f "ml/dlib/dlib/all/source.cpp"; then
Expand All @@ -36,10 +45,10 @@
+# AC_MSG_RESULT([no])
+# have_ml_submodules="no"
+# fi

if test "${enable_ml}" = "yes" -a "${have_ml_submodules}" = "no"; then
AC_MSG_ERROR([You have explicitly requested --enable-ml functionality but it cannot be built because the required git submodules are missing.])
@@ -1382,8 +1382,8 @@
@@ -1444,8 +1444,8 @@ fi
AM_CONDITIONAL([ENABLE_ML], [test "${build_ml}" = "yes"])
if test "${build_ml}" = "yes"; then
AC_DEFINE([ENABLE_ML], [1], [anomaly detection usability])
Expand All @@ -48,9 +57,9 @@
+# OPTIONAL_ML_CFLAGS="-DDLIB_NO_GUI_SUPPORT -I \$(abs_top_srcdir)/ml/dlib"
+# OPTIONAL_ML_LIBS=""
fi


@@ -1788,14 +1788,14 @@
@@ -1850,14 +1850,14 @@ AC_SUBST([OPTIONAL_DL_LIBS])

AC_DEFINE_UNQUOTED([NETDATA_USER], ["${with_user}"], [use this user to drop privileged])

Expand Down

0 comments on commit 5d2dcaa

Please sign in to comment.