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

PortSystem              1.0

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

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.

master_sites            http://distfiles.atheme.org/
use_bzip2               yes
extract.suffix          .tbz2

checksums               rmd160  049dc27eccf6bbd423f08234399b200c9e942f4d \
                        sha256  e4b0ce2c0f1d15a780418e53ea2b7a8d0e924219c6798c6ca4ad4ff1727fd5ce

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 conflicts universal description {Build with kconfig support} {
#    depends_lib-append     port:kdelibs4
#    configure.args-delete  --disable-kconfig
#    configure.args-append  --enable-kconfig
#}