# -*- 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.7
revision            0

checksums           rmd160  047e23fd5cdfb715330220e384e050b8a5fe381b \
                    sha256  cf72510b8ebb4eb6693eef765749d83677a03c79291a311040a5bfd79baab763 \
                    size    706437

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+)
