Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/sundials/files/, sci-libs/sundials/
Date: Sun, 31 Jan 2021 20:37:12
Message-Id: 1612125417.e8ba3ec29c32370eb12d24dcfc30c4fe7311a2e3.soap@gentoo
1 commit: e8ba3ec29c32370eb12d24dcfc30c4fe7311a2e3
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 31 20:36:57 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 31 20:36:57 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8ba3ec2
7
8 Reverts: 35d4a5366fcceebb570ca654b80598e706f4f056
9
10 We still depend on older versions of sci-libs/sundials in
11 * sci-libs/dealii
12 * sci-mathematics/nestedsums
13
14 Signed-off-by: David Seifert <soap <AT> gentoo.org>
15
16 sci-libs/sundials/Manifest | 1 +
17 .../sundials-3.2.1-fix-license-install-path.patch | 9 +++
18 sci-libs/sundials/sundials-3.2.1.ebuild | 77 ++++++++++++++++++++++
19 3 files changed, 87 insertions(+)
20
21 diff --git a/sci-libs/sundials/Manifest b/sci-libs/sundials/Manifest
22 index 76d2de2d267..8e2bf49a661 100644
23 --- a/sci-libs/sundials/Manifest
24 +++ b/sci-libs/sundials/Manifest
25 @@ -1 +1,2 @@
26 +DIST sundials-3.2.1.tar.gz 14958699 BLAKE2B ecc4b454ec589e9177acc9375e1db370ad6281f8d29580d9558ad3146dbbaab52794013e9cb56ad83f7309dbd3084a1ccaf6972c6b1468cefcc86bf30d3a460c SHA512 1f3e4b12f368e4f50c38b970c012f1702e339319ee0a858661bdf83e5739bb5b8a36f98b82e2ef76d1ce8a473123046347ee1b44f3cb685509823864f0af1384
27 DIST sundials-5.2.0.tar.gz 18639221 BLAKE2B c10e6deb5839993b8601347be94412d0b0c058084b4dc0d380681f7b4debd535f9736c2ef734e9fd84c6ddc190ab05f46abcb711225ec1f156a18d8edb6317fb SHA512 99163a104e436dab4779c77519502b5614b65d726324b29b14236315f6916beb5863fcd56b5acf19f62985c033b227fba1ebd3d3c4607ce991d94ee7739bb55f
28
29 diff --git a/sci-libs/sundials/files/sundials-3.2.1-fix-license-install-path.patch b/sci-libs/sundials/files/sundials-3.2.1-fix-license-install-path.patch
30 new file mode 100644
31 index 00000000000..eba90b52ac4
32 --- /dev/null
33 +++ b/sci-libs/sundials/files/sundials-3.2.1-fix-license-install-path.patch
34 @@ -0,0 +1,9 @@
35 +diff -Nur old/CMakeLists.txt new/CMakeLists.txt
36 +--- old/CMakeLists.txt 2018-10-11 22:22:09.000000000 +0300
37 ++++ new/CMakeLists.txt 2019-06-23 00:33:27.000000000 +0300
38 +@@ -1117,4 +1117,4 @@
39 + # install license file
40 + INSTALL(
41 + FILES ${PROJECT_SOURCE_DIR}/LICENSE
42 +- DESTINATION include/sundials)
43 ++ DESTINATION share/doc/sundials-3.2.1)
44
45 diff --git a/sci-libs/sundials/sundials-3.2.1.ebuild b/sci-libs/sundials/sundials-3.2.1.ebuild
46 new file mode 100644
47 index 00000000000..36bca3f96aa
48 --- /dev/null
49 +++ b/sci-libs/sundials/sundials-3.2.1.ebuild
50 @@ -0,0 +1,77 @@
51 +# Copyright 1999-2020 Gentoo Authors
52 +# Distributed under the terms of the GNU General Public License v2
53 +
54 +EAPI=7
55 +
56 +CMAKE_MAKEFILE_GENERATOR="emake"
57 +FORTRAN_NEEDED=fortran
58 +FORTRAN_STANDARD=90
59 +
60 +inherit cmake-utils toolchain-funcs fortran-2
61 +
62 +DESCRIPTION="Suite of nonlinear solvers"
63 +HOMEPAGE="https://computation.llnl.gov/projects/sundials"
64 +SRC_URI="https://computation.llnl.gov/projects/sundials/download/${P}.tar.gz"
65 +
66 +LICENSE="BSD"
67 +SLOT="0/$(ver_cut 1)"
68 +KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
69 +IUSE="cxx doc examples fortran hypre lapack mpi openmp sparse static-libs superlumt threads"
70 +REQUIRED_USE="hypre? ( mpi )"
71 +
72 +RDEPEND="
73 + lapack? ( virtual/lapack )
74 + mpi? ( virtual/mpi sci-libs/hypre:= )
75 + sparse? ( sci-libs/klu:= )
76 + superlumt? ( sci-libs/superlu_mt:= )
77 +"
78 +DEPEND="${RDEPEND}
79 + virtual/pkgconfig"
80 +
81 +PATCHES=( "${FILESDIR}"/${P}-fix-license-install-path.patch )
82 +
83 +pkg_setup() {
84 + if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
85 + ewarn "OpenMP is not available in your current selected gcc"
86 + die "need openmp capable gcc"
87 + fi
88 +}
89 +
90 +src_configure() {
91 + mycmakeargs+=(
92 + -DBUILD_SHARED_LIBS=ON
93 + -DBUILD_STATIC_LIBS="$(usex static-libs)"
94 + -DCXX_ENABLE="$(usex cxx)"
95 + -DFCMIX_ENABLE="$(usex fortran)"
96 + -DF90_ENABLE="$(usex fortran)"
97 + -DHYPRE_ENABLE="$(usex hypre)"
98 + -DHYPRE_INCLUDE_DIR="${EPREFIX}/usr/include/hypre"
99 + -DKLU_ENABLE="$(usex sparse)"
100 + -DLAPACK_ENABLE="$(usex lapack)"
101 + -DMPI_ENABLE="$(usex mpi)"
102 + -DOPENMP_ENABLE="$(usex openmp)"
103 + -DPTHREAD_ENABLE="$(usex threads)"
104 + -DSUPERLUMT_ENABLE="$(usex superlumt)"
105 + -DEXAMPLES_ENABLE="$(usex examples)"
106 + -DEXAMPLES_INSTALL=ON
107 + -DEXAMPLES_INSTALL_PATH="/usr/share/doc/${PF}/examples"
108 + -DUSE_GENERIC_MATH=ON
109 + )
110 + use sparse && mycmakeargs+=(
111 + -DKLU_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libklu.so"
112 + )
113 + use superlumt && mycmakeargs+=(
114 + -DSUPERLUMT_INCLUDE_DIR="${EPREFIX}/usr/include/superlu_mt"
115 + -DSUPERLUMT_LIBRARY="superlu_mt"
116 + )
117 + cmake-utils_src_configure
118 +}
119 +
120 +src_install() {
121 + cmake-utils_src_install
122 + use doc && dodoc doc/*/*.pdf
123 + cd src
124 + for r in */README; do
125 + newdoc ${r} README-${r%/*}
126 + done
127 +}