# -*- 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           gitlab 1.0
PortGroup           boost 1.0

name                mdds-2.1
set my_name         mdds
gitlab.setup        ${my_name} ${my_name} 2.1.1
revision            0

categories          devel
license             MPL-2
platforms           any
supported_archs     noarch
maintainers         {gmail.com:audvare @Tatsh} openmaintainer

description         Collection of multi-dimensional data structure and indexing algorithms.
long_description    {*}${description}

dist_subdir         ${my_name}

checksums           rmd160  54635a3819a0b095441418ed91453cc9b5ea5799 \
                    sha256  06fecb705276a8628e527311cb590c203442f5cbe934d245626cb328458e0e17 \
                    size    651536

compiler.cxx_standard \
                    2017

use_autoreconf      yes
configure.args-append \
                    --docdir=${prefix}/share/doc/${subport} \
                    --disable-memory_tests \
                    --disable-openmp \
                    --without-docs

# This port provides bindings previously provided by 'mdds'.
# So the latter must be deactivated first, if installed.
# This logic added 2023-05-29; keep in place for at least 12 months.
pre-activate {
    set port_conflict_name    mdds

    if { ![catch {set port_conflict_ver_info [lindex [registry_active ${port_conflict_name}] 0]}] } {
        ui_info "${port_conflict_name} installed; deactivating"
        registry_deactivate_composite ${port_conflict_name} "" [list ports_nodepcheck 1]
    }
}

gitlab.livecheck.regex {(2\.1\.\d+)}
