Ticket #44719: Portfile.4

File Portfile.4, 2.7 KB (added by macports@…, 10 years ago)

implemented comments by mf2k and ryandesign

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$
3
4PortSystem              1.0
5PortGroup               python 1.0
6
7name                    cantera
8version                 2.1.1
9
10categories              science
11platforms               darwin
12maintainers             thomasfiala.de:macports openmaintainer
13license                 BSD
14
15description             Cantera software package
16long_description        Cantera is a suite of object-oriented software tools for \
17                        problems involving chemical kinetics, thermodynamics, \
18                        and/or transport processes. \
19                        Fortran support is disabled by install using MacPorts
20
21homepage                https://cantera.github.io/docs/sphinx/html/index.html
22
23master_sites            sourceforge:project/cantera/cantera/${version}
24distname                ${name}-${version}
25checksums               rmd160  0348e98ba856e8e184d0438469de137b94c04331 \
26                        sha256  d052baf268883c4b1ccef9d4406de5adb4974b5fd85f056f8bcd85fb3e946f1b
27
28depends_lib-append      port:py${python.version}-numpy \
29                        port:py${python.version}-cython
30
31depends_build-append    port:scons
32
33python.versions         27
34
35use_configure           no
36
37build.cmd               ${prefix}/bin/scons install
38build.target
39build.args              prefix=${prefix} \
40                        CC=${configure.cc} \
41                        CXX=${configure.cxx} \
42                        f90_interface=n \
43                        python_prefix=${python.prefix} \
44                        stage_dir=$destroot
45
46destroot {
47    eval move [glob $destroot$prefix/man/man1/*] $destroot$prefix/share/man/man1/
48}
49
50notes "
51Cantera C++ demos are installed in:
52$prefix/share/cantera/samples
53Cantera python demos are installed in:
54${python.pkgd}/cantera/examples
55Cantera data files are installed in:
56$prefix/share/cantera/data
57
58Try the following in python to find the equilibrium composition
59of a stoichiometric methane/air mixture at 1000 K and 1 atm:
60>>> import cantera as ct
61>>> g = ct.Solution('gri30.xml')
62>>> g.TPX = 1000, ct.one_atm, 'CH4:1, O2:2, N2:8'
63>>> g.equilibrate('TP')
64>>> g()
65
66Don't forget to set the appropriate python interpreter using
67sudo port select python
68"
69
70variant sundials description {Build with sundials support (default)} {
71    depends_lib-append  port:sundials
72
73    build.args-append   use_sundials=y \
74                        sundials_include=$prefix/include \
75                        sundials_libdir=$prefix/lib
76}
77
78variant old_python description {Install old Python interface} {
79    build.args-append   python_package='full'
80}
81
82default_variants    +sundials