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

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         Devel-NYTProf 6.14
revision            0
license             {Artistic-1 GPL}
maintainers         nomaintainer

description         Powerful feature-rich perl source code profiler
long_description    Devel::NYTProf is a powerful feature-rich perl source code profiler. \
                    \n  o Performs per-line statement profiling for fine detail \
                    \n  o Performs per-subroutine statement profiling for overview \
                    \n  o Performs per-block statement profiling (the first profiler to do so) \
                    \n  o Accounts correctly for time spent after calls return \
                    \n  o Performs inclusive and exclusive timing of subroutines \
                    \n  o Subroutine times are per calling location (a powerful feature) \
                    \n  o Can profile compile-time activity, just run-time, or just END time \
                    \n  o Uses novel techniques for efficient profiling \
                    \n  o Sub-microsecond (100ns) resolution on systems with clock_gettime() \
                    \n  o Very fast - the fastest statement and subroutine profilers for perl \
                    \n  o Handles applications that fork, with no performance cost \
                    \n  o Immune from noise caused by profiling overheads and I/O \
                    \n  o Program being profiled can stop/start the profiler \
                    \n  o Generates richly annotated and cross-linked html reports \
                    \n  o Trivial to use with mod_perl - add one line to httpd.conf \
                    \n  o Includes an extensive test suite \
                    \n  o Tested on very large codebases \
                    \n\
                    \nNYTProf is effectively two profilers in one: a statement profiler, and a subroutine profiler.

checksums           rmd160  a4b806a8d7f88e0b8920a60219f3a7a05fac0747 \
                    sha256  ac24dd7da5b2247696becefc15ca935484367743aad44cb2c8cfa17a29ad8e03 \
                    size    569967

if {${perl5.major} != ""} {
    depends_build-append \
                    port:p${perl5.major}-capture-tiny \
                    port:p${perl5.major}-sub-name \
                    port:p${perl5.major}-test-differences \
                    port:p${perl5.major}-test-simple

    depends_lib-append \
                    port:p${perl5.major}-file-which \
                    port:p${perl5.major}-getopt-long \
                    port:p${perl5.major}-json-maybexs

    patchfiles      patch-bin-nytprofhtml.diff

    post-patch {
        reinplace "s|__MP_PERL5_MAJOR__|${perl5.major}|" ${worksrcpath}/bin/nytprofhtml
    }
}
