summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/KLU/KLU.SlackBuild76
-rw-r--r--libraries/KLU/KLU.info10
-rw-r--r--libraries/KLU/README6
-rw-r--r--libraries/KLU/autotoolize.diff218
-rw-r--r--libraries/KLU/slack-desc19
5 files changed, 329 insertions, 0 deletions
diff --git a/libraries/KLU/KLU.SlackBuild b/libraries/KLU/KLU.SlackBuild
new file mode 100644
index 0000000000..d521097e48
--- /dev/null
+++ b/libraries/KLU/KLU.SlackBuild
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# Slackware build script for KLU
+# Written by Kyle Guinn <elyk03@gmail.com>
+
+PRGNAM=KLU
+VERSION=${VERSION:-1.1.1}
+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/KLU/KLU.info b/libraries/KLU/KLU.info
new file mode 100644
index 0000000000..82b73057ca
--- /dev/null
+++ b/libraries/KLU/KLU.info
@@ -0,0 +1,10 @@
+PRGNAM="KLU"
+VERSION="1.1.1"
+HOMEPAGE="http://www.cise.ufl.edu/research/sparse/klu/"
+DOWNLOAD="http://www.cise.ufl.edu/research/sparse/klu/KLU-1.1.1.tar.gz"
+MD5SUM="ab0f4faf5fe200b0286ee6a21853c414"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Kyle Guinn"
+EMAIL="elyk03@gmail.com"
+APPROVED="dsomero"
diff --git a/libraries/KLU/README b/libraries/KLU/README
new file mode 100644
index 0000000000..0fca35503a
--- /dev/null
+++ b/libraries/KLU/README
@@ -0,0 +1,6 @@
+KLU is a sparse LU factorization algorithm well-suited for use in circuit
+simulation.
+
+This package is part of SuiteSparse.
+
+Requires UFconfig, AMD, BTF, COLAMD, and CHOLMOD.
diff --git a/libraries/KLU/autotoolize.diff b/libraries/KLU/autotoolize.diff
new file mode 100644
index 0000000000..5fd6db0b91
--- /dev/null
+++ b/libraries/KLU/autotoolize.diff
@@ -0,0 +1,218 @@
+diff --git a/Demo/Makefile.am b/Demo/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Demo/Makefile.am
+@@ -0,0 +1,44 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++LDADD = $(top_builddir)/Source/libklu.la
++
++EXTRA_DIST = \
++ klu_simple.out \
++ kludemo.out
++
++# Disable the .out implicit pattern rule. Prevents GNU make from
++# adding bogus dependencies for the .out files listed above.
++%.out: %
++
++check_PROGRAMS = klu_simple kludemo kluldemo
++
++TESTS = klu_simple
++
++klu_simple_SOURCES = klu_simple.c
++
++kludemo_SOURCES = kludemo.c
++kludemo_LDADD = $(LDADD) -lcholmod -lm
++
++kluldemo_SOURCES = kluldemo.c
++kluldemo_LDADD = $(LDADD) -lcholmod -lm
++
++MATRICES = \
++ ../Matrix/1c.mtx \
++ ../Matrix/arrowc.mtx \
++ ../Matrix/arrow.mtx \
++ ../Matrix/impcol_a.mtx \
++ ../Matrix/w156.mtx \
++ ../Matrix/ctina.mtx
++
++check-local: kludemo kluldemo $(MATRICES)
++ -./kludemo < ../Matrix/1c.mtx
++ -./kludemo < ../Matrix/arrowc.mtx
++ -./kludemo < ../Matrix/arrow.mtx
++ -./kludemo < ../Matrix/impcol_a.mtx
++ -./kludemo < ../Matrix/w156.mtx
++ -./kludemo < ../Matrix/ctina.mtx
++ -./kluldemo < ../Matrix/1c.mtx
++ -./kluldemo < ../Matrix/arrowc.mtx
++ -./kluldemo < ../Matrix/arrow.mtx
++ -./kluldemo < ../Matrix/impcol_a.mtx
++ -./kluldemo < ../Matrix/w156.mtx
++ -./kluldemo < ../Matrix/ctina.mtx
+diff --git a/Doc/Makefile.am b/Doc/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Doc/Makefile.am
+@@ -0,0 +1,41 @@
++# Generating KLU_UserGuide.pdf seems to be broken, so
++# just distribute the copy that came in the tarball.
++EXTRA_DIST = \
++ ChangeLog \
++ lesser.txt \
++ palamadai_e.pdf \
++ KLU_UserGuide.pdf
++
++dist_noinst_DATA = KLU_UserGuide.tex KLU_UserGuide.bib
++pdf_DATA = KLU_UserGuide.pdf palamadai_e.pdf
++
++#SRC = \
++# klu_h.tex \
++# btf_h.tex \
++# klu_simple_c.tex
++#
++#klu_h.tex: ../Include/klu.h
++# echo '\\begin{verbatim}' > $@
++# expand -8 $< >> $@
++# echo '\end{verbatim}' >> $@
++#
++## FIXME: Probably shouldn't rely on this location for btf.h.
++#btf_h.tex: /usr/include/btf.h
++# echo '\\begin{verbatim}' > $@
++# expand -8 $< >> $@
++# echo '\end{verbatim}' >> $@
++#
++#klu_simple_c.tex: ../Demo/klu_simple.c
++# echo '\\begin{verbatim}' > $@
++# expand -8 $< >> $@
++# echo '\end{verbatim}' >> $@
++#
++#KLU_UserGuide.pdf: KLU_UserGuide.tex KLU_UserGuide.bib $(SRC)
++# pdflatex KLU_UserGuide
++# bibtex KLU_UserGuide
++# pdflatex KLU_UserGuide
++# pdflatex KLU_UserGuide
++#
++#clean-local:
++# -$(RM) *.aux *.bbl *.blg *.log *.toc
++# -$(RM) $(SRC)
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,3 @@
++SUBDIRS = Source User Matrix Demo Doc
++EXTRA_DIST = README.txt
++include_HEADERS = Include/klu.h Include/klu_internal.h Include/klu_version.h
+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 = \
++ 1c.mtx \
++ GD99_cc.mtx \
++ arrow.mtx \
++ arrowc.mtx \
++ ctina.mtx \
++ impcol_a.mtx \
++ one.mtx \
++ onec.mtx \
++ two.mtx \
++ w156.mtx
+diff --git a/Source/Makefile.am b/Source/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/Source/Makefile.am
+@@ -0,0 +1,40 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++
++noinst_LTLIBRARIES = libklud.la libkluz.la libklul.la libkluzl.la
++
++KLUSRC = \
++ klu.c \
++ klu_diagnostics.c \
++ klu_dump.c \
++ klu_extract.c \
++ klu_factor.c \
++ klu_free_numeric.c \
++ klu_kernel.c \
++ klu_refactor.c \
++ klu_scale.c \
++ klu_solve.c \
++ klu_sort.c \
++ klu_tsolve.c
++
++CKLUSRC = \
++ klu_analyze.c \
++ klu_analyze_given.c \
++ klu_defaults.c \
++ klu_free_symbolic.c \
++ klu_memory.c
++
++libklud_la_SOURCES = $(KLUSRC) $(CKLUSRC)
++
++libkluz_la_SOURCES = $(KLUSRC)
++libkluz_la_CPPFLAGS = $(AM_CPPFLAGS) -DCOMPLEX
++
++libklul_la_SOURCES = $(KLUSRC) $(CKLUSRC)
++libklul_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
++
++libkluzl_la_SOURCES = $(KLUSRC)
++libkluzl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG -DCOMPLEX
++
++lib_LTLIBRARIES = libklu.la
++libklu_la_SOURCES =
++libklu_la_LIBADD = libklud.la libkluz.la libklul.la libkluzl.la -lamd -lbtf -lcolamd
++libklu_la_LDFLAGS = -no-undefined -version-info 2:1:1
+diff --git a/User/Makefile.am b/User/Makefile.am
+new file mode 100644
+--- /dev/null
++++ b/User/Makefile.am
+@@ -0,0 +1,9 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++
++EXTRA_DIST = README.txt
++
++include_HEADERS = klu_cholmod.h
++lib_LTLIBRARIES = libklu_cholmod.la
++libklu_cholmod_la_SOURCES = klu_cholmod.c klu_l_cholmod.c
++libklu_cholmod_la_LIBADD = -lcholmod
++libklu_cholmod_la_LDFLAGS = -no-undefined -version-info 2:1:1
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,35 @@
++AC_PREREQ([2.65])
++AC_INIT([KLU], [1.1.1], [davis@cise.ufl.edu])
++AC_CONFIG_SRCDIR([Source/klu.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_LIB([amd], [amd_order])
++AC_CHECK_LIB([btf], [btf_order])
++AC_CHECK_LIB([colamd], [colamd_recommended])
++AC_CHECK_LIB([cholmod], [cholmod_start])
++
++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
++ Doc/Makefile
++ Matrix/Makefile
++ Source/Makefile
++ User/Makefile])
++AC_OUTPUT
diff --git a/libraries/KLU/slack-desc b/libraries/KLU/slack-desc
new file mode 100644
index 0000000000..0b65eadf82
--- /dev/null
+++ b/libraries/KLU/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------------------------------------------------------|
+KLU: KLU (sparse matrix factorizing routines)
+KLU:
+KLU: KLU is a sparse LU factorization algorithm well-suited for use in
+KLU: circuit simulation.
+KLU:
+KLU:
+KLU:
+KLU:
+KLU:
+KLU:
+KLU: