diff options
author | Bernd Waibel <waebbl-gentoo@posteo.net> | 2021-10-04 20:56:43 +0200 |
---|---|---|
committer | Jakov Smolić <jsmolic@gentoo.org> | 2021-10-04 21:33:18 +0200 |
commit | e5c0a08d3cecd7466fbda92233bbbd498e275505 (patch) | |
tree | e5728c127f8eb39e58987e052ac4b54cdca96163 | |
parent | x11-wm/icewm: Removed old (diff) | |
download | gentoo-e5c0a08d3cecd7466fbda92233bbbd498e275505.tar.gz gentoo-e5c0a08d3cecd7466fbda92233bbbd498e275505.tar.bz2 gentoo-e5c0a08d3cecd7466fbda92233bbbd498e275505.zip |
sci-libs/sundials: add 5.8.0
Closes: https://bugs.gentoo.org/787341
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
-rw-r--r-- | sci-libs/sundials/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/sundials/files/sundials-5.8.0-fix-license-install-path.patch | 29 | ||||
-rw-r--r-- | sci-libs/sundials/sundials-5.8.0.ebuild | 114 |
3 files changed, 144 insertions, 0 deletions
diff --git a/sci-libs/sundials/Manifest b/sci-libs/sundials/Manifest index 6bbc8edccc42..17ed196b5511 100644 --- a/sci-libs/sundials/Manifest +++ b/sci-libs/sundials/Manifest @@ -1,2 +1,3 @@ DIST sundials-5.2.0.tar.gz 18639221 BLAKE2B c10e6deb5839993b8601347be94412d0b0c058084b4dc0d380681f7b4debd535f9736c2ef734e9fd84c6ddc190ab05f46abcb711225ec1f156a18d8edb6317fb SHA512 99163a104e436dab4779c77519502b5614b65d726324b29b14236315f6916beb5863fcd56b5acf19f62985c033b227fba1ebd3d3c4607ce991d94ee7739bb55f DIST sundials-5.7.0.tar.gz 22612286 BLAKE2B a21db0d07b8f2056ba244ca52f13bde51a2f745535c7381a4eecf9d8037df3d50f010c8fecd8e37d71150f101c8177b2e3f0ffbed8139702993e01b8ad52e707 SHA512 5e2b6145fdaa72e7d13f43e75e5bc08b9d7eb5b9e048207d5772ddab767e198af5be24b73a942a564a49d56ca0b47fe6493bd2de34a8a93948ccd1c13e5dd170 +DIST sundials-5.8.0.tar.gz 24012815 BLAKE2B f707ad7465218532f3dc4df7627b87933b2bc52be6f1ad290b91ab83a3414ae83bc64503126af8772daa000f58a89855d7ca35fe74fa21bd91180695582442c7 SHA512 d22e699aaddaeef026e91e18dd070d06278c75b6980b36c6fb2e50203ba6445420e4a8e0612a6317dcaa521aeffbdf62ab88737be235ef70cef3a8be02a13dbb diff --git a/sci-libs/sundials/files/sundials-5.8.0-fix-license-install-path.patch b/sci-libs/sundials/files/sundials-5.8.0-fix-license-install-path.patch new file mode 100644 index 000000000000..d4e5fd929b3c --- /dev/null +++ b/sci-libs/sundials/files/sundials-5.8.0-fix-license-install-path.patch @@ -0,0 +1,29 @@ +From 554a760daeda3a04049bfa4cf882aae1207f833d Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl-gentoo@posteo.net> +Date: Fri, 30 Apr 2021 11:58:25 +0200 +Subject: [PATCH] fix license install path + +Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 40a650e..d57ca7b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -231,10 +231,10 @@ endif() + + # install license and notice files + install(FILES "${PROJECT_SOURCE_DIR}/LICENSE" +- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sundials" ++ DESTINATION "${CMAKE_INSTALL_DOCDIR}" + ) + install(FILES "${PROJECT_SOURCE_DIR}/NOTICE" +- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sundials" ++ DESTINATION "${CMAKE_INSTALL_DOCDIR}" + ) + + # create package version file +-- +2.31.1 diff --git a/sci-libs/sundials/sundials-5.8.0.ebuild b/sci-libs/sundials/sundials-5.8.0.ebuild new file mode 100644 index 000000000000..894e7ef201cf --- /dev/null +++ b/sci-libs/sundials/sundials-5.8.0.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CMAKE_MAKEFILE_GENERATOR="emake" +FORTRAN_NEEDED=fortran +FORTRAN_STANDARD="77 90 2003" +# if FFLAGS and FCFLAGS are set then should be equal + +inherit cmake flag-o-matic fortran-2 toolchain-funcs + +DESCRIPTION="Suite of nonlinear solvers" +HOMEPAGE="https://computation.llnl.gov/projects/sundials" +SRC_URI="https://github.com/LLNL/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/$(ver_cut 1)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples fortran hypre lapack mpi openmp sparse +static-libs superlumt threads" +REQUIRED_USE=" + fortran? ( static-libs ) + hypre? ( mpi ) +" + +BDEPEND="virtual/pkgconfig" +RDEPEND=" + lapack? ( virtual/lapack ) + mpi? ( + sci-libs/hypre:=[fortran?,mpi?] + virtual/mpi[fortran?] + ) + sparse? ( sci-libs/klu ) + superlumt? ( sci-libs/superlu_mt:= ) +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-fix-license-install-path.patch +) + +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then + ewarn "OpenMP is not available in your current selected gcc" + die "need openmp capable gcc" + fi +} + +src_prepare() { + # bug #707240 + append-cflags -fcommon + use threads && append-ldflags -pthread + + cmake_src_prepare +} + +src_configure() { + mycmakeargs+=( + -DBUILD_FORTRAN77_INTERFACE=$(usex fortran) + -DBUILD_FORTRAN_MODULE_INTERFACE=$(usex fortran) + -DBUILD_SHARED_LIBS=ON + -DBUILD_STATIC_LIBS=$(usex static-libs) + -DENABLE_HYPRE=$(usex hypre) + -DENABLE_KLU=$(usex sparse) + -DENABLE_LAPACK=$(usex lapack) + -DENABLE_MPI=$(usex mpi) + -DENABLE_OPENMP=$(usex openmp) + -DENABLE_PTHREAD=$(usex threads) + -DENABLE_SUPERLUMT=$(usex superlumt) + -DEXAMPLES_INSTALL=ON + -DEXAMPLES_INSTALL_PATH="/usr/share/doc/${PF}/examples" + -DSUPERLUMT_INCLUDE_DIR="${EPREFIX}/usr/include/superlu_mt" + -DSUPERLUMT_LIBRARY="-lsuperlu_mt" + -DUSE_GENERIC_MATH=ON + ) + if use examples; then + mycmakeargs+=( + -DEXAMPLES_ENABLE_C=ON + -DEXAMPLES_ENABLE_CXX=ON + ) + if use fortran; then + mycmakeargs+=( + -DEXAMPLES_ENABLE_F77=ON + -DEXAMPLES_ENABLE_F90=ON + -DEXAMPLES_ENABLE_F2003=ON + ) + fi + fi + + if use fortran; then + mycmakeargs+=( + -DFortran_INSTALL_MODDIR="${EPREFIX}/usr/$(get_libdir)/fortran" + ) + fi + + if use hypre; then + mycmakeargs+=( + -DHYPRE_INCLUDE_DIR="${EPREFIX}/usr/include/hypre" + -DHYPRE_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libHYPRE.so" + ) + fi + + if use sparse; then + mycmakeargs+=( + -DKLU_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libklu.so" + ) + fi + cmake_src_configure +} + +src_install() { + cmake_src_install + use doc && dodoc doc/*/*.pdf +} |