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

# https://github.com/sccn/liblsl/issues/189
boost.version       1.81

license             MIT

github.setup        sccn liblsl 1.16.2 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
categories          science
maintainers         nomaintainer

description         C++ library for multi-modal time-synched data transmission over the local network.

long_description    The lab streaming layer is a simple all-in-one approach \
                    to streaming experiment data between applications in a \
                    lab, e.g. instrument time series, event markers, audio,\
                    and so on.

# Based on our python patch, see: https://trac.macports.org/ticket/67212
patchfiles          0001-loguru-fix-for-missing-pthread_is_threaded_np.patch

compiler.cxx_standard \
                    2011

depends_build-append \
                    port:pugixml

configure.args-append   -DLSL_BUNDLED_BOOST=OFF \
                        -DLSL_BUNDLED_PUGIXML=OFF

if {[string match *gcc* ${configure.compiler}]} {
    # cc1: error: '-fno-fat-lto-objects' are supported only with linker plugin
    configure.args-append   -DLSL_OPTIMIZATIONS=OFF
}

variant static description {Build LSL as a static library.} {
    configure.args-append   -DLSL_BUILD_STATIC=ON
}

checksums           rmd160  793c8e92d808084a133d45b550e9151cf77d5ef2 \
                    sha256  6667d647d7f42e9440e21fe22900b0dd5c2ee83b8f66b6463732cca4e64ce4fa \
                    size    2150327
