From ab5484e27189aa124507dcba18d8dbfabb0b1b0e Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Thu, 14 Dec 2023 19:15:33 +0800 Subject: [PATCH] suitesparse: bump to 7.3.0 (#730) --- tur/suitesparse/build.sh | 55 ++++++++++++++++++++++----- tur/suitesparse/remove_-lrt.patch | 62 ------------------------------- 2 files changed, 46 insertions(+), 71 deletions(-) delete mode 100644 tur/suitesparse/remove_-lrt.patch diff --git a/tur/suitesparse/build.sh b/tur/suitesparse/build.sh index 77c4a3601..ef126f7fd 100644 --- a/tur/suitesparse/build.sh +++ b/tur/suitesparse/build.sh @@ -2,13 +2,18 @@ TERMUX_PKG_HOMEPAGE=https://github.com/DrTimothyAldenDavis/SuiteSparse TERMUX_PKG_DESCRIPTION="A Suite of Sparse matrix packages." TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux-user-repository" -TERMUX_PKG_VERSION=7.0.1 -TERMUX_PKG_SRCURL=https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=dc2f8d5c2657c120b30cce942f634ec08fc3a4b0b10e19d3eef7790b2bec8d1e -TERMUX_PKG_DEPENDS="libopenblas, libgmp, libmpfr" +TERMUX_PKG_VERSION=1:7.3.1 +TERMUX_PKG_SRCURL=https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v${TERMUX_PKG_VERSION#*:}.tar.gz +TERMUX_PKG_SHA256=b512484396a80750acf3082adc1807ba0aabb103c2e09be5691f46f14d0a9718 +TERMUX_PKG_DEPENDS="blas-openblas, libopenblas, libgmp, libmpfr" TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_FORCE_CMAKE=true -TERMUX_PKG_EXTRA_MAKE_ARGS="BLAS=-lopenblas LAPACK=" +TERMUX_PKG_AUTO_UPDATE=true +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-DCMAKE_SYSTEM_NAME=Linux +-DBLA_VENDOR=Generic +-DALLOW_64BIT_BLAS=OFF +" source $TERMUX_SCRIPTDIR/common-files/setup_toolchain_gcc.sh @@ -61,12 +66,44 @@ termux_step_make() { CMAKE_OPTIONS+=" -DCMAKE_USE_SYSTEM_LIBRARIES=True" CMAKE_OPTIONS+=" -DDOXYGEN_EXECUTABLE=" CMAKE_OPTIONS+=" -DBUILD_TESTING=OFF" - CMAKE_OPTIONS+=" $TERMUX_PKG_EXTRA_CONFIGURE_ARGS" + CMAKE_OPTIONS+=" $(echo $TERMUX_PKG_EXTRA_CONFIGURE_ARGS)" - make -j $TERMUX_MAKE_PROCESSES $TERMUX_PKG_EXTRA_MAKE_ARGS \ - CMAKE_OPTIONS="$CMAKE_OPTIONS" + make -j $TERMUX_MAKE_PROCESSES \ + CMAKE_OPTIONS="$CMAKE_OPTIONS" JOBS=$TERMUX_MAKE_PROCESSES } termux_step_make_install() { - make install INSTALL=$TERMUX_PREFIX $TERMUX_PKG_EXTRA_MAKE_ARGS + make install INSTALL=$TERMUX_PREFIX +} + +termux_step_post_massage() { + # Do not forget to bump revision of reverse dependencies and rebuild them + # after SOVERSION is changed. + local _SOVERSION_GUARD_FILES=" +lib/libamd.so.3 +lib/libbtf.so.2 +lib/libcamd.so.3 +lib/libccolamd.so.3 +lib/libcholmod.so.5 +lib/libcolamd.so.3 +lib/libcxsparse.so.4 +lib/libgpuqrengine.so.3 +lib/libgraphblas.so.8 +lib/libklu.so.2 +lib/libklu_cholmod.so.2 +lib/libldl.so.3 +lib/libmongoose.so.3 +lib/librbio.so.4 +lib/libspex.so.2 +lib/libspqr.so.4 +lib/libsuitesparse_gpuruntime.so.3 +lib/libsuitesparseconfig.so.7 +lib/libumfpack.so.6 +" + local f + for f in ${_SOVERSION_GUARD_FILES}; do + if [ ! -e "${f}" ]; then + termux_error_exit "SOVERSION guard check failed." + fi + done } diff --git a/tur/suitesparse/remove_-lrt.patch b/tur/suitesparse/remove_-lrt.patch deleted file mode 100644 index 42db3eac2..000000000 --- a/tur/suitesparse/remove_-lrt.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -ruN SuiteSparse-7.0.1.orig/CHOLMOD/Tcov/Makefile SuiteSparse-7.0.1/CHOLMOD/Tcov/Makefile ---- SuiteSparse-7.0.1.orig/CHOLMOD/Tcov/Makefile 2023-01-22 04:31:16 -+++ SuiteSparse-7.0.1/CHOLMOD/Tcov/Makefile 2023-05-21 18:57:10 -@@ -100,7 +100,7 @@ - CN = $(CC) -O0 -g -fopenmp $(CHOLMOD_CONFIG) $(NANTESTS) - - LDLIBS = -L$(SUITESPARSE)/lib -lsuitesparseconfig \ -- -lm $(LAPACK) $(BLAS) -lrt -Wl,-rpath=$(SUITESPARSE)/lib -+ -lm $(LAPACK) $(BLAS) -Wl,-rpath=$(SUITESPARSE)/lib - - #------------------------------------------------------------------------------- - # With the CUDA BLAS: -diff -ruN SuiteSparse-7.0.1.orig/KLU/Tcov/Makefile SuiteSparse-7.0.1/KLU/Tcov/Makefile ---- SuiteSparse-7.0.1.orig/KLU/Tcov/Makefile 2023-01-22 04:31:16 -+++ SuiteSparse-7.0.1/KLU/Tcov/Makefile 2023-05-21 18:57:10 -@@ -19,7 +19,7 @@ - ../../lib/libcamd.so \ - ../../lib/libccolamd.so \ - ../../lib/libcholmod.so \ -- -lm -lrt \ -+ -lm \ - -Wl,-rpath=../../lib -lstdc++ - - I = -I../../include -I../Include -I../User -I../../BTF/Include -I../Source -diff -ruN SuiteSparse-7.0.1.orig/Mongoose/MATLAB/mongoose_make.m SuiteSparse-7.0.1/Mongoose/MATLAB/mongoose_make.m ---- SuiteSparse-7.0.1.orig/Mongoose/MATLAB/mongoose_make.m 2023-01-22 04:31:16 -+++ SuiteSparse-7.0.1/Mongoose/MATLAB/mongoose_make.m 2023-05-21 18:57:10 -@@ -40,12 +40,12 @@ - - cpp_flags = '' ; - lib = ''; --if (isunix) -- if(~ismac) -- % Mac doesn't need librt -- lib = [lib ' -lrt']; -- end --end -+%if (isunix) -+% if(~ismac) -+% % Mac doesn't need librt -+% lib = [lib ' -lrt']; -+% end -+%end - - % Fix the include & library path. - include = strrep (include, '/', filesep) ; -diff -ruN SuiteSparse-7.0.1.orig/RBio/Tcov/Makefile SuiteSparse-7.0.1/RBio/Tcov/Makefile ---- SuiteSparse-7.0.1.orig/RBio/Tcov/Makefile 2023-01-22 04:31:16 -+++ SuiteSparse-7.0.1/RBio/Tcov/Makefile 2023-05-21 18:57:10 -@@ -75,10 +75,10 @@ - ln -s ../../SuiteSparse_config/SuiteSparse_config.h - - RBdemo: RBdemo.c $(OBJ) $(INC) Makefile -- $(C) -o RBdemo RBdemo.c $(OBJ) -lm -lrt -+ $(C) -o RBdemo RBdemo.c $(OBJ) -lm - - RBtest: RBtest.c $(OBJ) $(INC) Makefile -- $(C) -o RBtest RBtest.c $(OBJ) -lm -lrt -+ $(C) -o RBtest RBtest.c $(OBJ) -lm - - RBio.o: RBio.c $(INC) - $(C) -c RBio.c