git: bf93a81b2712 - main - net-mgmt/ipcad: touchup and build fixes

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Fri, 09 Sep 2022 07:04:31 UTC
The branch main has been updated by mikael:

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

commit bf93a81b271271aa6c62f52adeb9ab3ce2461e13
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-07-30 04:15:06 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-09-09 06:55:49 +0000

    net-mgmt/ipcad: touchup and build fixes
    
     - fix wrong test(1) option in bpf configure test
       preventing configuration to succeed when no bpf(4)
       device is present on the system
     - add a missing include to avoid undefined behaviour
       through homegrown artisanal offsetof(3) macro
     - set LICENSE
    
    PR:             265512
    Approved by:    vlm@lionet.info (maintainer timeout)
---
 net-mgmt/ipcad/Makefile              |  5 ++++-
 net-mgmt/ipcad/files/patch-configure | 22 ++++++++++++++++++++++
 net-mgmt/ipcad/files/patch-headers.h | 10 ++++++++++
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/net-mgmt/ipcad/Makefile b/net-mgmt/ipcad/Makefile
index dcddcc698471..ca3aeba9857a 100644
--- a/net-mgmt/ipcad/Makefile
+++ b/net-mgmt/ipcad/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	ipcad
 PORTVERSION=	3.7.3
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	net-mgmt
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} \
 		http://ipcad.sourceforge.net/ \
@@ -10,6 +10,9 @@ MAINTAINER=	vlm@lionet.info
 COMMENT=	IP accounting daemon with Cisco-like RSH and NetFlow export
 WWW=		http://ipcad.sourceforge.net/
 
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/COPYING
+
 USE_RC_SUBR=	ipcad
 SUB_FILES=	pkg-message
 
diff --git a/net-mgmt/ipcad/files/patch-configure b/net-mgmt/ipcad/files/patch-configure
new file mode 100644
index 000000000000..459ced6fee0b
--- /dev/null
+++ b/net-mgmt/ipcad/files/patch-configure
@@ -0,0 +1,22 @@
+--- configure.orig	2022-07-30 04:13:00 UTC
++++ configure
+@@ -5797,15 +5797,15 @@ if test ! -z "$with_psrc" ; then
+ 	PSRC="$withval"
+ elif test -c /dev/bpf0 ; then
+ 	PSRC=bpf
+-elif test -a /usr/include/pcap.h; then
++elif test -f /usr/include/pcap.h; then
+ 	PSRC=pcap
+-elif test -a /usr/include/pcap/pcap.h; then
++elif test -f /usr/include/pcap/pcap.h; then
+ 	PSRC=pcap
+ 	CFLAGS="$CFLAGS -I/usr/include/pcap"
+ 	CPPFLAGS="$CPPFLAGS -I/usr/include/pcap"
+-elif test -a ${ac_default_prefix}/include/pcap.h; then
++elif test -f ${ac_default_prefix}/include/pcap.h; then
+ 	PSRC=pcap
+-elif test -a ${ac_default_prefix}/include/pcap/pcap.h; then
++elif test -f ${ac_default_prefix}/include/pcap/pcap.h; then
+ 	CFLAGS="$CFLAGS -I${ac_default_prefix}/include/pcap"
+ 	CPPFLAGS="$CPPFLAGS -I${ac_default_prefix}/include/pcap"
+ 	PSRC=pcap
diff --git a/net-mgmt/ipcad/files/patch-headers.h b/net-mgmt/ipcad/files/patch-headers.h
new file mode 100644
index 000000000000..89b49cf79727
--- /dev/null
+++ b/net-mgmt/ipcad/files/patch-headers.h
@@ -0,0 +1,10 @@
+--- headers.h.orig	2022-07-30 04:07:13 UTC
++++ headers.h
+@@ -32,6 +32,7 @@
+ #define	__need_sig_atomic_t	1
+ #endif
+ 
++#include <stddef.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>