diff options
author | mm <mm@FreeBSD.org> | 2011-01-15 08:06:46 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-01-15 08:06:46 +0800 |
commit | e11a6f6452b4dd927ed3053d6381e56d394d6f1a (patch) | |
tree | 60c4e37654cd6584ecc2ee4fd31f29a53d699e8d /databases | |
parent | 210cc90e2a7155fbd2b836c4ba6132bc44eea888 (diff) | |
download | freebsd-ports-gnome-e11a6f6452b4dd927ed3053d6381e56d394d6f1a.tar.gz freebsd-ports-gnome-e11a6f6452b4dd927ed3053d6381e56d394d6f1a.tar.zst freebsd-ports-gnome-e11a6f6452b4dd927ed3053d6381e56d394d6f1a.zip |
- Update to 1.4
- Fix lib/usual/endian.h
- Modify rc file - allow setting a custom configuration file
PR: ports/153932
Approved by: skv@FreeBSD.org (maintainer, private e-mail)
Feature safe: yes
Diffstat (limited to 'databases')
-rw-r--r-- | databases/pgbouncer/Makefile | 9 | ||||
-rw-r--r-- | databases/pgbouncer/distinfo | 5 | ||||
-rw-r--r-- | databases/pgbouncer/files/patch-lib-usual-endian.h | 32 | ||||
-rw-r--r-- | databases/pgbouncer/files/pgbouncer.sh.in | 24 |
4 files changed, 54 insertions, 16 deletions
diff --git a/databases/pgbouncer/Makefile b/databases/pgbouncer/Makefile index 720f27149791..e93541923f44 100644 --- a/databases/pgbouncer/Makefile +++ b/databases/pgbouncer/Makefile @@ -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_GROUP?= pgbouncer PGBOUNCER_RUNDIR?= /var/run/pgbouncer PGBOUNCER_LOGDIR?= /var/log/pgbouncer +BUILD_DEPENDS+= ${LOCALBASE}/bin/gsed:${PORTSDIR}/textproc/gsed + .include <bsd.port.pre.mk> + # 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 @@ post-patch: @${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/ diff --git a/databases/pgbouncer/distinfo b/databases/pgbouncer/distinfo index a3fd3eb21350..f9e4d317627e 100644 --- a/databases/pgbouncer/distinfo +++ b/databases/pgbouncer/distinfo @@ -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 diff --git a/databases/pgbouncer/files/patch-lib-usual-endian.h b/databases/pgbouncer/files/patch-lib-usual-endian.h new file mode 100644 index 000000000000..7995a10dab31 --- /dev/null +++ b/databases/pgbouncer/files/patch-lib-usual-endian.h @@ -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_ */ diff --git a/databases/pgbouncer/files/pgbouncer.sh.in b/databases/pgbouncer/files/pgbouncer.sh.in index 29c4ecf65ab8..9d4c8f2cffd0 100644 --- a/databases/pgbouncer/files/pgbouncer.sh.in +++ b/databases/pgbouncer/files/pgbouncer.sh.in @@ -10,26 +10,28 @@ # Add the following lines to /etc/rc.conf to enable pgbouncer: # -# pgbouncer_enable="YES" -# pgbouncer_flags="<set as needed>" -# +# 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" |