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