Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2014 22:26:02 GMT
From:      "Mikhail T." <m.tsatsenko@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/189787: [maintainer] [patch] databases/pgbouncer: support stage
Message-ID:  <201405132226.s4DMQ2cd081471@cgiserv.freebsd.org>
Resent-Message-ID: <201405132230.s4DMU0Y1095835@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         189787
>Category:       ports
>Synopsis:       [maintainer] [patch] databases/pgbouncer: support stage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 13 22:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Mikhail T.
>Release:        
>Organization:
>Environment:
>Description:
- Add STAGE support
- Depend on xmlto to generate man pages. Add DOCS option

Build log: https://redports.org/~mtsatsenko/20140512100032-55108-205965/pgbouncer-1.5.4_1.log
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: pgbouncer/Makefile
===================================================================
--- pgbouncer/Makefile	(revision 26596)
+++ pgbouncer/Makefile	(revision 26618)
@@ -14,6 +14,14 @@
 
 LIB_DEPENDS=	libevent-2.0.so:${PORTSDIR}/devel/libevent2
 
+OPTIONS_DEFINE=	DOCS
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+BUILD_DEPENDS+=	xmlto:${PORTSDIR}/textproc/xmlto
+.endif
+
 PORTSCOUT=	site:http://pgfoundry.org/frs/?group_id=1000258
 
 USERS=		pgbouncer
@@ -25,11 +33,6 @@
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
 
-.if ! defined(NO_INSTALL_MANPAGES)
-MAN1=		pgbouncer.1
-MAN5=		pgbouncer.5
-.endif
-
 CONFIGURE_ARGS=	--with-libevent=${LOCALBASE} --enable-evdns
 CONFIGURE_ENV+=	PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \
 		PTHREAD_LIBS=${PTHREAD_LIBS}
@@ -46,7 +49,6 @@
 
 BUILD_DEPENDS+=		${LOCALBASE}/bin/gsed:${PORTSDIR}/textproc/gsed
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 SUB_LIST+=	PGBOUNCER_USER="${USERS}" \
@@ -62,19 +64,20 @@
 	@${REINPLACE_CMD} -e "s|sed -n|${LOCALBASE}/bin/gsed -n|g" \
 		${WRKSRC}/lib/find_modules.sh
 
+.if empty(PORT_OPTIONS:MDOCS)
+	${REINPLACE_CMD} -e "s| = doc| = |g" ${WRKSRC}/Makefile
+.endif
+
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/pgbouncer ${PREFIX}/bin/
-.if ! defined(NO_INSTALL_MANPAGES)
-	${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.1 ${PREFIX}/man/man1/
-	${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.5 ${PREFIX}/man/man5/
+	${INSTALL_PROGRAM} ${WRKSRC}/pgbouncer ${STAGEDIR}${PREFIX}/bin/
+.if ${PORT_OPTIONS:MDOCS}
+	${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.1 ${STAGEDIR}${PREFIX}/man/man1/
+	${INSTALL_MAN} ${WRKSRC}/doc/pgbouncer.5 ${STAGEDIR}${PREFIX}/man/man5/
 .endif
-	${INSTALL_DATA} ${WRKSRC}/etc/pgbouncer.ini ${PREFIX}/etc/pgbouncer.ini.sample
-	${INSTALL_DATA} ${WRKSRC}/etc/userlist.txt ${PREFIX}/etc/pgbouncer.users.sample
+	${INSTALL_DATA} ${WRKSRC}/etc/pgbouncer.ini ${STAGEDIR}${PREFIX}/etc/pgbouncer.ini.sample
+	${INSTALL_DATA} ${WRKSRC}/etc/userlist.txt ${STAGEDIR}${PREFIX}/etc/pgbouncer.users.sample
 
 post-install:
-	@if [ ! -f ${PREFIX}/etc/pgbouncer.ini ]; then \
-		${CP} -p ${PREFIX}/etc/pgbouncer.ini.sample ${PREFIX}/etc/pgbouncer.ini ; \
-	fi
 	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${CAT} ${PKGMESSAGE}
 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405132226.s4DMQ2cd081471>