# -*- 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           app 1.0
PortGroup           qt5 1.0

qt5.depends_component qtwebkit

name                recoll
version             1.31.6
categories          textproc
platforms           darwin
license             GPL-2+
maintainers         {dockes.org:jf @medoc92} openmaintainer

description         Desktop full text search

long_description    Recoll is a desktop search tool based on Xapian

homepage            https://www.lesbonscomptes.com/recoll/
master_sites        ${homepage}

checksums           rmd160  ce938b4d9ac1ba706044f6dea10473ac2632f67c \
                    sha256  163ac6ec5a38d410262b509766b6f0985b7f87f21572be8a1b0cb93c4f412594 \
                    size    3697735

depends_lib         port:xapian-core \
                    port:aspell \
                    port:libiconv \
                    port:zlib

depends_run         port:antiword \
                    port:python37 \
                    port:py37-lxml \
                    path:lib/pkgconfig/poppler.pc:poppler \
                    port:unrtf \
                    port:unzip

compiler.cxx_standard 2011

# Note: this is probably not the right way to configure QMAKE
configure.args      QMAKE=${prefix}/libexec/qt5/bin/qmake \
                    --without-x \
                    --disable-x11mon \
                    --disable-python-module \
                    --disable-python-chm

build.args          CC=${configure.cc} CXX=${configure.cxx} CPPFLAGS=-DMACPORTS=1

pre-destroot {
    xinstall -m 755 ${worksrcpath}/qtgui/recoll.app/Contents/MacOS/recoll ${destroot}${prefix}/bin/${name}
}

# g++-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
universal_variant   no

livecheck.url       ${homepage}/pages/download.html

