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

name                pdfgrep
version             2.2.0
revision            0
checksums           rmd160  1526045539e03217faaedc2aad7e2f5fda7c0772 \
                    sha256  0661e531e4c0ef097959aa1c9773796585db39c72c84a02ff87d2c3637c620cb \
                    size    213237

categories          textproc
license             GPL-2+
maintainers         nomaintainer
description         A tool to search text in PDF files.
long_description \
   Pdfgrep is a tool to search text in PDF files. It works similar to grep.

homepage            https://pdfgrep.org
master_sites        ${homepage}/download/

compiler.cxx_standard 2014

depends_build-append \
                    path:bin/pkg-config:pkgconfig
depends_lib-append  path:lib/pkgconfig/poppler.pc:poppler \
                    port:pcre2 \
                    port:libgcrypt

patchfiles          scandir.patch

configure.args      --without-unac

variant unac description {Use unac to remove accents and ligatures before searching} {
    depends_lib-append  port:unac
    configure.args-replace \
                        --without-unac --with-unac
}

livecheck.type      regex
livecheck.url       ${homepage}/download.html
livecheck.regex     ${name}-(\\d+(\\.\\d+)+)\.tar
