summaryrefslogtreecommitdiff
path: root/academic
diff options
context:
space:
mode:
Diffstat (limited to 'academic')
-rw-r--r--academic/suitesparse/README33
-rw-r--r--academic/suitesparse/UFconfig.mk354
-rw-r--r--academic/suitesparse/slack-desc19
-rw-r--r--academic/suitesparse/suitesparse.SlackBuild291
-rw-r--r--academic/suitesparse/suitesparse.info10
5 files changed, 707 insertions, 0 deletions
diff --git a/academic/suitesparse/README b/academic/suitesparse/README
new file mode 100644
index 0000000000..577c027875
--- /dev/null
+++ b/academic/suitesparse/README
@@ -0,0 +1,33 @@
+suitesparse is a collection of libraries for computations involving sparse
+matrices. The package includes the following libraries:
+
+ AMD approximate minimum degree ordering
+ BTF permutation to block triangular form (beta)
+ CAMD constrained approximate minimum degree ordering
+ COLAMD column approximate minimum degree ordering
+ CCOLAMD constrained column approximate minimum degree ordering
+ CHOLMOD sparse Cholesky factorization
+ CXSparse CSparse extended: complex matrix, int and long int support
+ KLU sparse LU factorization, primarily for circuit simulation
+ LDL a simple LDL' factorization
+ SQPR a multithread, multifrontal, rank-revealing sparse QR
+ factorization method
+ UMFPACK sparse LU factorization
+ UFconfig configuration file for all the above packages.
+
+This requires blas and lapack.
+
+suitesparse is an optional dependency for the octave package.
+
+NOTES:
+
+* CHOLMOD can also be compiled to use the METIS library, but it is not
+ used here because its licensing terms exclude it from Octave.
+
+* CXSparse is a superset of CSparse, and the two share common header
+ names, so it does not make sense to build both. CXSparse is built
+ by default.
+
+* SlackBuilds.org also has all the parts of this suite as individual
+ builds DO NOT try and install the individual parts and the suite pick
+ one or the other.
diff --git a/academic/suitesparse/UFconfig.mk b/academic/suitesparse/UFconfig.mk
new file mode 100644
index 0000000000..fba2a1c875
--- /dev/null
+++ b/academic/suitesparse/UFconfig.mk
@@ -0,0 +1,354 @@
+#===============================================================================
+# UFconfig.mk: common configuration file for the SuiteSparse
+#===============================================================================
+
+# This file contains all configuration settings for all packages authored or
+# co-authored by Tim Davis at the University of Florida:
+#
+# Package Version Description
+# ------- ------- -----------
+# AMD 1.2 or later approximate minimum degree ordering
+# COLAMD 2.4 or later column approximate minimum degree ordering
+# CCOLAMD 1.0 or later constrained column approximate minimum degree ordering
+# CAMD any constrained approximate minimum degree ordering
+# UMFPACK 4.5 or later sparse LU factorization, with the BLAS
+# CHOLMOD any sparse Cholesky factorization, update/downdate
+# KLU 0.8 or later sparse LU factorization, BLAS-free
+# BTF 0.8 or later permutation to block triangular form
+# LDL 1.2 or later concise sparse LDL'
+# LPDASA any linear program solve (dual active set algorithm)
+# CXSparse any extended version of CSparse (int/long, real/complex)
+# SuiteSparseQR any sparse QR factorization
+#
+# The UFconfig directory and the above packages should all appear in a single
+# directory, in order for the Makefile's within each package to find this file.
+#
+# To enable an option of the form "# OPTION = ...", edit this file and
+# delete the "#" in the first column of the option you wish to use.
+
+#------------------------------------------------------------------------------
+# Generic configuration
+#------------------------------------------------------------------------------
+
+# C compiler and compiler flags: These will normally not give you optimal
+# performance. You should select the optimization parameters that are best
+# for your system. On Linux, use "CFLAGS = -O3 -fexceptions" for example.
+CC = cc
+# CFLAGS = -O (for example; see below for details)
+
+# C++ compiler (also uses CFLAGS)
+CPLUSPLUS = g++
+
+# ranlib, and ar, for generating libraries
+RANLIB = ranlib
+AR = ar cr
+
+# delete and rename a file
+RM = rm -f
+MV = mv -f
+
+# Fortran compiler (not normally required)
+F77 = gfortran
+F77FLAGS = -O
+F77LIB =
+
+# C and Fortran libraries
+LIB = -lm
+
+# For compiling MATLAB mexFunctions (MATLAB 7.5 or later)
+MEX = mex -O -largeArrayDims -lmwlapack -lmwblas
+
+# For compiling MATLAB mexFunctions (MATLAB 7.3 and 7.4)
+# MEX = mex -O -largeArrayDims -lmwlapack
+
+# For MATLAB 7.2 or earlier, you must use one of these options:
+# MEX = mex -O -lmwlapack
+# MEX = mex -O
+
+# Which version of MAKE you are using (default is "make")
+# MAKE = make
+# MAKE = gmake
+
+#------------------------------------------------------------------------------
+# BLAS and LAPACK configuration:
+#------------------------------------------------------------------------------
+
+# UMFPACK and CHOLMOD both require the BLAS. CHOLMOD also requires LAPACK.
+# See Kazushige Goto's BLAS at http://www.cs.utexas.edu/users/flame/goto/ or
+# http://www.tacc.utexas.edu/~kgoto/ for the best BLAS to use with CHOLMOD.
+# LAPACK is at http://www.netlib.org/lapack/ . You can use the standard
+# Fortran LAPACK along with Goto's BLAS to obtain very good performance.
+# CHOLMOD gets a peak numeric factorization rate of 3.6 Gflops on a 3.2 GHz
+# Pentium 4 (512K cache, 4GB main memory) with the Goto BLAS, and 6 Gflops
+# on a 2.5Ghz dual-core AMD Opteron.
+
+# These settings will probably not work, since there is no fixed convention for
+# naming the BLAS and LAPACK library (*.a or *.so) files.
+
+# Using the Goto BLAS:
+# BLAS = -lgoto -lgfortran -lgfortranbegin -lg2c
+
+# This is probably slow ... it might connect to the Standard Reference BLAS:
+BLAS = -lblas -lgfortran -lgfortranbegin
+LAPACK = -llapack
+
+# Using non-optimized versions:
+# BLAS = -lblas_plain -lgfortran -lgfortranbegin -lg2c
+# LAPACK = -llapack_plain
+
+# The BLAS might not contain xerbla, an error-handling routine for LAPACK and
+# the BLAS. Also, the standard xerbla requires the Fortran I/O library, and
+# stops the application program if an error occurs. A C version of xerbla
+# distributed with this software (UFconfig/xerbla/libcerbla.a) includes a
+# Fortran-callable xerbla routine that prints nothing and does not stop the
+# application program. This is optional.
+# XERBLA = ../../UFconfig/xerbla/libcerbla.a
+
+# If you wish to use the XERBLA in LAPACK and/or the BLAS instead,
+# use this option:
+XERBLA =
+
+# If you wish to use the Fortran UFconfig/xerbla/xerbla.f instead, use this:
+# XERBLA = ../../UFconfig/xerbla/libxerbla.a
+
+#------------------------------------------------------------------------------
+# METIS, optionally used by CHOLMOD
+#------------------------------------------------------------------------------
+
+# If you do not have METIS, or do not wish to use it in CHOLMOD, you must
+# compile CHOLMOD with the -DNPARTITION flag. You must also use the
+# "METIS =" option, below.
+
+# The path is relative to where it is used, in CHOLMOD/Lib, CHOLMOD/MATLAB, etc.
+# You may wish to use an absolute path. METIS is optional. Compile
+# CHOLMOD with -DNPARTITION if you do not wish to use METIS.
+#METIS_PATH = ../../metis-4.0
+#METIS = ../../metis-4.0/libmetis.a
+
+# If you use CHOLMOD_CONFIG = -DNPARTITION then you must use the following
+# options:
+METIS_PATH =
+METIS =
+
+#------------------------------------------------------------------------------
+# UMFPACK configuration:
+#------------------------------------------------------------------------------
+
+# Configuration flags for UMFPACK. See UMFPACK/Source/umf_config.h for details.
+#
+# -DNBLAS do not use the BLAS. UMFPACK will be very slow.
+# -D'LONGBLAS=long' or -DLONGBLAS='long long' defines the integers used by
+# LAPACK and the BLAS (defaults to 'int')
+# -DNSUNPERF do not use the Sun Perf. Library (default is use it on Solaris)
+# -DNPOSIX do not use POSIX routines sysconf and times.
+# -DGETRUSAGE use getrusage
+# -DNO_TIMER do not use any timing routines
+# -DNRECIPROCAL do not multiply by the reciprocal
+# -DNO_DIVIDE_BY_ZERO do not divide by zero
+
+UMFPACK_CONFIG =
+
+#------------------------------------------------------------------------------
+# CHOLMOD configuration
+#------------------------------------------------------------------------------
+
+# CHOLMOD Library Modules, which appear in libcholmod.a:
+# Core requires: none
+# Check requires: Core
+# Cholesky requires: Core, AMD, COLAMD. optional: Partition, Supernodal
+# MatrixOps requires: Core
+# Modify requires: Core
+# Partition requires: Core, CCOLAMD, METIS. optional: Cholesky
+# Supernodal requires: Core, BLAS, LAPACK
+#
+# CHOLMOD test/demo Modules (all are GNU GPL, do not appear in libcholmod.a):
+# Tcov requires: Core, Check, Cholesky, MatrixOps, Modify, Supernodal
+# optional: Partition
+# Valgrind same as Tcov
+# Demo requires: Core, Check, Cholesky, MatrixOps, Supernodal
+# optional: Partition
+#
+# Configuration flags:
+# -DNCHECK do not include the Check module. License GNU LGPL
+# -DNCHOLESKY do not include the Cholesky module. License GNU LGPL
+# -DNPARTITION do not include the Partition module. License GNU LGPL
+# also do not include METIS.
+# -DNGPL do not include any GNU GPL Modules in the CHOLMOD library:
+# -DNMATRIXOPS do not include the MatrixOps module. License GNU GPL
+# -DNMODIFY do not include the Modify module. License GNU GPL
+# -DNSUPERNODAL do not include the Supernodal module. License GNU GPL
+#
+# -DNPRINT do not print anything.
+# -D'LONGBLAS=long' or -DLONGBLAS='long long' defines the integers used by
+# LAPACK and the BLAS (defaults to 'int')
+# -DNSUNPERF for Solaris only. If defined, do not use the Sun
+# Performance Library
+
+CHOLMOD_CONFIG = -DNPARTITION
+
+#------------------------------------------------------------------------------
+# SuiteSparseQR configuration:
+#------------------------------------------------------------------------------
+
+# The SuiteSparseQR library can be compiled with the following options:
+#
+# -DNPARTITION do not include the CHOLMOD partition module
+# -DNEXPERT do not include the functions in SuiteSparseQR_expert.cpp
+# -DTIMING enable timing and flop counts
+# -DHAVE_TBB enable the use of Intel's Threading Building Blocks (TBB)
+
+# default, without timing, without TBB:
+SPQR_CONFIG = -DNPARTITION
+# with timing and TBB:
+# SPQR_CONFIG = -DTIMING -DHAVE_TBB
+# with timing
+# SPQR_CONFIG = -DTIMING
+
+# with TBB, you must select this:
+# TBB = -ltbb
+# without TBB:
+TBB =
+
+# with timing, you must include the timing library:
+# RTLIB = -lrt
+# without timing
+RTLIB =
+
+#------------------------------------------------------------------------------
+# Linux
+#------------------------------------------------------------------------------
+
+# Using default compilers:
+# CC = gcc
+CFLAGS = -O3 -fexceptions
+
+# alternatives:
+# CFLAGS = -g -fexceptions \
+ -Wall -W -Wshadow -Wmissing-prototypes -Wstrict-prototypes \
+ -Wredundant-decls -Wnested-externs -Wdisabled-optimization -ansi
+# CFLAGS = -O3 -fexceptions \
+ -Wall -W -Werror -Wshadow -Wmissing-prototypes -Wstrict-prototypes \
+ -Wredundant-decls -Wnested-externs -Wdisabled-optimization -ansi
+# CFLAGS = -O3 -fexceptions -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
+# CFLAGS = -O3
+# CFLAGS = -O3 -g -fexceptions
+# CFLAGS = -g -fexceptions \
+ -Wall -W -Wshadow \
+ -Wredundant-decls -Wdisabled-optimization -ansi
+
+# consider:
+# -fforce-addr -fmove-all-movables -freduce-all-givs -ftsp-ordering
+# -frename-registers -ffast-math -funroll-loops
+
+# Using the Goto BLAS:
+# BLAS = -lgoto -lfrtbegin -lg2c $(XERBLA) -lpthread
+
+# Using Intel's icc and ifort compilers:
+# (does not work for mexFunctions unless you add a mexopts.sh file)
+# F77 = ifort
+# CC = icc
+# CFLAGS = -O3 -xN -vec_report=0
+# CFLAGS = -g
+# old (broken): CFLAGS = -ansi -O3 -ip -tpp7 -xW -vec_report0
+
+# 64bit:
+# F77FLAGS = -O -m64
+# CFLAGS = -O3 -fexceptions -m64
+# BLAS = -lgoto64 -lfrtbegin -lg2c -lpthread $(XERBLA)
+# LAPACK = -llapack64
+
+
+# SUSE Linux 10.1, AMD Opteron, with GOTO Blas
+# F77 = gfortran
+# BLAS = -lgoto_opteron64 -lgfortran
+
+# SUSE Linux 10.1, Intel Pentium, with GOTO Blas
+# F77 = gfortran
+# BLAS = -lgoto -lgfortran
+
+#------------------------------------------------------------------------------
+# Solaris
+#------------------------------------------------------------------------------
+
+# 32-bit
+# CFLAGS = -KPIC -dalign -xc99=%none -Xc -xlibmieee -xO5 -xlibmil -m32
+
+# 64-bit
+# CFLAGS = -fast -KPIC -xc99=%none -xlibmieee -xlibmil -m64 -Xc
+
+# FFLAGS = -fast -KPIC -dalign -xlibmil -m64
+
+# The Sun Performance Library includes both LAPACK and the BLAS:
+# BLAS = -xlic_lib=sunperf
+# LAPACK =
+
+
+#------------------------------------------------------------------------------
+# Compaq Alpha
+#------------------------------------------------------------------------------
+
+# 64-bit mode only
+# CFLAGS = -O2 -std1
+# BLAS = -ldxml
+# LAPACK =
+
+#------------------------------------------------------------------------------
+# Macintosh
+#------------------------------------------------------------------------------
+
+# CC = gcc
+# CFLAGS = -O3 -fno-common -no-cpp-precomp -fexceptions
+# LIB = -lstdc++
+# BLAS = -framework Accelerate
+# LAPACK = -framework Accelerate
+
+#------------------------------------------------------------------------------
+# IBM RS 6000
+#------------------------------------------------------------------------------
+
+# BLAS = -lessl
+# LAPACK =
+
+# 32-bit mode:
+# CFLAGS = -O4 -qipa -qmaxmem=16384 -qproto
+# F77FLAGS = -O4 -qipa -qmaxmem=16384
+
+# 64-bit mode:
+# CFLAGS = -O4 -qipa -qmaxmem=16384 -q64 -qproto
+# F77FLAGS = -O4 -qipa -qmaxmem=16384 -q64
+# AR = ar -X64
+
+#------------------------------------------------------------------------------
+# SGI IRIX
+#------------------------------------------------------------------------------
+
+# BLAS = -lscsl
+# LAPACK =
+
+# 32-bit mode
+# CFLAGS = -O
+
+# 64-bit mode (32 bit int's and 64-bit long's):
+# CFLAGS = -64
+# F77FLAGS = -64
+
+# SGI doesn't have ranlib
+# RANLIB = echo
+
+#------------------------------------------------------------------------------
+# AMD Opteron (64 bit)
+#------------------------------------------------------------------------------
+
+# BLAS = -lgoto_opteron64 -lg2c
+# LAPACK = -llapack_opteron64
+
+# SUSE Linux 10.1, AMD Opteron
+# F77 = gfortran
+# BLAS = -lgoto_opteron64 -lgfortran
+# LAPACK = -llapack_opteron64
+
+#------------------------------------------------------------------------------
+# remove object files and profile output
+#------------------------------------------------------------------------------
+
+CLEAN = *.o *.obj *.ln *.bb *.bbg *.da *.tcov *.gcov gmon.out *.bak *.d *.gcda *.gcno
diff --git a/academic/suitesparse/slack-desc b/academic/suitesparse/slack-desc
new file mode 100644
index 0000000000..66fd4e5e91
--- /dev/null
+++ b/academic/suitesparse/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+suitesparse: suitesparse (A collection of sparse matrix libraries)
+suitesparse:
+suitesparse: suitesparse is a collection of libraries for computations involving
+suitesparse: sparse matrices. The package includes the following libraries:
+suitesparse: AMD, BTF, CAMD, COLAMD, CCOLAMD, CHOLMOD, CSparse, CXSparse, KLU,
+suitesparse: LDL, SQPR, UMFPACK.
+suitesparse:
+suitesparse:
+suitesparse:
+suitesparse:
+suitesparse:
diff --git a/academic/suitesparse/suitesparse.SlackBuild b/academic/suitesparse/suitesparse.SlackBuild
new file mode 100644
index 0000000000..9750a951ef
--- /dev/null
+++ b/academic/suitesparse/suitesparse.SlackBuild
@@ -0,0 +1,291 @@
+#!/bin/sh
+
+# Slackware build script for suitesparse
+
+# Written by Pablo Santamaria (pablosantamaria@gmail.com)
+
+PRGNAM=suitesparse
+VERSION=${VERSION:-3.4.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+amd_version=2.2.0
+amd_version_major=2
+btf_version=1.1.0
+btf_version_major=1
+camd_version=2.2.0
+camd_version_major=2
+ccolamd_version=2.7.1
+ccolamd_version_major=2
+cholmod_version=1.7.1
+cholmod_version_major=1
+colamd_version=2.7.1
+colamd_version_major=2
+csparse_version=2.2.3
+csparse_version_major=2
+cxsparse_version=2.2.3
+cxsparse_version_major=2
+klu_version=1.1.0
+klu_version_major=1
+ldl_version=2.0.1
+ldl_version_major=2
+umfpack_version=5.4.0
+umfpack_version_major=5
+spqr_version=1.1.2
+spqr_version_major=1
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf SuiteSparse
+tar xvf $CWD/SuiteSparse-$VERSION.tar.gz
+
+cd SuiteSparse
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Set common configuration for the SuiteSparse
+cp $CWD/UFconfig.mk UFconfig
+
+mkdir -p Doc/{AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,KLU,LDL,UMFPACK,SPQR} Lib Include
+
+pushd AMD
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libamd.so.${amd_version_major} -o \
+ libamd.so.${amd_version} ../AMD/Lib/*.o -lm
+ ln -sf libamd.so.${amd_version} libamd.so.${amd_version_major}
+ ln -sf libamd.so.${amd_version} libamd.so
+ cp -p ../AMD/Lib/*.a ./
+ popd
+ cp -p Include/*.h ../Include
+ cp -p README.txt Doc/License Doc/ChangeLog Doc/*.pdf ../Doc/AMD
+popd
+
+pushd BTF
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libbtf.so.${btf_version_major} -o \
+ libbtf.so.${btf_version} ../BTF/Lib/*.o
+ ln -sf libbtf.so.${btf_version} libbtf.so.${btf_version_major}
+ ln -sf libbtf.so.${btf_version} libbtf.so
+ cp -p ../BTF/Lib/*.a ./
+ popd
+ cp -p Include/*.h ../Include
+ cp -p README.txt Doc/* ../Doc/BTF
+popd
+
+pushd CAMD
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libcamd.so.${camd_version_major} -o \
+ libcamd.so.${camd_version} ../CAMD/Lib/*.o -lm
+ ln -sf libcamd.so.${camd_version} libcamd.so.${camd_version_major}
+ ln -sf libcamd.so.${camd_version} libcamd.so
+ cp -p ../CAMD/Lib/*.a ./
+ popd
+ cp -p Include/*.h ../Include
+ cp -p README.txt Doc/ChangeLog Doc/License Doc/*.pdf ../Doc/CAMD
+popd
+
+pushd CCOLAMD
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libccolamd.so.${ccolamd_version_major} -o \
+ libccolamd.so.${ccolamd_version} ../CCOLAMD/Lib/*.o -lm
+ ln -sf libccolamd.so.${ccolamd_version} libccolamd.so.${ccolamd_version_major}
+ ln -sf libccolamd.so.${ccolamd_version} libccolamd.so
+ cp -p ../CCOLAMD/Lib/*.a ./
+ popd
+ cp -p Include/*.h ../Include
+ cp -p README.txt Doc/* ../Doc/CCOLAMD
+popd
+
+pushd COLAMD
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libcolamd.so.${colamd_version_major} -o \
+ libcolamd.so.${colamd_version} ../COLAMD/Lib/*.o -lm
+ ln -sf libcolamd.so.${colamd_version} libcolamd.so.${colamd_version_major}
+ ln -sf libcolamd.so.${colamd_version} libcolamd.so
+ cp -p ../COLAMD/Lib/*.a ./
+ popd
+ cp -p Include/*.h ../Include
+ cp -p README.txt Doc/* ../Doc/COLAMD
+popd
+
+# CHOLMOD can also be compiled to use the METIS library, but it is not
+# used here because its licensing terms exclude it from Octave.
+pushd CHOLMOD
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libcholmod.so.${cholmod_version_major} -o \
+ libcholmod.so.${cholmod_version} ../CHOLMOD/Lib/*.o \
+ -lblas -lgfortran -lgfortranbegin -llapack \
+ libamd.so.${amd_version_major} \
+ libcamd.so.${camd_version_major} libcolamd.so.${colamd_version_major} \
+ libccolamd.so.${ccolamd_version_major} -lm
+ ln -sf libcholmod.so.${cholmod_version} libcholmod.so.${cholmod_version_major}
+ ln -sf libcholmod.so.${cholmod_version} libcholmod.so
+ cp -p ../CHOLMOD/Lib/*.a ./
+ popd
+ cp -p Include/*.h ../Include
+ cp -p README.txt Doc/*.pdf ../Doc/CHOLMOD
+ cp -p Cholesky/License.txt ../Doc/CHOLMOD/Cholesky_License.txt
+ cp -p Core/License.txt ../Doc/CHOLMOD/Core_License.txt
+ cp -p MatrixOps/License.txt ../Doc/CHOLMOD/MatrixOps_License.txt
+ cp -p Partition/License.txt ../Doc/CHOLMOD/Partition_License.txt
+ cp -p Supernodal/License.txt ../Doc/CHOLMOD/Supernodal_License.txt
+popd
+
+# CXSparse is a superset of CSparse, and the two share common header
+# names, so it does not make sense to build both.
+pushd CXSparse
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libcxsparse.so.${cxsparse_version_major} -o \
+ libcxsparse.so.${cxsparse_version} ../CXSparse/Lib/*.o -lm
+ ln -sf libcxsparse.so.${cxsparse_version} libcxsparse.so.${cxsparse_version_major}
+ ln -sf libcxsparse.so.${cxsparse_version} libcxsparse.so
+ cp -p ../CXSparse/Lib/*.a ./
+ popd
+ cp -p Include/cs.h ../Include
+ mkdir ../Doc/CXSparse/
+ cp -p Doc/* ../Doc/CXSparse
+popd
+
+pushd KLU
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libklu.so.${klu_version_major} -o \
+ libklu.so.${klu_version} ../KLU/Lib/*.o \
+ libamd.so.${amd_version_major} libcolamd.so.${colamd_version_major} \
+ libbtf.so.${btf_version_major} libcholmod.so.${cholmod_version_major}
+ ln -sf libklu.so.${klu_version} libklu.so.${klu_version_major}
+ ln -sf libklu.so.${klu_version} libklu.so
+ cp -p ../KLU/Lib/*.a ./
+ popd
+ cp -p Include/*.h ../Include
+ cp -p README.txt Doc/lesser.txt ../Doc/KLU
+popd
+
+pushd LDL
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libldl.so.${ldl_version_major} -o \
+ libldl.so.${ldl_version} ../LDL/Lib/*.o
+ ln -sf libldl.so.${ldl_version} libldl.so.${ldl_version_major}
+ ln -sf libldl.so.${ldl_version} libldl.so
+ cp -p ../LDL/Lib/*.a ./
+ popd
+ cp -p Include/*.h ../Include
+ cp -p README.txt Doc/ChangeLog Doc/lesser.txt Doc/*.pdf ../Doc/LDL
+popd
+
+pushd UMFPACK
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ gcc -shared -Wl,-soname,libumfpack.so.${umfpack_version_major} -o \
+ libumfpack.so.${umfpack_version} ../UMFPACK/Lib/*.o \
+ -lblas -lgfortran -lgfortranbegin -llapack \
+ libamd.so.${amd_version_major} -lm
+ ln -sf libumfpack.so.${umfpack_version} libumfpack.so.${umfpack_version_major}
+ ln -sf libumfpack.so.${umfpack_version} libumfpack.so
+ cp -p ../UMFPACK/Lib/*.a ./
+ popd
+ cp -p Include/*.h ../Include
+ cp -p README.txt Doc/License Doc/ChangeLog Doc/gpl.txt Doc/*.pdf ../Doc/UMFPACK
+popd
+
+pushd SPQR
+ pushd Lib
+ make CFLAGS="$SLKCFLAGS -fPIC"
+ popd
+ pushd ../Lib
+ g++ -shared -Wl,-soname,libspqr.so.${spqr_version_major} -o \
+ libspqr.so.${spqr_version} ../SPQR/Lib/*.o \
+ -lblas -lgfortran -lgfortranbegin -llapack \
+ libcholmod.so.${cholmod_version_major} -lm
+ ln -sf libspqr.so.${spqr_version} libspqr.so.${spqr_version_major}
+ ln -sf libspqr.so.${spqr_version} libspqr.so
+ cp -p ../SPQR/Lib/*.a ./
+ popd
+ cp -p Include/*.h* ../Include
+ cp -p README{,_SPQR}.txt
+ cp -p README_SPQR.txt Doc/* ../Doc/SPQR
+popd
+
+cp -p UFconfig/UFconfig.h Include
+
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
+cp -a Lib/* $PKG/usr/lib${LIBDIRSUFFIX}
+mkdir -p $PKG/usr/include/suitesparse
+cp -a Include/* $PKG/usr/include/suitesparse
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a README.txt Doc/* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/academic/suitesparse/suitesparse.info b/academic/suitesparse/suitesparse.info
new file mode 100644
index 0000000000..8b5482d7a2
--- /dev/null
+++ b/academic/suitesparse/suitesparse.info
@@ -0,0 +1,10 @@
+PRGNAM="suitesparse"
+VERSION="3.4.0"
+HOMEPAGE="http://www.cise.ufl.edu/research/sparse/SuiteSparse/"
+DOWNLOAD="http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-3.4.0.tar.gz"
+MD5SUM="e59dcabc9173b1ba1b3659ae147006b8"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Pablo Santamaria"
+EMAIL="pablosantamaria@gmail.com"
+APPROVED="dsomero"