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

boost.version       1.81

github.setup        NickvisionApps libnick 2024.12.0
revision            0
categories          devel
license             GPL-3
maintainers         {@nlogozzo} openmaintainer
description         Cross-platform base for native Nickvision applications
long_description    {*}${description}
checksums           rmd160  9cd32b3289e74333a9c76203a2fdcc3461116790 \
                    sha256  7cefe120666b57e93ecbc4fd6f31c9024d61aff5606d0d446075b5f1c3794f54 \
                    size    2570845
github.tarball_from archive

depends_build-append \
                    port:gtest \
                    port:maddy-parser \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:curl \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:gettext-runtime

compiler.cxx_standard   2020

# https://github.com/NickvisionApps/libnick/issues/50
conflicts_build     boost

variant secret description "Use libsecret instead of Apple keychain" {
    depends_lib-append \
                    port:libsecret
    configure.args-append \
                    -DUSE_LIBSECRET=ON
}

if {${os.platform} ne "darwin" || ${os.major} < 12} {
    default_variants-append \
                    +secret
}