aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-libs/superlu_dist/ChangeLog10
-rw-r--r--sci-libs/superlu_dist/Manifest1
-rw-r--r--sci-libs/superlu_dist/files/superlu_dist-3.3-duplicate-symbols.patch70
-rw-r--r--sci-libs/superlu_dist/metadata.xml23
-rw-r--r--sci-libs/superlu_dist/superlu_dist-3.3.ebuild82
5 files changed, 186 insertions, 0 deletions
diff --git a/sci-libs/superlu_dist/ChangeLog b/sci-libs/superlu_dist/ChangeLog
new file mode 100644
index 000000000..ba0f9e27c
--- /dev/null
+++ b/sci-libs/superlu_dist/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sci-libs/superlu_dist
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*superlu_dist-3.3 (15 Jul 2013)
+
+ 15 Jul 2013; S├ębastien Fabbro <bicatali@gentoo.org>
+ +files/superlu_dist-3.3-duplicate-symbols.patch, +metadata.xml,
+ +superlu_dist-3.3.ebuild:
+ sci-libs/superlu_dist: Initial import
diff --git a/sci-libs/superlu_dist/Manifest b/sci-libs/superlu_dist/Manifest
new file mode 100644
index 000000000..7f97ce664
--- /dev/null
+++ b/sci-libs/superlu_dist/Manifest
@@ -0,0 +1 @@
+DIST superlu_dist_3.3.tar.gz 2146029 SHA256 d2fd8dc847ae63ed7980cff2ad4db8d117640ecdf0234c9711e0f6ee1398cac2 SHA512 673f5a51a39531d5e59a274dfe3cef95a619fdd3fbe003e306376d12f78e3893813c3718befc1360f905344bb5a68cc9c14d5e3790cbfad7b6d4261cf2c8c170 WHIRLPOOL f3494a1319004b82efac529c84ae5644a765172c333baf186dec981eb8bb7f6801d0775349ebe82faf7c623edd381ceaa8e0ace938f0d38af824f2203a0555df
diff --git a/sci-libs/superlu_dist/files/superlu_dist-3.3-duplicate-symbols.patch b/sci-libs/superlu_dist/files/superlu_dist-3.3-duplicate-symbols.patch
new file mode 100644
index 000000000..b27647d81
--- /dev/null
+++ b/sci-libs/superlu_dist/files/superlu_dist-3.3-duplicate-symbols.patch
@@ -0,0 +1,70 @@
+diff -Nur SRC.orig/dcomplex.c SRC/dcomplex.c
+--- SRC.orig/dcomplex.c 2013-07-15 13:31:52.013335511 -0700
++++ SRC/dcomplex.c 2013-07-15 13:41:52.346722312 -0700
+@@ -11,6 +11,7 @@
+
+ #include <math.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "dcomplex.h"
+
+
+diff -Nur SRC.orig/dreadtriple.c SRC/dreadtriple.c
+--- SRC.orig/dreadtriple.c 2013-07-15 13:31:52.015335487 -0700
++++ SRC/dreadtriple.c 2013-07-15 13:32:57.202697327 -0700
+@@ -150,21 +150,4 @@
+ }
+
+
+-void dreadrhs(int m, double *b)
+-{
+- FILE *fp, *fopen();
+- int i, j;
+-
+- if ( !(fp = fopen("b.dat", "r")) ) {
+- fprintf(stderr, "dreadrhs: file does not exist\n");
+- exit(-1);
+- }
+- for (i = 0; i < m; ++i)
+- fscanf(fp, "%lf\n", &b[i]);
+- /*fscanf(fp, "%d%lf\n", &j, &b[i]);*/
+- /* readpair_(j, &b[i]);*/
+-
+- fclose(fp);
+-}
+-
+
+diff -Nur SRC.orig/xerbla.c SRC/xerbla.c
+--- SRC.orig/xerbla.c 2013-07-15 13:31:52.016335478 -0700
++++ SRC/xerbla.c 2013-07-15 13:51:47.522154563 -0700
+@@ -8,6 +8,7 @@
+ September 30, 1994
+ </pre>
+ */
++#include <stdio.h>
+ #include "Cnames.h"
+
+ /* Subroutine */
+diff -Nur SRC.orig/zreadtriple.c SRC/zreadtriple.c
+--- SRC.orig/zreadtriple.c 2013-07-15 13:31:52.014335499 -0700
++++ SRC/zreadtriple.c 2013-07-15 13:33:27.409864866 -0700
+@@ -149,19 +149,5 @@
+ }
+
+
+-void zreadrhs(int m, doublecomplex *b)
+-{
+- FILE *fp, *fopen();
+- int i, j;
+-
+- if ( !(fp = fopen("b.dat", "r")) ) {
+- fprintf(stderr, "zreadrhs: file does not exist\n");
+- exit(-1);
+- }
+- for (i = 0; i < m; ++i)
+- fscanf(fp, "%lf%lf\n", &(b[i].r), &(b[i].i));
+-
+- fclose(fp);
+-}
+
+
diff --git a/sci-libs/superlu_dist/metadata.xml b/sci-libs/superlu_dist/metadata.xml
new file mode 100644
index 000000000..c15766c04
--- /dev/null
+++ b/sci-libs/superlu_dist/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang="en">
+ SuperLU is a general purpose library for the direct solution of
+ large, sparse, nonsymmetric systems of linear equations on high
+ performance machines. The library is written in C and is callable
+ from either C or Fortran. The library routines will perform an LU
+ decomposition with partial pivoting and triangular system solves
+ through forward and back substitution. The LU factorization routines
+ can handle non-square matrices but the triangular solves are
+ performed only for square matrices. The matrix columns may be
+ preordered (before factorization) either through library or user
+ supplied routines. This preordering for sparsity is completely
+ separate from the factorization. Working precision iterative
+ refinement subroutines are provided for improved backward
+ stability. Routines are also provided to equilibrate the system,
+ estimate the condition number, calculate the relative backward
+ error, and estimate error bounds for the refined solutions.
+ This is the distributed version (MPI based).
+</longdescription>
+</pkgmetadata>
diff --git a/sci-libs/superlu_dist/superlu_dist-3.3.ebuild b/sci-libs/superlu_dist/superlu_dist-3.3.ebuild
new file mode 100644
index 000000000..a829769de
--- /dev/null
+++ b/sci-libs/superlu_dist/superlu_dist-3.3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/superlu/superlu-4.3.ebuild,v 1.7 2012/12/12 20:31:31 jlec Exp $
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+MYPN=SuperLU_DIST
+
+DESCRIPTION="Sparse LU factorization library distributed library"
+HOMEPAGE="http://crd.lbl.gov/~xiaoye/SuperLU/"
+SRC_URI="${HOMEPAGE}/${PN}_${PV}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+RDEPEND="
+ sci-libs/parmetis
+ virtual/mpi"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MYPN}_${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-duplicate-symbols.patch
+}
+
+src_configure() {
+ sed -i \
+ -e 's/^\(PLAT\s*=\).*/\1/' \
+ -e "s:^\(CC\s*=\).*:\1 mpicc:" \
+ -e "/CFLAGS/s:-fast -Mipa=fast,safe:${CFLAGS} \$(PIC):" \
+ -e "s:^\(PREDEFS\s*=\).*:\1 ${CPPFLAGS} -DUSE_VENDOR_BLAS \$(CTHREADS)$:" \
+ -e "s:^\(NOOPTS\s*=.*\):\1 \$(PIC):" \
+ -e "s:^\(FORTRAN\s*=\).*:\1 mpif77:" \
+ -e "s:^\(F90FLAGS\s*=\).*:\1 ${FFLAGS} \$(PIC):" \
+ -e "s:^\(ARCH\s*=\).*:\1 $(tc-getAR):" \
+ -e "s:^\(RANLIB\s*=\).*:\1 $(tc-getRANLIB):" \
+ -e "s:^\(LOADER\s*=\).*:\1 mpicc:" \
+ -e "s:^\(LOADOPTS\s*=\).*:\1 ${LDFLAGS} \$(LDTHREADS):" \
+ -e '/^FLIBS/d' \
+ -e "s:^\(METISLIB\s*=\).*:\1 -lmetis:" \
+ -e "s:^\(PARMETISLIB\s*=\).*:\1 -lparmetis:" \
+ -e "s:^\(BLASLIB\s*=\).*:\1 $($(tc-getPKG_CONFIG) --libs blas):" \
+ -e "s:^\(DSUPERLULIB\s*=\).*:\1 ../lib/libsuperlu_dist.a:" \
+ make.inc || die
+ SONAME=libsuperlu_dist.so.0
+ sed -i \
+ -e 's|../make.inc|make.inc|' \
+ -e "s|../SRC|${EPREFIX}/usr/include/${PN}|" \
+ -e '/:.*$(DSUPERLULIB)/s|../lib/$(DSUPERLULIB)||g' \
+ -e 's|../lib/$(DSUPERLULIB)|-lsuperlu_dist|g' \
+ EXAMPLE/Makefile || die
+}
+
+src_compile() {
+ emake superlulib \
+ PIC="-fPIC" ARCH="echo" ARCHFLAGS="" RANLIB="echo"
+ $(tc-getCC) ${LDFLAGS} ${LDTHREADS} -shared -Wl,-soname=${SONAME} SRC/*.o \
+ $($(tc-getPKG_CONFIG) --libs blas) -lm -o lib/${SONAME} || die
+ ln -s ${SONAME} lib/libsuperlu_dist.so || die
+
+ use static-libs && rm -f SRC/*.o && emake superlulib \
+ PIC="" ARCH="$(tc-getAR)" ARCHFLAGS="cr" RANLIB="$(tc-getRANLIB)"
+}
+
+src_install() {
+ dolib.so lib/*so*
+ use static-libs && dolib.a lib/*.a
+ insinto /usr/include/${PN}
+ doins SRC/*h
+ dodoc README
+ use doc && dodoc DOC/ug.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r EXAMPLE/* make.inc
+ fi
+}