# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                zebra
version             2.2.8
revision            0
categories          databases net www devel
license             GPL-2+
maintainers         nomaintainer

description         information management system
long_description    Zebra is a high-performance, general-purpose \
                    structured text indexing and retrieval engine. \
                    It reads structured records in a variety of input formats \
                    (e.g. email, XML, MARC) and allows access to them \
                    through exact boolean search expressions \
                    and relevance-ranked free-text queries.

homepage            https://www.indexdata.com/resources/software/zebra

master_sites        https://ftp.indexdata.com/pub/zebra/
distname            idzebra-${version}

checksums           rmd160  7e5ad768ef1267e69ae01fdd7713c508bf0337e6 \
                    sha256  879e402b91912e9074275753f24408ed2ac06b3b7c30b2a2d5a70718c869a542 \
                    size    1980160

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:bzip2 \
                    port:expat \
                    path:lib/pkgconfig/icu-uc.pc:icu \
                    port:libiconv \
                    port:libxml2 \
                    port:libxslt \
                    port:tcl \
                    port:yaz \
                    port:zlib

patchfiles          patch-includes.diff

configure.args-append \
                    --enable-mod-alvis \
                    --enable-mod-dom \
                    --enable-mod-grs-marc \
                    --enable-mod-grs-regx \
                    --enable-mod-grs-xml \
                    --enable-mod-safari \
                    --enable-mod-text \
                    --with-iconv=${prefix} \
                    --with-yaz=pkg

configure.cppflags-append \
                    -DUSE_INTERP_ERRORLINE -DUSE_INTERP_RESULT

livecheck.type      regex
livecheck.url       ${master_sites}?M=D
livecheck.regex     "${name}-(\[0-9\]+(\\.\[0-9\]+)+)${extract.suffix}"
