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

# Please rev-bump squirrel-ime whenever librime-devel updates
github.setup        rime librime 08dd95f5d9282346f0d4a3e8fc6b20811dc3d063
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                librime-devel
version             20230206
revision            6
categories          devel
license             BSD
maintainers         {l2dy @l2dy} openmaintainer
description         Rime Input Method Engine, the core library
long_description    {*}${description}
homepage            https://rime.im/

depends_build-append \
                    port:pkgconfig

depends_lib-append  port:capnproto \
                    port:gflags \
                    port:google-glog \
                    port:leveldb \
                    port:marisa-trie \
                    port:opencc \
                    port:yaml-cpp

compiler.cxx_standard 2014

configure.args      -DBOOST_USE_CXX11=ON \
                    -DBUILD_TEST=OFF

checksums           rmd160  9a46203b8f11a380d7c17df232310d7381a39985 \
                    sha256  591321c13ef15185f3f07a418cffd96d679affd6363c8257225e4c8e77389540 \
                    size    2623636

variant tests description "Build tests" {
    configure.pre_args-replace \
                    -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
                    -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
    configure.args-replace \
                    -DBUILD_TEST=OFF \
                    -DBUILD_TEST=ON

    test.run        yes
}
