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

# Needed for clock_gettime, std::filesystem
legacysupport.newest_darwin_requires_legacy 19
legacysupport.use_mp_libcxx                 yes

github.setup        rizsotto Bear 3.1.5
revision            0

checksums           rmd160  15a2c3369693c1ec3b14f82cf483fbc0a214c100 \
                    sha256  2b3ac2fe04f76999083db604fbe25743c95548ce73e3148036e50e80d3d1026b \
                    size    152222

maintainers         {cal @neverpanic} openmaintainer
license             GPL-3+

categories          devel
description         \
    Bear is a tool to generate compilation database for clang tooling.
long_description    {*}${description} \
    The JSON compilation database is used in clang project to provide \
    information how a single compilation unit was processed. When that is \
    available then it is easy to re-run the compilation with different \
    programs.

patchfiles          patch-spdlog-header-only.diff

set port_libfmt     libfmt9
cmake.module_path-append \
                    ${prefix}/lib/${port_libfmt}/cmake

# Cxx 2017 needed, as of latest 3.1.x releases
compiler.cxx_standard 2017

depends_build-append \
                    port:pkgconfig \
                    port:spdlog \
                    port:nlohmann-json \

depends_lib-append  port:abseil \
                    port:grpc \
                    port:${port_libfmt} \
                    port:protobuf3-cpp \
                    port:re2

configure.args-append \
                    -DENABLE_UNIT_TESTS=Off \
                    -DENABLE_FUNC_TESTS=Off
