# -*- 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                orcus-0.18
set my_name         orcus
gitlab.setup        ${my_name} ${my_name} 0.18.1
revision            0

categories          devel
license             MIT
maintainers         {gmail.com:audvare @Tatsh} openmaintainer

description         Standalone file import filter library for spreadsheet documents.
long_description    {*}${description}

depends_build-append \
                    port:pkgconfig

depends_lib-append \
                    port:ixion-0.18 \
                    port:mdds-2.1 \
                    port:zlib

checksums           rmd160  5b3264f35962e2db5da27e6c34d2a9ac8405edc3 \
                    sha256  413a1fc00efe40c126eb56dc88912c30f6d7b3d020a7d02db827a6de7058600e \
                    size    8160360

use_autoreconf      yes

compiler.cxx_standard 2017
# Extend blacklist to cover macOS10.13
compiler.blacklist-append {clang < 1050}

configure.cxxflags-append -std=gnu++17
configure.args-append \
                    --disable-python \
                    --disable-static \
                    --disable-werror \
                    --enable-spreadsheet-model \
                    --program-suffix=-0.18 \
                    --without-docs \
                    --without-tools

# This port provides bindings previously provided by 'orcus'.
# 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    orcus

    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 {(0\.18\.\d+)}
