git: 1435927b3e9c - main - comms/ebusd: update to the 22.3 version

From: Oleksii Samorukov <samm_at_FreeBSD.org>
Date: Tue, 12 Jul 2022 13:17:06 UTC
The branch main has been updated by samm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1435927b3e9c6cfcdf11967bf5d410098a390855

commit 1435927b3e9c6cfcdf11967bf5d410098a390855
Author:     Oleksii Samorukov <samm@FreeBSD.org>
AuthorDate: 2022-07-12 13:12:55 +0000
Commit:     Oleksii Samorukov <samm@FreeBSD.org>
CommitDate: 2022-07-12 13:16:51 +0000

    comms/ebusd: update to the 22.3 version
    
    - Update to the latest version
    - Fix FreeBSD build
---
 comms/ebusd/Makefile                          |  3 ++-
 comms/ebusd/distinfo                          |  6 +++---
 comms/ebusd/files/patch-configure.ac          |  8 ++++----
 comms/ebusd/files/patch-src_ebusd_main.cpp    | 12 ++++++++++++
 comms/ebusd/files/patch-src_tools_ebusctl.cpp | 16 ++++++++++++++++
 5 files changed, 37 insertions(+), 8 deletions(-)

diff --git a/comms/ebusd/Makefile b/comms/ebusd/Makefile
index a70d55ea157d..060ebd06b06c 100644
--- a/comms/ebusd/Makefile
+++ b/comms/ebusd/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	ebusd
-PORTVERSION=	21.3
+PORTVERSION=	22.3
 DISTVERSIONPREFIX=	v
 CATEGORIES=	comms
 
@@ -25,6 +25,7 @@ LOGDIR=		/var/log/${PORTNAME}
 RUNDIR=		/var/run/${PORTNAME}
 CPPFLAGS+=	-I${LOCALBASE}/include
 GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--with-ebusfeed
 
 PLIST_SUB=	USER=${USERS} GROUP=${GROUPS} \
 		LOGDIR=${LOGDIR} \
diff --git a/comms/ebusd/distinfo b/comms/ebusd/distinfo
index 0d9400cb12ef..387b6d7f353f 100644
--- a/comms/ebusd/distinfo
+++ b/comms/ebusd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1637778910
-SHA256 (john30-ebusd-v21.3_GH0.tar.gz) = 251bdbac3d400001bb6b39701e5ae9ac1fdbc1ec65ce688def5cc6b79e8d927d
-SIZE (john30-ebusd-v21.3_GH0.tar.gz) = 501795
+TIMESTAMP = 1657630258
+SHA256 (john30-ebusd-v22.3_GH0.tar.gz) = 7b9b8297c76670617bd25d3bb66f4a887188b8d9a4980a27b5e2f172448e0134
+SIZE (john30-ebusd-v22.3_GH0.tar.gz) = 532334
diff --git a/comms/ebusd/files/patch-configure.ac b/comms/ebusd/files/patch-configure.ac
index 1ccde321b677..ffea9bbbceba 100644
--- a/comms/ebusd/files/patch-configure.ac
+++ b/comms/ebusd/files/patch-configure.ac
@@ -1,11 +1,11 @@
---- configure.ac.orig	2018-12-26 15:38:15 UTC
+--- configure.ac.orig	2022-05-08 17:50:35 UTC
 +++ configure.ac
-@@ -118,7 +119,7 @@ AM_COND_IF([CONTRIB], [AC_CONFIG_FILES([
+@@ -133,7 +133,7 @@ AM_COND_IF([CONTRIB], [AC_CONFIG_FILES([
  	])])
  
  AC_DEFINE_UNQUOTED(PACKAGE_PIDFILE, LOCALSTATEDIR "/run/" PACKAGE ".pid", [The path and name of the PID file.])
 -AC_DEFINE_UNQUOTED(PACKAGE_LOGFILE, LOCALSTATEDIR "/log/" PACKAGE ".log", [The path and name of the log file.])
 +AC_DEFINE_UNQUOTED(PACKAGE_LOGFILE, LOCALSTATEDIR "/log/" PACKAGE "/" PACKAGE ".log", [The path and name of the log file.])
  AC_DEFINE(SCAN_VERSION, "[m4_esyscmd_s([sed -e 's#^\([0-9]*\.[0-9]*\).*#\1#' -e 's#\.\([0-9]\)$#0\1#' -e 's#\.##' VERSION])]", [The version of the package formatted for the scan result.])
- AC_DEFINE(REVISION, "[m4_esyscmd_s([git describe --always 2>/dev/null || (date +p%Y%m%d)])]", [The revision of the package.])
- 
+ AC_DEFINE(PACKAGE_VERSION_MAJOR, "[m4_esyscmd_s([sed -e 's#^\([0-9]*\)\..*$#\1#' VERSION])]", [The major version of the package.])
+ AC_DEFINE(PACKAGE_VERSION_MINOR, "[m4_esyscmd_s([sed -e 's#^.*\.\([0-9]*\)$#\1#' VERSION])]", [The minor version of the package.])
diff --git a/comms/ebusd/files/patch-src_ebusd_main.cpp b/comms/ebusd/files/patch-src_ebusd_main.cpp
new file mode 100644
index 000000000000..c451ab1188d9
--- /dev/null
+++ b/comms/ebusd/files/patch-src_ebusd_main.cpp
@@ -0,0 +1,12 @@
+--- src/ebusd/main.cpp.orig	2022-07-12 12:56:35 UTC
++++ src/ebusd/main.cpp
+@@ -34,6 +34,9 @@
+ #include "lib/utils/log.h"
+ #include "lib/utils/httpclient.h"
+ 
++#ifdef __FreeBSD__
++extern char **environ;
++#endif
+ 
+ /** the version string of the program. */
+ const char *argp_program_version = "" PACKAGE_STRING "." REVISION "";
diff --git a/comms/ebusd/files/patch-src_tools_ebusctl.cpp b/comms/ebusd/files/patch-src_tools_ebusctl.cpp
new file mode 100644
index 000000000000..dcffdadcaf90
--- /dev/null
+++ b/comms/ebusd/files/patch-src_tools_ebusctl.cpp
@@ -0,0 +1,16 @@
+--- src/tools/ebusctl.cpp.orig	2022-07-12 13:01:34 UTC
++++ src/tools/ebusctl.cpp
+@@ -147,7 +147,13 @@ string fetchData(ebusd::TCPSocket* socket, bool &liste
+   time_t now;
+   time(&now);
+   time_t endTime = now + timeout;
++
+ #ifdef HAVE_PPOLL
++
++#ifndef POLLRDHUP
++#  define POLLRDHUP 0
++#endif
++
+   int nfds = 2;
+   struct pollfd fds[nfds];
+