# -*- 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 119604 2014-05-02 09:12:57Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           cmake 1.0
PortGroup           bitbucket 1.0

bitbucket.setup     fenics-project ufc 2.3.0 ufc-
revision            2
categories          math science python
platforms           darwin
maintainers         sean openmaintainer
description         Unified Form-assembly Code
long_description    UFC (Unified Form-assembly Code) is a unified framework \
                    for finite element assembly. More precisely, it defines a \
                    fixed interface for communicating low level routines \
                    (functions) for evaluating and assembling finite element \
                    variational forms. The UFC interface consists of a single \
                    header file ufc.h that specifies a C++ interface that must \
                    be implemented by code that complies with the UFC specification.

checksums           rmd160  f2357707a5b4eec2f50abbc957234d972603ab97 \
                    sha256  75565ec0268d7f4c916ced7fe1ca2cc98e62c0c724efb94083580275098f0dd0

depends_lib         port:python27 \
                    port:swig-python \
                    port:boost

configure.args-append \
                    -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python2.7 \
                    -DPYTHON_INCLUDE_DIR:PATH=${frameworks_dir}/Python.framework/Headers \
                    -DPYTHON_LIBRARY:FILEPATH=${prefix}/lib/libpython2.7.dylib

post-destroot {
    xinstall -d ${destroot}${frameworks_dir}/Python.framework/Versions/2.7
    move ${destroot}${prefix}/lib ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib
    xinstall -d ${destroot}${prefix}/lib
    move ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/pkgconfig ${destroot}${prefix}/lib/pkgconfig
}
