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

github.setup        AyatanaIndicators libayatana-indicator 0.9.4
revision            0
categories          devel gnome
license             GPL-3
maintainers         {@barracuda156 gmail.com:vital.had} openmaintainer
description         Ayatana Indicators Shared Library
long_description    {*}${description}
checksums           rmd160  b3af71a534cb32d133d65bf4ebb9a24f14ae5162 \
                    sha256  a18d3c682e29afd77db24366f8475b26bda22b0e16ff569a2ec71cd6eb4eac95 \
                    size    150030
github.tarball_from archive

# https://github.com/AyatanaIndicators/libayatana-indicator/pull/76
patchfiles          0001-Fix-build-on-macOS.patch

# Fix build with glib2 +quartz
# https://github.com/AyatanaIndicators/libayatana-indicator/pull/77
patchfiles-append   0001-Remove-unnecessary-gio-gdesktopappinfo.h-include.patch

depends_build-append \
                    path:bin/pkg-config:pkgconfig \
                    path:bin/vala:vala

depends_lib-append  port:atk \
                    port:ayatana-ido \
                    path:lib/pkgconfig/cairo.pc:cairo \
                    path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/gobject-introspection-1.0.pc:gobject-introspection \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    path:lib/pkgconfig/harfbuzz.pc:harfbuzz \
                    path:lib/pkgconfig/pango.pc:pango

compiler.c_standard 1999

configure.args-append \
                    -DENABLE_COVERAGE=OFF \
                    -DENABLE_IDO=ON \
                    -DENABLE_LOADER=ON \
                    -DENABLE_TESTS=OFF \
                    -DENABLE_WERROR=OFF \
                    -DFLAVOUR_GTK3=ON

# ndicator-ng.c: error: ‘for’ loop initial declaration used outside C99 mode
configure.cflags-append \
                    -std=c99
