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

PortSystem          1.0
PortGroup           perl5 1.0

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         innotop 1.10.0
license             {GPL-2 Artistic-1}
maintainers         nomaintainer
supported_archs     noarch

description         A MySQL and InnoDB monitor program.
long_description    MySQL and InnoDB transaction/status monitor.  \
                    Like 'top' for MySQL.  Displays queries, InnoDB \
                    transactions, lock waits, deadlocks, foreign key \
                    errors, open tables, replication status, buffer \
                    information, row operations, logs, I/O \
                    operations, load graph, and more.  You can \
                    monitor any servers at once with innotop.

set gh_user         innotop
set gh_project      innotop
set gh_commit       c931d2d

homepage            https://github.com/${gh_user}/${gh_project}
master_sites        ${homepage}/tarball/${gh_commit}
distname            ${gh_project}-${gh_commit}
worksrcdir          ${gh_user}-${distname}

platforms           {darwin any}

checksums           rmd160  1c3a91c447b6eafbcce1cde80d38d585e82543e1 \
                    sha256  290646dbcf8bc689363c8c6febeb9e5cc574d0b10854524da14ee740a1364d57

if {${perl5.major} != ""} {
    depends_lib-append \
                    port:p${perl5.major}-dbi \
                    port:p${perl5.major}-dbd-mysql \
                    port:p${perl5.major}-term-readkey

    patchfiles      patch-innotop.diff

    post-patch {
        reinplace "s|^#!.*|#!${perl5.bin}|" ${worksrcpath}/innotop
        reinplace "s|@@MP_PREFIX@@|${prefix}|" ${worksrcpath}/innotop
    }
}

livecheck.type      none
