# -*- 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 90579 2012-03-09 08:47:02Z ryandesign@macports.org $

PortSystem                      1.0
PortGroup                       pure 1.0

pure.setup                      ffi 0.13
categories                      devel
platforms                       darwin
maintainers                     ryandesign
license                         LGPL-3

description                     an interface to libffi which enables you to \
                                call C functions from Pure and vice versa

long_description                ${name} provides ${description}. It goes \
                                beyond Pure's built-in C interface in that \
                                it also handles C structs and makes Pure \
                                functions callable from C. Moreover, \
                                depending on the libffi implementation, it \
                                may also be possible to call foreign \
                                languages other than C.

checksums                       rmd160  eb4f28bcca830bd32cfc25d369ed0ebca01d1650 \
                                sha256  1c605ee261a6a8fe60684e764ba1f12dfd2e1e09290190411314b35a71a69636

depends_build-append            port:pkgconfig

depends_lib-append              port:libffi

platform darwin {
    configure.cflags-append     -fno-common
}

pre-configure {
    eval configure.cppflags-append [exec ${prefix}/bin/pkg-config libffi --cflags]
}
