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

name                py-LabJackPython
version             2.1.0
epoch               3
revision            0

license             MIT X11
maintainers         nomaintainer

description         The LabJack Python modules for the LabJack U3, U6, UE9 and U12.
long_description    {*}${description}

supported_archs     noarch
platforms           {darwin any}

homepage            https://support.labjack.com/docs/labjackpython-for-ud-exodriver-u12-windows-mac-lin

checksums           rmd160  18413c0c732ddb4a83ed4f2422d75038d87c25fe \
                    sha256  c4fb8fe1ce161949cb2bb70e5fe8e99549121b065c45c8511293f6ff8037a160 \
                    size    113538

python.versions     312

if {${name} ne ${subport}} {
    depends_lib-append  port:exodriver

    post-patch {
        reinplace "s|/usr/local|${prefix}|g" \
            ${worksrcpath}/src/LabJackPython.py \
            ${worksrcpath}/src/u12.py
    }

    post-destroot {
        set docdir ${prefix}/share/doc/${subport}
        xinstall -d ${destroot}${docdir}
        xinstall -m 0644 -W ${worksrcpath} README LICENSE \
            ${destroot}${docdir}
    }
}
