git: 3b29bf80e140 - main - databases/pgbouncer: Fix config file

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Fri, 05 Nov 2021 18:04:29 UTC
The branch main has been updated by bofh:

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

commit 3b29bf80e1405bd318e0bc2f402de428e53d9ee3
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2021-11-05 18:00:40 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2021-11-05 18:04:18 +0000

    databases/pgbouncer: Fix config file
    
    - No need to replace pgbouncer.log as the config mentions the absolute path
      /var/log/pgbouncer/pgbouncer.log now
    - No need to replace pgbouncer.pid as the config mentions the absolute path
      /var/run/pgbouncer/pgbouncer.log now
    - References to other files in /etc/ is changed with ${PREFIX}/etc specially
      pgbouncer.users which had a reference to /etc directory
    - No longer requires gsed so removed the BUILD_DEPENDS
    - There was a pkg-message.in file which was not called using SUB_FILES; added
      accordingly
    
    PR: 259474
    Approved by: m.tsatsenko@gmail.com (maintainer)
    Sponsored by: Bounce Experts
---
 databases/pgbouncer/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/databases/pgbouncer/Makefile b/databases/pgbouncer/Makefile
index 430486806c35..46fb6eccbf26 100644
--- a/databases/pgbouncer/Makefile
+++ b/databases/pgbouncer/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	pgbouncer
 PORTVERSION=	1.16.0
+PORTREVISION=	1
 CATEGORIES=	databases
 MASTER_SITES=	https://pgbouncer.github.io/downloads/files/${PORTVERSION}/ \
 		http://pgbouncer.github.io/downloads/files/${PORTVERSION}/
@@ -12,7 +13,6 @@ COMMENT=	Lightweight connection pooler for PostgreSQL
 LICENSE=	BSD2CLAUSE
 
 LIB_DEPENDS=	libevent.so:devel/libevent
-BUILD_DEPENDS+=	${LOCALBASE}/bin/gsed:textproc/gsed
 
 USES=		cpe gmake ssl pkgconfig
 
@@ -42,13 +42,13 @@ PLIST_SUB+=	PGBOUNCER_USER="${USERS}" \
 		PGBOUNCER_LOGDIR="${PGBOUNCER_LOGDIR}" \
 		PGBOUNCER_RUNDIR="${PGBOUNCER_RUNDIR}"
 SUB_LIST+=	PGBOUNCER_RUNDIR="${PGBOUNCER_RUNDIR}"
+SUB_FILES=	pkg-message
 
 post-patch:
-	@${REINPLACE_CMD} -e "s|= pgbouncer.log|= ${PGBOUNCER_LOGDIR}/pgbouncer.log|g" \
-		-e "s|= pgbouncer.pid|= ${PGBOUNCER_RUNDIR}/pgbouncer.pid|g" \
+	@${REINPLACE_CMD} -e "s|= /etc/pgbouncer/userlist.txt|= ${PREFIX}/etc/pgbouncer.users|g" \
+		-e "s|= /etc/pgbouncer/resolv.conf|= ${PREFIX}/etc/pgbouncer-resolv.conf|g" \
+		-e "s|include /etc/pgbouncer/pgbouncer-other.ini|include ${PREFIX}/etc/pgbouncer-other.ini|g" \
 		${WRKSRC}/etc/pgbouncer.ini
-	@${REINPLACE_CMD} -e "s|sed -n|${LOCALBASE}/bin/gsed -n|g" \
-		${WRKSRC}/lib/find_modules.sh
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/pgbouncer ${STAGEDIR}${PREFIX}/bin/