# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           legacysupport 1.1

github.setup        p11-glue p11-kit 0.25.10
revision            0
license             Permissive
description         PKCS#11 module discovery and loading
long_description    Provides a way to load and enumerate PKCS#11 modules and a standard \
                    configuration setup for installing PKCS#11 modules in such a way that \
                    they are discoverable.
maintainers         nomaintainer
categories          security

github.tarball_from releases
use_xz              yes

checksums           rmd160  51fc29d770a416758ea2b736880b177351efb716 \
                    sha256  a62a137a966fb3a9bbfa670b4422161e369ddea216be51425e3be0ab2096e408 \
                    size    1053532

depends_build       port:gettext \
                    path:bin/pkg-config:pkgconfig \
                    port:python313

depends_lib         port:gettext-runtime \
                    port:libtasn1 \
                    port:libffi \
                    port:libxslt

depends_run         path:share/curl/curl-ca-bundle.crt:curl-ca-bundle

configure.args      --disable-doc \
                    --disable-silent-rules \
                    --with-trust-paths=${prefix}/share/curl/curl-ca-bundle.crt:${prefix}/etc/openssl

# /usr/bin/python is Python 2.7 for older systems, and
# /usr/bin/python3 is too old (< 3.6) on older systems
# https://trac.macports.org/ticket/68739
configure.env       PYTHON=${prefix}/bin/python3.13

# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr

variant doc description {Build man pages and documentation} {
    depends_build-append    port:gtk-doc
    configure.args-replace  --disable-doc --enable-doc
}

test.run            yes
test.target         check
