# -*- 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
# $Id$
PortSystem          1.0
PortGroup           cmake 1.0

name                libbiosig
version             BSVERSION
categories          science
platforms           darwin
license             GPL-3+
maintainers         {gmx.de:christsc @neurodroid}
description         I/O library for biomedical data
long_description    BioSig is a library for accessing files in several \
                    biomedical data formats (including EDF, BDF, GDF, \
                    BrainVision, BCI2000, CFWB, HL7aECG, SCP_ECG (EN1064), \
                    MFER, ACQ, CNT(Neuroscan), DEMG, EGI, EEG1100, FAMOS, \
                    SigmaPLpro, TMS32)
homepage            http://biosig.sourceforge.net/index.html
master_sites        sourceforge:biosig
master_sites.mirror_subdir \
                    /BioSig%20for%20C_C++/src
distname            biosig-${version}.src
worksrcdir          biosig-${version}/biosig4c++
checksums           rmd160  RMD160 \
                    sha256  SHA256

depends_build-append \
                    port:gawk
depends_lib         port:SuiteSparse_CHOLMOD \
                    port:zlib \
                    port:libiconv

cmake.out_of_source yes

configure.args-append \
                    -DUSE_SUITESPARSE=ON \
                    -DUSE_ZLIB=ON \
                    -DZLIB_INCLUDE_DIR=${prefix}/include \
                    -DZLIB_LIBRARY=${prefix}/lib/libz.dylib \
                    -DICONV_LIBRARY=${prefix}/lib/libiconv.dylib \
                    -DCHOLMOD_LIBRARY=${prefix}/lib/libcholmod.dylib

configure.cflags-append \
                    -DMACPORTS

configure.cxxflags-append \
                    -DMACPORTS

livecheck.regex     biosig-(\[0-9a-z.\]+)\\.src${extract.suffix}
