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

# for _strndup
legacysupport.newest_darwin_requires_legacy 10

name                libu2f-server
version             1.1.0
revision            4
categories          security
platforms           darwin
maintainers         {l2dy @l2dy} openmaintainer
license             BSD

description         Yubico Universal 2nd Factor (U2F) Server C Library

long_description    This is a C library that implements the server-side \
                    of the U2F protocol. More precisely, it provides an API \
                    for generating the JSON blobs required by U2F devices to \
                    perform the U2F Registration and U2F Authentication operations, \
                    and functionality for verifying the cryptographic operations.

homepage            https://developers.yubico.com/${name}/
master_sites        https://developers.yubico.com/${name}/Releases/

use_xz              yes

checksums           rmd160  cbd67ad4cc3ab73362749576e9debd426a2de250 \
                    sha256  8dcd3caeacebef6e36a42462039fd035e45fa85653dcb2013f45e15aad49a277

depends_build       port:check \
                    port:gengetopt \
                    port:help2man \
                    port:pkgconfig

depends_lib         port:json-c \
                    path:lib/libssl.dylib:openssl

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     ${name}-(\\d+\\.\\d+\\.\\d+)${extract.suffix}

patchfiles          patch-core-macro-fix.diff

notes "
This project is in maintenance mode.
libfido2 is a new project with support for U2F and FIDO2.
"