source: trunk/dports/python/py-ffc/Portfile

Last change on this file was 150518, checked in by sean@…, 14 months ago

py-ffc: update to 2016.1.0

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1# -*- 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
2# $Id: Portfile 150518 2016-07-20 20:38:31Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           bitbucket 1.0
7
8bitbucket.setup     fenics-project ffc 2016.1.0 ffc-
9name                py-ffc
10
11categories-append   math science
12license             LGPL-3+
13platforms           darwin
14supported_archs     noarch
15maintainers         sean openmaintainer
16
17description         FEniCS Form Compiler
18long_description    FFC works as a compiler for multilinear forms by generating \
19                    code (C or C++) for the evaluation of a multilinear form given \
20                    in mathematical notation. This new approach to form evaluation \
21                    makes it possible to combine generality with efficiency, the \
22                    form can be given in mathematical notation and the generated \
23                    code is as efficient as hand-optimized code.
24
25checksums           rmd160  187cff1cbc258686d8509edf5c152296dca7bbc5 \
26                    sha256  f1023bd18b41fa6184770bdf379b205c6357ef23b18c7a3e50773fd706abbd62
27
28python.versions     27
29python.link_binaries_suffix
30
31configure.cxxflags-append -std=c++11
32
33if {${subport} ne ${name}} {
34   depends_lib      port:py${python.version}-fiat \
35                    port:py${python.version}-ufl \
36                    port:py${python.version}-instant \
37                    port:swig-python \
38                    port:boost
39
40    pre-build {
41        build.env-append CXXFLAGS="${configure.cxxflags}"
42    }
43
44    pre-destroot {
45        destroot.env-append CXXFLAGS="${configure.cxxflags}"
46    }
47
48    post-fetch {
49        if {![file exists ${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages/boost/mpi.so]} {
50            return -code error "${name} needs boost installed with a mpi variant "
51        }
52    }
53
54    post-destroot {
55        move {*}[glob ${destroot}${destroot}/include/*.h] ${destroot}${prefix}/include
56        move {*}[glob ${destroot}${destroot}/lib/pkgconfig/*.pc] ${destroot}${prefix}/lib/pkgconfig
57        move ${destroot}${destroot}/share/ufc/ ${destroot}${prefix}/share/ufc
58        reinplace -W ${destroot}${prefix}/lib/pkgconfig "s,${destroot},${prefix},g" ufc-1.pc
59        reinplace -W ${destroot}${prefix}/share/ufc "s,${destroot},${prefix},g" UFCConfig.cmake
60        reinplace -W ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc "s,${destroot},${prefix},g" ufc_include.py
61        delete ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc/ufc_include.pyc
62        system -W ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages/ffc "${prefix}/bin/python2.7 -m compileall ufc_include.py"
63    }
64
65    livecheck.type  none
66}
Note: See TracBrowser for help on using the repository browser.