# -*- 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             4.1.2
revision            0
license             BSD
maintainers         nomaintainer

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

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

checksums           rmd160  a40f5b49a756447c21da925ddc764fcac93f7d79 \
                    sha256  aa56578b0ff5a756fe180b3fda7bd67c27bbd478b3d0124612d8cf00e4a21df2 \
                    size    78149

python.versions     39 310 311 312

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