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

github.setup        pezmaster31 bamtools 2.5.2 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball

categories          devel
license             MIT
maintainers         nomaintainer

description         a programmer's API and an end-user's toolkit for handling BAM files
long_description    BamTools provides both {*}${description}.

checksums           rmd160  3b50c1a2c92d619cfe17ccf2c790cc7996f337cd \
                    sha256  1ba47cbb4322f5faedd76f9a7e6cc5c88f208d66367d4509ca55d346c68869fc \
                    size    245830

depends_lib-append  \
                    path:lib/libjsoncpp.dylib:jsoncpp

compiler.cxx_standard \
                    2011

# the C++11 requirement is being imposed by jsoncpp
configure.cxxflags-append \
                    -std=c++11
configure.args-append \
                    -DBUILD_SHARED_LIBS=ON

cmake.build_type    [expr {[variant_isset debug] eq 1 ? "Debug" : "Release"}]

variant nodejs description {If you plan to run in Node.js environment} {
    configure.args-append \
                    -DEnableNodeJS=true
    depends_lib-append \
                    path:bin/node:nodejs22
}

notes {
    * NodeJS support is now enabled via variant '+nodejs'.
    * While the default NodeJS version defaults to the latest available version,\
      you are free to install an older release. This port will utilize any NodeJS\
      version you have installed.
}
