# -*- 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
PortGroup           python 1.0

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

name                py-line_profiler
version             5.1.0
revision            0

license             BSD
maintainers         {reneeotten @reneeotten} openmaintainer

description         Line-by-line profiler
long_description    {*}${description}

homepage            https://github.com/pyutils/line_profiler

checksums           rmd160  587a5929df8d473921459d3cb12314d08c4e7ae9 \
                    sha256  5717a2dccf0ced65fd19ba5e479581c47412831fe768bc211c6d0f5ba1ad9b47 \
                    size    197869

python.versions     311 312 313 314 315

# attempt to fix the build error on 10.7 and 10.8:
# line_profiler/_line_profiler.cpp:1264:10: fatal error: 'unordered_map' file not found
compiler.cxx_standard 2011

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-cython

    notes-append    "To use line_profiler within a Jupyter notebook:
\t%load_ext line_profiler
\tdef prof_function():
\t    …
\t%lprun -f prof_function prof_function()"
}
