git: 043827049d3c - main - net-mgmt/net-snmp: Fix missing datarootdir, Bump PORTREVISION

From: Ryan Steinmetz <zi_at_FreeBSD.org>
Date: Sat, 03 Dec 2022 13:32:26 UTC
The branch main has been updated by zi:

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

commit 043827049d3c24fc8c3184f17d2d7eb3b1957c35
Author:     Ryan Steinmetz <zi@FreeBSD.org>
AuthorDate: 2022-12-03 13:32:11 +0000
Commit:     Ryan Steinmetz <zi@FreeBSD.org>
CommitDate: 2022-12-03 13:32:11 +0000

    net-mgmt/net-snmp: Fix missing datarootdir, Bump PORTREVISION
---
 net-mgmt/net-snmp/Makefile                               |  2 +-
 net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index 4c757923d390..408c5a9a2baf 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	snmp
 PORTVERSION=	5.9.1
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \
diff --git a/net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in b/net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in
new file mode 100644
index 000000000000..10afdc703070
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-net-snmp-create-v3-user.in
@@ -0,0 +1,10 @@
+--- net-snmp-create-v3-user.in.orig	2022-12-03 13:29:45 UTC
++++ net-snmp-create-v3-user.in
+@@ -135,6 +135,7 @@ if test ! -d "$outfile"; then
+ fi
+ echo "$line" >> "$outfile"
+ # Avoid that configure complains that this script ignores @datarootdir@
++datarootdir="@datarootdir@"
+ echo "@datarootdir@" >/dev/null
+ outfile="@datadir@/snmp/snmpd.conf"
+ line="$token $user"