summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2008-02-05 18:28:01 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2008-02-05 18:28:01 +0000
commitfefc2485c2416ba5731decf4311e118f010afa32 (patch)
tree43e57c2e1243bbd2744311043f8b6a0e2f34259c /sci-libs/cholmod
parentfixed syntax on cholmod use flags (diff)
downloadhistorical-fefc2485c2416ba5731decf4311e118f010afa32.tar.gz
historical-fefc2485c2416ba5731decf4311e118f010afa32.tar.bz2
historical-fefc2485c2416ba5731decf4311e118f010afa32.zip
Initial import. Thanks to Justin Bronder for his work, closing bug #173900
Package-Manager: portage-2.1.4
Diffstat (limited to 'sci-libs/cholmod')
-rw-r--r--sci-libs/cholmod/ChangeLog11
-rw-r--r--sci-libs/cholmod/Manifest15
-rw-r--r--sci-libs/cholmod/cholmod-1.6.0.ebuild88
-rw-r--r--sci-libs/cholmod/files/cholmod-1.6.0-autotools.patch670
-rw-r--r--sci-libs/cholmod/metadata.xml9
5 files changed, 793 insertions, 0 deletions
diff --git a/sci-libs/cholmod/ChangeLog b/sci-libs/cholmod/ChangeLog
new file mode 100644
index 000000000000..438c9b11a8ca
--- /dev/null
+++ b/sci-libs/cholmod/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sci-libs/cholmod
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/cholmod/ChangeLog,v 1.1 2008/02/05 18:28:00 bicatali Exp $
+
+*cholmod-1.6.0 (05 Feb 2008)
+
+ 05 Feb 2008; SĂ©bastien Fabbro <bicatali@gentoo.org>
+ +files/cholmod-1.6.0-autotools.patch, +metadata.xml,
+ +cholmod-1.6.0.ebuild:
+ Initial import. Thanks to Justin Bronder for his work, see bug #173900
+
diff --git a/sci-libs/cholmod/Manifest b/sci-libs/cholmod/Manifest
new file mode 100644
index 000000000000..7e9030b7557c
--- /dev/null
+++ b/sci-libs/cholmod/Manifest
@@ -0,0 +1,15 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX cholmod-1.6.0-autotools.patch 21780 RMD160 7e5cb1a79a0d450e15ec959ab730cdfc36f4be06 SHA1 2e5590fe861bab8d5b62903c7ca79f4b09623461 SHA256 02c09e70789351387ae7adedcdeb19c6e037de27e6f75a6440e94b6cd4449c2f
+DIST CHOLMOD-1.6.0.tar.gz 1092883 RMD160 0c0b8b6f9e9bab2d95791c4ca12d0d8cc692c0e5 SHA1 be19fa1ac19d190e9f3aa1aee7ba88a7ce0111db SHA256 6e13d49c5452cd99e5eb828d50a55dc56d399751fe5dee82b0a5a3dbefd24e0e
+EBUILD cholmod-1.6.0.ebuild 2380 RMD160 c116bf8fb57b7b7194184a3169401720650eb2ce SHA1 958179c72ed3eb9c48a17d4feaa9751c01daad64 SHA256 496ba6a39a0ab0ac69dd969d9d53f4d557bed16691002c9389f4fb593e3b3c88
+MISC ChangeLog 446 RMD160 70f9147953037223ea6e1c0134c7fda8faa5ff28 SHA1 15813ef16b7cd3640c714fcc881f6389f0046f39 SHA256 aa46102e2c445e842b31434966f2f3cbbe0dcbf0a3f0e70b6a35151145d2dcc9
+MISC metadata.xml 298 RMD160 e4dce9b47ecf37cae07578b6b651f5ab48b62798 SHA1 9d370cc079d58938a7e2b4aab021d119f5890328 SHA256 747b5ab49213efb826b98273e83905c85cb16e25d6e4a182c58b12a3dda46398
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.7 (GNU/Linux)
+
+iD8DBQFHqKq61ycZbhPLE2ARAjfcAKCkF9TnJ/o5HZjh+UdmM+WBDcj6iQCgsD7r
+MKq+/8x8yDl4J2R005KQK34=
+=xr1x
+-----END PGP SIGNATURE-----
diff --git a/sci-libs/cholmod/cholmod-1.6.0.ebuild b/sci-libs/cholmod/cholmod-1.6.0.ebuild
new file mode 100644
index 000000000000..0e5f71d97a06
--- /dev/null
+++ b/sci-libs/cholmod/cholmod-1.6.0.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/cholmod/cholmod-1.6.0.ebuild,v 1.1 2008/02/05 18:28:00 bicatali Exp $
+
+inherit autotools eutils
+
+MY_PN=CHOLMOD
+
+DESCRIPTION="Sparse Cholesky factorization and update/downdate library"
+HOMEPAGE="http://www.cise.ufl.edu/research/sparse/cholmod"
+SRC_URI="http://www.cise.ufl.edu/research/sparse/${PN}/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1 GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc metis minimal supernodal"
+
+DEPEND="supernodal? ( virtual/lapack )
+ sci-libs/amd
+ sci-libs/colamd
+ metis? ( sci-libs/camd sci-libs/ccolamd sci-libs/metis )"
+
+S="${WORKDIR}/${MY_PN}"
+
+src_unpack() {
+ unpack "${A}"
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-autotools.patch
+
+ # We need to take care of cholmod.h here as well depending on
+ # the USE flags, otherwise the installed file will reference
+ # headers that we may not have included.
+ if use minimal; then
+ sed -i '/^#define CHOLMOD_/{N;
+ s:\(#define\) \(CHOLMOD_CONFIG_H\)\n:\1 \2\n\1 NMODIFY 1\n\1 NMATRIXOPS 1\n:}' \
+ Include/cholmod_config.h
+ fi
+
+ if ! use supernodal; then
+ sed -i '/^#define CHOLMOD_/{N;
+ s:\(#define\) \(CHOLMOD_CONFIG_H\)\n:\1 \2\n\1 NSUPERNODAL 1\n:}' \
+ Include/cholmod_config.h
+ fi
+
+ if ! use metis; then
+ sed -i '/^#define CHOLMOD_/{N;
+ s:\(#define\) \(CHOLMOD_CONFIG_H\)\n:\1 \2\n\1 NPARTITION 1\n:}' \
+ Include/cholmod_config.h
+ fi
+
+ eautoreconf
+}
+
+src_compile() {
+ local myconf=""
+
+ # Minimal is used to build only the LGPL libraries...
+ if use minimal; then
+ myconf="--disable-mod-modify
+ --disable-mod-matrixops"
+ fi
+
+ econf \
+ ${myconf} \
+ $(use_enable supernodal mod-supernodal) \
+ $(use_enable metis mod-partition) \
+ || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_test() {
+ if ! use supernodal || ! use metis || use minimal; then
+ ewarn "According to your useflags, some modules were not built on"
+ ewarn "purpose. This can cause the tests included with Cholmod"
+ ewarn "to fail. Rebuild with USE=\"supernodal metis -minimal\""
+ ewarn "if you care."
+ fi
+ cd "${S}"/Demo
+ emake test || die "emake test failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc README.txt Doc/ChangeLog || die "dodoc failed"
+ if use doc; then
+ dodoc Doc/UserGuide.pdf || die "pdf install failed"
+ fi
+}
diff --git a/sci-libs/cholmod/files/cholmod-1.6.0-autotools.patch b/sci-libs/cholmod/files/cholmod-1.6.0-autotools.patch
new file mode 100644
index 000000000000..692d3d197e9c
--- /dev/null
+++ b/sci-libs/cholmod/files/cholmod-1.6.0-autotools.patch
@@ -0,0 +1,670 @@
+--- configure.ac 1970-01-01 01:00:00.000000000 +0100
++++ configure.ac 2008-02-01 19:12:59.582510299 +0000
+@@ -0,0 +1,137 @@
++# -*- Autoconf -*-
++AC_PREREQ(2.59)
++AC_INIT(cholmod, 1.6.0, davis@cise.ufl.edu)
++AM_INIT_AUTOMAKE([foreign])
++AC_PROG_INSTALL
++AC_PROG_LIBTOOL
++
++AC_CHECK_LIB(m, sqrt)
++AC_CHECK_HEADERS(UFconfig.h)
++
++AC_ARG_ENABLE(mod-check,
++ [AC_HELP_STRING([--enable-mod-check],
++ [build the check module])],
++ [mod_check=$enableval],
++ [mod_check="yes"])
++AC_MSG_RESULT($mod_check)
++
++AC_ARG_ENABLE(mod-cholesky,
++ [AC_HELP_STRING([--enable-mod-cholesky],
++ [build the cholesky module])],
++ [mod_cholesky=$enableval],
++ [mod_cholesky="yes"])
++AC_MSG_RESULT($mod_cholesky)
++
++AC_ARG_ENABLE(mod-partition,
++ [AC_HELP_STRING([--enable-mod-partition],
++ [build the partition module])],
++ [mod_partition=$enableval],
++ [mod_partition="yes"])
++AC_MSG_RESULT($mod_partition)
++
++AC_ARG_ENABLE(mod-matrixops,
++ [AC_HELP_STRING([--enable-mod-matrixops],
++ [build the matrixops module])],
++ [mod_matrixops=$enableval],
++ [mod_matrixops="yes"])
++AC_MSG_RESULT($mod_matrixops)
++
++AC_ARG_ENABLE(mod-modify,
++ [AC_HELP_STRING([--enable-mod-modify],
++ [build the modify module])],
++ [mod_modify=$enableval],
++ [mod_modify="yes"])
++AC_MSG_RESULT($mod_modify)
++
++AC_ARG_ENABLE(mod-supernodal,
++ [AC_HELP_STRING([--enable-mod-supernodal],
++ [build the supernodal module])],
++ [mod_supernodal=$enableval],
++ [mod_supernodal="yes"])
++AC_MSG_RESULT($mod_supernodal)
++
++if test x$mod_check = xno; then
++ AC_DEFINE(NCHECK)
++else
++ MODULES="$MODULES Check"
++fi
++
++if test x$mod_cholesky = xno; then
++ AC_DEFINE(NCHOLESKY)
++else
++ MODULES="$MODULES Cholesky"
++fi
++
++if test x$mod_partition = xno; then
++ AC_DEFINE(NPARTITION)
++else
++ MODULES="$MODULES Partition"
++ AC_CHECK_HEADERS(metis.h)
++ AC_CHECK_LIB(metis, METIS_NodeND, [], \
++ [AC_MSG_ERROR([Cannot find libmetis])])
++
++ AC_CHECK_HEADERS(ccolamd.h)
++ AC_CHECK_LIB(ccolamd, ccolamd_report, [], \
++ [AC_MSG_ERROR([Cannot find libccolamd])])
++
++ AC_CHECK_HEADERS(camd.h)
++ AC_CHECK_LIB(camd, camd_info, [], \
++ [AC_MSG_ERROR([Cannot find libcamd])])
++fi
++
++if test x$mod_matrixops = xno; then
++ AC_DEFINE(NMATRIXOPS)
++else
++ MODULES="$MODULES MatrixOps"
++fi
++
++if test x$mod_modify = xno; then
++ AC_DEFINE(NMODIFY)
++else
++ MODULES="$MODULES Modify"
++fi
++
++if test x$mod_supernodal = xno; then
++ AC_DEFINE(NSUPERNODAL)
++else
++ MODULES="$MODULES Supernodal"
++ sinclude(acx_blas.m4)
++ sinclude(acx_lapack.m4)
++ ACX_LAPACK
++
++ if test x"$BLAS_LIBS" = x; then
++ AC_MSG_ERROR([Cannot find blas libraries])
++ fi
++
++ if test x"$LAPACK_LIBS" = x; then
++ AC_MSG_ERROR([Cannot find lapack libraries])
++ fi
++fi
++
++AC_SUBST([MODULES])
++AM_CONDITIONAL([MOD_CHECK], [test x$mod_check = xyes])
++AM_CONDITIONAL([MOD_CHOLESKY], [test x$mod_cholesky = xyes])
++AM_CONDITIONAL([MOD_PARTITION], [test x$mod_partition = xyes])
++AM_CONDITIONAL([MOD_MATRIXOPS], [test x$mod_matrixops = xyes])
++AM_CONDITIONAL([MOD_MODIFY], [test x$mod_modify = xyes])
++AM_CONDITIONAL([MOD_SUPERNODAL], [test x$mod_supernodal = xyes])
++AC_CHECK_HEADERS(amd.h)
++AC_CHECK_LIB(amd, amd_info, [], \
++ [AC_MSG_ERROR([Cannot find libamd])])
++
++AC_CHECK_HEADERS(colamd.h)
++AC_CHECK_LIB(colamd, colamd_recommended, [], \
++ [AC_MSG_ERROR([Cannot find libcolamd])])
++
++AC_CONFIG_FILES(
++ Makefile \
++ Check/Makefile \
++ Cholesky/Makefile \
++ Core/Makefile \
++ Include/Makefile \
++ MatrixOps/Makefile \
++ Modify/Makefile \
++ Partition/Makefile \
++ Supernodal/Makefile \
++ Demo/Makefile)
++AC_OUTPUT
+--- acx_blas.m4 1970-01-01 01:00:00.000000000 +0100
++++ acx_blas.m4 2008-02-01 18:53:12.284468336 +0000
+@@ -0,0 +1,191 @@
++##### http://autoconf-archive.cryp.to/acx_blas.html
++#
++# SYNOPSIS
++#
++# ACX_BLAS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
++#
++# DESCRIPTION
++#
++# This macro looks for a library that implements the BLAS
++# linear-algebra interface (see http://www.netlib.org/blas/). On
++# success, it sets the BLAS_LIBS output variable to hold the
++# requisite library linkages.
++#
++# To link with BLAS, you should link with:
++#
++# $BLAS_LIBS $LIBS $FLIBS
++#
++# in that order. FLIBS is the output variable of the
++# AC_F77_LIBRARY_LDFLAGS macro (called if necessary by ACX_BLAS), and
++# is sometimes necessary in order to link with F77 libraries. Users
++# will also need to use AC_F77_DUMMY_MAIN (see the autoconf manual),
++# for the same reason.
++#
++# Many libraries are searched for, from ATLAS to CXML to ESSL. The
++# user may also use --with-blas=<lib> in order to use some specific
++# BLAS library <lib>. In order to link successfully, however, be
++# aware that you will probably need to use the same Fortran compiler
++# (which can be set via the F77 env. var.) as was used to compile the
++# BLAS library.
++#
++# ACTION-IF-FOUND is a list of shell commands to run if a BLAS
++# library is found, and ACTION-IF-NOT-FOUND is a list of commands to
++# run it if it is not found. If ACTION-IF-FOUND is not specified, the
++# default action will define HAVE_BLAS.
++#
++# This macro requires autoconf 2.50 or later.
++#
++# LAST MODIFICATION
++#
++# 2007-07-29
++#
++# COPYLEFT
++#
++# Copyright (c) 2007 Steven G. Johnson <stevenj@alum.mit.edu>
++#
++# This program is free software: you can redistribute it and/or
++# modify it under the terms of the GNU General Public License as
++# published by the Free Software Foundation, either version 3 of the
++# License, or (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program. If not, see
++# <http://www.gnu.org/licenses/>.
++#
++# As a special exception, the respective Autoconf Macro's copyright
++# owner gives unlimited permission to copy, distribute and modify the
++# configure scripts that are the output of Autoconf when processing
++# the Macro. You need not follow the terms of the GNU General Public
++# License when using or distributing such scripts, even though
++# portions of the text of the Macro appear in them. The GNU General
++# Public License (GPL) does govern all other use of the material that
++# constitutes the Autoconf Macro.
++#
++# This special exception to the GPL applies to versions of the
++# Autoconf Macro released by the Autoconf Macro Archive. When you
++# make and distribute a modified version of the Autoconf Macro, you
++# may extend this special exception to the GPL to apply to your
++# modified version as well.
++
++AC_DEFUN([ACX_BLAS], [
++AC_PREREQ(2.50)
++AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
++acx_blas_ok=no
++
++AC_ARG_WITH(blas,
++ [AC_HELP_STRING([--with-blas=<lib>], [use BLAS library <lib>])])
++case $with_blas in
++ yes | "") ;;
++ no) acx_blas_ok=disable ;;
++ -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;;
++ *) BLAS_LIBS="-l$with_blas" ;;
++esac
++
++# Get fortran linker names of BLAS functions to check for.
++AC_F77_FUNC(sgemm)
++AC_F77_FUNC(dgemm)
++
++acx_blas_save_LIBS="$LIBS"
++LIBS="$LIBS $FLIBS"
++
++# First, check BLAS_LIBS environment variable
++if test $acx_blas_ok = no; then
++if test "x$BLAS_LIBS" != x; then
++ save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
++ AC_MSG_CHECKING([for $sgemm in $BLAS_LIBS])
++ AC_TRY_LINK_FUNC($sgemm, [acx_blas_ok=yes], [BLAS_LIBS=""])
++ AC_MSG_RESULT($acx_blas_ok)
++ LIBS="$save_LIBS"
++fi
++fi
++
++# BLAS linked to by default? (happens on some supercomputers)
++if test $acx_blas_ok = no; then
++ save_LIBS="$LIBS"; LIBS="$LIBS"
++ AC_CHECK_FUNC($sgemm, [acx_blas_ok=yes])
++ LIBS="$save_LIBS"
++fi
++
++# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/)
++if test $acx_blas_ok = no; then
++ AC_CHECK_LIB(atlas, ATL_xerbla,
++ [AC_CHECK_LIB(f77blas, $sgemm,
++ [AC_CHECK_LIB(cblas, cblas_dgemm,
++ [acx_blas_ok=yes
++ BLAS_LIBS="-lcblas -lf77blas -latlas"],
++ [], [-lf77blas -latlas])],
++ [], [-latlas])])
++fi
++
++# BLAS in PhiPACK libraries? (requires generic BLAS lib, too)
++if test $acx_blas_ok = no; then
++ AC_CHECK_LIB(blas, $sgemm,
++ [AC_CHECK_LIB(dgemm, $dgemm,
++ [AC_CHECK_LIB(sgemm, $sgemm,
++ [acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas"],
++ [], [-lblas])],
++ [], [-lblas])])
++fi
++
++# BLAS in Alpha CXML library?
++if test $acx_blas_ok = no; then
++ AC_CHECK_LIB(cxml, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-lcxml"])
++fi
++
++# BLAS in Alpha DXML library? (now called CXML, see above)
++if test $acx_blas_ok = no; then
++ AC_CHECK_LIB(dxml, $sgemm, [acx_blas_ok=yes;BLAS_LIBS="-ldxml"])
++fi
++
++# BLAS in Sun Performance library?
++if test $acx_blas_ok = no; then
++ if test "x$GCC" != xyes; then # only works with Sun CC
++ AC_CHECK_LIB(sunmath, acosp,
++ [AC_CHECK_LIB(sunperf, $sgemm,
++ [BLAS_LIBS="-xlic_lib=sunperf -lsunmath"
++ acx_blas_ok=yes],[],[-lsunmath])])
++ fi
++fi
++
++# BLAS in SCSL library? (SGI/Cray Scientific Library)
++if test $acx_blas_ok = no; then
++ AC_CHECK_LIB(scs, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lscs"])
++fi
++
++# BLAS in SGIMATH library?
++if test $acx_blas_ok = no; then
++ AC_CHECK_LIB(complib.sgimath, $sgemm,
++ [acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath"])
++fi
++
++# BLAS in IBM ESSL library? (requires generic BLAS lib, too)
++if test $acx_blas_ok = no; then
++ AC_CHECK_LIB(blas, $sgemm,
++ [AC_CHECK_LIB(essl, $sgemm,
++ [acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas"],
++ [], [-lblas $FLIBS])])
++fi
++
++# Generic BLAS library?
++if test $acx_blas_ok = no; then
++ AC_CHECK_LIB(blas, $sgemm, [acx_blas_ok=yes; BLAS_LIBS="-lblas"])
++fi
++
++AC_SUBST(BLAS_LIBS)
++
++LIBS="$acx_blas_save_LIBS"
++
++# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
++if test x"$acx_blas_ok" = xyes; then
++ ifelse([$1],,AC_DEFINE(HAVE_BLAS,1,[Define if you have a BLAS library.]),[$1])
++ :
++else
++ acx_blas_ok=no
++ $2
++fi
++])dnl ACX_BLAS
+--- acx_lapack.m4 1970-01-01 01:00:00.000000000 +0100
++++ acx_lapack.m4 2008-02-01 18:53:12.284468336 +0000
+@@ -0,0 +1,133 @@
++##### http://autoconf-archive.cryp.to/acx_lapack.html
++#
++# SYNOPSIS
++#
++# ACX_LAPACK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
++#
++# DESCRIPTION
++#
++# This macro looks for a library that implements the LAPACK
++# linear-algebra interface (see http://www.netlib.org/lapack/). On
++# success, it sets the LAPACK_LIBS output variable to hold the
++# requisite library linkages.
++#
++# To link with LAPACK, you should link with:
++#
++# $LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS
++#
++# in that order. BLAS_LIBS is the output variable of the ACX_BLAS
++# macro, called automatically. FLIBS is the output variable of the
++# AC_F77_LIBRARY_LDFLAGS macro (called if necessary by ACX_BLAS), and
++# is sometimes necessary in order to link with F77 libraries. Users
++# will also need to use AC_F77_DUMMY_MAIN (see the autoconf manual),
++# for the same reason.
++#
++# The user may also use --with-lapack=<lib> in order to use some
++# specific LAPACK library <lib>. In order to link successfully,
++# however, be aware that you will probably need to use the same
++# Fortran compiler (which can be set via the F77 env. var.) as was
++# used to compile the LAPACK and BLAS libraries.
++#
++# ACTION-IF-FOUND is a list of shell commands to run if a LAPACK
++# library is found, and ACTION-IF-NOT-FOUND is a list of commands to
++# run it if it is not found. If ACTION-IF-FOUND is not specified, the
++# default action will define HAVE_LAPACK.
++#
++# LAST MODIFICATION
++#
++# 2007-07-29
++#
++# COPYLEFT
++#
++# Copyright (c) 2007 Steven G. Johnson <stevenj@alum.mit.edu>
++#
++# This program is free software: you can redistribute it and/or
++# modify it under the terms of the GNU General Public License as
++# published by the Free Software Foundation, either version 3 of the
++# License, or (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program. If not, see
++# <http://www.gnu.org/licenses/>.
++#
++# As a special exception, the respective Autoconf Macro's copyright
++# owner gives unlimited permission to copy, distribute and modify the
++# configure scripts that are the output of Autoconf when processing
++# the Macro. You need not follow the terms of the GNU General Public
++# License when using or distributing such scripts, even though
++# portions of the text of the Macro appear in them. The GNU General
++# Public License (GPL) does govern all other use of the material that
++# constitutes the Autoconf Macro.
++#
++# This special exception to the GPL applies to versions of the
++# Autoconf Macro released by the Autoconf Macro Archive. When you
++# make and distribute a modified version of the Autoconf Macro, you
++# may extend this special exception to the GPL to apply to your
++# modified version as well.
++
++AC_DEFUN([ACX_LAPACK], [
++AC_REQUIRE([ACX_BLAS])
++acx_lapack_ok=no
++
++AC_ARG_WITH(lapack,
++ [AC_HELP_STRING([--with-lapack=<lib>], [use LAPACK library <lib>])])
++case $with_lapack in
++ yes | "") ;;
++ no) acx_lapack_ok=disable ;;
++ -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;;
++ *) LAPACK_LIBS="-l$with_lapack" ;;
++esac
++
++# Get fortran linker name of LAPACK function to check for.
++AC_F77_FUNC(cheev)
++
++# We cannot use LAPACK if BLAS is not found
++if test "x$acx_blas_ok" != xyes; then
++ acx_lapack_ok=noblas
++fi
++
++# First, check LAPACK_LIBS environment variable
++if test "x$LAPACK_LIBS" != x; then
++ save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS"
++ AC_MSG_CHECKING([for $cheev in $LAPACK_LIBS])
++ AC_TRY_LINK_FUNC($cheev, [acx_lapack_ok=yes], [LAPACK_LIBS=""])
++ AC_MSG_RESULT($acx_lapack_ok)
++ LIBS="$save_LIBS"
++ if test acx_lapack_ok = no; then
++ LAPACK_LIBS=""
++ fi
++fi
++
++# LAPACK linked to by default? (is sometimes included in BLAS lib)
++if test $acx_lapack_ok = no; then
++ save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS"
++ AC_CHECK_FUNC($cheev, [acx_lapack_ok=yes])
++ LIBS="$save_LIBS"
++fi
++
++# Generic LAPACK library?
++for lapack in lapack lapack_rs6k; do
++ if test $acx_lapack_ok = no; then
++ save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS"
++ AC_CHECK_LIB($lapack, $cheev,
++ [acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack"], [], [$FLIBS])
++ LIBS="$save_LIBS"
++ fi
++done
++
++AC_SUBST(LAPACK_LIBS)
++
++# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
++if test x"$acx_lapack_ok" = xyes; then
++ ifelse([$1],,AC_DEFINE(HAVE_LAPACK,1,[Define if you have LAPACK library.]),[$1])
++ :
++else
++ acx_lapack_ok=no
++ $2
++fi
++])dnl ACX_LAPACK
+--- ./Core/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Core/Makefile.am 2008-02-01 18:53:12.288468564 +0000
+@@ -0,0 +1,19 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++noinst_LTLIBRARIES = libcore.la libcorel.la
++libcore_la_SOURCES = cholmod_aat.c \
++ cholmod_add.c \
++ cholmod_band.c \
++ cholmod_change_factor.c \
++ cholmod_common.c \
++ cholmod_complex.c \
++ cholmod_copy.c \
++ cholmod_dense.c \
++ cholmod_error.c \
++ cholmod_factor.c \
++ cholmod_memory.c \
++ cholmod_sparse.c \
++ cholmod_transpose.c \
++ cholmod_triplet.c
++
++libcorel_la_SOURCES = $(libcore_la_SOURCES)
++libcorel_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
+--- ./Demo/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Demo/Makefile.am 2008-02-01 18:53:12.288468564 +0000
+@@ -0,0 +1,28 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++if MOD_PARTITION
++LMETIS = -lmetis -lccolamd -lcamd
++endif
++
++if MOD_SUPERNODAL
++LSUPERNODAL = $(LAPACK_LIBS) $(BLAS_LIBS)
++endif
++
++LDADD = $(top_builddir)/libcholmod.la $(LMETIS) $(LSUPERNODAL)
++
++check_PROGRAMS = cholmod_demo cholmod_l_demo cholmod_simple
++cholmod_demo_SOURCES = cholmod_demo.c
++cholmod_l_demo_SOURCES = cholmod_l_demo.c
++cholmod_simple_SOURCES = cholmod_simple.c
++
++test: check
++ ./cholmod_demo < Matrix/bcsstk01.tri || exit 1
++ ./cholmod_l_demo < Matrix/bcsstk01.tri || exit 1
++ ./cholmod_demo < Matrix/lp_afiro.tri || exit 1
++ ./cholmod_l_demo < Matrix/lp_afiro.tri || exit 1
++ ./cholmod_demo < Matrix/can___24.mtx || exit 1
++ ./cholmod_l_demo < Matrix/can___24.mtx || exit 1
++ ./cholmod_demo < Matrix/c.tri || exit 1
++ ./cholmod_l_demo < Matrix/c.tri || exit 1
++ ./cholmod_simple < Matrix/c.tri || exit 1
++ ./cholmod_simple < Matrix/can___24.mtx || exit 1
++ ./cholmod_simple < Matrix/bcsstk01.tri || exit 1
+--- ./Check/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Check/Makefile.am 2008-02-01 18:53:12.284468336 +0000
+@@ -0,0 +1,5 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++noinst_LTLIBRARIES = libcheck.la libcheckl.la
++libcheck_la_SOURCES = cholmod_check.c cholmod_read.c cholmod_write.c
++libcheckl_la_SOURCES = $(libcheck_la_SOURCES)
++libcheckl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
+--- ./Supernodal/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Supernodal/Makefile.am 2008-02-01 18:53:12.292468792 +0000
+@@ -0,0 +1,5 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++noinst_LTLIBRARIES = libsnod.la libsnodl.la
++libsnod_la_SOURCES = cholmod_super_numeric.c cholmod_super_symbolic.c cholmod_super_solve.c
++libsnodl_la_SOURCES = $(libsnod_la_SOURCES)
++libsnodl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
+--- ./Modify/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Modify/Makefile.am 2008-02-01 18:53:12.292468792 +0000
+@@ -0,0 +1,5 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++noinst_LTLIBRARIES = libmodify.la libmodifyl.la
++libmodify_la_SOURCES = cholmod_rowadd.c cholmod_updown.c cholmod_rowdel.c
++libmodifyl_la_SOURCES = $(libmodify_la_SOURCES)
++libmodifyl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
+--- ./Cholesky/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Cholesky/Makefile.am 2008-02-01 18:53:12.284468336 +0000
+@@ -0,0 +1,17 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++noinst_LTLIBRARIES = libcholesky.la libcholeskyl.la
++libcholesky_la_SOURCES = cholmod_amd.c \
++ cholmod_analyze.c \
++ cholmod_colamd.c \
++ cholmod_etree.c \
++ cholmod_factorize.c \
++ cholmod_postorder.c \
++ cholmod_rcond.c \
++ cholmod_resymbol.c \
++ cholmod_rowcolcounts.c \
++ cholmod_rowfac.c \
++ cholmod_solve.c \
++ cholmod_spsolve.c
++
++libcholeskyl_la_SOURCES = $(libcholesky_la_SOURCES)
++libcholeskyl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
+--- ./MatrixOps/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./MatrixOps/Makefile.am 2008-02-01 18:53:12.288468564 +0000
+@@ -0,0 +1,14 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++noinst_LTLIBRARIES = libmops.la libmopsl.la
++libmops_la_SOURCES = cholmod_drop.c \
++ cholmod_horzcat.c \
++ cholmod_norm.c \
++ cholmod_scale.c \
++ cholmod_sdmult.c \
++ cholmod_ssmult.c \
++ cholmod_submatrix.c \
++ cholmod_symmetry.c \
++ cholmod_vertcat.c
++
++libmopsl_la_SOURCES = $(libmops_la_SOURCES)
++libmopsl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
+--- ./Include/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Include/Makefile.am 2008-02-01 18:53:12.288468564 +0000
+@@ -0,0 +1,29 @@
++if MOD_CHECK
++CHECK = cholmod_check.h
++endif
++
++if MOD_CHOLESKY
++CHOLESKY = cholmod_cholesky.h
++endif
++
++if MOD_PARTITION
++PARTITION = cholmod_partition.h
++endif
++
++if MOD_MATRIXOPS
++MATRIXOPS = cholmod_matrixops.h
++endif
++
++if MOD_MODIFY
++MODIFY = cholmod_modify.h
++endif
++
++if MOD_SUPERNODAL
++SUPERNODAL = cholmod_supernodal.h
++endif
++
++include_HEADERS = $(CHECK) $(CHOLESKY) $(PARTITIOn) $(MATRIXOPS) $(MODIFY) $(SUPERNODAL) \
++ cholmod.h \
++ cholmod_config.h \
++ cholmod_core.h \
++ cholmod_io64.h
+--- ./Partition/Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Partition/Makefile.am 2008-02-01 18:53:12.292468792 +0000
+@@ -0,0 +1,6 @@
++AM_CPPFLAGS = -I$(top_srcdir)/Include
++noinst_LTLIBRARIES = libpart.la libpartl.la
++libpart_la_SOURCES = cholmod_camd.c cholmod_csymamd.c cholmod_nesdis.c cholmod_ccolamd.c cholmod_metis.c
++
++libpartl_la_SOURCES = $(libpart_la_SOURCES)
++libpartl_la_CPPFLAGS = $(AM_CPPFLAGS) -DDLONG
+--- ./Makefile.am 1970-01-01 01:00:00.000000000 +0100
++++ ./Makefile.am 2008-02-01 18:53:12.288468564 +0000
+@@ -0,0 +1,42 @@
++SUBDIRS = Include Demo Core $(MODULES)
++EXTRA_DIST = README.txt
++
++lib_LTLIBRARIES = libcholmod.la
++
++if MOD_CHECK
++CHECK = $(top_builddir)/Check/libcheck.la \
++ $(top_builddir)/Check/libcheckl.la
++endif
++
++if MOD_CHOLESKY
++CHOLESKY = $(top_builddir)/Cholesky/libcholesky.la \
++ $(top_builddir)/Cholesky/libcholeskyl.la
++endif
++
++if MOD_PARTITION
++PARTITION = $(top_builddir)/Partition/libpart.la \
++ $(top_builddir)/Partition/libpartl.la \
++ -lmetis -lccolamd -lcamd
++endif
++
++if MOD_MATRIXOPS
++MATRIXOPS = $(top_builddir)/MatrixOps/libmops.la \
++ $(top_builddir)/MatrixOps/libmopsl.la
++endif
++
++if MOD_MODIFY
++MODIFY = $(top_builddir)/Modify/libmodify.la \
++ $(top_builddir)/Modify/libmodifyl.la
++endif
++
++if MOD_SUPERNODAL
++SUPERNODAL = $(top_builddir)/Supernodal/libsnod.la \
++ $(top_builddir)/Supernodal/libsnodl.la \
++ $(LAPACK_LIBS) $(BLAS_LIBS)
++endif
++
++libcholmod_la_SOURCES =
++libcholmod_la_LIBADD = $(CHECK) $(CHOLESKY) $(PARTITION) $(MATRIXOPS) \
++ $(MODIFY) $(SUPERNODAL) -lcolamd -lamd \
++ $(top_builddir)/Core/libcore.la \
++ $(top_builddir)/Core/libcorel.la
diff --git a/sci-libs/cholmod/metadata.xml b/sci-libs/cholmod/metadata.xml
new file mode 100644
index 000000000000..036063c821cb
--- /dev/null
+++ b/sci-libs/cholmod/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang="en">
+ CHOLMOD is a set of ANSI C routines for sparse Cholesky
+ factorization and update/downdate.
+</longdescription>
+</pkgmetadata>