1 |
commit: 083c8e158079d734bf9fd4502865ccc50fe9043a |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 17 22:12:31 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 17 22:12:31 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=083c8e15 |
7 |
|
8 |
sci-libs/sundials: add 6.2.0 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/731904 |
11 |
Bug: https://bugs.gentoo.org/831110 |
12 |
Bug: https://bugs.gentoo.org/715556 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
sci-libs/sundials/Manifest | 1 + |
16 |
sci-libs/sundials/sundials-6.2.0.ebuild | 119 ++++++++++++++++++++++++++++++++ |
17 |
2 files changed, 120 insertions(+) |
18 |
|
19 |
diff --git a/sci-libs/sundials/Manifest b/sci-libs/sundials/Manifest |
20 |
index 5588e189068a..dc11161c3fdd 100644 |
21 |
--- a/sci-libs/sundials/Manifest |
22 |
+++ b/sci-libs/sundials/Manifest |
23 |
@@ -1,2 +1,3 @@ |
24 |
DIST sundials-5.2.0.tar.gz 18639221 BLAKE2B c10e6deb5839993b8601347be94412d0b0c058084b4dc0d380681f7b4debd535f9736c2ef734e9fd84c6ddc190ab05f46abcb711225ec1f156a18d8edb6317fb SHA512 99163a104e436dab4779c77519502b5614b65d726324b29b14236315f6916beb5863fcd56b5acf19f62985c033b227fba1ebd3d3c4607ce991d94ee7739bb55f |
25 |
DIST sundials-5.8.0.tar.gz 24012815 BLAKE2B f707ad7465218532f3dc4df7627b87933b2bc52be6f1ad290b91ab83a3414ae83bc64503126af8772daa000f58a89855d7ca35fe74fa21bd91180695582442c7 SHA512 d22e699aaddaeef026e91e18dd070d06278c75b6980b36c6fb2e50203ba6445420e4a8e0612a6317dcaa521aeffbdf62ab88737be235ef70cef3a8be02a13dbb |
26 |
+DIST sundials-6.2.0.tar.gz 82410068 BLAKE2B c6aa9735198465bb458590ef1a90101e246202632afd6bd7f48970b9a2752810ce8c5be7983097cd816189cb994efbddf8d34706665846c67d6442bd7c12db38 SHA512 0dd0a2bf6390a13a5846caf440aa6d459f3890f6d13c0eff8c8180a92a636d6eae7f64679d45acd2048de742d4c644e2ae112cb09028b3fdef10a247bee44c0b |
27 |
|
28 |
diff --git a/sci-libs/sundials/sundials-6.2.0.ebuild b/sci-libs/sundials/sundials-6.2.0.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..bc44870f0732 |
31 |
--- /dev/null |
32 |
+++ b/sci-libs/sundials/sundials-6.2.0.ebuild |
33 |
@@ -0,0 +1,119 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+CMAKE_MAKEFILE_GENERATOR="emake" |
40 |
+FORTRAN_NEEDED=fortran |
41 |
+FORTRAN_STANDARD="77 90 2003" |
42 |
+# if FFLAGS and FCFLAGS are set then should be equal |
43 |
+ |
44 |
+inherit cmake flag-o-matic fortran-2 toolchain-funcs |
45 |
+ |
46 |
+DESCRIPTION="Suite of nonlinear solvers" |
47 |
+HOMEPAGE="https://computing.llnl.gov/projects/sundials" |
48 |
+SRC_URI="https://github.com/LLNL/${PN}/releases/download/v${PV}/${P}.tar.gz" |
49 |
+ |
50 |
+LICENSE="BSD" |
51 |
+SLOT="0/$(ver_cut 1)" |
52 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" |
53 |
+IUSE="doc examples fortran hypre +int64 lapack mpi openmp sparse +static-libs superlumt threads" |
54 |
+REQUIRED_USE=" |
55 |
+ fortran? ( static-libs ) |
56 |
+ hypre? ( mpi ) |
57 |
+" |
58 |
+ |
59 |
+BDEPEND="virtual/pkgconfig" |
60 |
+RDEPEND=" |
61 |
+ lapack? ( virtual/lapack ) |
62 |
+ mpi? ( |
63 |
+ sci-libs/hypre:=[fortran?,mpi?] |
64 |
+ virtual/mpi[fortran?] |
65 |
+ ) |
66 |
+ sparse? ( sci-libs/klu ) |
67 |
+ superlumt? ( sci-libs/superlu_mt:=[int64=] ) |
68 |
+" |
69 |
+DEPEND="${RDEPEND}" |
70 |
+ |
71 |
+PATCHES=( |
72 |
+ "${FILESDIR}"/${PN}-5.8.0-fix-license-install-path.patch |
73 |
+) |
74 |
+ |
75 |
+pkg_pretend() { |
76 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
77 |
+} |
78 |
+ |
79 |
+pkg_setup() { |
80 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
81 |
+ |
82 |
+ use fortran && fortran-2_pkg_setup |
83 |
+} |
84 |
+ |
85 |
+src_prepare() { |
86 |
+ # bug #707240 |
87 |
+ append-cflags -fcommon |
88 |
+ use threads && append-ldflags -pthread |
89 |
+ |
90 |
+ cmake_src_prepare |
91 |
+} |
92 |
+ |
93 |
+src_configure() { |
94 |
+ mycmakeargs+=( |
95 |
+ -DBUILD_FORTRAN_MODULE_INTERFACE=$(usex fortran) |
96 |
+ -DBUILD_SHARED_LIBS=ON |
97 |
+ -DBUILD_STATIC_LIBS=$(usex static-libs) |
98 |
+ -DENABLE_HYPRE=$(usex hypre) |
99 |
+ -DENABLE_KLU=$(usex sparse) |
100 |
+ -DENABLE_LAPACK=$(usex lapack) |
101 |
+ -DENABLE_MPI=$(usex mpi) |
102 |
+ -DENABLE_OPENMP=$(usex openmp) |
103 |
+ -DENABLE_PTHREAD=$(usex threads) |
104 |
+ -DENABLE_SUPERLUMT=$(usex superlumt) |
105 |
+ -DEXAMPLES_INSTALL=ON |
106 |
+ -DEXAMPLES_INSTALL_PATH="/usr/share/doc/${PF}/examples" |
107 |
+ -DSUNDIALS_INDEX_SIZE="$(usex int64 64 32)" |
108 |
+ -DSUPERLUMT_INCLUDE_DIR="${EPREFIX}/usr/include/superlu_mt" |
109 |
+ -DSUPERLUMT_LIBRARY="-lsuperlu_mt" |
110 |
+ -DUSE_GENERIC_MATH=ON |
111 |
+ ) |
112 |
+ |
113 |
+ if use examples; then |
114 |
+ mycmakeargs+=( |
115 |
+ -DEXAMPLES_ENABLE_C=ON |
116 |
+ -DEXAMPLES_ENABLE_CXX=ON |
117 |
+ ) |
118 |
+ if use fortran; then |
119 |
+ mycmakeargs+=( |
120 |
+ -DEXAMPLES_ENABLE_F77=ON |
121 |
+ -DEXAMPLES_ENABLE_F90=ON |
122 |
+ -DEXAMPLES_ENABLE_F2003=ON |
123 |
+ ) |
124 |
+ fi |
125 |
+ fi |
126 |
+ |
127 |
+ if use fortran; then |
128 |
+ mycmakeargs+=( |
129 |
+ -DFortran_INSTALL_MODDIR="${EPREFIX}/usr/$(get_libdir)/fortran" |
130 |
+ ) |
131 |
+ fi |
132 |
+ |
133 |
+ if use hypre; then |
134 |
+ mycmakeargs+=( |
135 |
+ -DHYPRE_INCLUDE_DIR="${EPREFIX}/usr/include/hypre" |
136 |
+ -DHYPRE_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libHYPRE.so" |
137 |
+ ) |
138 |
+ fi |
139 |
+ |
140 |
+ if use sparse; then |
141 |
+ mycmakeargs+=( |
142 |
+ -DKLU_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libklu.so" |
143 |
+ ) |
144 |
+ fi |
145 |
+ |
146 |
+ cmake_src_configure |
147 |
+} |
148 |
+ |
149 |
+src_install() { |
150 |
+ cmake_src_install |
151 |
+ use doc && dodoc doc/*/*.pdf |
152 |
+} |