# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           legacysupport 1.1

# strnlen
legacysupport.newest_darwin_requires_legacy 10

name                pgbouncer
version             1.23.1
revision            0

categories          databases
installs_libs       no
license             ISC
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

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            https://www.pgbouncer.org
master_sites        ${homepage}/downloads/files/${version}/

checksums           rmd160  86df5e41f431fed3c191ae1a4715886ca12099c2 \
                    sha256  1963b497231d9a560a62d266e4a2eae6881ab401853d93e5d292c3740eec5084 \
                    size    700025

depends_build-append \
                    port:gmake \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:c-ares \
                    port:libevent \
                    path:lib/libssl.dylib:openssl

# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr

# https://trac.macports.org/ticket/70487
compiler.blacklist-append \
                    *gcc-4.0 *gcc-4.2

# Disable silent rules.
build.args          V=1

livecheck.type      regex
livecheck.url       https://www.pgbouncer.org/downloads/
livecheck.regex     pgbouncer-(\[0-9\\.\]+)\\.tar\\.gz
