# -*- 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           cmake 1.1
PortGroup           github 1.0

name                keychain-cpp
# 1.3.0 breaks the API. Stay at 1.2.1 until this is addressed,
# either by upstream or at least locally in MacPorts.
# https://github.com/hrantzsch/keychain/pull/33
github.setup        hrantzsch keychain 1.2.1 v
revision            0
categories          security sysutils
license             MIT
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
description         Cross-platform wrapper for the OS credential storage
long_description    Keychain is a thin cross-platform wrapper in C++ \
                    to access the operating system credential storage.
checksums           rmd160  279838f1fb34af4a0a908125f89cf1ebed6dc549 \
                    sha256  725cc30da0451403713dee648edd06686fdc31b5041e75e3350e6056c78de076 \
                    size    138151
github.tarball_from archive

# https://github.com/hrantzsch/keychain/pull/38
patchfiles-append   0001-keychain_mac-fix-build-on-10.9.patch

compiler.cxx_standard   2011

configure.args-append \
                    -DBUILD_TESTS=OFF

variant tests description "Enable testing" {
    configure.args-replace \
                    -DBUILD_TESTS=OFF -DBUILD_TESTS=ON
    test.run        yes
}