# $Id: Portfile 54552 2009-07-29 13:06:35Z giorgio_v@macports.org $

PortSystem 1.0

name			pgbouncer
version			1.3.1
categories		databases
platforms		darwin
maintainers		mac.com:giorgio_v
description		Lightweight connection pooler for PostgreSQL
long_description	pgbouncer is a PostgreSQL connection pooler. \
			Any target application can be connected to \
			pgbouncer as if it were a PostgreSQL server, \
			and pgbouncer will manage to connect to the \
			server, or to reuse one of its existing	connections.

homepage		http://pgbouncer.projects.postgresql.org/
master_sites		http://pgfoundry.org/frs/download.php/2284/
checksums		md5 ccb2dbe8b6ce505e14762712c478982e \
			sha1 dd4686cb6976ddd52159ac79c5235cad6a06b50f \
			rmd160 c385a91a85070f54569bc5a2029751477b1bee6d

configure.env		PATH=$env(PATH):${prefix}/lib/postgresql84/bin

depends_build		port:postgresql84
depends_lib             port:libevent

livecheck.check	regex
livecheck.url	http://pgfoundry.org/frs/?group_id=1000258
livecheck.regex	pgbouncer-(\[0-9\\.\]+)\\.tgz

variant postgresql82 description {uses postgresql82 installation} {
	depends_build		port:postgresql82
	configure.env		PATH=$env(PATH):${prefix}/lib/postgresql82/bin
}

variant postgresql83 description {uses postgresql83 installation} {
	depends_build		port:postgresql83
	configure.env		PATH=$env(PATH):${prefix}/lib/postgresql83/bin
}
