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

name                libksba
version             1.9.1
revision            0

checksums           rmd160  c8145db9e9a85734b46a55d906e29a221e0a29b2 \
                    sha256  9afdd398b4a076735e1e7fd29c7f6e7670b6c382aee2d3a55aa937b283f43e5b \
                    size    767904

categories          devel security
license             {GPL-2+ LGPL-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

gnu_info.name       ksba

master_sites        gnupg
use_bzip2           yes

configure.args-append   --enable-shared \
                        --disable-silent-rules \
                        --disable-static \
                        --disable-valgrind-tests

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