# -*- 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                arabica
version             Oct2007
categories          devel textproc
maintainers         hypergene.com:isak
description         Arabica, an XML toolkit written in C++
long_description    Arabica has a full SAX2 implementation. Layered on SAX is a DOM Level 2.0 implementation, \
        together with an XPath engine and partial XSLT implementation. It delivers UTF-8 encoded std::strings \
        or UCS-2 std::wstrings, but can also accommodate custom string types and alternative encodings. It \
        provides uniform SAX2 wrappers for the Expat parser, Xerces, Libxml2 and (on Windows) for the \
        Microsoft XML parser COM component.
homepage            http://www.jezuk.co.uk/arabica
platforms           darwin
master_sites        sourceforge

checksums           md5 026ac9690fca1843e35d382ce3df1077 \
                    sha1 9d6eb1e0532af58c2f15beaff531817b7f062f29 \
                    rmd160 da311611120d8b60670ea7f38171f4ac96a2368f

depends_lib         port:libxml2 \
                    port:boost

configure.args      --with-parser=libxml2 \
                    --with-libxml2=${prefix} \
                    --with-boost=${prefix}

patchfiles          patch-Makefile.in.diff

variant noboost {
    configure.args.delete   --with-boost=${prefix}
    configure.args.append   --with-boost=no
    depends_lib.delete      port:boost
}

variant expat {
    configure.args.delete   --with-parser=libxml2
    configure.args.delete   --with-libxml2=${prefix}
    configure.args.append   --with-parser=expat
    configure.args.append   --with-expat=${prefix}
    depends_lib.delete      port:libxml2
    depends_lib.append      port:expat
}