# -*- 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 83385 2011-08-31 01:52:26Z dports@macports.org $

PortSystem              1.0
PortGroup               muniversal 1.0

name                    libmcs
version                 0.7.1
revision                1
categories              devel
maintainers             nodetwo.com:jdunn
license                 GPL-3
homepage                http://www.atheme.org/
platforms               darwin linux
use_parallel_build      yes
master_sites            http://www.nodetwo.com/macports/libmcs/

description \
    A library and set of tools which abstract the storage of configuration \
    settings away from userland applications.

long_description \
    The libmcs package is a library and set of tools which abstract the \
    storage of configuration settings away from userland applications. \
    There are similar projects like this (such as GConf), but unlike those \
    projects, libmcs strictly handles abstraction. \
    It does not impose any specific data storage requirement, nor is it tied \
    to any desktop environment or software suite.

checksums \
    md5     bff6a7e6f39c8fbcb63f1c659ea8c2c6 \
    sha1    683f0c62aa8374f5ec1bf32e5b778a82e638ae21 \
    rmd160  6c8e2f5afc3c4dd1c951f73131cd5d3c6751c8a0

patchfiles \
    patch-m4-buildsys.m4.diff

post-patch {
    # Remove terminal color sequences so the log is readable.
    reinplace {s|\\033[^m]*m||g} ${worksrcpath}/buildsys.mk.in
}

use_autoconf            yes

# These are just temporary since i dont want to install all the dependencies.
configure.args \
    --disable-gconf \
    --disable-kconfig

configure.universal_args-delete \
    --disable-dependency-tracking

depends_build-append \
    port:pkgconfig
depends_lib \
    port:libmowgli

variant gconf description {Build with gconf support} {
    depends_lib-append     port:gconf
    configure.args-delete  --disable-gconf
    configure.args-append  --enable-gconf
}

#variant kconfig description {Build with kconfig support} {
#    depends_lib-append     port:kconfig
#    configure.args-delete  --disable-kconfig
#    configure.args-append  --enable-kconfig
#}
