# -*- 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           cmake 1.0
PortGroup           github 1.0

if {(${os.platform} eq "darwin" && ${os.major} > 13) \
    || ${os.platform} ne "darwin"} {
    PortGroup       qt5 1.0

    github.setup    Faster3ck converseen 0.15.0.1 v
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    revision        0
    checksums       rmd160  82c70e290524b9b9874d3dc942aae5e6d2a83af9 \
                    sha256  12c0e0025b11db4fd4f5c15b9a414a20e6230393846250d934291e517e2bf04c \
                    size    968297

    qt5.depends_component \
                    qttools

    compiler.cxx_standard   2017
} else {
    PortGroup       qt4 1.0

    # Version for legacy systems using Qt4.
    github.setup    Faster3ck converseen 0.9.2 v
    # Change github.tarball_from to 'releases' or 'archive' next update
    github.tarball_from tarball
    revision        0
    checksums       rmd160  8fb30774f2105641c864fd5d828dc51bb218eb7c \
                    sha256  4ad8a612ff8dc693159743031b6bf14af966b163a155296ce809d1dc3789faee \
                    size    292007

    # https://github.com/Faster3ck/Converseen/issues/169
    patchfiles-append \
                    patch-fix-formats.diff
}

categories          graphics
license             GPL-3
maintainers         {mps @Schamschula} openmaintainer
description         Converseen is an open source batch image converter and resizer.
long_description    {*}${description} Thanks to the Magick++ image libraries it supports \
                    more than 100 image formats.

depends_lib-append  port:ImageMagick

app.icon            ${filespath}/Converseen.icns
