From 16f00133d92bda820f660e0c51575865d7a259b7 Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Sun, 12 Jun 2022 21:53:01 +0200 Subject: [PATCH] net-mgmt/pmacct: fix build on armv7 PR: 260194 Author: Robert Clausecker --- net-mgmt/pmacct/Makefile | 2 +- net-mgmt/pmacct/files/patch-configure.ac | 20 +++++++++++++++++++ net-mgmt/pmacct/files/patch-src_bgp_bgp.c | 14 +++++++++++++ .../patch-src_external__libs_Makefile.am | 16 +++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 net-mgmt/pmacct/files/patch-configure.ac create mode 100644 net-mgmt/pmacct/files/patch-src_bgp_bgp.c create mode 100644 net-mgmt/pmacct/files/patch-src_external__libs_Makefile.am diff --git a/net-mgmt/pmacct/Makefile b/net-mgmt/pmacct/Makefile index b160bd88c9ad..815a01d92e75 100644 --- a/net-mgmt/pmacct/Makefile +++ b/net-mgmt/pmacct/Makefile @@ -10,7 +10,7 @@ COMMENT= Accounting and aggregation tool for IPv4 and IPv6 traffic LICENSE= GPLv2 -USES= libtool pkgconfig localbase autoreconf +USES= gmake libtool pkgconfig localbase autoreconf USE_RC_SUBR= pmacctd nfacctd sfacctd SUB_FILES= pkg-message GNU_CONFIGURE= yes diff --git a/net-mgmt/pmacct/files/patch-configure.ac b/net-mgmt/pmacct/files/patch-configure.ac new file mode 100644 index 000000000000..c917463ca363 --- /dev/null +++ b/net-mgmt/pmacct/files/patch-configure.ac @@ -0,0 +1,20 @@ +--- configure.ac.orig 2021-11-05 16:03:23.000000000 +0100 ++++ configure.ac 2022-04-15 16:15:06.250117000 +0200 +@@ -404,9 +404,14 @@ + AC_CHECK_HEADERS([mysql.h mysql/mysql.h]) + CFLAGS="$_save_CFLAGS" + +- AC_CHECK_LIB([numa], [numa_bind], [], [AC_MSG_ERROR([ +- ERROR: missing libnuma. Requirement for building MySQL. +- ])]) ++ case "$host_os" in ++ linux*) ++ AC_CHECK_LIB([numa], [numa_bind], [], [AC_MSG_ERROR([ ++ ERROR: missing libnuma. Requirement for building MySQL. ++ ])]) ++ ;; ++ esac ++ + ;; + no) + AC_MSG_RESULT(no) diff --git a/net-mgmt/pmacct/files/patch-src_bgp_bgp.c b/net-mgmt/pmacct/files/patch-src_bgp_bgp.c new file mode 100644 index 000000000000..3c500325b54d --- /dev/null +++ b/net-mgmt/pmacct/files/patch-src_bgp_bgp.c @@ -0,0 +1,14 @@ +--- src/bgp/bgp.c.orig 2022-05-28 08:30:21 UTC ++++ src/bgp/bgp.c +@@ -830,9 +830,9 @@ void skinny_bgp_daemon_online() + bgp_peer_close(&peers[peers_check_idx], FUNC_TYPE_BGP, FALSE, FALSE, FALSE, FALSE, NULL); + } + else { +- Log(LOG_WARNING, "WARN ( %s/%s ): [%s] Refusing new connection from existing peer (residual holdtime: %ld).\n", ++ Log(LOG_WARNING, "WARN ( %s/%s ): [%s] Refusing new connection from existing peer (residual holdtime: %lld).\n", + config.name, bgp_misc_db->log_str, bgp_peer_str, +- (peers[peers_check_idx].ht - ((long)now - peers[peers_check_idx].last_keepalive))); ++ (long long)(peers[peers_check_idx].ht - ((long)now - peers[peers_check_idx].last_keepalive))); + FD_CLR(peer->fd, &bkp_read_descs); + bgp_peer_close(peer, FUNC_TYPE_BGP, FALSE, FALSE, FALSE, FALSE, NULL); + goto read_data; diff --git a/net-mgmt/pmacct/files/patch-src_external__libs_Makefile.am b/net-mgmt/pmacct/files/patch-src_external__libs_Makefile.am new file mode 100644 index 000000000000..aac851998bc8 --- /dev/null +++ b/net-mgmt/pmacct/files/patch-src_external__libs_Makefile.am @@ -0,0 +1,16 @@ +--- src/external_libs/Makefile.am.orig 2021-11-05 15:03:23.000000000 +0000 ++++ src/external_libs/Makefile.am 2022-04-15 12:37:36.692736000 +0000 +@@ -45,11 +45,12 @@ + fi;\ + echo "[dep: libcdada] Building...";\ + mkdir -p $(abs_builddir)/libcdada/build || true; \ ++ unset LIBS; \ + cd $(abs_srcdir)/libcdada/ && \ + ./autogen.sh &&\ + cd $(abs_builddir)/libcdada/build && \ + $(abs_srcdir)/libcdada/configure --disable-shared --host=$(host_alias) @configure_silent_rules_val@ \ +- --prefix=$(abs_builddir)/rootfs && make $(MAKE_JOBS) install;\ ++ --prefix=$(abs_builddir)/rootfs && gmake $(MAKE_JOBS) install;\ + if [ $$? != 0 ]; then exit 1; fi; \ + echo "`cd $(abs_srcdir)/libcdada && git rev-parse HEAD 2> /dev/null`" > $(abs_builddir)/.libcdada_mark;\ + if [ $$? != 0 ]; then exit 1; fi; \