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 python 1.0 |
---|
5 | PortGroup github 1.0 |
---|
6 | PortGroup linear_algebra 1.0 |
---|
7 | |
---|
8 | linalg.setup noveclibfort |
---|
9 | |
---|
10 | github.setup cvxopt cvxopt 1.2.7 |
---|
11 | revision 0 |
---|
12 | name py-cvxopt |
---|
13 | categories-append math |
---|
14 | platforms darwin |
---|
15 | license GPL-3+ |
---|
16 | maintainers {gmail.com:jjstickel @jjstickel} openmaintainer |
---|
17 | |
---|
18 | description Python module for convex optimization |
---|
19 | long_description CVXOPT is a free software package for convex \ |
---|
20 | optimization based on the Python programming \ |
---|
21 | language. It can be used with the interactive \ |
---|
22 | Python interpreter, on the command line by \ |
---|
23 | executing Python scripts, or integrated in other \ |
---|
24 | software via Python extension modules. Its main \ |
---|
25 | purpose is to make the development of software for \ |
---|
26 | convex optimization applications straightforward \ |
---|
27 | by building on Python's extensive standard library \ |
---|
28 | and on the strengths of Python as a high-level \ |
---|
29 | programming language. |
---|
30 | homepage https://cvxopt.org/ |
---|
31 | |
---|
32 | checksums rmd160 4af2fec6a886aa076206de428e5b7ead9447e1d4 \ |
---|
33 | sha256 e03d8cdd2c952672fa45fd365338857f2d30fbd913df5708747a0535558a51ea \ |
---|
34 | size 4115655 |
---|
35 | |
---|
36 | python.versions 27 35 36 37 38 39 |
---|
37 | |
---|
38 | if {${subport} ne ${name}} { |
---|
39 | # ignore empty BLAS and LAPACK inputs |
---|
40 | patchfiles patch-setup.py.diff |
---|
41 | |
---|
42 | build.env-append \ |
---|
43 | CVXOPT_BLAS_LIB_DIR=${prefix}/lib \ |
---|
44 | CVXOPT_LAPACK_LIB= |
---|
45 | |
---|
46 | pre-build { |
---|
47 | set blas_lib {} |
---|
48 | set blas_extra_link_args {} |
---|
49 | foreach lib [split ${linalglib} " "] { |
---|
50 | if { [lrange ${lib} 0 1] eq "-l" } { |
---|
51 | lappend blas_lib [lrange ${lib} end] |
---|
52 | } else { |
---|
53 | lappend blas_extra_link_args ${lib} |
---|
54 | } |
---|
55 | } |
---|
56 | |
---|
57 | build.env-append \ |
---|
58 | CVXOPT_BLAS_LIB=[join ${blas_lib} ";"] \ |
---|
59 | CVXOPT_BLAS_EXTRA_LINK_ARGS=[join ${blas_extra_link_args} ";"] |
---|
60 | } |
---|
61 | |
---|
62 | variant gsl description {Build GSL module} { |
---|
63 | depends_lib-append port:gsl |
---|
64 | |
---|
65 | build.env-append \ |
---|
66 | CVXOPT_BUILD_GSL=1 \ |
---|
67 | CVXOPT_GSL_LIB_DIR=${prefix}/lib \ |
---|
68 | CVXOPT_GSL_INC_DIR=${prefix}/include |
---|
69 | } |
---|
70 | |
---|
71 | variant fftw description {Build FFTW module} { |
---|
72 | depends_lib-append port:fftw-3 |
---|
73 | |
---|
74 | build.env-append \ |
---|
75 | CVXOPT_BUILD_FFTW=1 \ |
---|
76 | CVXOPT_FFTW_LIB_DIR=${prefix}/lib \ |
---|
77 | CVXOPT_FFTW_INC_DIR=${prefix}/include |
---|
78 | } |
---|
79 | |
---|
80 | variant glpk description {Build GLPK module} { |
---|
81 | depends_lib-append port:glpk |
---|
82 | |
---|
83 | build.env-append \ |
---|
84 | CVXOPT_BUILD_GLPK=1 \ |
---|
85 | CVXOPT_GLPK_LIB_DIR=${prefix}/lib \ |
---|
86 | CVXOPT_GLPK_INC_DIR=${prefix}/include |
---|
87 | } |
---|
88 | |
---|
89 | variant dsdp description {Build DSDP module} { |
---|
90 | depends_lib-append port:DSDP |
---|
91 | |
---|
92 | build.env-append \ |
---|
93 | CVXOPT_BUILD_DSDP=1 \ |
---|
94 | CVXOPT_DSDP_LIB_DIR=${prefix}/lib \ |
---|
95 | CVXOPT_DSDP_INC_DIR=${prefix}/include |
---|
96 | } |
---|
97 | |
---|
98 | depends_build-append port:py${python.version}-setuptools |
---|
99 | |
---|
100 | # link against MacPorts SuiteSparse |
---|
101 | depends_lib-append port:SuiteSparse_config \ |
---|
102 | port:SuiteSparse_AMD \ |
---|
103 | port:SuiteSparse_COLAMD \ |
---|
104 | port:SuiteSparse_CHOLMOD \ |
---|
105 | port:SuiteSparse_UMFPACK |
---|
106 | build.env-append \ |
---|
107 | CVXOPT_SUITESPARSE_SRC_DIR= \ |
---|
108 | CVXOPT_SUITESPARSE_LIB_DIR=${prefix}/lib \ |
---|
109 | CVXOPT_SUITESPARSE_INC_DIR=${prefix}/include |
---|
110 | |
---|
111 | default_variants +gsl +glpk +fftw +dsdp |
---|
112 | |
---|
113 | livecheck.type none |
---|
114 | } |
---|