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 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | |
---|
7 | name cantera |
---|
8 | version 2.1.1 |
---|
9 | |
---|
10 | categories science |
---|
11 | platforms darwin |
---|
12 | maintainers nomaintainer, openmaintainer |
---|
13 | license BSD |
---|
14 | |
---|
15 | description Cantera software package |
---|
16 | long_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 | |
---|
21 | homepage https://cantera.github.io/docs/sphinx/html/index.html |
---|
22 | |
---|
23 | master_sites sourceforge:project/cantera/cantera/${version} |
---|
24 | distname ${name}-${version} |
---|
25 | checksums sha1 439dfc583ad225e06bcc5f00ce0173720ac8942a \ |
---|
26 | md5 06eb65039818aabfdb49830a65751b95 |
---|
27 | |
---|
28 | variant devel description {Use the latest development version} { |
---|
29 | fetch.type git |
---|
30 | git.url https://github.com/Cantera/${name}.git |
---|
31 | git.branch 2.1-svn |
---|
32 | } |
---|
33 | |
---|
34 | depends_lib port:py${python.version}-numpy \ |
---|
35 | port:py${python.version}-cython |
---|
36 | |
---|
37 | depends_build port:scons |
---|
38 | |
---|
39 | python.versions 26 27 |
---|
40 | |
---|
41 | use_configure no |
---|
42 | |
---|
43 | build.cmd ${prefix}/bin/scons install |
---|
44 | build.target |
---|
45 | build.args prefix=${prefix} \ |
---|
46 | CC=${configure.cc} \ |
---|
47 | CXX=${configure.cxx} \ |
---|
48 | f90_interface=n \ |
---|
49 | python_prefix=${python.prefix} \ |
---|
50 | stage_dir=$destroot |
---|
51 | |
---|
52 | pre-destroot {} |
---|
53 | destroot { |
---|
54 | system "mv $destroot$prefix/man/man1/* $destroot$prefix/share/man/man1/" |
---|
55 | system "cd $destroot$prefix/share/man/man1 && gzip *" |
---|
56 | } |
---|
57 | |
---|
58 | post-install { |
---|
59 | notes-append " |
---|
60 | |
---|
61 | Cantera C++ demos are installed in: |
---|
62 | $prefix/share/cantera/samples |
---|
63 | Cantera python demos are installed in: |
---|
64 | ${python.pkgd}/cantera/examples |
---|
65 | Cantera data files are installed in: |
---|
66 | $prefix/share/cantera/data |
---|
67 | |
---|
68 | Try the following in python to find the equilibrium composition |
---|
69 | of a stoichiometric methane/air mixture at 1000 K and 1 atm: |
---|
70 | >>> import cantera as ct |
---|
71 | >>> g = ct.Solution('gri30.xml') |
---|
72 | >>> g.TPX = 1000, ct.one_atm, 'CH4:1, O2:2, N2:8' |
---|
73 | >>> g.equilibrate('TP') |
---|
74 | >>> g() |
---|
75 | |
---|
76 | Don't forget to set the appropriate python interpreter using |
---|
77 | sudo port select python |
---|
78 | |
---|
79 | " |
---|
80 | } |
---|
81 | |
---|
82 | variant sundials description {Build with sundials support (default)} { |
---|
83 | depends_lib-append port:sundials |
---|
84 | |
---|
85 | build.args-append use_sundials=y \ |
---|
86 | sundials_include=$prefix/include \ |
---|
87 | sundials_libdir=$prefix/lib |
---|
88 | } |
---|
89 | |
---|
90 | variant old_python conflicts devel description { Install legacy Python interface} { |
---|
91 | build.args-append python_package='full' |
---|
92 | } |
---|
93 | |
---|
94 | # # possibly a variant for python3, but it would be a mess and prone to break |
---|
95 | # variant python34 { |
---|
96 | # depends_lib-append port:python34 \ |
---|
97 | # port:py34-numpy \ |
---|
98 | # port:py34-cython |
---|
99 | # |
---|
100 | # build.args-append python3_package=y \ |
---|
101 | # python3_prefix=${prefix}/Library/Frameworks/Python.framework/Versions/3.4 \ |
---|
102 | # python3_cmd=$prefix/bin/python3.4 |
---|
103 | # } |
---|
104 | |
---|
105 | default_variants +sundials |
---|