From fc637fb28da700da71ec2064d65ca5a7a31b9c6c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 18 Aug 2019 18:16:17 +0100 Subject: gentoo resync : 18.08.2019 --- sci-libs/trilinos/Manifest | 4 + sci-libs/trilinos/metadata.xml | 47 +++++++ sci-libs/trilinos/trilinos-12.14.1.ebuild | 211 ++++++++++++++++++++++++++++++ 3 files changed, 262 insertions(+) create mode 100644 sci-libs/trilinos/Manifest create mode 100644 sci-libs/trilinos/metadata.xml create mode 100644 sci-libs/trilinos/trilinos-12.14.1.ebuild (limited to 'sci-libs/trilinos') diff --git a/sci-libs/trilinos/Manifest b/sci-libs/trilinos/Manifest new file mode 100644 index 000000000000..6bfeaa2d8a53 --- /dev/null +++ b/sci-libs/trilinos/Manifest @@ -0,0 +1,4 @@ +DIST trilinos-12.14.1-patches-r0.tar.xz 6448 BLAKE2B f852a4612c400ddfb6dcecb476e0b9b2cd0f38ac9cd74fd09fc1f99ccb2588a4703f8c8514689c81d23aa218aff3cdcbe9b5205becea8936723d6e339705d54d SHA512 206bd08f0a5b7f7107e60c9e9c1a15fa7e74916bacb5399cccdd936b426768834ff24424ea77e8d1706afa98d88bb5a098b3b0203039024a3b5f5388c4a9735b +DIST trilinos-12.14.1.tar.gz 129036436 BLAKE2B e7401df2ff8408a7af4a8e90d93b1929df65228c4f5cf3c754d20ebdfa8f3835800f540e87c1198e0baf2fefe0920618ae497f59373720754ab0c9dc1da93136 SHA512 dfff0e0582cb5ad12614dd53e9635572c8d1ee86d96f432f5a6e046af63edb13f6bfa3037204ab89fbb0d27e9be9bd9661d47efb41ab2a6e421bca5eba6b6a87 +EBUILD trilinos-12.14.1.ebuild 6148 BLAKE2B d8ef14be03e34742e59292426af03336fb3997f3e50b02e0d6a9d6114a5d67c7d3530e93f44e645e247f395343b1a3045383714f8408a41a0434cf125f6006c5 SHA512 b96f197cfd8435366940237eba40dd8cd48e950e6c814ebcb18b6c04125f374d4475cecaea3c25a2ec60b3685e3db2d52ac025a9f6031111c67039cfa00be2d8 +MISC metadata.xml 2778 BLAKE2B 45cb2a647a1730c9b6b21271364b5f4acaf145f6ae33db356d0b9be7584705c29a645d3f96abfe0a9b87540ae55ab586ec202191776f4472b66291c274b9f24b SHA512 c58e98197353efe1c6fef038dd53d4a938e85aa66fc53f00cab0133d8ee89c629eead55c270c88583778b193f0a85b498c7235fc3f1e8f45a1abfff2d5f0cbec diff --git a/sci-libs/trilinos/metadata.xml b/sci-libs/trilinos/metadata.xml new file mode 100644 index 000000000000..8cbeddb082eb --- /dev/null +++ b/sci-libs/trilinos/metadata.xml @@ -0,0 +1,47 @@ + + + + + tamiko@gentoo.org + Matthias Maier + + + sci@gentoo.org + Gentoo Science Project + + +The Trilinos Project is an effort to develop algorithms and enabling +technologies within an object-oriented software framework for the solution +of large-scale, complex multi-physics engineering and scientific problems. + + + Add support for adolc (sci-libs/adolc) + Add support for arprec (sci-libs/arprec) + Add support for boost (dev-libs/boost) + Add support for clp (sci-libs/coinor-clp) + Add support for cuda (dev-util/nvidia-cuda-toolkit) + Add support for eigen (dev-cpp/eigen) + Add support for glpk (sci-mathematics/glpk) + Add support for gtest (dev-cpp/gtest) + Add support for hwloc (sys-apps/hwloc) + Add support for hdf5 (sci-libs/hdf5) + Add support for hypre (sci-libs/hypre) + Add support for matio (sci-libs/matio) + +Add support for metis (sci-libs/metis or sci-libs/parmetis) + + Add support for mkl (sci-libs/mkl) + Add support for mumps (sci-libs/mumps) + Add support for netcdf (sci-libs/netcdf) + Add support for petsc (sci-mathematics/petsc) + Add support for qd (sci-libs/qd) + Add support for scalapack (sci-libs/scalapack) + Add support for scotch (sci-libs/scotch) + Add support for sparse matrix solvers (sci-libs/umfpack) + Add support for superlu (sci-libs/superlu) + Add support for taucs (sci-libs/taucs) + Add support for threading building blocks library (dev-cpp/tbb) + Add support for tvmet (dev-libs/tvmet) + Add support for yaml (dev-cpp/yaml-cpp) + + diff --git a/sci-libs/trilinos/trilinos-12.14.1.ebuild b/sci-libs/trilinos/trilinos-12.14.1.ebuild new file mode 100644 index 000000000000..affe878ba6ec --- /dev/null +++ b/sci-libs/trilinos/trilinos-12.14.1.ebuild @@ -0,0 +1,211 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +CMAKE_MAKEFILE_GENERATOR=emake + +inherit cmake-utils toolchain-funcs multilib toolchain-funcs + +DESCRIPTION="Scientific library collection for large scale problems" +HOMEPAGE="http://trilinos.sandia.gov/" +MY_PV="${PV//\./-}" +PATCHSET="r0" +SRC_URI="https://github.com/${PN}/Trilinos/archive/${PN}-release-${MY_PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-${PATCHSET}.tar.xz" + +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +LICENSE="BSD LGPL-2.1" +SLOT="0" + +IUSE=" + adolc arprec boost clp cuda eigen glpk gtest hdf5 hwloc hypre + matio metis mkl mumps netcdf petsc qd scalapack scotch sparse + superlu taucs tbb test threads tvmet yaml zlib X +" + +# TODO: fix export cmake function for tests +RESTRICT="test" + +RDEPEND=" + sys-libs/binutils-libs + virtual/blas + virtual/lapack + virtual/mpi + adolc? ( sci-libs/adolc ) + arprec? ( sci-libs/arprec ) + boost? ( dev-libs/boost ) + clp? ( sci-libs/coinor-clp ) + cuda? ( >=dev-util/nvidia-cuda-toolkit-3.2 ) + eigen? ( dev-cpp/eigen:3 ) + glpk? ( sci-mathematics/glpk ) + gtest? ( dev-cpp/gtest ) + hdf5? ( sci-libs/hdf5[mpi] ) + hypre? ( sci-libs/hypre ) + hwloc? ( sys-apps/hwloc ) + matio? ( sci-libs/matio ) + mkl? ( sci-libs/mkl ) + metis? ( || ( sci-libs/parmetis sci-libs/metis ) ) + mumps? ( sci-libs/mumps ) + netcdf? ( sci-libs/netcdf ) + petsc? ( sci-mathematics/petsc ) + qd? ( sci-libs/qd ) + scalapack? ( sci-libs/scalapack ) + scotch? ( sci-libs/scotch ) + sparse? ( sci-libs/cxsparse sci-libs/umfpack ) + superlu? ( sci-libs/superlu ) + taucs? ( sci-libs/taucs ) + tbb? ( dev-cpp/tbb ) + tvmet? ( dev-libs/tvmet ) + yaml? ( dev-cpp/yaml-cpp ) + zlib? ( sys-libs/zlib ) + X? ( x11-libs/libX11 )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}/Trilinos-${PN}-release-${MY_PV}" + +PATCHES=( + "${WORKDIR}"/patches +) + +trilinos_conf() { + local dirs libs d + for d in $($(tc-getPKG_CONFIG) --libs-only-L $1); do + dirs="${dirs};${d:2}" + done + [[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_DIRS=${dirs:1}" ) + for d in $($(tc-getPKG_CONFIG) --libs-only-l $1); do + libs="${libs};${d:2}" + done + [[ -n ${libs} ]] && mycmakeargs+=( "-D${2}_LIBRARY_NAMES=${libs:1}" ) + dirs="" + for d in $($(tc-getPKG_CONFIG) --cflags-only-I $1); do + dirs="${dirs};${d:2}" + done + [[ -n ${dirs} ]] && mycmakeargs+=( "-D${2}_INCLUDE_DIRS=${dirs:1}" ) +} + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_PREFIX="${EPREFIX}" + -DCMAKE_SKIP_INSTALL_RPATH=ON + -DTrilinos_INSTALL_CONFIG_DIR="${EPREFIX}/usr/$(get_libdir)/cmake" + -DTrilinos_INSTALL_INCLUDE_DIR="${EPREFIX}/usr/include/trilinos" + -DTrilinos_INSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)/trilinos" + -DTrilinos_ENABLE_ALL_PACKAGES=ON + -DTrilinos_ENABLE_PyTrilinos=OFF + -DTrilinos_ENABLE_SEACASChaco=OFF + -DTrilinos_ENABLE_SEACASExodiff="$(usex netcdf)" + -DTrilinos_ENABLE_SEACASExodus="$(usex netcdf)" + -DTrilinos_ENABLE_TESTS="$(usex test)" + -DZoltan2_ENABLE_Experimental=ON + -DTPL_ENABLE_BinUtils=ON + -DTPL_ENABLE_BLAS=ON + -DTPL_ENABLE_LAPACK=ON + -DTPL_ENABLE_MPI=ON + -DTPL_ENABLE_ADOLC="$(usex adolc)" + -DTPL_ENABLE_AMD="$(usex sparse)" + -DTPL_ENABLE_ARPREC="$(usex arprec)" + -DTPL_ENABLE_BLACS="$(usex scalapack)" + -DTPL_ENABLE_BoostLib="$(usex boost)" + -DTPL_ENABLE_Boost="$(usex boost)" + -DTPL_ENABLE_Clp="$(usex clp)" + -DTPL_ENABLE_CSparse="$(usex sparse)" + -DTPL_ENABLE_CUDA="$(usex cuda)" + -DTPL_ENABLE_CUSPARSE="$(usex cuda)" + -DTPL_ENABLE_Eigen="$(usex eigen)" + -DTPL_ENABLE_GLPK="$(usex glpk)" + -DTPL_ENABLE_gtest="$(usex gtest)" + -DTPL_ENABLE_HDF5="$(usex hdf5)" + -DTPL_ENABLE_HWLOC="$(usex hwloc)" + -DTPL_ENABLE_HYPRE="$(usex hypre)" + -DTPL_ENABLE_Matio="$(usex matio)" + -DTPL_ENABLE_METIS="$(usex metis)" + -DTPL_ENABLE_MKL="$(usex mkl)" + -DTPL_ENABLE_MUMPS="$(usex mumps)" + -DTPL_ENABLE_Netcdf="$(usex netcdf)" + -DTPL_ENABLE_PARDISO_MKL="$(usex mkl)" + -DTPL_ENABLE_PETSC="$(usex petsc)" + -DTPL_ENABLE_Pthread="$(usex threads)" + -DTPL_ENABLE_QD="$(usex qd)" + -DTPL_ENABLE_SCALAPACK="$(usex scalapack)" + -DTPL_ENABLE_Scotch="$(usex scotch)" + -DTPL_ENABLE_SuperLU="$(usex superlu)" + -DTPL_ENABLE_TAUCS="$(usex taucs)" + -DTPL_ENABLE_TBB="$(usex tbb)" + -DTPL_ENABLE_Thrust="$(usex cuda)" + -DTPL_ENABLE_TVMET="$(usex tvmet)" + -DTPL_ENABLE_UMFPACK="$(usex sparse)" + -DTPL_ENABLE_X11="$(usex X)" + -DTPL_ENABLE_yaml-cpp="$(usex yaml)" + -DTPL_ENABLE_Zlib="$(usex zlib)" + -DML_ENABLE_SuperLU:BOOL=OFF + ) + + use eigen && \ + mycmakeargs+=( + -DEigen_INCLUDE_DIRS="${EPREFIX}/usr/include/eigen3" + ) + use hypre && \ + mycmakeargs+=( + -DHYPRE_INCLUDE_DIRS="${EPREFIX}/usr/include/hypre" + ) + use scotch && \ + mycmakeargs+=( + -DScotch_INCLUDE_DIRS="${EPREFIX}/usr/include/scotch" + ) + + # cxsparse is a rewrite of csparse + extras + use sparse && \ + mycmakeargs+=( + -DCSparse_LIBRARY_NAMES="cxsparse" + ) + + # mandatory blas and lapack + trilinos_conf blas BLAS + trilinos_conf lapack LAPACK + use superlu && trilinos_conf superlu SuperLU + use metis && trilinos_conf metis METIS + + # blacs library is included in scalapack these days + if use scalapack; then + trilinos_conf scalapack SCALAPACK + mycmakeargs+=( + -DBLACS_LIBRARY_NAMES="scalapack" + -DBLACS_INCLUDE_DIRS="${EPREFIX}/usr/include/blacs" + ) + fi + + # + # Make sure we use the compiler wrappers in order to build trilinos. + # + export CC=mpicc CXX=mpicxx && tc-export CC CXX + + # + # cmake-utils eclass patches the base directory CMakeLists.txt + # which does not work for complex Trilinos CMake modules + # + CMAKE_BUILD_TYPE=RELEASE cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # Clean up the mess: + mv "${ED}"/bin "${ED}/usr/$(get_libdir)"/trilinos || die "mv failed" + if [ -f "${ED}"/lib/exodus.py ]; then + mv "${ED}"/lib/exodus.py "${ED}/usr/$(get_libdir)"/trilinos || die "mv failed" + fi + + # + # register $(get_libdir)/trilinos in LDPATH so that the dynamic linker + # has a chance to pick up the libraries... + # + cat >> "${T}"/99trilinos <<- EOF + LDPATH="${EPREFIX}/usr/$(get_libdir)/trilinos" + PATH="${EPREFIX}/usr/$(get_libdir)/trilinos/bin" + EOF + doenvd "${T}"/99trilinos +} -- cgit v1.2.3