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 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup github 1.0 |
---|
5 | |
---|
6 | github.setup DrTimothyAldenDavis SuiteSparse 5.9.0 v |
---|
7 | # subports have independent revisions |
---|
8 | revision 0 |
---|
9 | epoch 20200517 |
---|
10 | categories math science |
---|
11 | maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer |
---|
12 | license none |
---|
13 | |
---|
14 | description Sparse matrix routines |
---|
15 | |
---|
16 | long_description SuiteSparse is a single archive that contains all packages \ |
---|
17 | authored by Tim Davis. |
---|
18 | |
---|
19 | homepage https://people.engr.tamu.edu/davis/suitesparse.html |
---|
20 | |
---|
21 | checksums rmd160 bedf435c5ee9a5d15a923b361ef033a89e01c9a7 \ |
---|
22 | sha256 f62709c67d6f545b709099ff5afaa54fef4743c1ae3bb3e955a4e71c35303550 \ |
---|
23 | size 59609016 |
---|
24 | |
---|
25 | use_parallel_build no |
---|
26 | |
---|
27 | patchfiles-append patch-shared_lib.diff \ |
---|
28 | patch-Mongoose.diff \ |
---|
29 | patch-KLU-Include-klu_version.h.diff |
---|
30 | |
---|
31 | configure.optflags -O3 |
---|
32 | build.args-append LDFLAGS=-ld_classic |
---|
33 | |
---|
34 | # see https://github.com/macports/macports-ports/pull/2292#issuecomment-408526461 |
---|
35 | configure.cppflags-replace -I${prefix}/include \ |
---|
36 | -isystem${prefix}/include |
---|
37 | |
---|
38 | subport SuiteSparse_config { |
---|
39 | version 5.9.0 |
---|
40 | revision 0 |
---|
41 | # from the README.txt: |
---|
42 | # "[n]o licensing restrictions apply" |
---|
43 | license Permissive |
---|
44 | } |
---|
45 | |
---|
46 | subport SuiteSparse_GraphBLAS { |
---|
47 | version 4.0.3 |
---|
48 | revision 0 |
---|
49 | license Apache-2 |
---|
50 | long_description-append ${subport}: graph algorithms in the language of linear algebra. |
---|
51 | compiler.c_standard 2011 |
---|
52 | } |
---|
53 | |
---|
54 | subport SuiteSparse_Mongoose { |
---|
55 | version 2.0.4 |
---|
56 | revision 1 |
---|
57 | depends_lib-append port:SuiteSparse_config |
---|
58 | license GPL-3 |
---|
59 | long_description-append ${subport}: graph partitioning. |
---|
60 | compiler.cxx_standard 2011 |
---|
61 | } |
---|
62 | |
---|
63 | subport SuiteSparse_AMD { |
---|
64 | version 2.4.6 |
---|
65 | revision 0 |
---|
66 | depends_lib-append port:SuiteSparse_config |
---|
67 | license BSD |
---|
68 | long_description-append ${subport}: approximate minimum degree ordering. |
---|
69 | } |
---|
70 | |
---|
71 | subport SuiteSparse_BTF { |
---|
72 | version 1.2.6 |
---|
73 | revision 0 |
---|
74 | depends_lib-append port:SuiteSparse_config |
---|
75 | license LGPL-2.1+ |
---|
76 | long_description-append ${subport}: permutation to block triangular form. |
---|
77 | } |
---|
78 | |
---|
79 | subport SuiteSparse_CAMD { |
---|
80 | version 2.4.6 |
---|
81 | revision 0 |
---|
82 | depends_lib-append port:SuiteSparse_config |
---|
83 | license BSD |
---|
84 | long_description-append ${subport}: constrained approximate minimum degree ordering. |
---|
85 | } |
---|
86 | |
---|
87 | subport SuiteSparse_CCOLAMD { |
---|
88 | version 2.9.6 |
---|
89 | revision 0 |
---|
90 | depends_lib-append port:SuiteSparse_config |
---|
91 | license BSD |
---|
92 | long_description-append ${subport}: constrained column approximate minimum degree ordering. |
---|
93 | } |
---|
94 | |
---|
95 | subport SuiteSparse_COLAMD { |
---|
96 | version 2.9.6 |
---|
97 | revision 0 |
---|
98 | depends_lib-append port:SuiteSparse_config |
---|
99 | license BSD |
---|
100 | long_description-append ${subport}: column approximate minimum degree ordering. |
---|
101 | } |
---|
102 | |
---|
103 | subport SuiteSparse_CHOLMOD { |
---|
104 | PortGroup linear_algebra 1.0 |
---|
105 | |
---|
106 | version 3.0.14 |
---|
107 | revision 1 |
---|
108 | depends_lib-append port:SuiteSparse_config port:SuiteSparse_AMD port:SuiteSparse_CAMD port:SuiteSparse_COLAMD port:SuiteSparse_CCOLAMD |
---|
109 | depends_lib-append port:metis |
---|
110 | build.args-append MY_METIS_LIB="-L${prefix}/lib -lmetis" \ |
---|
111 | MY_METIS_INC="${prefix}/include" |
---|
112 | |
---|
113 | pre-build { |
---|
114 | build.args-append BLAS="-L${prefix}/lib ${linalglib}" \ |
---|
115 | LAPACK="-L${prefix}/lib ${linalglib}" |
---|
116 | } |
---|
117 | license LGPL-2.1+ |
---|
118 | long_description-append ${subport}: sparse Cholesky factorization. |
---|
119 | linalg.setup noveclibfort |
---|
120 | } |
---|
121 | |
---|
122 | subport SuiteSparse_CSparse { |
---|
123 | # see Doc/ChangeLog |
---|
124 | version 3.2.0 |
---|
125 | revision 0 |
---|
126 | license LGPL-2.1+ |
---|
127 | long_description-append ${subport}: a concise sparse matrix package. |
---|
128 | } |
---|
129 | |
---|
130 | subport SuiteSparse_CXSparse { |
---|
131 | version 3.2.0 |
---|
132 | revision 0 |
---|
133 | depends_lib-append port:SuiteSparse_config |
---|
134 | license LGPL-2.1+ |
---|
135 | long_description-append ${subport}: CSparse Extended. |
---|
136 | } |
---|
137 | |
---|
138 | subport SuiteSparse_LDL { |
---|
139 | version 2.2.6 |
---|
140 | revision 0 |
---|
141 | depends_lib-append port:SuiteSparse_config |
---|
142 | license LGPL-2.1+ |
---|
143 | long_description-append ${subport}: a very concise LDL' factorization package. |
---|
144 | } |
---|
145 | |
---|
146 | subport SuiteSparse_KLU { |
---|
147 | version 1.3.8 |
---|
148 | revision 0 |
---|
149 | depends_lib-append port:SuiteSparse_config port:SuiteSparse_AMD port:SuiteSparse_BTF port:SuiteSparse_COLAMD |
---|
150 | license LGPL-2.1+ |
---|
151 | long_description-append ${subport}: sparse LU factorization, primarily for circuit simulation. |
---|
152 | } |
---|
153 | |
---|
154 | subport SuiteSparse_UMFPACK { |
---|
155 | PortGroup linear_algebra 1.0 |
---|
156 | |
---|
157 | version 5.7.9 |
---|
158 | revision 0 |
---|
159 | depends_lib-append port:SuiteSparse_config port:SuiteSparse_AMD port:SuiteSparse_CHOLMOD |
---|
160 | pre-build { |
---|
161 | build.args-append BLAS="-L${prefix}/lib ${linalglib}" \ |
---|
162 | LAPACK="-L${prefix}/lib ${linalglib}" |
---|
163 | } |
---|
164 | license GPL-2+ |
---|
165 | long_description-append ${subport}: sparse LU factorization. |
---|
166 | linalg.setup noveclibfort |
---|
167 | } |
---|
168 | |
---|
169 | subport SuiteSparse_RBio { |
---|
170 | version 2.2.6 |
---|
171 | revision 0 |
---|
172 | depends_lib-append port:SuiteSparse_config |
---|
173 | license GPL-2+ |
---|
174 | long_description-append ${subport}: read/write sparse matrices in Rutherford/Boeing format. |
---|
175 | } |
---|
176 | |
---|
177 | subport SuiteSparse_SPQR { |
---|
178 | PortGroup linear_algebra 1.0 |
---|
179 | |
---|
180 | version 2.0.9 |
---|
181 | revision 1 |
---|
182 | depends_lib-append port:SuiteSparse_config port:SuiteSparse_AMD port:SuiteSparse_CHOLMOD port:SuiteSparse_COLAMD |
---|
183 | pre-build { |
---|
184 | build.args-append BLAS="-L${prefix}/lib ${linalglib}" \ |
---|
185 | LAPACK="-L${prefix}/lib ${linalglib}" |
---|
186 | } |
---|
187 | license GPL-2+ |
---|
188 | long_description-append ${subport}: sparse QR factorization. |
---|
189 | linalg.setup noveclibfort |
---|
190 | } |
---|
191 | |
---|
192 | subport SuiteSparse_SLIP_LU { |
---|
193 | version 2.0.9 |
---|
194 | revision 0 |
---|
195 | depends_lib-append port:SuiteSparse_config port:SuiteSparse_AMD port:SuiteSparse_COLAMD \ |
---|
196 | port:gmp \ |
---|
197 | port:mpfr |
---|
198 | license {LGPL-3+ GPL-2+} |
---|
199 | long_description-append ${subport}: sparse left-looking integer-preserving LU factorization. |
---|
200 | } |
---|
201 | |
---|
202 | if {${subport} eq ${name}} { |
---|
203 | depends_lib-append port:SuiteSparse_config \ |
---|
204 | port:SuiteSparse_GraphBLAS \ |
---|
205 | port:SuiteSparse_Mongoose \ |
---|
206 | port:SuiteSparse_AMD \ |
---|
207 | port:SuiteSparse_BTF \ |
---|
208 | port:SuiteSparse_CAMD \ |
---|
209 | port:SuiteSparse_CCOLAMD \ |
---|
210 | port:SuiteSparse_COLAMD \ |
---|
211 | port:SuiteSparse_CHOLMOD \ |
---|
212 | port:SuiteSparse_CSparse \ |
---|
213 | port:SuiteSparse_CXSparse \ |
---|
214 | port:SuiteSparse_LDL \ |
---|
215 | port:SuiteSparse_KLU \ |
---|
216 | port:SuiteSparse_UMFPACK \ |
---|
217 | port:SuiteSparse_RBio \ |
---|
218 | port:SuiteSparse_SPQR \ |
---|
219 | port:SuiteSparse_SLIP_LU |
---|
220 | |
---|
221 | master_sites |
---|
222 | distfiles |
---|
223 | extract.rename no |
---|
224 | patchfiles |
---|
225 | use_configure no |
---|
226 | supported_archs noarch |
---|
227 | installs_libs no |
---|
228 | universal_variant no |
---|
229 | build {} |
---|
230 | # create a dummy file so the port can be successfully activated |
---|
231 | destroot { |
---|
232 | xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${subport} |
---|
233 | set docfile [open ${destroot}${prefix}/share/doc/${subport}/README.txt "w"] |
---|
234 | puts ${docfile} "Meta-port for ${name}" |
---|
235 | puts ${docfile} "${long_description}" |
---|
236 | close ${docfile} |
---|
237 | } |
---|
238 | } else { |
---|
239 | PortGroup compilers 1.0 |
---|
240 | |
---|
241 | compilers.choose cc cpp cxx |
---|
242 | compilers.setup |
---|
243 | |
---|
244 | if {${subport} eq "SuiteSparse_config"} { |
---|
245 | set SuiteSparse_name ${subport} |
---|
246 | } else { |
---|
247 | set SuiteSparse_name [join [lrange [split ${subport} _] 1 end] _] |
---|
248 | } |
---|
249 | |
---|
250 | if {${subport} eq "SuiteSparse_GraphBLAS" || ${subport} eq "SuiteSparse_Mongoose"} { |
---|
251 | PortGroup cmake 1.1 |
---|
252 | |
---|
253 | cmake.source_dir ${worksrcpath}/${SuiteSparse_name} |
---|
254 | } else { |
---|
255 | PortGroup makefile 1.0 |
---|
256 | |
---|
257 | if {${subport} eq "SuiteSparse_config"} { |
---|
258 | build.dir ${worksrcpath}/${SuiteSparse_name} |
---|
259 | } else { |
---|
260 | build.dir ${worksrcpath}/${SuiteSparse_name}/Lib |
---|
261 | } |
---|
262 | destroot.dir ${build.dir} |
---|
263 | |
---|
264 | configure.universal_cflags |
---|
265 | configure.cc_archflags |
---|
266 | configure.universal_cxxflags |
---|
267 | configure.cxx_archflags |
---|
268 | pre-build { |
---|
269 | build.args-append TARGET_ARCH="[get_canonical_archflags ld]" |
---|
270 | } |
---|
271 | |
---|
272 | # INSTALL variable has non-standard meaning |
---|
273 | configure.install |
---|
274 | |
---|
275 | build.args-append MACPORTS_PREFIX="${prefix}" \ |
---|
276 | OPTIMIZATION="${configure.optflags}" \ |
---|
277 | AUTOCC=no |
---|
278 | # avoid duplicate values |
---|
279 | configure.optflags |
---|
280 | |
---|
281 | # see https://trac.macports.org/ticket/60492 |
---|
282 | configure.cxx-append {*}${configure.cxxflags} |
---|
283 | |
---|
284 | if {${subport} eq "SuiteSparse_CSparse"} { |
---|
285 | build.target all |
---|
286 | } else { |
---|
287 | build.target default |
---|
288 | } |
---|
289 | |
---|
290 | destroot { |
---|
291 | proc check_copy {directory pattern prefix_directory} { |
---|
292 | global destroot prefix |
---|
293 | set files [glob -nocomplain -directory ${directory} ${pattern}] |
---|
294 | if {${files} ne ""} { |
---|
295 | xinstall -d -m 0755 ${destroot}${prefix}/${prefix_directory} |
---|
296 | copy {*}${files} ${destroot}${prefix}/${prefix_directory} |
---|
297 | } |
---|
298 | } |
---|
299 | check_copy ${worksrcpath}/lib * lib |
---|
300 | check_copy ${destroot.dir} *.a lib |
---|
301 | check_copy ${worksrcpath}/include * include |
---|
302 | check_copy ${worksrcpath}/share/doc/suitesparse-${github.version} * share/doc/suitesparse |
---|
303 | } |
---|
304 | |
---|
305 | livecheck.type none |
---|
306 | } |
---|
307 | } |
---|