From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S78E5-0006Cp-Uk for garchives@archives.gentoo.org; Mon, 12 Mar 2012 16:36:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 21164E0B85; Mon, 12 Mar 2012 16:35:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D65B8E0B85 for ; Mon, 12 Mar 2012 16:35:53 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 25ACF1B4019 for ; Mon, 12 Mar 2012 16:35:53 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E0804E5402 for ; Mon, 12 Mar 2012 16:35:51 +0000 (UTC) From: "Sebastien Fabbro" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastien Fabbro" Message-ID: <1331570136.a5ae217a4042f08588e657bdf9414a12597bd1fe.bicatali@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/mumps/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/mumps/ChangeLog sci-libs/mumps/metadata.xml sci-libs/mumps/mumps-4.10.0.ebuild X-VCS-Directories: sci-libs/mumps/ X-VCS-Committer: bicatali X-VCS-Committer-Name: Sebastien Fabbro X-VCS-Revision: a5ae217a4042f08588e657bdf9414a12597bd1fe X-VCS-Branch: master Date: Mon, 12 Mar 2012 16:35:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 5ecf592b-f9de-4056-8c9d-2939b277d5f1 X-Archives-Hash: 7dd13044078a11bb363d909b95cc1fa6 commit: a5ae217a4042f08588e657bdf9414a12597bd1fe Author: S=C3=A9bastien Fabbro gmail com> AuthorDate: Mon Mar 12 16:35:36 2012 +0000 Commit: Sebastien Fabbro gentoo org> CommitDate: Mon Mar 12 16:35:36 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sci.git;a=3Dc= ommit;h=3Da5ae217a imported mumps --- sci-libs/mumps/ChangeLog | 14 ++++ sci-libs/mumps/metadata.xml | 13 ++++ sci-libs/mumps/mumps-4.10.0.ebuild | 141 ++++++++++++++++++++++++++++++= ++++++ 3 files changed, 168 insertions(+), 0 deletions(-) diff --git a/sci-libs/mumps/ChangeLog b/sci-libs/mumps/ChangeLog new file mode 100644 index 0000000..66ba813 --- /dev/null +++ b/sci-libs/mumps/ChangeLog @@ -0,0 +1,14 @@ +# ChangeLog for sci-libs/mumps +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 12 Mar 2012; S=C3=A9bastien Fabbro +mumps-4.10.0= .ebuild, + +metadata.xml: + metis-mpi is now parmetis + +*mumps-4.10.0 (01 Jun 2011) + + 01 Jun 2011; S=C3=A9bastien Fabbro +mumps-4.10.0= .ebuild, + +metadata.xml: + Initial import + diff --git a/sci-libs/mumps/metadata.xml b/sci-libs/mumps/metadata.xml new file mode 100644 index 0000000..e9804fe --- /dev/null +++ b/sci-libs/mumps/metadata.xml @@ -0,0 +1,13 @@ + + + +sci + + 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=20 + as Scotch or Metis. + + 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 0000000..e1c5015 --- /dev/null +++ b/sci-libs/mumps/mumps-4.10.0.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3D4 +inherit eutils toolchain-funcs flag-o-matic versionator + +MYP=3DMUMPS_${PV} + +DESCRIPTION=3D"MUltifrontal Massively Parallel sparse direct matrix Solv= er" +HOMEPAGE=3D"http://mumps.enseeiht.fr/" +SRC_URI=3D"${HOMEPAGE}${MYP}.tar.gz" + +LICENSE=3D"public-domain" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" +IUSE=3D"doc examples metis mpi +scotch static-libs" + +RDEPEND=3D"virtual/blas + sci-libs/parmetis[mpi?] + scotch? ( sci-libs/scotch[mpi?] ) + mpi? ( virtual/scalapack )" + +DEPEND=3D"${RDEPEND} + dev-util/pkgconfig" + +S=3D"${WORKDIR}/${MYP}" + +make_shared_lib() { + local libstatic=3D${1} + local soname=3D$(basename "${1%.a}").so.$(get_major_version) + shift + einfo "Making ${soname}" + ${LINK:-$(tc-getCC)} ${LDFLAGS} \ + -shared -Wl,-soname=3D"${soname}" \ + -Wl,--whole-archive "${libstatic}" -Wl,--no-whole-archive \ + "$@" -o $(dirname "${libstatic}")/"${soname}" || die "${soname} failed= " + ln -s "${soname}" $(dirname "${libstatic}")/"${soname%.*}" +} + +src_prepare() { + sed -e "s:^\(CC\s*=3D\).*:\1$(tc-getCC):" \ + -e "s:^\(FC\s*=3D\).*:\1$(tc-getFC):" \ + -e "s:^\(FL\s*=3D\).*:\1$(tc-getFC):" \ + -e "s:^\(AR\s*=3D\).*:\1$(tc-getAR) rv :" \ + -e "s:^\(RANLIB\s*=3D\).*:\1$(tc-getRANLIB):" \ + -e "s:^\(LIBBLAS\s*=3D\).*:\1$(pkg-config --libs blas):" \ + -e "s:^\(INCPAR\s*=3D\).*:\1:" \ + -e 's:^\(LIBPAR\s*=3D\).*:\1$(SCALAP):' \ + -e "s:^\(OPTF\s*=3D\).*:\1${FFLAGS} -DALLOW_NON_INIT \$(PIC):" \ + -e "s:^\(OPTC\s*=3D\).*:\1${CFLAGS} \$(PIC):" \ + -e "s:^\(OPTL\s*=3D\).*:\1${LDFLAGS}:" \ + Make.inc/Makefile.inc.generic > Makefile.inc || die +} + +src_configure() { + LIBADD=3D"$(pkg-config --libs blas) -Llib -lpord" + local ord=3D"-Dpord" + if use metis && use mpi; then + sed -i \ + -e "s:#\s*\(LMETIS\s*=3D\).*:\1$(pkg-config --libs parmetis):" \ + -e "s:#\s*\(IMETIS\s*=3D\).*:\1$(pkg-config --cflags parmetis):" \ + Makefile.inc || die + LIBADD=3D"${LIBADD} $(pkg-config --libs parmetis)" + ord=3D"${ord} -Dparmetis" + elif use metis; then + sed -i \ + -e "s:#\s*\(LMETIS\s*=3D\).*:\1$(pkg-config --libs metis):" \ + -e "s:#\s*\(IMETIS\s*=3D\).*:\1$(pkg-config --cflags metis):" \ + Makefile.inc || die + LIBADD=3D"${LIBADD} $(pkg-config --libs metis)" + ord=3D"${ord} -Dmetis" + fi + if use scotch && use mpi; then + sed -i \ + -e "s:#\s*\(LSCOTCH\s*=3D\).*:\1-lptesmumps -lptscotch -lptscotcherr:= " \ + -e "s:#\s*\(ISCOTCH\s*=3D\).*:\1-I${EROOT}usr/include/scotch:" \ + Makefile.inc || die + LIBADD=3D"${LIBADD} -lptesmumps -lptscotch -lptscotcherr" + ord=3D"${ord} -Dptscotch" + elif use scotch; then + sed -i \ + -e "s:#\s*\(LSCOTCH\s*=3D\).*:\1-lesmumps -lscotch -lscotcherr:" \ + -e "s:#\s*\(ISCOTCH\s*=3D\).*:\1-I${EROOT}usr/include/scotch:" \ + Makefile.inc || die + LIBADD=3D"${LIBADD} -lesmumps -lscotch -lscotcherr" + ord=3D"${ord} -Dscotch" + fi + if use mpi; then + sed -i \ + -e "s:^\(CC\s*=3D\).*:\1mpicc:" \ + -e "s:^\(FC\s*=3D\).*:\1mpif90:" \ + -e "s:^\(FL\s*=3D\).*:\1mpif90:" \ + -e "s:^\(SCALAP\s*=3D\).*:\1$(pkg-config --libs scalapack):" \ + Makefile.inc || die + export LINK=3Dmpif90 + LIBADD=3D"${LIBADD} $(pkg-config --libs scalapack)" + fi + sed -i -e "s:^\s*\(ORDERINGSF\s*=3D\).*:\1 ${ord}:" Makefile.inc || die +} + +src_compile() { + emake alllib PIC=3D"-fPIC" + make_shared_lib lib/libmumps_common.a ${LIBADD} + local i + for i in c d s z; do + make_shared_lib lib/lib${i}mumps.a -Llib -lmumps_common + done + if use static-libs; then + emake clean + emake alllib + fi +} + +src_test() { + emake all + local dotest + use mpi && dotest=3D"mpirun -np 2" + 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*.so* + use static-libs && dolib.a lib/lib*.a + insinto /usr + doins -r include + dodoc README ChangeLog VERSION + use doc && dodoc doc/*.pdf + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +}