mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
academic/spqr: Updated for version 2.0.7.
Signed-off-by: Kyle Guinn <elyk03@gmail.com>
This commit is contained in:
parent
9a81dc9adc
commit
b3fc4f2027
6 changed files with 83 additions and 75 deletions
|
@ -6,3 +6,13 @@ architectures. It can obtain a substantial fraction of the
|
|||
theoretical peak performance of a multicore computer.
|
||||
|
||||
This package is part of SuiteSparse.
|
||||
|
||||
This requires a BLAS/LAPACK implementation. Choose one of these package sets:
|
||||
* OpenBLAS (includes both a BLAS and a LAPACK implementation)
|
||||
* atlas (includes both a BLAS and a LAPACK implementation)
|
||||
* blas, lapack (the Netlib reference implementations)
|
||||
If more than one set is installed (assuming there are no packaging conflicts)
|
||||
then the auto-detection will use the first implementation from this list that
|
||||
it finds. If in doubt, choose the Netlib reference implementations; other
|
||||
packages that require a BLAS or LAPACK implementation may not build if they
|
||||
are not configured to detect/use alternate implementations.
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
diff --git a/ax_blas.m4 b/ax_blas.m4
|
||||
--- a/ax_blas.m4
|
||||
+++ b/ax_blas.m4
|
||||
@@ -117,12 +117,16 @@
|
||||
# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
|
||||
if test $ax_blas_ok = no; then
|
||||
AC_CHECK_LIB(atlas, ATL_xerbla,
|
||||
- [AC_CHECK_LIB(f77blas, $sgemm,
|
||||
- [AC_CHECK_LIB(cblas, cblas_dgemm,
|
||||
- [ax_blas_ok=yes
|
||||
- BLAS_LIBS="-lcblas -lf77blas -latlas"],
|
||||
- [], [-lf77blas -latlas])],
|
||||
- [], [-latlas])])
|
||||
+ [AC_CHECK_LIB(ptf77blas, $sgemm,
|
||||
+ [AC_CHECK_LIB(ptcblas, cblas_dgemm,
|
||||
+ [ax_blas_ok=yes; BLAS_LIBS="-lptcblas -lptf77blas -latlas"],,
|
||||
+ [-lptf77blas -latlas])],
|
||||
+ [AC_CHECK_LIB(f77blas, $sgemm,
|
||||
+ [AC_CHECK_LIB(cblas, cblas_dgemm,
|
||||
+ [ax_blas_ok=yes; BLAS_LIBS="-lcblas -lf77blas -latlas"],,
|
||||
+ [-lf77blas -latlas])],,
|
||||
+ [-latlas])],
|
||||
+ [-latlas])])
|
||||
fi
|
||||
|
||||
# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
|
21
academic/spqr/patches/atlas-lib-rename.diff
Normal file
21
academic/spqr/patches/atlas-lib-rename.diff
Normal file
|
@ -0,0 +1,21 @@
|
|||
diff --git a/m4/ax_blas.m4 b/m4/ax_blas.m4
|
||||
--- a/m4/ax_blas.m4
|
||||
+++ b/m4/ax_blas.m4
|
||||
@@ -116,13 +116,10 @@
|
||||
|
||||
# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
|
||||
if test $ax_blas_ok = no; then
|
||||
- AC_CHECK_LIB(atlas, ATL_xerbla,
|
||||
- [AC_CHECK_LIB(f77blas, $sgemm,
|
||||
- [AC_CHECK_LIB(cblas, cblas_dgemm,
|
||||
- [ax_blas_ok=yes
|
||||
- BLAS_LIBS="-lcblas -lf77blas -latlas"],
|
||||
- [], [-lf77blas -latlas])],
|
||||
- [], [-latlas])])
|
||||
+ AC_CHECK_LIB(tatlas, $sgemm,
|
||||
+ [ax_blas_ok=yes; BLAS_LIBS="-ltatlas"],
|
||||
+ [AC_CHECK_LIB(satlas, $sgemm,
|
||||
+ [ax_blas_ok=yes; BLAS_LIBS="-lsatlas"])])
|
||||
fi
|
||||
|
||||
# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
|
|
@ -118,9 +118,10 @@ diff --git a/Doc/Makefile.am b/Doc/Makefile.am
|
|||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/Doc/Makefile.am
|
||||
@@ -0,0 +1,28 @@
|
||||
@@ -0,0 +1,29 @@
|
||||
+EXTRA_DIST = \
|
||||
+ ChangeLog \
|
||||
+ License.txt \
|
||||
+ README.txt \
|
||||
+ gpl.txt
|
||||
+
|
||||
|
@ -161,11 +162,10 @@ diff --git a/Makefile.am b/Makefile.am
|
|||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/Makefile.am
|
||||
@@ -0,0 +1,5 @@
|
||||
@@ -0,0 +1,4 @@
|
||||
+SUBDIRS = Include Source Matrix Demo Doc
|
||||
+EXTRA_DIST = README.txt
|
||||
+
|
||||
+pkgconfigdir = $(libdir)/pkgconfig
|
||||
+pkgconfig_DATA = spqr.pc
|
||||
diff --git a/Matrix/Makefile.am b/Matrix/Makefile.am
|
||||
new file mode 100644
|
||||
|
@ -650,73 +650,63 @@ diff --git a/configure.ac b/configure.ac
|
|||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/configure.ac
|
||||
@@ -0,0 +1,92 @@
|
||||
@@ -0,0 +1,89 @@
|
||||
+# -*- Autoconf -*-
|
||||
+# Process this file with autoconf to produce a configure script.
|
||||
+
|
||||
+AC_PREREQ([2.69])
|
||||
+AC_INIT([SPQR],[2.0.2],[DrTimothyAldenDavis@gmail.com],[spqr],[http://www.suitesparse.com/])
|
||||
+AC_INIT([SPQR],[2.0.7],[DrTimothyAldenDavis@gmail.com],[spqr],[http://www.suitesparse.com/])
|
||||
+AC_CONFIG_SRCDIR([Source/spqr_kernel.cpp])
|
||||
+AC_CONFIG_HEADERS([config.h])
|
||||
+AM_INIT_AUTOMAKE([foreign])
|
||||
+LT_INIT
|
||||
+
|
||||
+# Checks for programs.
|
||||
+PKG_PROG_PKG_CONFIG
|
||||
+AC_PROG_INSTALL
|
||||
+AC_PROG_F77
|
||||
+AC_PROG_CC
|
||||
+AC_PROG_CXX
|
||||
+AC_LANG([C++])
|
||||
+
|
||||
+AC_MSG_CHECKING([whether to use expert routines])
|
||||
+AC_ARG_ENABLE([expert],
|
||||
+ [AS_HELP_STRING(
|
||||
+ [--disable-expert],
|
||||
+ [compile without the min 2-norm solution option])],
|
||||
+ [expert=$enableval],
|
||||
+ [expert="yes"])
|
||||
+AC_MSG_RESULT([$expert])
|
||||
+ [],
|
||||
+ [AS_VAR_SET([enable_expert], [yes])])
|
||||
+
|
||||
+AC_MSG_CHECKING([whether to use tbb])
|
||||
+AC_ARG_WITH([tbb],
|
||||
+ [AS_HELP_STRING(
|
||||
+ [--without-tbb],
|
||||
+ [do not use Intel Threading Building Blocks for multithreading])],
|
||||
+ [tbb=$withval],
|
||||
+ [tbb="yes"])
|
||||
+AC_MSG_RESULT([$tbb])
|
||||
+ [],
|
||||
+ [AS_VAR_SET([with_tbb], [yes])])
|
||||
+
|
||||
+LIBS_SAVED=$LIBS
|
||||
+AS_VAR_SET([LIBS_SAVED], [$LIBS])
|
||||
+
|
||||
+# Checks for libraries.
|
||||
+AC_CHECK_LIB([m], [sqrt])
|
||||
+
|
||||
+sinclude([ax_blas.m4])
|
||||
+AX_BLAS
|
||||
+if test "x$ax_blas_ok" != "xyes"; then
|
||||
+ AC_MSG_ERROR([cannot find blas])
|
||||
+fi
|
||||
+AX_BLAS(
|
||||
+ [],
|
||||
+ [AC_MSG_ERROR([cannot find BLAS])])
|
||||
+
|
||||
+sinclude([ax_lapack.m4])
|
||||
+AX_LAPACK
|
||||
+if test "x$ax_lapack_ok" != "xyes"; then
|
||||
+ AC_MSG_ERROR([cannot find lapack])
|
||||
+fi
|
||||
+AX_LAPACK(
|
||||
+ [],
|
||||
+ [AC_MSG_ERROR([cannot find LAPACK])])
|
||||
+
|
||||
+PKG_PROG_PKG_CONFIG
|
||||
+PKG_CHECK_MODULES([SUITESPARSECONFIG],[suitesparseconfig],
|
||||
+ [],
|
||||
+ [AC_MSG_ERROR([cannot find suitesparseconfig])])
|
||||
+PKG_CHECK_MODULES([CHOLMOD],[cholmod],
|
||||
+ [],
|
||||
+ [AC_MSG_ERROR([cannot find cholmod])])
|
||||
+PKG_CHECK_MODULES([SUITESPARSECONFIG], [suitesparseconfig])
|
||||
+PKG_CHECK_MODULES([CHOLMOD], [cholmod])
|
||||
+
|
||||
+# Checks for header files.
|
||||
+AC_CHECK_HEADERS([float.h stdlib.h])
|
||||
+
|
||||
+if test "x$tbb" = "xyes"; then
|
||||
+AS_IF([test "x$with_tbb" = "xyes"], [
|
||||
+ AC_CHECK_HEADERS([tbb/task_scheduler_init.h tbb/task.h])
|
||||
+fi
|
||||
+])
|
||||
+
|
||||
+# Checks for typedefs, structures, and compiler characteristics.
|
||||
+AC_TYPE_SIZE_T
|
||||
|
@ -724,16 +714,22 @@ new file mode 100644
|
|||
+# Checks for library functions.
|
||||
+AC_CHECK_FUNCS([sqrt])
|
||||
+
|
||||
+LIBS=$LIBS_SAVED
|
||||
+AS_VAR_SET([LIBS], [$LIBS_SAVED])
|
||||
+
|
||||
+if test "x$tbb" = "xyes"; then
|
||||
+AS_IF([test "x$with_tbb" = "xyes"], [
|
||||
+ AC_SUBST([TBB_CFLAGS], [""])
|
||||
+ AC_SUBST([TBB_LIBS], ["-ltbb"])
|
||||
+fi
|
||||
+])
|
||||
+
|
||||
+AM_CONDITIONAL([EXPERT], [test "x$expert" = "xyes"])
|
||||
+AM_CONDITIONAL([TBB], [test "x$tbb" = "xyes"])
|
||||
+AC_MSG_CHECKING([whether to use expert routines])
|
||||
+AC_MSG_RESULT([$enable_expert])
|
||||
+AM_CONDITIONAL([EXPERT], [test "x$enable_expert" = "xyes"])
|
||||
+
|
||||
+AC_MSG_CHECKING([whether to use Intel Threading Building Blocks])
|
||||
+AC_MSG_RESULT([$with_tbb])
|
||||
+AM_CONDITIONAL([TBB], [test "x$with_tbb" = "xyes"])
|
||||
+
|
||||
+PKG_INSTALLDIR
|
||||
+AC_CONFIG_FILES([
|
||||
+ spqr.pc
|
||||
+ Makefile
|
||||
|
@ -741,7 +737,8 @@ new file mode 100644
|
|||
+ Doc/Makefile
|
||||
+ Include/Makefile
|
||||
+ Matrix/Makefile
|
||||
+ Source/Makefile])
|
||||
+ Source/Makefile
|
||||
+])
|
||||
+AC_OUTPUT
|
||||
diff --git a/spqr.pc.in b/spqr.pc.in
|
||||
new file mode 100644
|
|
@ -25,14 +25,14 @@
|
|||
PRGNAM=spqr
|
||||
SRCNAM=SuiteSparse
|
||||
SUBDIR=SPQR
|
||||
VERSION=${VERSION:-2.0.2}
|
||||
SRCVER=${SRCVER:-4.4.6}
|
||||
VERSION=${VERSION:-2.0.7}
|
||||
SRCVER=${SRCVER:-4.5.3}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
i?86) ARCH=i486 ;;
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$(uname -m) ;;
|
||||
esac
|
||||
|
@ -43,11 +43,14 @@ TMP=${TMP:-/tmp/SBo}
|
|||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
DOCS="README.txt Doc/ChangeLog Doc/gpl.txt"
|
||||
DOCS="README.txt Doc/ChangeLog Doc/License.txt Doc/gpl.txt"
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
|
@ -73,12 +76,13 @@ cd $SRCNAM/$SUBDIR
|
|||
chown -R root:root .
|
||||
chmod -R u+w,go-w,a+rX-st .
|
||||
|
||||
patch -p1 < $CWD/autotoolize.diff
|
||||
patch -p1 < $CWD/atlas-threaded-blas.diff
|
||||
patch -p1 < $CWD/patches/autotoolize.diff
|
||||
patch -p2 < $CWD/patches/atlas-lib-rename.diff
|
||||
autoreconf -vif
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
# Avoid rebuilding the docs.
|
||||
touch Doc/spqr_user_guide.pdf
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
|
@ -90,7 +94,9 @@ CXXFLAGS="$SLKCFLAGS" \
|
|||
--enable-shared \
|
||||
--disable-static \
|
||||
--disable-dependency-tracking \
|
||||
--build=$ARCH-slackware-linux
|
||||
--build=$ARCH-slackware-linux \
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
|
||||
make
|
||||
make check
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="spqr"
|
||||
VERSION="2.0.2"
|
||||
VERSION="2.0.7"
|
||||
HOMEPAGE="http://faculty.cse.tamu.edu/davis/suitesparse.html"
|
||||
DOWNLOAD="http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.4.6.tar.gz"
|
||||
MD5SUM="131a3a5e2dee784cd946284e44ce9af2"
|
||||
DOWNLOAD="http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.3.tar.gz"
|
||||
MD5SUM="8ec57324585df3c6483ad7f556afccbd"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="blas lapack suitesparseconfig cholmod tbb"
|
||||
|
|
Loading…
Reference in a new issue