-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
template
37 lines (34 loc) · 1.23 KB
/
template
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
# Template file for 'python3-cvxopt'
pkgname=python3-cvxopt
version=1.3.2
revision=3
build_style=python3-module
hostmakedepends="python3-setuptools_scm"
makedepends="python3-devel SuiteSparse-devel gsl-devel glpk-devel fftw-devel
$(vopt_if openblas 'openblas-devel' 'lapack-devel')"
depends="python3"
checkdepends="python3-pytest"
short_desc="Python software for convex optimization"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-3.0-or-later"
homepage="http://cvxopt.org/"
changelog="https://github.com/cvxopt/cvxopt/releases"
distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
checksum=3461fa42c1b2240ba4da1d985ca73503914157fc4c77417327ed6d7d85acdbe6
build_options="openblas"
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*|aarch64*|armv[67]*|ppc64*)
# Prefer accelerated routines where available
build_options_default="openblas"
;;
*) ;;
esac
pre_build() {
export CVXOPT_BUILD_GSL=1
export CVXOPT_BUILD_GLPK=1
export CVXOPT_BUILD_FFTW=1
export CVXOPT_BLAS_LIB=$(vopt_if openblas 'openblas' 'blas;gslcblas')
export CVXOPT_LAPACK_LIB=$(vopt_if openblas 'openblas' 'lapack')
# setup.py gets this wrong for i686 (and other 32 bit?)
export CVXOPT_SUITESPARSE_INC_DIR=${XBPS_CROSS_BASE}/usr/include/suitesparse
}