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