commit: 180dda21f7e970e576b6064ac387431056cea33e Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> AuthorDate: Sat Dec 6 21:52:06 2014 +0000 Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> CommitDate: Sat Dec 6 21:52:06 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=180dda21
version bump Package-Manager: portage-2.2.15 --- sci-libs/trilinos/ChangeLog | 6 + .../files/trilinos-11.12.1-fix-install-paths.patch | 61 +++++++ sci-libs/trilinos/trilinos-11.12.1.ebuild | 202 +++++++++++++++++++++ 3 files changed, 269 insertions(+) diff --git a/sci-libs/trilinos/ChangeLog b/sci-libs/trilinos/ChangeLog index d6c571d..82242b8 100644 --- a/sci-libs/trilinos/ChangeLog +++ b/sci-libs/trilinos/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*trilinos-11.12.1 (06 Dec 2014) + + 06 Dec 2014; Matthias Maier <tam...@gentoo.org> + +files/trilinos-11.12.1-fix-install-paths.patch, +trilinos-11.12.1.ebuild: + version bump + *trilinos-11.10.2 (21 Oct 2014) 21 Oct 2014; Matthias Maier <tam...@gentoo.org> +trilinos-11.10.2.ebuild, diff --git a/sci-libs/trilinos/files/trilinos-11.12.1-fix-install-paths.patch b/sci-libs/trilinos/files/trilinos-11.12.1-fix-install-paths.patch new file mode 100644 index 0000000..130f3ce --- /dev/null +++ b/sci-libs/trilinos/files/trilinos-11.12.1-fix-install-paths.patch @@ -0,0 +1,61 @@ +diff --git a/cmake/tribits/package_arch/TribitsWriteClientExportFiles.cmake b/cmake/tribits/package_arch/TribitsWriteClientExportFiles.cmake +index e1c633f..864488f 100644 +--- a/cmake/tribits/package_arch/TribitsWriteClientExportFiles.cmake ++++ b/cmake/tribits/package_arch/TribitsWriteClientExportFiles.cmake +@@ -494,8 +494,8 @@ INCLUDE(\"${PROJECT_BINARY_DIR}/${PACKAGE_NAME}Targets.cmake\")" + FOREACH(PATH ${PATH_LIST}) + SET(RELATIVE_PATH "${RELATIVE_PATH}/..") + ENDFOREACH() +- SET(FULL_LIBRARY_DIRS_SET "\${CMAKE_CURRENT_LIST_DIR}/${RELATIVE_PATH}/${${PROJECT_NAME}_INSTALL_LIB_DIR}") +- SET(FULL_INCLUDE_DIRS_SET "\${CMAKE_CURRENT_LIST_DIR}/${RELATIVE_PATH}/${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}") ++ SET(FULL_LIBRARY_DIRS_SET "${${PROJECT_NAME}_INSTALL_LIB_DIR}") ++ SET(FULL_INCLUDE_DIRS_SET "${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}") + + # Custom code in configuration file. + SET(PACKAGE_CONFIG_CODE "") +@@ -574,14 +574,14 @@ FUNCTION(TRIBITS_WRITE_PROJECT_CLIENT_EXPORT_FILES_INSTALL_TARGETS PACKAGE_NAME) + IF (${PROJECT_NAME}_ENABLE_INSTALL_CMAKE_CONFIG_FILES) + INSTALL( + FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${PACKAGE_NAME}Config_install.cmake +- DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/cmake/${PACKAGE_NAME}" ++ DESTINATION "${${PROJECT_NAME}_INSTALL_CONFIG_DIR}/${PACKAGE_NAME}" + RENAME ${PACKAGE_NAME}Config.cmake + ) + + IF(${PACKAGE_NAME}_HAS_NATIVE_LIBRARIES) + INSTALL( + EXPORT ${PACKAGE_NAME} +- DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/cmake/${PACKAGE_NAME}" ++ DESTINATION "${${PROJECT_NAME}_INSTALL_CONFIG_DIR}/${PROJECT_NAME}" + FILE ${PACKAGE_NAME}Targets.cmake + ) + ENDIF() +@@ -819,8 +819,8 @@ include(\"${${TRIBITS_PACKAGE}_BINARY_DIR}/${TRIBITS_PACKAGE}Config.cmake\")") + FOREACH(PATH ${PATH_LIST}) + SET(RELATIVE_PATH "${RELATIVE_PATH}/..") + ENDFOREACH() +- SET(${PROJECT_NAME}_CONFIG_INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/${RELATIVE_PATH}/${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}") +- SET(${PROJECT_NAME}_CONFIG_LIBRARY_DIRS "\${CMAKE_CURRENT_LIST_DIR}/${RELATIVE_PATH}/${${PROJECT_NAME}_INSTALL_LIB_DIR}") ++ SET(${PROJECT_NAME}_CONFIG_INCLUDE_DIRS "${${PROJECT_NAME}_INSTALL_INCLUDE_DIR}") ++ SET(${PROJECT_NAME}_CONFIG_LIBRARY_DIRS "${${PROJECT_NAME}_INSTALL_LIB_DIR}") + + # Write the specification of the rpath if necessary. This is only needed if we're building shared libraries. + IF(BUILD_SHARED_LIBS) +@@ -845,7 +845,7 @@ include(\"\${CMAKE_CURRENT_LIST_DIR}/../${TRIBITS_PACKAGE}/${TRIBITS_PACKAGE}Con + + INSTALL( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config_install.cmake +- DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/cmake/${PROJECT_NAME}" ++ DESTINATION "${${PROJECT_NAME}_INSTALL_CONFIG_DIR}/${PROJECT_NAME}" + RENAME ${PROJECT_NAME}Config.cmake + ) + ENDIF() +@@ -890,7 +890,7 @@ include(\"\${CMAKE_CURRENT_LIST_DIR}/../${TRIBITS_PACKAGE}/${TRIBITS_PACKAGE}Con + ) + INSTALL( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake +- DESTINATION "${${PROJECT_NAME}_INSTALL_LIB_DIR}/cmake/${PROJECT_NAME}" ++ DESTINATION "${${PROJECT_NAME}_INSTALL_CONFIG_DIR}/${PROJECT_NAME}" + ) + + ENDFUNCTION() diff --git a/sci-libs/trilinos/trilinos-11.12.1.ebuild b/sci-libs/trilinos/trilinos-11.12.1.ebuild new file mode 100644 index 0000000..51734a4 --- /dev/null +++ b/sci-libs/trilinos/trilinos-11.12.1.ebuild @@ -0,0 +1,202 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit cmake-utils toolchain-funcs multilib toolchain-funcs + +DESCRIPTION="Scientific library collection for large scale problems" +HOMEPAGE="http://trilinos.sandia.gov/" +SRC_URI="${P}-Source.tar.bz2" + +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" + +LICENSE="BSD LGPL-2.1" +SLOT="0" + +IUSE=" + adolc arprec boost clp cppunit cuda eigen glpk gtest + hdf5 hwloc hypre metis mkl mumps netcdf petsc qd qt4 + scalapack scotch sparse superlu taucs tbb test threads + tvmet yaml zlib +" + +# TODO: fix export cmake function for tests +RESTRICT="test fetch" + +RDEPEND=" + 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 ) + gtest? ( dev-cpp/gtest ) + hdf5? ( sci-libs/hdf5[mpi] ) + hypre? ( sci-libs/hypre ) + hwloc? ( sys-apps/hwloc ) + 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 ) + qt4? ( dev-qt/qtgui:4 ) + scalapack? ( virtual/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 )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S="${WORKDIR}/${P}-Source" + +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}" ) +} + +trilinos_enable() { + cmake-utils_use $1 TPL_ENABLE_${2:-${1^^}} +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-fix-install-paths.patch +} + +src_configure() { + + local mycmakeargs=( + -DBUILD_SHARED_LIBS=ON + -DCMAKE_INSTALL_PREFIX="${EPREFIX}" + -DTrilinos_ENABLE_ALL_PACKAGES=ON + -DTrilinos_INSTALL_INCLUDE_DIR="${EPREFIX}/usr/include/trilinos" + -DTrilinos_INSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)/trilinos" + -DTrilinos_INSTALL_CONFIG_DIR="${EPREFIX}/usr/$(get_libdir)/cmake" + -DTPL_ENABLE_BinUtils=ON + -DTPL_ENABLE_MPI=ON + -DTPL_ENABLE_BLAS=ON + -DTPL_ENABLE_LAPACK=ON + $(cmake-utils_use test Trilinos_ENABLE_TESTS) + $(trilinos_enable adolc) + $(trilinos_enable arprec) + $(trilinos_enable boost Boost) + $(trilinos_enable boost BoostLib) + $(trilinos_enable cppunit Cppunit) + $(trilinos_enable clp Clp) + $(trilinos_enable cuda) + $(trilinos_enable cuda CUSPARSE) + $(trilinos_enable cuda Thrust) + $(trilinos_enable eigen Eigen) + $(trilinos_enable gtest gtest) + $(trilinos_enable glpk) + $(trilinos_enable hdf5) + $(trilinos_enable hwloc) + $(trilinos_enable hypre) + $(trilinos_enable metis) + $(trilinos_enable mkl) + $(trilinos_enable mkl PARDISO_MKL) + $(trilinos_enable mumps) + $(trilinos_enable netcdf Netcdf) + $(trilinos_enable petsc) + $(trilinos_enable qd) + $(trilinos_enable qt4 QT) + $(trilinos_enable scalapack) + $(trilinos_enable scalapack BLACS) + $(trilinos_enable scotch Scotch) + $(trilinos_enable sparse AMD) + $(trilinos_enable sparse CSparse) + $(trilinos_enable sparse UMFPACK) + $(trilinos_enable superlu SuperLU) + $(trilinos_enable taucs) + $(trilinos_enable tbb) + $(trilinos_enable threads Pthread) + $(trilinos_enable tvmet) + $(trilinos_enable yaml yaml-cpp) + $(trilinos_enable zlib Zlib) + ) + + 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 + + # TODO: do we need that line? + 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 + + # TODO: + # python bindings with python-r1 + # fix hypre bindings + # fix hdf5 + # cuda/thrust is untested + # do we always need mpi? and for all packages: blah[mpi] ? + # install docs, examples + # see what packages are related, do we need REQUIRED_USE + # proper use flags description + # add more use flags/packages ? +} + +src_install() { + cmake-utils_src_install + + # 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" + EOF + doenvd "${T}"/99trilinos +}