Commits
Duncan Macleod authored and Adam Mercer committed 994f715a5db
1 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 2 | |
3 3 | PortSystem 1.0 |
4 4 | |
5 5 | name lalinference |
6 6 | version 1.10.0 |
7 + | revision 1 |
7 8 | |
8 9 | description LSC Algorithm Library - Inference |
9 10 | long_description \ |
10 11 | LIGO Scientific Collaboration Algorithm Library - Inference containing \ |
11 12 | routines for Bayesian inference data analysis. |
12 13 | |
13 14 | checksums rmd160 057f5516a1726efb9e5832dc959c14d9cd654ab7 \ |
14 15 | sha256 e44af2856d9570aeb795be3a663a7dd7bc6e65fa07f46846da4b0fd2c0537fa5 \ |
15 16 | size 1101608 |
16 17 | |
26 27 | port:lalburst \ |
27 28 | port:lalinspiral \ |
28 29 | port:lalpulsar \ |
29 30 | port:healpix-c \ |
30 31 | port:ligo-gracedb |
31 32 | |
32 33 | # add Python dependencies for python subports |
33 34 | if {[string match "py*" ${subport}]} { |
34 35 | set numbers [regexp -all -inline -- {[0-9]+} ${subport}] |
35 36 | set v [lindex ${numbers} 0] |
36 - | depends_lib-append port:py${v}-astropy |
37 - | depends_lib-append port:py${v}-healpy |
38 - | depends_lib-append port:py${v}-shapely |
39 - | # ideally we need to depend on this, but this brings in py27-tables |
40 - | # which is not compatible with port:hdf, which is a required |
41 - | # upstream dependency |
42 - | #depends_lib-append port:py${v}-seaborn |
43 - | # bump revision for python subports only |
44 - | #revision 1 |
37 + | # python, C-library port, and numpy are automatically added below |
38 + | depends_lib port:py${v}-lal port:py${v}-lalmetaio port:py${v}-lalsimulation \ |
39 + | port:py${v}-lalburst port:py${v}-lalinspiral port:py${v}-lalpulsar \ |
40 + | port:py${v}-scipy port:py${v}-lscsoft-glue port:py${v}-healpy \ |
41 + | port:py${v}-astropy port:py${v}-matplotlib port:py${v}-h5py \ |
42 + | port:py${v}-shapely |
43 + | revision 1 |
44 + | } |
45 + | |
46 + | # add Octave dependencies for octave subports |
47 + | if {[string match "octave-*" ${subport}]} { |
48 + | # octave, and C-library port are automatically added below |
49 + | depends_lib port:octave-lal port:octave-lalmetaio port:octave-lalsimulation \ |
50 + | port:octave-lalburst port:lalinspiral port:lalpulsar |
51 + | revision 1 |
45 52 | } |
46 53 | |
47 54 | configure.args --enable-openmp \ |
48 55 | --disable-help2man |
49 56 | |
50 57 | pre-activate { |
51 58 | # lalinference now contains files that used to be provided by lalapps |
52 59 | if {![catch {set installed [lindex [registry_active lalapps] 0]}]} { |
53 60 | set _version [lindex $installed 1] |
54 61 | if {[vercmp $_version 6.20.0] < 0} { |
75 82 | # our scripts. |
76 83 | license_noconflict openssl |
77 84 | |
78 85 | homepage https://wiki.ligo.org/Computing/DASWG/LALSuite |
79 86 | master_sites http://software.ligo.org/lscsoft/source/lalsuite |
80 87 | use_xz yes |
81 88 | |
82 89 | depends_build-append \ |
83 90 | port:pkgconfig \ |
84 91 | port:swig \ |
85 - | port:python27 |
86 92 | |
87 93 | # Choose a compiler that supports OpenMP. |
88 94 | compiler.whitelist macports-clang-6.0 macports-clang-5.0 macports-clang-4.0 macports-clang-7.0 macports-clang-3.9 |
89 95 | compiler.fallback macports-clang-6.0 |
90 96 | |
91 - | set default_pythonarg PYTHON=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7 |
92 97 | configure.args-append \ |
93 98 | --mandir=${prefix}/share/man \ |
94 99 | --disable-silent-rules \ |
95 100 | --disable-gcc-flags \ |
96 101 | --enable-swig-iface \ |
97 - | --disable-python \ |
98 - | ${default_pythonarg} |
102 + | --disable-swig-octave \ |
103 + | --disable-swig-python \ |
104 + | --disable-python |
99 105 | |
100 106 | test.run yes |
101 107 | test.target check |
102 108 | |
103 109 | # Create subports for each supported Python version |
104 110 | foreach v {27 35 36 37} { |
105 111 | subport py${v}-${name} { |
106 112 | set pythonversion [string range ${v} 0 end-1].[string index ${v} end] |
107 113 | set pythonhome \ |
108 114 | "${frameworks_dir}/Python.framework/Versions/${pythonversion}" |
109 115 | set pythondir "${pythonhome}/lib/python${pythonversion}/site-packages" |
110 116 | |
111 117 | categories-prepend python |
112 118 | description Python ${pythonversion} bindings for ${description} |
113 119 | long_description ${long_description} This package provides Python \ |
114 120 | ${pythonversion} bindings, modules, and scripts. |
115 121 | |
122 + | |
116 123 | depends_build-append port:swig-python |
117 - | depends_build-replace port:python27 port:python${v} |
118 - | depends_lib-strsed g/port:lal/port:py${v}-lal/ |
119 - | depends_lib-append port:${name} port:py${v}-numpy port:py${v}-scipy port:py${v}-lscsoft-glue port:py${v}-healpy port:py${v}-astropy port:py${v}-matplotlib port:py${v}-h5py port:py${v}-shapely |
124 + | depends_lib-prepend port:python${v} port:${name} port:py${v}-numpy |
120 125 | |
121 - | configure.args-replace ${default_pythonarg} PYTHON=${pythonhome}/bin/python${pythonversion} |
122 - | configure.args-replace --disable-python --enable-python |
123 - | configure.args-append --enable-swig-python |
126 + | configure.args-append PYTHON=${pythonhome}/bin/python${pythonversion} |
127 + | configure.args-replace --disable-python --enable-python |
128 + | configure.args-replace --disable-swig-python --enable-swig-python |
124 129 | |
125 130 | destroot.args-append pythondir="${pythondir}" \ |
126 131 | pyexecdir="${pythondir}" \ |
127 132 | pkgpythondir="${pythondir}/${name}" \ |
128 133 | pkgpyexecdir="${pythondir}/${name}" \ |
129 134 | prefix="${pythonhome}" |
130 135 | |
131 136 | # Only install SWIG bindings, Python libraries, and Python scripts |
132 137 | destroot { |
133 138 | command_exec destroot "" "-C swig" |
154 159 | set pythonhome \ |
155 160 | "${frameworks_dir}/Python.framework/Versions/${pythonversion}" |
156 161 | set pythondir "${pythonhome}/lib/python${pythonversion}/site-packages" |
157 162 | |
158 163 | categories-prepend octave |
159 164 | description Octave ${pythonversion} bindings for ${description} |
160 165 | long_description ${long_description} This package provides Octave \ |
161 166 | bindings, modules, and scripts. |
162 167 | |
163 168 | depends_build-append port:swig-octave |
164 - | depends_lib-strsed g/port:lal/port:octave-lal/ |
165 - | depends_lib-append port:${name} port:octave |
169 + | depends_lib-prepend port:octave port:${name} |
166 170 | |
167 - | configure.args-append --enable-swig-octave |
171 + | configure.args-replace --disable-swig-octave --enable-swig-octave |
168 172 | |
169 173 | # Only install SWIG bindings, Python libraries, and Python scripts |
170 174 | destroot { |
171 175 | command_exec destroot "" "-C swig" |
172 176 | } |
173 177 | |
174 178 | post-destroot { |
175 179 | # Remove Octave include directory |
176 180 | # (duplicate of SWIG headers in ${prefix}/include) |
177 181 | file delete -force ${destroot}${prefix}/include |