libraries/CCOLAMD: Added (sparse matrix ordering routines)

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
Kyle Guinn 2010-08-24 00:01:12 -04:00 committed by Erik Hanson
parent d0b90b7f56
commit 1eaac72b9e
5 changed files with 211 additions and 0 deletions

View file

@ -0,0 +1,76 @@
#!/bin/sh
# Slackware build script for CCOLAMD
# Written by Kyle Guinn <elyk03@gmail.com>
PRGNAM=CCOLAMD
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}

View file

@ -0,0 +1,10 @@
PRGNAM="CCOLAMD"
VERSION="2.7.2"
HOMEPAGE="http://www.cise.ufl.edu/research/sparse/ccolamd/"
DOWNLOAD="http://www.cise.ufl.edu/research/sparse/ccolamd/CCOLAMD-2.7.2.tar.gz"
MD5SUM="79d813d5b54951060fc264172bfb5ca6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Kyle Guinn"
EMAIL="elyk03@gmail.com"
APPROVED="dsomero"

6
libraries/CCOLAMD/README Normal file
View file

@ -0,0 +1,6 @@
CCOLAMD computes a column approximate minimum degree ordering algorithm
(like COLAMD), but it can also be given a set of ordering constraints.
This package is part of SuiteSparse.
Requires UFconfig.

View file

@ -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/libccolamd.la
+
+EXTRA_DIST = \
+ ccolamd_example.out \
+ ccolamd_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 = \
+ ccolamd_example \
+ ccolamd_l_example
+
+ccolamd_example_SOURCES = ccolamd_example.c
+ccolamd_l_example_SOURCES = ccolamd_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/ccolamd.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
+
+CCOLAMDSRC = \
+ ccolamd.c
+
+lib_LTLIBRARIES = libccolamd.la
+noinst_LTLIBRARIES = libccolamdl.la libccolamdi.la
+
+libccolamdi_la_SOURCES = $(CCOLAMDSRC)
+libccolamdi_la_LIBADD = -lm
+
+libccolamdl_la_SOURCES = $(CCOLAMDSRC)
+libccolamdl_la_LIBADD = -lm
+libccolamdl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
+
+libccolamd_la_SOURCES = ccolamd_global.c
+libccolamd_la_LIBADD = libccolamdi.la libccolamdl.la
+libccolamd_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([CCOLAMD], [2.7.2], [davis@cise.ufl.edu])
+AC_CONFIG_SRCDIR([Source/ccolamd_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

View file

@ -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------------------------------------------------------|
CCOLAMD: CCOLAMD (sparse matrix ordering routines)
CCOLAMD:
CCOLAMD: CCOLAMD computes a column approximate minimum degree ordering
CCOLAMD: algorithm (like COLAMD), but it can also be given a set of
CCOLAMD: ordering constraints.
CCOLAMD:
CCOLAMD:
CCOLAMD:
CCOLAMD:
CCOLAMD:
CCOLAMD: