Revision: 115467 https://trac.macports.org/changeset/115467 Author: sean@macports.org Date: 2014-01-02 14:24:41 -0800 (Thu, 02 Jan 2014) Log Message: ----------- ufc: add new port for finite element assembly Added Paths: ----------- trunk/dports/math/ufc/ trunk/dports/math/ufc/Portfile Added: trunk/dports/math/ufc/Portfile =================================================================== --- trunk/dports/math/ufc/Portfile (rev 0) +++ trunk/dports/math/ufc/Portfile 2014-01-02 22:24:41 UTC (rev 115467) @@ -0,0 +1,67 @@ +# -*- 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$ + +PortSystem 1.0 +PortGroup cmake 1.0 +PortGroup bitbucket 1.0 + +bitbucket.setup fenics-project ufc ef9f4f7d08d7 +version 2.2.0 +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 b2a6a60eafef58cf0db95031169296d295c7ef7a \ + sha256 b04928148c01d7f76a76c63c68659b12732db932342ef4e8e3edc253119646ed + +depends_lib port:swig-python port:boost + +set pythons_suffixes {25 26 27 31 32} + +set pythons_ports {} +foreach s ${pythons_suffixes} { + lappend pythons_ports python${s} +} + +proc python_dir {} { + global pythons_suffixes + foreach s ${pythons_suffixes} { + if {[variant_isset python${s}]} { + set p python[string index ${s} 0].[string index ${s} 1] + return [file normalize [exec ${p} -c "import sys; print(sys.prefix)"]/lib/${p}/site-packages] + } + } + error "Python support not enabled." +} + +foreach s ${pythons_suffixes} { + set p python${s} + set v [string index ${s} 0].[string index ${s} 1] + set i [lsearch -exact ${pythons_ports} ${p}] + set c [lreplace ${pythons_ports} ${i} ${i}] + eval [subst { + variant ${p} description "Build UFC for Python ${v}" conflicts ${c} { + + post-destroot { + xinstall -d ${destroot}${frameworks_dir}/Python.framework/Versions/${v} + move ${destroot}${prefix}/lib ${destroot}${frameworks_dir}/Python.framework/Versions/${v}/lib + xinstall -d ${destroot}${prefix}/lib + move ${destroot}${frameworks_dir}/Python.framework/Versions/${v}/lib/pkgconfig ${destroot}${prefix}/lib/pkgconfig + } + + } + }] +} + +default_variants +python27 + +# project doesn't use tag or branches for releases +livecheck.type none
participants (1)
-
sean@macports.org