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

name                libksba
version             1.6.8
revision            0

checksums           rmd160  33ce3a7e56c48874836d72eb055cc9b1d8108a70 \
                    sha256  0f4510f1c7a679c3545990a31479f391ad45d84e039176309d42f80cf41743f5 \
                    size    716917

categories          devel security
license             GPL-3+
maintainers         {larryv @larryv} openmaintainer

description         X.509 and CMS library
long_description    Libksba is a library to make the tasks of working \
                    with X.509 certificates, CMS data and related \
                    objects more easy. It provides a highlevel \
                    interface to the implemented protocols and \
                    presents the data in a consistent way. There is no \
                    more need to worry about all the nasty details of \
                    the protocols. The API gives the C programmer an \
                    easy way of interacting with the data.
homepage            https://www.gnupg.org/related_software/libksba

depends_lib         port:libgpg-error

master_sites        gnupg
use_bzip2           yes

platform darwin 10 {
    # Rosetta misdetects the arch and gives a warning of a mismatch:
    # *** The config script "/opt/local/bin/gpgrt-config --libdir=/opt/local/lib gpg-error" was
    # *** built for powerpc-apple-darwin10 and thus may not match the used host x86_64-apple-darwin10.8.0.
    if {${build_arch} eq "ppc"} {
        configure.args-append --build=powerpc-apple-darwin${os.major}
    }
}

test.run            yes
test.target         check

livecheck.type      regex
livecheck.url       https://gnupg.org/ftp/gcrypt/${name}/
livecheck.regex     ${name}-(\\d+\\.\\d+\\.\\d+)
