diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/mumps |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/mumps')
-rw-r--r-- | sci-libs/mumps/Manifest | 5 | ||||
-rw-r--r-- | sci-libs/mumps/metadata.xml | 21 | ||||
-rw-r--r-- | sci-libs/mumps/mumps-4.10.0-r1.ebuild | 184 |
3 files changed, 210 insertions, 0 deletions
diff --git a/sci-libs/mumps/Manifest b/sci-libs/mumps/Manifest new file mode 100644 index 000000000000..4982395d6f53 --- /dev/null +++ b/sci-libs/mumps/Manifest @@ -0,0 +1,5 @@ +DIST MUMPS_4.10.0.tar.gz 2481516 SHA256 d0f86f91a74c51a17a2ff1be9c9cee2338976f13a6d00896ba5b43a5ca05d933 SHA512 348df048618ea2086fbe805a90f2e31f57e0db4aa6f4843a0e3c7142bac80fe45e54768e65921657c970bc286b59c2bca91e5006ed8000678f26ba2efe2bfda8 WHIRLPOOL 268a22811395b0a193eed90798ede8bc1a1478da25354711fbc8a220b5cfc3af78e0aedff787deb1592871ff450835533e1266393592056228fa8685f51f13fd +EBUILD mumps-4.10.0-r1.ebuild 5585 SHA256 b8942239fbb7ee16eea149932368f06a92f06973bd7a82d5fd7617d9df752364 SHA512 578f6584f115e6299bac629073701bd8534864693afa7c70f98ed6b0b4edc466e6f242733ec3baaec9b98c61f796a1d822ab10b2671fc90230fb2d73129310ea WHIRLPOOL b249d0df175ae9a00f764372fbafca4955adc66176868fff8dcc22e4cba106c347caa60c8ba489638b0e8d7f6b0ef527a2d92f0acd280c7ef176469d4f16ef83 +MISC ChangeLog 2822 SHA256 4f47bfea7b7b58a28ddf6e75bf689c7735d9463a89f3ae86e19c178d6a4b39ec SHA512 e0b8ff7a4f05ae2746e36d7c409cde67e1d3b893a69e4d6844a3cebc043bdf2686aef52cebac323b20f1b86fd9eb3ea12c28a7e40b97721cc7947052b80c47fd WHIRLPOOL 55296389a5a7fd37aea8d296f789d4be44f64a253f8fd6967f4e5e427f9d72b0120d8d6c1af886709713fceb7a4c256cbd25132aa1cc7dc66a200a31157e5d70 +MISC ChangeLog-2015 2173 SHA256 6f12d65292f1ed149c6ea606040f5956c9f326649122b4fbd550c846fc3f3ee2 SHA512 984fd66370ab1ba6ffdf3b1be7b1880ba3a9724a42f0849815eb95f82272420460a8257c6fcc15c4ce840d39f63468181b05bd5d1b8901e1d6a6902bd7c2c036 WHIRLPOOL bcc12de0c9841f5b6e7f6d5b27e281c379b460e9be658461c7c2cce9ec835d2a246f1d43a29caebfd57617fc22de963090083cceea2d707125ece879066cbefb +MISC metadata.xml 864 SHA256 5a0c2f8342f12c4ae6101439533ffc80850c5de547100106f4b2a9e289ed3179 SHA512 c285d7ed4bd26bb603f40f9d5e4e7262aea8a2679d14f65a4f8959a9bf2c622310422790e6221708fa227cd2c3bb2f4ba140eb5f23acc71b3f1ca20c04c4711a WHIRLPOOL a7da05ff251587017fc41f162ac74d7ef4cb7569a76f77c2157dc114dbc0b9de278c8938aafb6720fb52bed0fcc540a21acbb69cfacc75f1ca657876bbc7bf7b diff --git a/sci-libs/mumps/metadata.xml b/sci-libs/mumps/metadata.xml new file mode 100644 index 000000000000..6c7bab904ee4 --- /dev/null +++ b/sci-libs/mumps/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> +</maintainer> +<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-r1.ebuild b/sci-libs/mumps/mumps-4.10.0-r1.ebuild new file mode 100644 index 000000000000..d57d19e1d13d --- /dev/null +++ b/sci-libs/mumps/mumps-4.10.0-r1.ebuild @@ -0,0 +1,184 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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-6[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 +} |