# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           gobject_introspection 1.0

name                rygel
version             0.36.2
revision            3
license             GPL-2+
set branch          [join [lrange [split ${version} .] 0 1] .]
description         Rygel DLNA media server, renderer
long_description    Rygel is a home media solution that allows you to easily share audio, \
                    video and pictures, and control media players on your home network.
maintainers         {devans @dbevans} openmaintainer
categories          net multimedia
homepage            https://wiki.gnome.org/Projects/Rygel
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  bddc89f0cce08da3f7b2062502d8d7f9f6ae1fd0 \
                    sha256  d332c76c76716de1e5085f0ca0c152174352efd652a80e5b94ec7df797f92244 \
                    size    4057356

depends_build       port:pkgconfig \
                    port:gsed \
                    path:bin/vala:vala

depends_lib         port:desktop-file-utils \
                    path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    port:gssdp \
                    port:gupnp \
                    port:gupnp-av \
                    port:gupnp-dlna \
                    port:gstreamer1-gst-plugins-base \
                    port:libgee \
                    port:libmediaart \
                    port:libunistring

depends_run         port:adwaita-icon-theme

gobject_introspection yes

# blacklist compilers that do not support C11
# due to error: redefinition of typedef 'GUPnPService'
# build fix for SL and earlier

compiler.blacklist  *gcc-3.* *gcc-4.* {clang < 300}

configure.env-append \
                    SED=${prefix}/bin/gsed

configure.args      --disable-silent-rules \
                    --enable-gst-launch-plugin=yes \
                    --enable-example-plugins=yes \
                    --enable-vala=yes \
                    --enable-tracker-plugin=no

post-activate {
    system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}

livecheck.type      gnome
