# $Id: Portfile 55901 2009-08-20 23:31:24Z ryandesign@macports.org $

PortSystem                      1.0

name                            pure-csv
version                         0.6
revision                        1
categories                      devel
platforms                       darwin
maintainers                     ryandesign
use_parallel_build              yes
homepage                        http://pure-lang.googlecode.com/
master_sites                    ${homepage}files/

description                     an interface to read and write comma \
                                separated value files in Pure

long_description                ${name} provides ${description}. The reading \
                                and writing functions are loosely based on \
                                Python's CSV module

checksums                       md5     cf45f4b5f517b6e79798db0993f23422 \
                                sha1    c32e20beee17aa1036ce94b80da3b160d1cfcc57 \
                                rmd160  38287e5a1dd312b6d69de33e2a27ff9c8819443d

depends_lib-append              path:lib/libpure.dylib:pure

use_configure                   no

pre-build {
    build.args-append           CC=${configure.cc} \
                                CFLAGS="${configure.cflags}" \
                                CPPFLAGS="${configure.cppflags}" \
                                LDFLAGS="${configure.ldflags}"
}

post-destroot {
    xinstall -d \
        ${destroot}${prefix}/share/doc/${name} \
        ${destroot}${prefix}/share/examples
    xinstall -m 644 -W ${worksrcpath} \
        COPYING \
        README \
        ${destroot}${prefix}/share/doc/${name}
    copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/${name}
}

livecheck.check                 regex
livecheck.url                   http://code.google.com/p/pure-lang/downloads/list
livecheck.regex                 ${name}-(\[0-9.\]+)\\.tar
