# -*- 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-kcs11
python.rootname     PyKCS11
version             1.5.17
revision            0

license             GPL-2+
maintainers         nomaintainer

description         PKCS11 wrapper for Python
long_description    PyKCS11 let you access to almost all PKCS#11 functions and data types \
                    using any PKCS#11 library, such as the various modules supplied by \
                    smartcard vendors.
homepage            https://github.com/LudovicRousseau/PyKCS11
distname            pykcs11-${version}
checksums           rmd160  aba82c1130e8e85a49a9a5a4ff0a0bcc58f32d6a \
                    sha256  7b667e959fa0b6ad0750b03e2081a059cbe9a62789766143e50f90988a338994 \
                    size    82675

patchfiles          patch-setup.py-no-usr-local.diff \
                    patch-fix-swig.diff

python.versions     310 311 312

if {${name} ne ${subport}} {
    depends_build-append \
                    port:swig-python

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