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