# -*- 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           perl5 1.0

name                postgresql_autodoc
version             1.41
revision            3
categories          databases textproc
license             BSD
platforms           darwin
supported_archs     noarch
maintainers         nomaintainer

description         Automatic documentation generator for postgresql databases
long_description    Automatic documentation generator for postgresql \
                    databases. It supports output in HTML, GraphViz, SGML \
                    DocBook and DIA formats.

# doesn't work
homepage            http://www.rbt.ca/autodoc/
master_sites        http://www.rbt.ca/autodoc/binaries/

checksums           rmd160  c588ef93e955b5c41b6175f3f2762c35accbb567 \
                    sha256  8fd8300a1913bd60be7b8214aadc8e193575c1fabe7797cbb6dcaed2b90eb8e9

perl5.branches      5.26

depends_lib         port:perl${perl5.major}
depends_run         port:p${perl5.major}-dbi \
                    port:p${perl5.major}-dbd-pg \
                    port:p${perl5.major}-html-template \
                    port:p${perl5.major}-term-readkey
worksrcdir          ${name}

patchfiles          patch-Makefile.diff

post-patch {
    reinplace -W ${worksrcpath} "s|__PREFIX__|${prefix}|" Makefile
}

use_configure       no

build               {}

destroot.args       PERL=${perl5.bin}
destroot.destdir    DESTDIR=${destroot}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     "Stable Release - (\\d(?:\\.\\d+))*"