# -*- 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           github 1.0
PortGroup           openssl 1.0
PortGroup           legacysupport 1.1

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

github.setup        stefanberger libtpms 0.10.2 v
github.tarball_from archive
revision            0

categories          security
maintainers         {@trodemaster icloud.com:manuals-unread2u} openmaintainer
license             BSD

description         Library for software emulation of a Trusted Platform Module

long_description    {*}${description}. libtpms provides the core TPM 1.2 and \
                    TPM 2.0 functionality used to integrate TPM emulation \
                    into hypervisors, primarily QEMU, via the swtpm TPM \
                    emulator.

checksums           rmd160  21c3efc868077d6b108eb38193a4a4c179f982b1 \
                    sha256  edac03680f8a4a1c5c1d609a10e3f41e1a129e38ff5158f0c8deaedc719fb127 \
                    size    1399529

depends_build-append \
                    path:bin/pkg-config:pkgconfig

use_autoreconf      yes

# clang: error: unrecognized command line option "-fstack-protector-strong"
# VerifyConfiguration.h:72: error: expected declaration specifiers or '...' before '(' token
compiler.blacklist-append \
                    *gcc-4.* {clang < 700}

configure.args-append \
                    --with-openssl \
                    --with-tpm2 \
                    --disable-silent-rules
