# -*- 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 91519 2012-04-04 00:24:46Z ryandesign@macports.org $

PortSystem          1.0

name                expat
version             2.1.0
categories          textproc devel
platforms           darwin freebsd
maintainers         ryandesign
license             MIT

description         XML 1.0 parser written in C

long_description    Expat is an XML parser library written in C. It is a \
                    stream-oriented parser in which an application \
                    registers handlers for things the parser might find \
                    in the XML document (like start tags).
                    
homepage            http://www.libexpat.org/
master_sites        sourceforge:project/${name}/${name}/${version}

checksums           rmd160  bffca083d29fe7688f106a902ef9b909c3321c5d \
                    sha256  823705472f816df21c8f6aa026dd162b280806838bb55b3432b0fb1fcca7eb86

use_parallel_build  yes

test.run            yes
test.target         check

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    set examplesdir ${destroot}${prefix}/share/examples/${name}
    xinstall -m 0755 -d ${examplesdir} ${docdir}/html
    
    xinstall -m 0644 -W ${worksrcpath} COPYING Changes README ${docdir}
    eval xinstall -m 0644 [glob ${worksrcpath}/doc/*] ${docdir}/html
    
    xinstall -m 0644 -W ${worksrcpath}/examples elements.c outline.c \
        ${examplesdir}
}

livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
