Commits
Duncan Macleod authored and Adam Mercer committed 8247f3b97ad
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 lalburst |
6 6 | version 1.5.0 |
7 + | revision 1 |
7 8 | |
8 9 | description LSC Algorithm Library - Burst |
9 10 | long_description \ |
10 11 | LIGO Scientific Collaboration Algorithm Library - Burst, containing \ |
11 12 | routines for burst gravitational wave data analysis. |
12 13 | |
13 14 | checksums rmd160 498a8604b115e2212166522876ad6a39fe7d67ba \ |
14 15 | sha256 2918c61c8c767bfa1fc2d439e9b7ca15e0e7a186ec045a6b563f9dcb6c1a1ca2 \ |
15 16 | size 865204 |
16 17 | |
17 18 | depends_lib port:lal \ |
18 19 | port:lalmetaio \ |
19 20 | port:lalsimulation \ |
20 21 | port:gsl \ |
21 22 | port:metaio |
22 23 | |
24 + | # add Python dependencies for python subports |
25 + | if {[string match "py*" ${subport}]} { |
26 + | set numbers [regexp -all -inline -- {[0-9]+} ${subport}] |
27 + | set v [lindex ${numbers} 0] |
28 + | # python, C-library port, and numpy are automatically added below |
29 + | depends_lib port:py${v}-lal port:py${v}-lalmetaio port:py${v}-lalsimulation \ |
30 + | port:py${v}-scipy port:py${v}-lscsoft-glue |
31 + | revision 1 |
32 + | } |
33 + | |
34 + | # add Octave dependencies for octave subports |
35 + | if {[string match "octave-*" ${subport}]} { |
36 + | # octave, and C-library port are automatically added below |
37 + | depends_lib port:octave-lal port:octave-lalmetaio port:octave-lalsimulation |
38 + | revision 1 |
39 + | } |
40 + | |
23 41 | ############################################################################### |
24 42 | ### Everything below this line is common to all LALSuite ports. ############### |
25 43 | ############################################################################### |
26 44 | |
27 45 | categories science |
28 46 | platforms darwin |
29 47 | maintainers {ram @skymoo} {aronnax @lpsinger} |
30 48 | license GPL-2+ |
31 49 | |
32 50 | # The GPL and OpenSSL licenses conflict with each other, and our build |
37 55 | # our scripts. |
38 56 | license_noconflict openssl |
39 57 | |
40 58 | homepage https://wiki.ligo.org/Computing/DASWG/LALSuite |
41 59 | master_sites http://software.ligo.org/lscsoft/source/lalsuite |
42 60 | use_xz yes |
43 61 | |
44 62 | depends_build-append \ |
45 63 | port:pkgconfig \ |
46 64 | port:swig \ |
47 - | port:python27 |
48 65 | |
49 66 | # Choose a compiler that supports OpenMP. |
50 67 | compiler.whitelist macports-clang-6.0 macports-clang-5.0 macports-clang-4.0 macports-clang-7.0 macports-clang-3.9 |
51 68 | compiler.fallback macports-clang-6.0 |
52 69 | |
53 - | set default_pythonarg PYTHON=${frameworks_dir}/Python.framework/Versions/2.7/bin/python2.7 |
54 70 | configure.args-append \ |
55 71 | --mandir=${prefix}/share/man \ |
56 72 | --disable-silent-rules \ |
57 73 | --disable-gcc-flags \ |
58 74 | --enable-swig-iface \ |
59 - | --disable-python \ |
60 - | ${default_pythonarg} |
75 + | --disable-swig-octave \ |
76 + | --disable-swig-python \ |
77 + | --disable-python |
61 78 | |
62 79 | test.run yes |
63 80 | test.target check |
64 81 | |
65 82 | # Create subports for each supported Python version |
66 83 | foreach v {27 35 36 37} { |
67 84 | subport py${v}-${name} { |
68 85 | set pythonversion [string range ${v} 0 end-1].[string index ${v} end] |
69 86 | set pythonhome \ |
70 87 | "${frameworks_dir}/Python.framework/Versions/${pythonversion}" |
71 88 | set pythondir "${pythonhome}/lib/python${pythonversion}/site-packages" |
72 89 | |
73 90 | categories-prepend python |
74 91 | description Python ${pythonversion} bindings for ${description} |
75 92 | long_description ${long_description} This package provides Python \ |
76 93 | ${pythonversion} bindings, modules, and scripts. |
77 94 | |
78 95 | depends_build-append port:swig-python |
79 - | depends_build-replace port:python27 port:python${v} |
80 - | depends_lib-strsed g/port:lal/port:py${v}-lal/ |
81 - | depends_lib-append port:${name} port:py${v}-numpy |
96 + | depends_lib-prepend port:python${v} port:${name} port:py${v}-numpy |
82 97 | |
83 - | configure.args-replace ${default_pythonarg} PYTHON=${pythonhome}/bin/python${pythonversion} |
84 - | configure.args-replace --disable-python --enable-python |
85 - | configure.args-append --enable-swig-python |
98 + | configure.args-append PYTHON=${pythonhome}/bin/python${pythonversion} |
99 + | configure.args-replace --disable-python --enable-python |
100 + | configure.args-replace --disable-swig-python --enable-swig-python |
86 101 | |
87 102 | destroot.args-append pythondir="${pythondir}" \ |
88 103 | pyexecdir="${pythondir}" \ |
89 104 | pkgpythondir="${pythondir}/${name}" \ |
90 105 | pkgpyexecdir="${pythondir}/${name}" \ |
91 106 | prefix="${pythonhome}" |
92 107 | |
93 108 | # Only install SWIG bindings, Python libraries, and Python scripts |
94 109 | destroot { |
95 110 | command_exec destroot "" "-C swig" |
116 131 | set pythonhome \ |
117 132 | "${frameworks_dir}/Python.framework/Versions/${pythonversion}" |
118 133 | set pythondir "${pythonhome}/lib/python${pythonversion}/site-packages" |
119 134 | |
120 135 | categories-prepend octave |
121 136 | description Octave ${pythonversion} bindings for ${description} |
122 137 | long_description ${long_description} This package provides Octave \ |
123 138 | bindings, modules, and scripts. |
124 139 | |
125 140 | depends_build-append port:swig-octave |
126 - | depends_lib-strsed g/port:lal/port:octave-lal/ |
127 - | depends_lib-append port:${name} port:octave |
141 + | depends_lib-prepend port:octave port:${name} |
128 142 | |
129 - | configure.args-append --enable-swig-octave |
143 + | configure.args-replace --disable-swig-octave --enable-swig-octave |
130 144 | |
131 145 | # Only install SWIG bindings, Python libraries, and Python scripts |
132 146 | destroot { |
133 147 | command_exec destroot "" "-C swig" |
134 148 | } |
135 149 | |
136 150 | post-destroot { |
137 151 | # Remove Octave include directory |
138 152 | # (duplicate of SWIG headers in ${prefix}/include) |
139 153 | file delete -force ${destroot}${prefix}/include |