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

PortSystem      1.0
PortGroup       cmake 1.1
PortGroup       github 1.0
PortGroup       legacysupport 1.1
PortGroup       qt4 1.0

legacysupport.newest_darwin_requires_legacy 0
legacysupport.redirect_bins Grabber Grabber-cli

# Original upstream: https://github.com/Bionus/imgbrd-grabber
# Qt4 port is massive, and we do not want all that as patches on top, so fork is used.
github.setup    barracuda156 imgbrd-grabber acb8bc8c4b441f832eaceaae6c5837a8198512c5
version         7.14.0
revision        0
categories      www graphics manga
maintainers     {@barracuda156 gmail.com:vital.had} openmaintainer
license         Apache-2

description     imageboard/booru downloader with powerful filenaming features
long_description \
                Very customizable {*}${description}.

homepage        https://www.bionus.org/imgbrd-grabber

checksums       rmd160  4389d60b026662551dd73aad31139df1a62a885c \
                sha256  c45d5e0fde1c829fe85b2dcf7851f04ea375a2543eedd24011d17af4efd17103 \
                size    8130680
github.tarball_from archive
github.livecheck.branch qt4

installs_libs   no

cmake.source_dir    ${worksrcpath}/src

depends_build-append \
                port:catch2 \
                port:jq \
                path:bin/pkg-config:pkgconfig
depends_lib-append \
                port:lexbor \
                port:pcre2 \
                port:phonon-backend-vlc \
                port:QJson4
depends_run-append \
                port:qt4-imageformats

compiler.cxx_standard \
                2014

configure.args-append \
                -DPREBUILT_SITES=ON \
                -DUSE_SYSTEM_CATCH2=ON \
                -DUSE_SYSTEM_LEXBOR=ON \
                -DUSE_SYSTEM_QJSON4=ON \
                -DVERSION_PLATFORM=${configure.build_arch}
