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

github.setup        lwindolf liferea 1.12.9 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1
# Note: do not remove the epoch line.
epoch               20090731
description         A feed aggregator for GTK+/GNOME.
long_description    Liferea is an aggregator for online news feeds. \
                    It supports the RSS/RDF, CDF, Atom, OCS and OPML \
                    formats and enclosures (podcasting). It also has \
                    filtering mechanisms.
maintainers         {devans @dbevans} openmaintainer
categories          gnome net
license             GPL-2+
homepage            http://lzone.de/${name}/

checksums           rmd160  c6b0e8c8d15b7f2200d2900b4a998f4124fb2686 \
                    sha256  dee452a3e173ec7932c7df67afd358624e2460ca4b240fe2a930193646aa6b0d \
                    size    1531405

depends_build       port:pkgconfig \
                    port:intltool \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:desktop-file-utils \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    port:libxml2 \
                    port:libxslt \
                    port:sqlite3 \
                    port:libsoup-2.4 \
                    port:json-glib \
                    port:gsettings-desktop-schemas \
                    port:libpeas1 \
                    path:lib/pkgconfig/webkit2-gtk-4.0.pc:webkit2-gtk

depends_run         port:adwaita-icon-theme

patchfiles          patch-autogen.sh.diff

gobject_introspection yes

# blacklist compilers that do not support C11 (redefinition of typedef ‘WebKitWebEditor’ at WebKitWebEditor.h)
compiler.blacklist  *gcc-3.* *gcc-4.* {clang < 300}

configure.cmd       ./autogen.sh

configure.args      --disable-schemas-compile \
                    --disable-silent-rules

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
    system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
}

# restrict livecheck to stable release versions only
github.livecheck.regex  {(\d+\.\d*[02468](?:\.\d+)*)}
