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

PortSystem                      1.0

name                            pure-gsl
version                         0.6
categories                      math science
platforms                       darwin
maintainers                     ryandesign
use_parallel_build              yes
homepage                        http://pure-lang.googlecode.com/
master_sites                    ${homepage}files/

description                     a wrapper to call GNU Scientific Library \
                                functions from Pure

long_description                ${name} aims to provide a complete wrapper \
                                for the GNU Scientific Library which provides \
                                a wide range of mathematical routines useful \
                                for scientific programming, number crunching \
                                and signal processing applications.

checksums                       md5     83aa329b41e86ead39b125c5b73c70d8 \
                                sha1    81a521b300ec83154f440d78fd14d3c0e6f8fe85 \
                                rmd160  da1181fca5445116025e1327beeed6f69fa37ca6

depends_lib-append              path:lib/libpure.dylib:pure \
                                port:gsl

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
