# -*- 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 swtpm 0.10.2 v
github.tarball_from archive
revision            0

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

description         Software TPM emulator based on libtpms

long_description    {*}${description}. swtpm provides TPM 1.2 and TPM 2.0 \
                    emulation with a TCP/IP or Unix domain socket interface, \
                    intended primarily for use with hypervisors such as QEMU.

checksums           rmd160  af729c47e3863fad60becd06b10eb3b8927cf863 \
                    sha256  f61cf6f1e9bbcb4cefb30b70cafaf1c4df54c6961e65cfa63830e8ad0e220134 \
                    size    417378

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

depends_lib-append  port:libtpms \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:json-glib \
                    port:libtasn1 \
                    port:gmp

use_autoreconf      yes

# clang: error: unrecognized command line option "-fstack-protector-strong"
compiler.blacklist-append \
                    *gcc-4.* {clang < 700}

configure.args-append \
                    --with-openssl \
                    --without-gnutls \
                    --without-cuse \
                    --disable-tests
