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

nim.setup           github sergiotapia torrentinim 0.9.1 v
revision            0
nim.vcs_revision    8a0f2294c7e11f71540d6e2bbbc48fa25748494e
categories-append   www p2p
license             MIT
maintainers         {@barracuda156 macos-powerpc.org:barracuda} \
                    openmaintainer

description         API-only torrent search engine
long_description    A very low memory-footprint, self-hosted {*}${description}. Sonarr- and Radarr-compatible.

checksums           rmd160  4bef4f843627fa07d99044c85d3417d0f0efa954 \
                    sha256  74b336b24bd6c5324b94c1a5a915281f8f295e58d40d67a134084de027766b86 \
                    size    151803

nim.nimble_binaries ${nim.package_name}

# https://github.com/sergiotapia/torrentinim/issues/34
patchfiles          db_connector.patch
# https://github.com/sergiotapia/torrentinim/issues/35
# https://github.com/sergiotapia/torrentinim/issues/36
patchfiles-append   fix-nim.cfg.patch

depends_lib-append  port:nim-db_connector \
                    port:nim-filesize \
                    port:nim-nimquery \
                    port:nim-prologue

if {${configure.build_arch} in [list arm i386 ppc]} {
    nim.build_flags-append \
                    --overflowChecks:off
}
