summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/mumps')
-rw-r--r--sci-libs/mumps/ChangeLog47
-rw-r--r--sci-libs/mumps/Manifest4
-rw-r--r--sci-libs/mumps/metadata.xml18
-rw-r--r--sci-libs/mumps/mumps-4.10.0.ebuild185
4 files changed, 254 insertions, 0 deletions
diff --git a/sci-libs/mumps/ChangeLog b/sci-libs/mumps/ChangeLog
new file mode 100644
index 000000000000..808f26848557
--- /dev/null
+++ b/sci-libs/mumps/ChangeLog
@@ -0,0 +1,47 @@
+# ChangeLog for sci-libs/mumps
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/mumps/ChangeLog,v 1.1 2014/01/14 18:47:26 bicatali Exp $
+
+ 14 Jan 2014; Sébastien Fabbro <bicatali@gentoo.org> +mumps-4.10.0.ebuild,
+ +metadata.xml:
+ Initial import in main tree
+
+ 17 Jun 2013; Justin Bronder <jsbronder@gentoo.org> mumps-4.10.0-r2.ebuild:
+ Don't let openmpi override malloc, works around sandbox issue in #462602
+
+*mumps-4.10.0-r2 (11 Dec 2012)
+
+ 11 Dec 2012; Sébastien Fabbro <bicatali@gentoo.org> +mumps-4.10.0-r2.ebuild,
+ -mumps-4.10.0-r1.ebuild, metadata.xml:
+ sci-libs/mumps: Install libpord, force -j1 on makefile because of random
+ parallel build failures, separate dummy sequential mpi library from the common
+ mumps library
+
+ 15 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> mumps-4.10.0-r1.ebuild:
+ sci-libs/mumps: Merge dummy sequential mpi into sequential mumps
+
+ 13 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> mumps-4.10.0.ebuild:
+ sci-libs/mumps: fix underlinking for sequential library
+
+ 12 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> mumps-4.10.0.ebuild:
+ sci-libs/mumps: Shared library fixes and prefix love
+
+ 12 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> mumps-4.10.0.ebuild:
+ sci-libs/mumps: prefix love
+
+ 13 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org> mumps-4.10.0.ebuild,
+ metadata.xml:
+ Fixed for sequential (non mpi) libraries
+
+ 12 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org> mumps-4.10.0.ebuild:
+ Only allow earlier parmetis versions
+
+ 12 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org> +mumps-4.10.0.ebuild,
+ +metadata.xml:
+ metis-mpi is now parmetis
+
+*mumps-4.10.0 (01 Jun 2011)
+
+ 01 Jun 2011; Sébastien Fabbro <bicatali@gentoo.org> +mumps-4.10.0.ebuild,
+ +metadata.xml:
+ Initial import
diff --git a/sci-libs/mumps/Manifest b/sci-libs/mumps/Manifest
new file mode 100644
index 000000000000..3c7bf2ec4f6e
--- /dev/null
+++ b/sci-libs/mumps/Manifest
@@ -0,0 +1,4 @@
+DIST MUMPS_4.10.0.tar.gz 2481516 SHA256 d0f86f91a74c51a17a2ff1be9c9cee2338976f13a6d00896ba5b43a5ca05d933 SHA512 348df048618ea2086fbe805a90f2e31f57e0db4aa6f4843a0e3c7142bac80fe45e54768e65921657c970bc286b59c2bca91e5006ed8000678f26ba2efe2bfda8 WHIRLPOOL 268a22811395b0a193eed90798ede8bc1a1478da25354711fbc8a220b5cfc3af78e0aedff787deb1592871ff450835533e1266393592056228fa8685f51f13fd
+EBUILD mumps-4.10.0.ebuild 5595 SHA256 06f8eb7841005cca9d43e580c4966b9c279d3e3d7d207d304fd9307085a4759a SHA512 a34f67b24072c2248a0b4178b7da9cc149100501aabaa4cc12971caf8810ee03e9c3eec6c6e0c7d0875b73f26f5ed59a0e87800a296d015ef822a0874472f6f6 WHIRLPOOL 895b7045ba51a75f9585d3da3c219911cf39d1c49d20068d8bbbda0ffab0a59422a6f50576fc0b6fd9e777df6a241e462efaec6fcd025f3f1f0def8319551eaf
+MISC ChangeLog 1755 SHA256 8487d5d2f14280f1a16078083eb2cf629b8859cf753a91ca3d08f1f2a91860a7 SHA512 f2610a5694f15af063e11919d65d09dcd059d4a1f6a0b8d8aafcce84967c52f2139e6b1dedea86903761008f2e6ac34e3b2a0bc8134cdb55e51a1408da1d773e WHIRLPOOL 14bd21dbcd2fb3d5f763a4e0ebd695418df255641b187ed60825d767dff54c08b24c03f0a181ecc94c26b80798246abd8af118530f19d3ac3848be85c08a2491
+MISC metadata.xml 769 SHA256 c8f2460dd79bcca4712582e6c732553e46af497cb045455c9ef7a258ee9d61d1 SHA512 7c9e0dd1cedfde3b7cbd2a7a59310d9b666ccd44dbf3ad56682c4d3de2c7f320ffdeda05251bbf5aae066395bbbd2332cbcf1e38fa11fdb6a7275ca43331b466 WHIRLPOOL 710f613edd76ef11f2fdef0c018d0f75af1cc4ffe8cc970ca5230a459a2f4d7ba61bdc48eed6b05d619b1bb339f4f201369e89121ef6e94b73c8a53dc4886789
diff --git a/sci-libs/mumps/metadata.xml b/sci-libs/mumps/metadata.xml
new file mode 100644
index 000000000000..3aa8aad22ee4
--- /dev/null
+++ b/sci-libs/mumps/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang='en'>
+ MUltifrontal Massively Parallel sparse direct Solver implements a
+ direct solver for large sparse linear systems, with a particular
+ focus on symmetric positive definite matrices. It can operate on
+ distributed matrices e.g. over a cluster. It has Fortran and C
+ interfaces, and can interface with ordering tools such
+ as Scotch or Metis.
+</longdescription>
+<use>
+ <flag name="metis">Enable matrix ordering with METIS
+ (<pkg>sci-libs/metis</pkg>, <pkg>sci-libs/parmetis</pkg>)</flag>
+ <flag name="scotch">Enable matrix ordering with <pkg>sci-libs/scotch</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/sci-libs/mumps/mumps-4.10.0.ebuild b/sci-libs/mumps/mumps-4.10.0.ebuild
new file mode 100644
index 000000000000..d14e0f008210
--- /dev/null
+++ b/sci-libs/mumps/mumps-4.10.0.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/mumps/mumps-4.10.0.ebuild,v 1.1 2014/01/14 18:47:26 bicatali Exp $
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic versionator fortran-2 multilib
+
+MYP=MUMPS_${PV}
+
+DESCRIPTION="MUltifrontal Massively Parallel sparse direct matrix Solver"
+HOMEPAGE="http://mumps.enseeiht.fr/"
+SRC_URI="${HOMEPAGE}${MYP}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples metis mpi +scotch static-libs"
+
+RDEPEND="
+ virtual/blas
+ metis? ( || ( sci-libs/metis <sci-libs/parmetis-4 )
+ mpi? ( <sci-libs/parmetis-4 ) )
+ scotch? ( sci-libs/scotch[mpi=] )
+ mpi? ( sci-libs/scalapack )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MYP}"
+
+static_to_shared() {
+ local libstatic=${1}; shift
+ local libname=$(basename ${libstatic%.a})
+ local soname=${libname}$(get_libname $(get_version_component_range 1-2))
+ local libdir=$(dirname ${libstatic})
+
+ einfo "Making ${soname} from ${libstatic}"
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+ -Wl,-all_load -Wl,${libstatic} \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ else
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname=${soname} \
+ -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ [[ $(get_version_component_count) -gt 1 ]] && \
+ ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
+ ln -s ${soname} ${libdir}/${libname}$(get_libname)
+ fi
+}
+
+src_prepare() {
+ sed -e "s:^\(CC\s*=\).*:\1$(tc-getCC):" \
+ -e "s:^\(FC\s*=\).*:\1$(tc-getFC):" \
+ -e "s:^\(FL\s*=\).*:\1$(tc-getFC):" \
+ -e "s:^\(AR\s*=\).*:\1$(tc-getAR) cr :" \
+ -e "s:^\(RANLIB\s*=\).*:\1$(tc-getRANLIB):" \
+ -e "s:^\(LIBBLAS\s*=\).*:\1$($(tc-getPKG_CONFIG) --libs blas):" \
+ -e "s:^\(INCPAR\s*=\).*:\1:" \
+ -e 's:^\(LIBPAR\s*=\).*:\1$(SCALAP):' \
+ -e "s:^\(OPTF\s*=\).*:\1${FFLAGS} -DALLOW_NON_INIT \$(PIC):" \
+ -e "s:^\(OPTC\s*=\).*:\1${CFLAGS} \$(PIC):" \
+ -e "s:^\(OPTL\s*=\).*:\1${LDFLAGS}:" \
+ Make.inc/Makefile.inc.generic > Makefile.inc || die
+ # fixed a missing copy of libseq to libdir
+}
+
+src_configure() {
+ LIBADD="$($(tc-getPKG_CONFIG) --libs blas) -Llib -lpord"
+ local ord="-Dpord"
+ if use metis && use mpi; then
+ sed -i \
+ -e "s:#\s*\(LMETIS\s*=\).*:\1$($(tc-getPKG_CONFIG) --libs parmetis):" \
+ -e "s:#\s*\(IMETIS\s*=\).*:\1$($(tc-getPKG_CONFIG) --cflags parmetis):" \
+ Makefile.inc || die
+ LIBADD="${LIBADD} $($(tc-getPKG_CONFIG) --libs parmetis)"
+ ord="${ord} -Dparmetis"
+ elif use metis; then
+ sed -i \
+ -e "s:#\s*\(LMETIS\s*=\).*:\1$($(tc-getPKG_CONFIG) --libs metis):" \
+ -e "s:#\s*\(IMETIS\s*=\).*:\1$($(tc-getPKG_CONFIG) --cflags metis):" \
+ Makefile.inc || die
+ LIBADD="${LIBADD} $($(tc-getPKG_CONFIG) --libs metis)"
+ ord="${ord} -Dmetis"
+ fi
+ if use scotch && use mpi; then
+ sed -i \
+ -e "s:#\s*\(LSCOTCH\s*=\).*:\1-lptesmumps -lptscotch -lptscotcherr:" \
+ -e "s:#\s*\(ISCOTCH\s*=\).*:\1-I${EROOT}usr/include/scotch:" \
+ Makefile.inc || die
+ LIBADD="${LIBADD} -lptesmumps -lptscotch -lptscotcherr"
+ ord="${ord} -Dptscotch"
+ elif use scotch; then
+ sed -i \
+ -e "s:#\s*\(LSCOTCH\s*=\).*:\1-lesmumps -lscotch -lscotcherr:" \
+ -e "s:#\s*\(ISCOTCH\s*=\).*:\1-I${EROOT}usr/include/scotch:" \
+ Makefile.inc || die
+ LIBADD="${LIBADD} -lesmumps -lscotch -lscotcherr"
+ ord="${ord} -Dscotch"
+ fi
+ if use mpi; then
+ sed -i \
+ -e "s:^\(CC\s*=\).*:\1mpicc:" \
+ -e "s:^\(FC\s*=\).*:\1mpif90:" \
+ -e "s:^\(FL\s*=\).*:\1mpif90:" \
+ -e "s:^\(SCALAP\s*=\).*:\1$($(tc-getPKG_CONFIG) --libs scalapack):" \
+ Makefile.inc || die
+ export LINK=mpif90
+ LIBADD="${LIBADD} $($(tc-getPKG_CONFIG) --libs scalapack)"
+ else
+ sed -i \
+ -e 's:-Llibseq:-L$(topdir)/libseq:' \
+ -e 's:PAR):SEQ):g' \
+ -e "s:^\(SCALAP\s*=\).*:\1:" \
+ -e 's:^LIBSEQNEEDED =:LIBSEQNEEDED = libseqneeded:g' \
+ Makefile.inc || die
+ export LINK="$(tc-getFC)"
+ fi
+ sed -i -e "s:^\s*\(ORDERINGSF\s*=\).*:\1 ${ord}:" Makefile.inc || die
+}
+
+src_compile() {
+ # Workaround #462602
+ export FAKEROOTKEY=1
+
+ # -j1 because of static archive race
+ emake -j1 alllib PIC="-fPIC"
+ if ! use mpi; then
+ #$(tc-getAR) crs lib/libmumps_common.a libseq/*.o || die
+ LIBADD+=" -Llibseq -lmpiseq"
+ static_to_shared libseq/libmpiseq.a
+ fi
+ static_to_shared lib/libpord.a ${LIBADD}
+ static_to_shared lib/libmumps_common.a ${LIBADD}
+
+ local i
+ for i in c d s z; do
+ static_to_shared lib/lib${i}mumps.a -Llib -lmumps_common ${LIBADD}
+ done
+ if use static-libs; then
+ emake clean
+ emake -j1 alllib
+ fi
+}
+
+src_test() {
+ emake all
+ local dotest
+ if use mpi; then
+ dotest="mpirun -np 2"
+ else
+ export LD_LIBRARY_PATH="${S}/libseq:${LD_LIBRARY_PATH}"
+ fi
+ cd examples
+ ${dotest} ./ssimpletest < input_simpletest_real || die
+ ${dotest} ./dsimpletest < input_simpletest_real || die
+ ${dotest} ./csimpletest < input_simpletest_cmplx || die
+ ${dotest} ./zsimpletest < input_simpletest_cmplx || die
+ einfo "The solutions should be close to (1,2,3,4,5)"
+ ${dotest} ./c_example || die
+ einfo "The solution should be close to (1,2)"
+ make clean
+}
+
+src_install() {
+ dolib.so lib/lib*$(get_libname)*
+ use static-libs && dolib.a lib/lib*.a
+ insinto /usr
+ doins -r include
+ if ! use mpi; then
+ dolib.so libseq/lib*$(get_libname)*
+ insinto /usr/include/mpiseq
+ doins libseq/*.h
+ use static-libs && dolib.a libseq/libmpiseq.a
+ fi
+ dodoc README ChangeLog VERSION
+ use doc && dodoc doc/*.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}