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

PortSystem                      1.0

name                            pure-odbc
version                         0.4
categories                      databases
platforms                       darwin
maintainers                     ryandesign
use_parallel_build              yes
homepage                        http://pure-lang.googlecode.com/
master_sites                    ${homepage}files/

description                     a simple ODBC interface for the Pure \
                                programming language

long_description                ${name} provides ${description} which lets \
                                you access a large variety of open source \
                                and commercial database systems from Pure

checksums                       md5     6c1baddf9f6008220b4be5524348046a \
                                sha1    bc4097eab3ec227c8500429ed3312fb17badacd7 \
                                rmd160  865006f880ef3f698244059f9758b89fcbc4c9b3

depends_lib-append              path:lib/libpure.dylib:pure \
                                path:lib/libgmp.dylib:gmp \
                                path:lib/libodbc.dylib:unixODBC

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
