# -*- 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.0.0
revision            0

license             BSD
maintainers         nomaintainer

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

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

checksums           rmd160  84e6b963d8126037e07db12af88d1394d95b26c0 \
                    sha256  a80f0afb05ba0d275d9dddc5ff97eab637471167ff3e66dcc7d135755059398c \
                    size    376919

python.versions     310 311 312 313 314

# 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()"
}
