# -*- 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        strasdat Sophus 1.22.10
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1
categories          math
platforms           any
license             MIT
maintainers         {@ierofant gmail.com:aw.kornilov} openmaintainer
supported_archs     noarch

description         C++ implementation of Lie Groups using Eigen
long_description    This is a c++ implementation of Lie groups commonly used for 2d and 3d geometric problems \
                    (i.e. for Computer Vision or Robotics applications). Among others, \
                    this package includes the special orthogonal groups SO(2) and SO(3) \
                    to present rotations in 2d and 3d as well as the special Euclidean group SE(2) \
                    and SE(3) to represent rigid body transformations (i.e. rotations and translations) in 2d and 3d.

set port_libfmt     libfmt9
cmake.module_path-append \
                    ${prefix}/lib/${port_libfmt}/cmake
                    
depends_lib-append  path:share/pkgconfig/eigen3.pc:eigen3 \
                    port:${port_libfmt}

checksums           rmd160  25ed84a989a16df4abf424dfdf7e4e0e32f28deb \
                    sha256  ca5d3f8955f7da6ec3c24b641d5a1a20f6f4cd9f031023e0eeaa4bb6bd9edf11 \
                    size    104186

compiler.cxx_standard   2014

configure.args-append \
                    -DBUILD_SOPHUS_EXAMPLES=OFF \
                    -DBUILD_SOPHUS_TESTS=OFF

variant tests description "Build and run tests" {
    # Notice that there are a few failures on PPC: https://github.com/strasdat/Sophus/issues/448
    configure.args-replace \
                    -DBUILD_SOPHUS_TESTS=OFF -DBUILD_SOPHUS_TESTS=ON
    test.run        yes
}
