git: dfdd03f9ff7d - main - net/msoak: Sanitize MANPREFIX

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Mon, 22 Jan 2024 15:51:19 UTC
The branch main has been updated by bofh:

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

commit dfdd03f9ff7dab8d3e1220be1a1db4a1f7d10754
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2024-01-22 15:37:42 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2024-01-22 15:50:47 +0000

    net/msoak: Sanitize MANPREFIX
    
    Approved by:    portmgr (blanket)
---
 net/msoak/Makefile             |  3 ++-
 net/msoak/files/patch-Makefile | 22 ++++++++++++++++++++++
 net/msoak/pkg-plist            |  2 +-
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/net/msoak/Makefile b/net/msoak/Makefile
index dcef486210bc..ba5d8493d8fe 100644
--- a/net/msoak/Makefile
+++ b/net/msoak/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	msoak
 DISTVERSION=	0.8
+PORTREVISION=	1
 CATEGORIES=	net
 
 MAINTAINER=	ports@jpmens.net
@@ -19,7 +20,7 @@ GH_ACCOUNT=	jpmens
 CFLAGS+=	-I${LUA_INCDIR}
 LDFLAGS+=	-llua-${LUA_VER} -lmosquitto -lconfig
 MAKE_ARGS+=	CC="${CC}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
-		BINDIR=${PREFIX}/bin MANDIR=${MANPREFIX}/man
+		BINDIR=${PREFIX}/bin MANDIR=${PREFIX}/share/man
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/msoak
diff --git a/net/msoak/files/patch-Makefile b/net/msoak/files/patch-Makefile
new file mode 100644
index 000000000000..ecbb011441f2
--- /dev/null
+++ b/net/msoak/files/patch-Makefile
@@ -0,0 +1,22 @@
+--- Makefile.orig	2024-01-22 15:40:56 UTC
++++ Makefile
+@@ -4,6 +4,8 @@ LDFLAGS=-L /usr/local/lib -lmosquitto -lconfig
+ 
+ CFLAGS=-Wall -Werror -I.
+ LDFLAGS=-L /usr/local/lib -lmosquitto -lconfig
++BINDIR?=
++MANDIR?=
+ 
+ detect:
+ 	@echo "detected: $(OS)"
+@@ -35,9 +37,7 @@ freebsd:
+ 
+ freebsd:
+ 	@$(MAKE) $(TARGET) CFLAGS="$(CFLAGS) -I/usr/local/include -I/usr/local/include/lua53/" \
+-		LDFLAGS="$(LDFLAGS) -llua-5.3" \
+-		BINDIR=/usr/local/bin \
+-		MANDIR=/usr/local/man
++		LDFLAGS="$(LDFLAGS) -llua-5.3"
+ 
+ openbsd:
+ 	@$(MAKE) $(TARGET) CFLAGS="$(CFLAGS) -I/usr/local/include -I/usr/local/include/lua-5.3/" \
diff --git a/net/msoak/pkg-plist b/net/msoak/pkg-plist
index e3d38a129cdb..2c5277c662f1 100644
--- a/net/msoak/pkg-plist
+++ b/net/msoak/pkg-plist
@@ -1,4 +1,4 @@
 bin/msoak
-man/man1/msoak.1.gz
+share/man/man1/msoak.1.gz
 %%EXAMPLESDIR%%/example.config
 %%EXAMPLESDIR%%/example.lua