summaryrefslogtreecommitdiffstats
path: root/libraries/COLAMD
diff options
context:
space:
mode:
author Kyle Guinn <elyk03@gmail.com>2010-08-24 00:02:25 -0400
committer Erik Hanson <erik@slackbuilds.org>2010-08-29 15:32:11 -0500
commit5ab59a9afb00a0094059d0ccc902dd3f9ac2dbcc (patch)
tree98cec69668427378e2946dc4c0778f2e5c9e646f /libraries/COLAMD
parent0bf8f75918917093b9799cbcb4ead947e15d7dfc (diff)
downloadslackbuilds-5ab59a9afb00a0094059d0ccc902dd3f9ac2dbcc.tar.gz
slackbuilds-5ab59a9afb00a0094059d0ccc902dd3f9ac2dbcc.tar.xz
libraries/COLAMD: Added (sparse matrix ordering routines)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'libraries/COLAMD')
-rw-r--r--libraries/COLAMD/COLAMD.SlackBuild76
-rw-r--r--libraries/COLAMD/COLAMD.info10
-rw-r--r--libraries/COLAMD/README8
-rw-r--r--libraries/COLAMD/autotoolize.diff100
-rw-r--r--libraries/COLAMD/slack-desc19
5 files changed, 213 insertions, 0 deletions
diff --git a/libraries/COLAMD/COLAMD.SlackBuild b/libraries/COLAMD/COLAMD.SlackBuild
new file mode 100644
index 0000000000..97ef1b138d
--- /dev/null
+++ b/libraries/COLAMD/COLAMD.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Slackware build script for COLAMD
+# Written by Kyle Guinn <elyk03@gmail.com>
+
+PRGNAM=COLAMD
+VERSION=${VERSION:-2.7.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/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
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM
+chown -R root:root .
+chmod -R u+w,go+r-w,a-st .
+
+patch -p1 < $CWD/autotoolize.diff
+autoreconf -vif
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+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/libraries/COLAMD/COLAMD.info b/libraries/COLAMD/COLAMD.info
new file mode 100644
index 0000000000..56cee9549f
--- /dev/null
+++ b/libraries/COLAMD/COLAMD.info
@@ -0,0 +1,10 @@
+PRGNAM="COLAMD"
+VERSION="2.7.2"
+HOMEPAGE="http://www.cise.ufl.edu/research/sparse/colamd/"
+DOWNLOAD="http://www.cise.ufl.edu/research/sparse/colamd/COLAMD-2.7.2.tar.gz"
+MD5SUM="2b4e43c8ef33dacfade6d1ec49542ac1"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Kyle Guinn"
+EMAIL="elyk03@gmail.com"
+APPROVED="dsomero"
diff --git a/libraries/COLAMD/README b/libraries/COLAMD/README
new file mode 100644
index 0000000000..51c1047aed
--- /dev/null
+++ b/libraries/COLAMD/README
@@ -0,0 +1,8 @@
+The COLAMD column approximate minimum degree ordering algorithm computes
+a permutation vector P such that the LU factorization of A (:,P)
+tends to be sparser than that of A. The Cholesky factorization of
+(A (:,P))'*(A (:,P)) will also tend to be sparser than that of A'*A.
+
+This package is part of SuiteSparse.
+
+Requires UFconfig.
diff --git a/libraries/COLAMD/autotoolize.diff b/libraries/COLAMD/autotoolize.diff
new file mode 100644
index 0000000000..331f0d1722
--- /dev/null
+++ b/libraries/COLAMD/autotoolize.diff
@@ -0,0 +1,100 @@
+diff --git a/Demo/Makefile.am b/Demo/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Demo/Makefile.am
+@@ -0,0 +1,31 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++LDADD = $(top_builddir)/Source/libcolamd.la
++
++EXTRA_DIST = \
++ colamd_example.out \
++ colamd_l_example.out
++
++# Disable the .out implicit pattern rule. Prevents GNU make from
++# adding bogus dependencies for the .out files listed above.
++%.out: %
++
++check_PROGRAMS = \
++ colamd_example \
++ colamd_l_example
++
++colamd_example_SOURCES = colamd_example.c
++colamd_l_example_SOURCES = colamd_l_example.c
++
++check-local: $(check_PROGRAMS) $(check_PROGRAMS:=.out)
++ @for i in $(check_PROGRAMS); do \
++ echo "Testing $$i"; \
++ ./$$i$(EXEEXT) > my_$$i.out; \
++ if diff -u $$i.out my_$$i.out; then \
++ echo "Test $$i PASSED."; \
++ else \
++ echo "Test $$i FAILED."; \
++ fi; \
++ done
++
++clean-local:
++ -$(RM) my_*.out
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,3 @@
++SUBDIRS = Source Demo
++EXTRA_DIST = README.txt Doc/ChangeLog Doc/lesser.txt
++include_HEADERS = Include/colamd.h
+diff --git a/Source/Makefile.am b/Source/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Source/Makefile.am
+@@ -0,0 +1,18 @@
++AM_CPPFLAGS = -I$(top_builddir)/Include
++
++COLAMDSRC = \
++ colamd.c
++
++lib_LTLIBRARIES = libcolamd.la
++noinst_LTLIBRARIES = libcolamdi.la libcolamdl.la
++
++libcolamdi_la_SOURCES = $(COLAMDSRC)
++libcolamdi_la_LIBADD = -lm
++
++libcolamdl_la_SOURCES = $(COLAMDSRC)
++libcolamdl_la_LIBADD = -lm
++libcolamdl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
++
++libcolamd_la_SOURCES = colamd_global.c
++libcolamd_la_LIBADD = libcolamdi.la libcolamdl.la
++libcolamd_la_LDFLAGS = -no-undefined -version-info 9:2:7
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,28 @@
++AC_PREREQ([2.65])
++AC_INIT([COLAMD], [2.7.2], [davis@cise.ufl.edu])
++AC_CONFIG_SRCDIR([Source/colamd_global.c])
++AC_CONFIG_HEADER([config.h])
++AM_INIT_AUTOMAKE([foreign])
++LT_INIT
++
++AC_PROG_INSTALL
++AC_PROG_CC
++
++LIBS_SAVED=$LIBS
++
++AC_CHECK_LIB([m], [sqrt])
++
++AC_CHECK_HEADERS([limits.h stdlib.h])
++AC_CHECK_HEADERS([UFconfig.h])
++
++AC_TYPE_SIZE_T
++
++AC_CHECK_FUNCS([sqrt])
++
++LIBS=$LIBS_SAVED
++
++AC_CONFIG_FILES([
++ Makefile
++ Demo/Makefile
++ Source/Makefile])
++AC_OUTPUT
diff --git a/libraries/COLAMD/slack-desc b/libraries/COLAMD/slack-desc
new file mode 100644
index 0000000000..fff3850be9
--- /dev/null
+++ b/libraries/COLAMD/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+COLAMD: COLAMD (sparse matrix ordering routines)
+COLAMD:
+COLAMD: The COLAMD column approximate minimum degree ordering algorithm
+COLAMD: computes a permutation vector P such that the LU factorization of
+COLAMD: A (:,P) tends to be sparser than that of A. The Cholesky
+COLAMD: factorization of (A (:,P))'*(A (:,P)) will also tend to be sparser
+COLAMD: than that of A'*A.
+COLAMD:
+COLAMD:
+COLAMD:
+COLAMD: