# -*- 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
# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem      1.0

name            liboobs
version         2.22.2
set branch      [join [lrange [split ${version} .] 0 1] .]
maintainers     nomaintainer
categories      gnome
platforms       darwin
description     Library that provides an interface to system-tools-backends

long_description \
    Liboobs is a lightweight library that provides a GObject based \
    interface to system-tools-backends. It's completely abstracted of \
    the communication and authentication details, making it easy for \
    applications to integrate with the system details.

homepage        http://www.gnome.org/
master_sites    gnome:sources/${name}/${branch}/

use_bzip2       yes

checksums       md5     84d20702942635e3bebc0c1c35bdad43 \
                sha1    39a54fc11a7384e2d241518a4cdd61798472d77f \
                rmd160  900aa933c9f8da262de77dc30e6f116679cad07f

patchfiles      patch-oobs-oobs-ifacesconfig.c.diff \
                patch-oobs-oobs-user.c.diff

post-patch {
    # Crypt functions are in the System library.
    reinplace "s/-lcrypt/-lSystem/" ${worksrcpath}/configure

    # Crypt functions are declared in unistd.h system header.
    reinplace "s/<crypt.h>/<unistd.h>/" ${worksrcpath}/oobs/oobs-group.c
}

depends_build   port:pkgconfig \
                port:gtk-doc

depends_lib     port:dbus-glib \
                port:system-tools-backends

livecheck.type  regex
livecheck.url   http://ftp.gnome.org/pub/gnome/sources/${name}/${branch}/
livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}
