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

name                groonga
version             13.0.1
revision            1
categories          databases
maintainers         clear-code.com:kou openmaintainer

description         An embeddable fulltext search engine

long_description    groonga is an embeddable fulltext search engine library. It can integrate \
                    with DBMS and scripting languages to enhance their search functionality. \
                    It also provides a standalone data store server based on relation data \
                    model.

homepage            https://groonga.org/
license             LGPL-2.1

master_sites        http://packages.groonga.org/source/groonga/
checksums           rmd160  d1fd79a8afb0ec9e6057a276fcdaf6ee00888e66 \
                    sha256  1c2d1a6981c1ad3f02a11aff202b15ba30cb1c6147f1fa9195b519a2b728f8ba \
                    size    24694524

depends_build-append \
                    port:pkgconfig

depends_lib-append  path:lib/libzmq.dylib:zmq \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/RapidJSON.pc:rapidjson \
                    port:kytea \
                    port:libevent \
                    port:libstemmer \
                    port:lz4 \
                    port:mecab-utf8 \
                    port:msgpack \
                    port:zlib

compiler.c_standard 1999
#warning Need atomic 64-bit operation support. The current implementation may break data.
compiler.blacklist-append *gcc-4.*

configure.args-append \
                    -DUSE_KQUEUE=yes \
                    -DGRN_WITH_APACHE_ARROW=no \
                    -DGRN_WITH_KYTEA=yes \
                    -DGRN_WITH_LIBEVENT=yes \
                    -DGRN_WITH_LIBSTEMMER=yes \
                    -DGRN_WITH_LZ4=yes \
                    -DGRN_WITH_MECAB=yes \
                    -DGRN_WITH_MESSAGE_PACK=yes \
                    -DGRN_WITH_MRUBY=no \
                    -DGRN_WITH_RAPIDJSON=yes \
                    -DGRN_WITH_XXHASH=no \
                    -DGRN_WITH_ZEROMQ=yes \
                    -DGRN_WITH_ZLIB=yes \
                    -DGRN_WITH_ZSTD=no

# Undefined symbols: __ZN5kytea11KyteaConfig12getModelFileB5cxx11Ev
patchfiles-append   patch-cxx11.diff

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
