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

name                gwenview
version             4.14.3
revision            9
categories          kde kde4
license             GPL-2+
maintainers         nomaintainer
description         Gwenview is an image viewer for KDE.
long_description    Gwenview can load and save all image formats supported by KDE.
homepage            https://www.kde.org/applications/graphics/gwenview/
master_sites        kde:stable/${version}/src/
use_xz              yes
distname            gwenview-${version}
checksums           rmd160  493754167864154be07772bc85be168fb5a2b755 \
                    sha256  2032d18bc20ea490f3d1298e015ffac2a7b96eb7a76c02578df0713c1ab427a0 \
                    size    2910652

# Binaries do not link directly to openssl, nor use the ssl backend of kdelibs4,
# nor links to libkimap or libmailtransport from kdepimlibs4
license_noconflict  openssl

depends_lib-append  port:exiv2 \
                    port:kactivities \
                    port:kde4-baseapps \
                    port:kdelibs4 \
                    port:lcms2 \
                    path:include/turbojpeg.h:libjpeg-turbo \
                    port:libkdcraw \
                    port:libkipi \
                    port:libpng

patchfiles          patch-fileutils.diff

# /opt/local/include/exiv2/slice.hpp: error: exception handling disabled, use -fexceptions to enable
patchfiles-append   patch-fexceptions.diff

patchfiles-append   patch-exiv2.diff

compiler.cxx_standard \
                    2011

# kde4-baseapps is not universal
universal_variant   no

if {![variant_isset docs]} {
    patchfiles-append   patch-CMakeLists.txt.diff
}

configure.args-append   -DGWENVIEW_SEMANTICINFO_BACKEND=None

variant baloo description "Enable semantic info backend" {
    depends_lib-append      port:baloo
    configure.args-delete   -DGWENVIEW_SEMANTICINFO_BACKEND=None
    #Default is baloo, but set for completeness
    configure.args-append   -DGWENVIEW_SEMANTICINFO_BACKEND=BALOO
}

livecheck.url       ${kde4.mirror}
livecheck.regex     (\\d+(\\.\\d+)+)
