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

name                libepc
version             0.4.6
license             LGPL-2.1+
set branch          [join [lrange [split ${version} .] 0 1] .]
maintainers         {devans @dbevans} openmaintainer
categories          gnome
platforms           darwin
description         The Easy Publish and Consume Library

long_description    The Easy Publish and Consume library provides an easy method to \
                    publish data per HTTPS, announce that information via DNS-SD, \
                    find that information, and finally consume it.  You can use this \
                    library as a key/value store published to the network, using \
                    encryption, authentication and service discovery.

homepage            https://wiki.gnome.org/Projects/libepc
master_sites        gnome:sources/${name}/${branch}/
use_xz              yes

checksums           rmd160  b96222557cef72bc64f76875ebdc87f10bac6044 \
                    sha256  215990847a8526c85774cb74fbcaea4c46866df58281b21dce5a62aac5da7ae8

depends_build       port:pkgconfig \
                    port:intltool \
                    port:gtk-doc \
                    port:gnome-common \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
                    port:avahi \
                    path:lib/pkgconfig/gnutls.pc:gnutls \
                    path:lib/pkgconfig/libsoup-2.4.pc:libsoup \
                    port:ossp-uuid

patchfiles          patch-configure.ac.diff \
                    patch-Makefile.am.diff

# use upstream autogen.sh to reconfigure with our intltool.m4
                    
post-patch {
    xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
}

configure.cmd       ./autogen.sh

livecheck.type      gnome

# https://download.gnome.org/sources/libepc/cache.json
# LATEST-IS entry is not up to date.
livecheck.regex     "${name}-(\\d+\\.\\d*\[02468\](?:\\.\\d+)*)"
