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

license             BSD
maintainers         nomaintainer

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

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

checksums           rmd160  2a700c7e90d9253a36a19028d168b9191480d929 \
                    sha256  8d8a990c84c64bcde45af22af502d17bc0ae107be405ce41bba92af5c39c0000 \
                    size    407075

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