Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SuiteSparse: update to 6.0.1. #39846

Merged
merged 2 commits into from
Dec 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions common/shlibs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ libppl.so.14 ppl-1.2_1
libppl_c.so.4 ppl-0.11_1
libstdc++.so.6 libstdc++-4.4.0_1
libssp.so.0 libssp-4.4.0_1
libcxsparse.so.3 SuiteSparse-5.10.1_1
libncurses.so.6 ncurses-libs-6.0_1 ignore
libncursesw.so.6 ncurses-libs-5.8_1 ignore
libtinfo.so.6 ncurses-libtinfo-libs-6.2_2
Expand Down Expand Up @@ -4071,9 +4070,15 @@ libprimecount.so.7 primecount-7.2_1
libprimesieve.so.10 primesieve-8.0_1
libavif.so.15 libavif-0.11.0_1
libkdumpfile.so.10 libkdumpfile-0.4.1_1
libamd.so.2 SuiteSparse-5.10.1_1
libcholmod.so.3 SuiteSparse-5.10.1_1
libumfpack.so.5 SuiteSparse-5.10.1_1
libamd.so.3 SuiteSparse-6.0.1_1
libcamd.so.3 SuiteSparse-6.0.1_1
libccolamd.so.3 SuiteSparse-6.0.1_1
libcholmod.so.4 SuiteSparse-6.0.1_1
libcolamd.so.3 SuiteSparse-6.0.1_1
libcxsparse.so.4 SuiteSparse-6.0.1_1
libspqr.so.3 SuiteSparse-6.0.1_1
libsuitesparseconfig.so.6 SuiteSparse-6.0.1_1
libumfpack.so.6 SuiteSparse-6.0.1_1
libecl.so.21.2 ecl-21.2.1_1
libecm.so.1 ecm-7.0.4_3
libcliquer.so.1 cliquer-1.22_1
Expand Down
22 changes: 0 additions & 22 deletions srcpkgs/SuiteSparse/patches/skip-demo-on-build.patch

This file was deleted.

42 changes: 26 additions & 16 deletions srcpkgs/SuiteSparse/template
Original file line number Diff line number Diff line change
@@ -1,44 +1,54 @@
# Template file for 'SuiteSparse'
pkgname=SuiteSparse
version=5.12.0
version=6.0.1
revision=1
# XXX: re-enable TBB=-ltbb -DSPQR_CONFIG=-DHAVE_TBB when updating, if possible
make_build_args="BLAS=-lblas LAPACK=-llapack"
hostmakedepends="cmake chrpath"
makedepends="libgomp-devel lapack-devel mpfr-devel"
hostmakedepends="cmake gcc-fortran"
makedepends="libgomp-devel mpfr-devel
$(vopt_if openblas 'openblas-devel' 'lapack-devel')"
short_desc="Suite of sparse matrix software"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="custom:multiple"
homepage="https://people.engr.tamu.edu/davis/suitesparse.html"
changelog="https://raw.githubusercontent.com/DrTimothyAldenDavis/SuiteSparse/master/ChangeLog"
distfiles="https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v${version}.tar.gz"
checksum=5fb0064a3398111976f30c5908a8c0b40df44c6dd8f0cc4bfa7b9e45d8c647de
checksum=06f55a0449775d1f43d8a33ba8c8417ea8cf76c27833b465c49825baa8741d0c

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

do_build() {
make config library $make_build_args JOBS=$XBPS_MAKEJOBS
make library \
JOBS=$XBPS_MAKEJOBS \
CMAKE_OPTIONS="-DBLA_VENDOR=$(vopt_if openblas 'OpenBLAS' 'Generic') \
-DCMAKE_INSTALL_PREFIX=$DESTDIR/usr"
}

do_check() {
make go $make_build_args LD_LIBRARY_PATH=$wrksrc/lib JOBS=$XBPS_MAKEJOBS
make demos \
JOBS=$XBPS_MAKEJOBS
}

do_install() {
make install $make_build_args INSTALL=$DESTDIR/usr
make install
vlicense LICENSE.txt

# remove invalid rpath
chrpath -d $DESTDIR/usr/lib/lib*.so
}

SuiteSparse-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
# conflict for /usr/lib/libmongoose.{a,so}
conflicts="mongoose-devel"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove "usr/lib/*.a"
# do not vmove libmetis.so
vmove "usr/lib/lib[a-ln-z]*.so"
vmove "usr/lib/libmo*.so"
vmove usr/share/doc
vmove "usr/lib/*.so"
}
}
11 changes: 0 additions & 11 deletions srcpkgs/python3-cvxopt/patches/fix-gsl.patch

This file was deleted.

76 changes: 76 additions & 0 deletions srcpkgs/python3-cvxopt/patches/test-modules.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
diff --git a/tests/test_dsdp.py b/tests/test_dsdp.py
index d514dc8..2a5e5bf 100644
--- a/tests/test_dsdp.py
+++ b/tests/test_dsdp.py
@@ -4,9 +4,10 @@ class TestDSDP(unittest.TestCase):

def setUp(self):
try:
- from cvxopt import dsdp, matrix
- except:
+ import cvxopt.dsdp
+ except ModuleNotFoundError:
self.skipTest("DSDP not available")
+ from cvxopt import matrix
c = matrix([1.,-1.,1.])
G = [ matrix([[-7., -11., -11., 3.],
[ 7., -18., -18., 8.],
diff --git a/tests/test_glpk.py b/tests/test_glpk.py
index 89f876d..dad5801 100644
--- a/tests/test_glpk.py
+++ b/tests/test_glpk.py
@@ -4,15 +4,16 @@ class TestGLPK(unittest.TestCase):

def setUp(self):
try:
- from cvxopt import glpk, matrix
- c = matrix([-4., -5.])
- G = matrix([[2., 1., -1., 0.], [1., 2., 0., -1.]])
- h = matrix([3., 3., 0., 0.])
- A = matrix([1.0,1.0],(1,2))
- b = matrix(1.0)
- self._prob_data = (c,G,h,A,b)
- except:
+ import cvxopt.glpk
+ except ModuleNotFoundError:
self.skipTest("GLPK not available")
+ from cvxopt import matrix
+ c = matrix([-4., -5.])
+ G = matrix([[2., 1., -1., 0.], [1., 2., 0., -1.]])
+ h = matrix([3., 3., 0., 0.])
+ A = matrix([1.0,1.0],(1,2))
+ b = matrix(1.0)
+ self._prob_data = (c,G,h,A,b)

def test_lp(self):
from cvxopt import solvers, glpk
diff --git a/tests/test_gsl.py b/tests/test_gsl.py
index d24f058..3ee9a37 100644
--- a/tests/test_gsl.py
+++ b/tests/test_gsl.py
@@ -4,8 +4,8 @@ class TestGSL(unittest.TestCase):

def setUp(self):
try:
- from cvxopt import gsl
- except:
+ import cvxopt.gsl
+ except ModuleNotFoundError:
self.skipTest("GSL not available")

def test1(self):
diff --git a/tests/test_mosek.py b/tests/test_mosek.py
index e3d0f4e..6cd1fbf 100644
--- a/tests/test_mosek.py
+++ b/tests/test_mosek.py
@@ -4,8 +4,8 @@ class TestMOSEK(unittest.TestCase):

def setUp(self):
try:
- from cvxopt import msk
- except:
+ import cvxopt.msk
+ except ModuleNotFoundError:
self.skipTest("MOSEK not available")

def assertAlmostEqualLists(self,L1,L2,places=3):
18 changes: 15 additions & 3 deletions srcpkgs/python3-cvxopt/template
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Template file for 'python3-cvxopt'
pkgname=python3-cvxopt
version=1.3.0
revision=2
revision=3
build_style=python3-module
hostmakedepends="python3-setuptools"
makedepends="python3-devel blas-devel lapack-devel SuiteSparse-devel gsl-devel
glpk-devel fftw-devel"
makedepends="python3-devel SuiteSparse-devel gsl-devel glpk-devel fftw-devel
$(vopt_if openblas 'openblas-devel' 'lapack-devel')"
checkdepends="python3-pytest"
short_desc="Python software for convex optimization"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
Expand All @@ -14,8 +14,20 @@ homepage="http://cvxopt.org/"
distfiles="${PYPI_SITE}/c/cvxopt/cvxopt-${version}.tar.gz"
checksum=00b1b232f9d1f902d578a9d75814b67fa020758d5ae422e28ca8cef6269fa5c6

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')
}