# -*- 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

github.setup        Martinsos edlib 1.2.7 v
github.tarball_from archive
revision            0

categories          devel
license             MIT
maintainers         {@herbygillot gmail.com:herby.gillot} openmaintainer

description         Sequence alignment library using edit distance
long_description    Edlib is a lightweight C++ library with a C API for computing \
                    edit (Levenshtein) distance and optimal sequence alignments.
homepage            https://martinsos.github.io/edlib/

checksums           rmd160  dfcc955c0581017648d840720d4f8352063b70c9 \
                    sha256  8767bc1b04a1a67282d57662e5702c4908996e96b1753b5520921ff189974621 \
                    size    4318998

compiler.cxx_standard 2014

patchfiles          patch-cmake-version.diff

configure.args-append \
                    -DBUILD_SHARED_LIBS=ON \
                    -DBUILD_TESTING=ON \
                    -DEDLIB_BUILD_EXAMPLES=OFF \
                    -DEDLIB_BUILD_UTILITIES=OFF \
                    -DEDLIB_ENABLE_INSTALL=ON

test.run            yes
# Set this in the command so macOS does not strip it from the shell environment.
test.cmd            DYLD_LIBRARY_PATH=${cmake.build_dir}/lib ${prefix}/bin/ctest
test.target
test.args           --output-on-failure

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 0644 -W ${worksrcpath} LICENSE README.md ${docdir}
}
