# -*- 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
# $Id: Portfile 120280 2014-05-21 18:59:46Z devans@macports.org $

PortSystem          1.0

name                accountsservice
version             0.6.37
description         AccountsService provides a set of D-Bus interfaces for querying \
                    and manipulating user account information.

long_description    ${description}
maintainers         devans openmaintainer
categories          gnome security
platforms           darwin
license             GPL-3+
homepage            http://www.freedesktop.org/wiki/Software/AccountsService
master_sites        http://www.freedesktop.org/software/accountsservice/

use_xz              yes

checksums           rmd160  5df09a7b84b1a88f04b88c66f705d424593c5e15 \
                    sha256  b0b21136dc9d74a7135fd5ed7fa1a8069efb91bc6ecc1ef8911125433345a5c1

depends_build       port:pkgconfig \
                    port:intltool \
                    port:xmlto \
                    port:libxslt \
                    port:gtk-doc

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:policykit \
                    port:gobject-introspection

patchfiles          patch-src-daemon.c.diff \
                    patch-src-libaccountsservice-Makefile.am.diff \
                    patch-src-wtmp-helper.c.diff

post-patch {
    reinplace "s|@@MP_PREFIX@@|${prefix}|" ${worksrcpath}/src/daemon.c
}

# autoreconf with our intltool.m4

use_autoreconf      yes
autoreconf.args     -fvi

configure.args      --enable-introspection=yes \
                    --disable-systemd \
                    --disable-silent-rules

# gobject-introspection uses g-ir-scanner, which uses $CC from env
build.args-append   CC="${configure.cc} ${configure.cc_archflags}"

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
