summaryrefslogtreecommitdiff
path: root/academic
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2014-01-24 20:53:47 -0600
committerRobby Workman <rworkman@slackbuilds.org>2014-01-31 00:53:47 -0600
commit0b98c868152f5fe5db65c3b898d8c72e25a155dd (patch)
tree861a6e0c99e62b382a819fac7855c5e6f0c1b314 /academic
parent2b966ae2851e2547358cc9b9382347d323e2932e (diff)
downloadslackbuilds-0b98c868152f5fe5db65c3b898d8c72e25a155dd.tar.gz
academic/csparse: Renamed and moved from libraries.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r--academic/csparse/README5
-rw-r--r--academic/csparse/autotoolize.diff212
-rw-r--r--academic/csparse/csparse.SlackBuild107
-rw-r--r--academic/csparse/csparse.info10
-rw-r--r--academic/csparse/slack-desc19
5 files changed, 353 insertions, 0 deletions
diff --git a/academic/csparse/README b/academic/csparse/README
new file mode 100644
index 0000000000..7119c1bf65
--- /dev/null
+++ b/academic/csparse/README
@@ -0,0 +1,5 @@
+CSparse is a small yet feature-rich sparse matrix package. Its purpose is
+to demonstrate a wide range of sparse matrix algorithms in as concise a
+code as possible.
+
+This package is part of SuiteSparse.
diff --git a/academic/csparse/autotoolize.diff b/academic/csparse/autotoolize.diff
new file mode 100644
index 0000000000..5fa2b85643
--- /dev/null
+++ b/academic/csparse/autotoolize.diff
@@ -0,0 +1,212 @@
+diff --git a/Demo/Makefile.am b/Demo/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Demo/Makefile.am
+@@ -0,0 +1,46 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++LDADD = $(top_builddir)/Source/libcsparse.la
++
++EXTRA_DIST = \
++ README.txt \
++ cs_demo.out
++
++# Disable the .out implicit pattern rule. Prevents GNU make from
++# adding bogus dependencies for the .out files listed above.
++%.out: %
++
++noinst_HEADERS = \
++ cs_demo.h
++
++check_PROGRAMS = \
++ cs_demo1 \
++ cs_demo2 \
++ cs_demo3
++
++cs_demo1_SOURCES = cs_demo1.c
++cs_demo2_SOURCES = cs_demo2.c cs_demo.c
++cs_demo3_SOURCES = cs_demo3.c cs_demo.c
++
++MATRICES = \
++ $(top_srcdir)/Matrix/ash219 \
++ $(top_srcdir)/Matrix/bcsstk01 \
++ $(top_srcdir)/Matrix/bcsstk01 \
++ $(top_srcdir)/Matrix/bcsstk16 \
++ $(top_srcdir)/Matrix/fs_183_1 \
++ $(top_srcdir)/Matrix/lp_afiro \
++ $(top_srcdir)/Matrix/mbeacxc \
++ $(top_srcdir)/Matrix/t1 \
++ $(top_srcdir)/Matrix/west0067
++
++check-local: $(check_PROGRAMS) $(MATRICES)
++ -./cs_demo1 < $(top_srcdir)/Matrix/t1
++ -./cs_demo2 < $(top_srcdir)/Matrix/t1
++ -./cs_demo2 < $(top_srcdir)/Matrix/ash219
++ -./cs_demo2 < $(top_srcdir)/Matrix/bcsstk01
++ -./cs_demo2 < $(top_srcdir)/Matrix/fs_183_1
++ -./cs_demo2 < $(top_srcdir)/Matrix/mbeacxc
++ -./cs_demo2 < $(top_srcdir)/Matrix/west0067
++ -./cs_demo2 < $(top_srcdir)/Matrix/lp_afiro
++ -./cs_demo2 < $(top_srcdir)/Matrix/bcsstk16
++ -./cs_demo3 < $(top_srcdir)/Matrix/bcsstk01
++ -./cs_demo3 < $(top_srcdir)/Matrix/bcsstk16
+diff --git a/Include/Makefile.am b/Include/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Include/Makefile.am
+@@ -0,0 +1 @@
++pkginclude_HEADERS = cs.h
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,5 @@
++SUBDIRS = Include Source Matrix Demo
++EXTRA_DIST = README.txt Doc/ChangeLog Doc/License.txt Doc/lesser.txt
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = csparse.pc
+diff --git a/Matrix/Makefile.am b/Matrix/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Matrix/Makefile.am
+@@ -0,0 +1,11 @@
++dist_noinst_DATA = \
++ ash219 \
++ bcsstk01 \
++ bcsstk16 \
++ fs_183_1 \
++ ibm32a \
++ ibm32b \
++ lp_afiro \
++ mbeacxc \
++ t1 \
++ west0067
+diff --git a/Source/Makefile.am b/Source/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Source/Makefile.am
+@@ -0,0 +1,62 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++
++EXTRA_DIST = \
++ README.txt
++
++CSPARSESRC = \
++ cs_add.c \
++ cs_amd.c \
++ cs_chol.c \
++ cs_cholsol.c \
++ cs_compress.c \
++ cs_counts.c \
++ cs_cumsum.c \
++ cs_dfs.c \
++ cs_dmperm.c \
++ cs_droptol.c \
++ cs_dropzeros.c \
++ cs_dupl.c \
++ cs_entry.c \
++ cs_ereach.c \
++ cs_etree.c \
++ cs_fkeep.c \
++ cs_gaxpy.c \
++ cs_happly.c \
++ cs_house.c \
++ cs_ipvec.c \
++ cs_leaf.c \
++ cs_load.c \
++ cs_lsolve.c \
++ cs_ltsolve.c \
++ cs_lu.c \
++ cs_lusol.c \
++ cs_malloc.c \
++ cs_maxtrans.c \
++ cs_multiply.c \
++ cs_norm.c \
++ cs_permute.c \
++ cs_pinv.c \
++ cs_post.c \
++ cs_print.c \
++ cs_pvec.c \
++ cs_qr.c \
++ cs_qrsol.c \
++ cs_randperm.c \
++ cs_reach.c \
++ cs_scatter.c \
++ cs_scc.c \
++ cs_schol.c \
++ cs_spsolve.c \
++ cs_sqr.c \
++ cs_symperm.c \
++ cs_tdfs.c \
++ cs_transpose.c \
++ cs_updown.c \
++ cs_usolve.c \
++ cs_util.c \
++ cs_utsolve.c
++
++lib_LTLIBRARIES = libcsparse.la
++libcsparse_la_SOURCES = $(CSPARSESRC)
++libcsparse_la_LIBADD = -lm
++libcsparse_la_LDFLAGS = -no-undefined -version-number 3:1:2
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,40 @@
++# -*- Autoconf -*-
++# Process this file with autoconf to produce a configure script.
++
++AC_PREREQ([2.69])
++AC_INIT([CSparse],[3.1.2],[DrTimothyAldenDavis@gmail.com],[csparse],[http://www.suitesparse.com/])
++AC_CONFIG_SRCDIR([Source/cs_print.c])
++AC_CONFIG_HEADERS([config.h])
++AM_INIT_AUTOMAKE([foreign])
++LT_INIT
++
++# Checks for programs.
++AC_PROG_INSTALL
++AC_PROG_CC
++
++LIBS_SAVED=$LIBS
++
++# Checks for libraries.
++AC_CHECK_LIB([m], [sqrt])
++
++# Checks for header files.
++AC_CHECK_HEADERS([limits.h stddef.h stdlib.h])
++
++# Checks for typedefs, structures, and compiler characteristics.
++AC_TYPE_SIZE_T
++
++# Checks for library functions.
++AC_FUNC_MALLOC
++AC_FUNC_REALLOC
++AC_CHECK_FUNCS([sqrt])
++
++LIBS=$LIBS_SAVED
++
++AC_CONFIG_FILES([
++ csparse.pc
++ Makefile
++ Demo/Makefile
++ Include/Makefile
++ Matrix/Makefile
++ Source/Makefile])
++AC_OUTPUT
+diff --git a/csparse.pc.in b/csparse.pc.in
+new file mode 100644
+--- /dev/null
++++ b/csparse.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE_NAME@
++Description: A concise sparse matrix package
++Version: @PACKAGE_VERSION@
++URL: @PACKAGE_URL@
++Libs: -L${libdir} -lcsparse
++Libs.private: -lm
++Cflags: -I${includedir}/csparse
diff --git a/academic/csparse/csparse.SlackBuild b/academic/csparse/csparse.SlackBuild
new file mode 100644
index 0000000000..d63b83ff17
--- /dev/null
+++ b/academic/csparse/csparse.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+# Slackware build script for CSparse
+
+# Copyright 2013 Kyle Guinn <elyk03@gmail.com>, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=csparse
+SRCNAM=CSparse
+VERSION=${VERSION:-3.1.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$(uname -m) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+DOCS="README.txt Doc/ChangeLog Doc/License.txt Doc/lesser.txt"
+
+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
+
+# Recommended by SuiteSparse
+SLKCFLAGS="$SLKCFLAGS -fexceptions -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+patch -p1 < $CWD/autotoolize.diff
+autoreconf -vif
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --enable-shared \
+ --disable-static \
+ --disable-dependency-tracking \
+ --build=$ARCH-slackware-linux
+
+make
+make check
+make install-strip DESTDIR=$PKG
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $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/csparse/csparse.info b/academic/csparse/csparse.info
new file mode 100644
index 0000000000..5114422a8c
--- /dev/null
+++ b/academic/csparse/csparse.info
@@ -0,0 +1,10 @@
+PRGNAM="csparse"
+VERSION="3.1.2"
+HOMEPAGE="https://www.cise.ufl.edu/research/sparse/CSparse/"
+DOWNLOAD="https://www.cise.ufl.edu/research/sparse/CSparse/versions/CSparse-3.1.2.tar.gz"
+MD5SUM="c610815814fe38de69aaf00d38604012"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Kyle Guinn"
+EMAIL="elyk03@gmail.com"
diff --git a/academic/csparse/slack-desc b/academic/csparse/slack-desc
new file mode 100644
index 0000000000..9692518a7e
--- /dev/null
+++ b/academic/csparse/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------------------------------------------------------|
+csparse: CSparse (sparse matrix routines)
+csparse:
+csparse: CSparse is a small yet feature-rich sparse matrix package.
+csparse: Its purpose is to demonstrate a wide range of sparse matrix
+csparse: algorithms in as concise a code as possible.
+csparse:
+csparse:
+csparse:
+csparse:
+csparse:
+csparse: