? work Index: Makefile =================================================================== RCS file: /home/pcvs/ports/databases/pgbouncer/Makefile,v retrieving revision 1.12 diff -u -r1.12 Makefile --- Makefile 28 Sep 2010 09:30:50 -0000 1.12 +++ Makefile 13 Jan 2011 13:10:22 -0000 @@ -6,9 +6,9 @@ # PORTNAME= pgbouncer -PORTVERSION= 1.3.4 +PORTVERSION= 1.4 CATEGORIES= databases -MASTER_SITES= http://pgfoundry.org/frs/download.php/2797/ +MASTER_SITES= http://pgfoundry.org/frs/download.php/2912/ MAINTAINER= skv@FreeBSD.org COMMENT= Lightweight connection pooler for PostgreSQL @@ -40,7 +40,10 @@ PGBOUNCER_RUNDIR?= /var/run/pgbouncer PGBOUNCER_LOGDIR?= /var/log/pgbouncer +BUILD_DEPENDS+= ${LOCALBASE}/bin/gsed:${PORTSDIR}/textproc/gsed + .include + # Parse ${PORTSDIR}/UIDs and GIDs for the defaults USER!= ${GREP} -E '^${PGBOUNCER_USER}:' ${PORTSDIR}/UIDs | \ ${SED} -Ee 's/^([^:]*):([^:]*):([^:]*):([^:]*)::0:0:([^:]*):([^:]*):([^:]*)$$/USER="\1" UID="\3" GECOS="\5" HOME="\6" SHELL="\7"/' @@ -71,6 +74,8 @@ @${REINPLACE_CMD} -e "s|= pgbouncer.log|= ${PGBOUNCER_LOGDIR}/pgbouncer.log|g" \ -e "s|= pgbouncer.pid|= ${PGBOUNCER_RUNDIR}/pgbouncer.pid|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 ${PREFIX}/bin/ Index: distinfo =================================================================== RCS file: /home/pcvs/ports/databases/pgbouncer/distinfo,v retrieving revision 1.8 diff -u -r1.8 distinfo --- distinfo 28 Sep 2010 09:30:50 -0000 1.8 +++ distinfo 13 Jan 2011 13:10:22 -0000 @@ -1,3 +1,2 @@ -MD5 (pgbouncer-1.3.4.tar.gz) = 38af22d4b3546dc6763d374ec3b40f38 -SHA256 (pgbouncer-1.3.4.tar.gz) = 74eba35f6e088d45a49e4b2226b266d8d5649af498f72f771a22873fa9b16fe7 -SIZE (pgbouncer-1.3.4.tar.gz) = 167957 +SHA256 (pgbouncer-1.4.tar.gz) = e94a8e7edd6de4ae6978e8f485bbc6a610195b56b1f5fe95a49bfd70959628fb +SIZE (pgbouncer-1.4.tar.gz) = 231691 Index: files/patch-lib-usual-endian.h =================================================================== RCS file: files/patch-lib-usual-endian.h diff -N files/patch-lib-usual-endian.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-lib-usual-endian.h 13 Jan 2011 13:10:22 -0000 @@ -0,0 +1,32 @@ +--- lib/usual/endian.h.orig 2010-12-14 07:35:50.000000000 +0100 ++++ lib/usual/endian.h 2011-01-12 16:01:08.148625395 +0100 +@@ -157,6 +157,7 @@ + /* + * Read LE/BE values from memory. + */ ++#ifndef __FreeBSD__ + + #define _DEC(name, typ, decode) \ + static inline typ name(const void *p) { \ +@@ -173,10 +174,14 @@ + _DEC(le64dec, uint64_t, le64toh) + #undef _DEC + ++#endif ++ + /* + * Write LE/BE values to memory. + */ + ++#ifndef __FreeBSD__ ++ + #define _ENC(name, typ, encode) \ + static inline void name(void *p, typ val) { \ + typ tmp = encode(val); \ +@@ -190,4 +195,6 @@ + _ENC(le64enc, uint64_t, htole64) + #undef _ENC + ++#endif ++ + #endif /* _USUAL_ENDIAN_H_ */ Index: files/pgbouncer.sh.in =================================================================== RCS file: /home/pcvs/ports/databases/pgbouncer/files/pgbouncer.sh.in,v retrieving revision 1.4 diff -u -r1.4 pgbouncer.sh.in --- files/pgbouncer.sh.in 27 Mar 2010 00:12:48 -0000 1.4 +++ files/pgbouncer.sh.in 13 Jan 2011 13:10:22 -0000 @@ -10,26 +10,28 @@ # Add the following lines to /etc/rc.conf to enable pgbouncer: # -# pgbouncer_enable="YES" -# pgbouncer_flags="" -# +# pgbouncer_enable (bool): Set to "YES" to enable pgbouncer +# Default is "NO". +# pgbouncer_conf (path): Set full path to configuration file. +# Default is "%%PREFIX%%/etc/pgbouncer.ini". +# pgbouncer_flags (string): Additional flags passed to pgbouncer. +# Default is "". . /etc/rc.subr name="pgbouncer" rcvar=`set_rcvar` +load_rc_config "$name" +: ${pgbouncer_enable="NO"} +: ${pgbouncer_user="pgbouncer"} +: ${pgbouncer_conf="%%PREFIX%%/etc/$name.ini"} + extra_commands="reload" command="%%PREFIX%%/bin/pgbouncer" -config_file="%%PREFIX%%/etc/$name.ini" -command_args="-d ${config_file}" pidfile="%%PGBOUNCER_RUNDIR%%/$name.pid" -required_files="${config_file}" - -# read configuration and set defaults -load_rc_config "$name" -: ${pgbouncer_enable="NO"} -: ${pgbouncer_user="%%PGBOUNCER_USER%%"} +required_files="${pgbouncer_conf}" +command_args="-d ${pgbouncer_conf}" run_rc_command "$1"