Gentoo Archives: gentoo-commits

From: "Jakov Smolić" <jsmolic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/sundials/files/, sci-libs/sundials/
Date: Mon, 04 Oct 2021 19:33:31
Message-Id: 1633375998.e5c0a08d3cecd7466fbda92233bbbd498e275505.jsmolic@gentoo
1 commit: e5c0a08d3cecd7466fbda92233bbbd498e275505
2 Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
3 AuthorDate: Mon Oct 4 18:56:43 2021 +0000
4 Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 4 19:33:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5c0a08d
7
8 sci-libs/sundials: add 5.8.0
9
10 Closes: https://bugs.gentoo.org/787341
11 Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
12 Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
13
14 sci-libs/sundials/Manifest | 1 +
15 .../sundials-5.8.0-fix-license-install-path.patch | 29 ++++++
16 sci-libs/sundials/sundials-5.8.0.ebuild | 114 +++++++++++++++++++++
17 3 files changed, 144 insertions(+)
18
19 diff --git a/sci-libs/sundials/Manifest b/sci-libs/sundials/Manifest
20 index 6bbc8edccc4..17ed196b551 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.7.0.tar.gz 22612286 BLAKE2B a21db0d07b8f2056ba244ca52f13bde51a2f745535c7381a4eecf9d8037df3d50f010c8fecd8e37d71150f101c8177b2e3f0ffbed8139702993e01b8ad52e707 SHA512 5e2b6145fdaa72e7d13f43e75e5bc08b9d7eb5b9e048207d5772ddab767e198af5be24b73a942a564a49d56ca0b47fe6493bd2de34a8a93948ccd1c13e5dd170
26 +DIST sundials-5.8.0.tar.gz 24012815 BLAKE2B f707ad7465218532f3dc4df7627b87933b2bc52be6f1ad290b91ab83a3414ae83bc64503126af8772daa000f58a89855d7ca35fe74fa21bd91180695582442c7 SHA512 d22e699aaddaeef026e91e18dd070d06278c75b6980b36c6fb2e50203ba6445420e4a8e0612a6317dcaa521aeffbdf62ab88737be235ef70cef3a8be02a13dbb
27
28 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
29 new file mode 100644
30 index 00000000000..d4e5fd929b3
31 --- /dev/null
32 +++ b/sci-libs/sundials/files/sundials-5.8.0-fix-license-install-path.patch
33 @@ -0,0 +1,29 @@
34 +From 554a760daeda3a04049bfa4cf882aae1207f833d Mon Sep 17 00:00:00 2001
35 +From: Bernd Waibel <waebbl-gentoo@××××××.net>
36 +Date: Fri, 30 Apr 2021 11:58:25 +0200
37 +Subject: [PATCH] fix license install path
38 +
39 +Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net>
40 +---
41 + CMakeLists.txt | 4 ++--
42 + 1 file changed, 2 insertions(+), 2 deletions(-)
43 +
44 +diff --git a/CMakeLists.txt b/CMakeLists.txt
45 +index 40a650e..d57ca7b 100644
46 +--- a/CMakeLists.txt
47 ++++ b/CMakeLists.txt
48 +@@ -231,10 +231,10 @@ endif()
49 +
50 + # install license and notice files
51 + install(FILES "${PROJECT_SOURCE_DIR}/LICENSE"
52 +- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sundials"
53 ++ DESTINATION "${CMAKE_INSTALL_DOCDIR}"
54 + )
55 + install(FILES "${PROJECT_SOURCE_DIR}/NOTICE"
56 +- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sundials"
57 ++ DESTINATION "${CMAKE_INSTALL_DOCDIR}"
58 + )
59 +
60 + # create package version file
61 +--
62 +2.31.1
63
64 diff --git a/sci-libs/sundials/sundials-5.8.0.ebuild b/sci-libs/sundials/sundials-5.8.0.ebuild
65 new file mode 100644
66 index 00000000000..894e7ef201c
67 --- /dev/null
68 +++ b/sci-libs/sundials/sundials-5.8.0.ebuild
69 @@ -0,0 +1,114 @@
70 +# Copyright 1999-2021 Gentoo Authors
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=8
74 +
75 +CMAKE_MAKEFILE_GENERATOR="emake"
76 +FORTRAN_NEEDED=fortran
77 +FORTRAN_STANDARD="77 90 2003"
78 +# if FFLAGS and FCFLAGS are set then should be equal
79 +
80 +inherit cmake flag-o-matic fortran-2 toolchain-funcs
81 +
82 +DESCRIPTION="Suite of nonlinear solvers"
83 +HOMEPAGE="https://computation.llnl.gov/projects/sundials"
84 +SRC_URI="https://github.com/LLNL/${PN}/releases/download/v${PV}/${P}.tar.gz"
85 +
86 +LICENSE="BSD"
87 +SLOT="0/$(ver_cut 1)"
88 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
89 +IUSE="doc examples fortran hypre lapack mpi openmp sparse +static-libs superlumt threads"
90 +REQUIRED_USE="
91 + fortran? ( static-libs )
92 + hypre? ( mpi )
93 +"
94 +
95 +BDEPEND="virtual/pkgconfig"
96 +RDEPEND="
97 + lapack? ( virtual/lapack )
98 + mpi? (
99 + sci-libs/hypre:=[fortran?,mpi?]
100 + virtual/mpi[fortran?]
101 + )
102 + sparse? ( sci-libs/klu )
103 + superlumt? ( sci-libs/superlu_mt:= )
104 +"
105 +DEPEND="${RDEPEND}"
106 +
107 +PATCHES=(
108 + "${FILESDIR}"/${P}-fix-license-install-path.patch
109 +)
110 +
111 +pkg_setup() {
112 + if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
113 + ewarn "OpenMP is not available in your current selected gcc"
114 + die "need openmp capable gcc"
115 + fi
116 +}
117 +
118 +src_prepare() {
119 + # bug #707240
120 + append-cflags -fcommon
121 + use threads && append-ldflags -pthread
122 +
123 + cmake_src_prepare
124 +}
125 +
126 +src_configure() {
127 + mycmakeargs+=(
128 + -DBUILD_FORTRAN77_INTERFACE=$(usex fortran)
129 + -DBUILD_FORTRAN_MODULE_INTERFACE=$(usex fortran)
130 + -DBUILD_SHARED_LIBS=ON
131 + -DBUILD_STATIC_LIBS=$(usex static-libs)
132 + -DENABLE_HYPRE=$(usex hypre)
133 + -DENABLE_KLU=$(usex sparse)
134 + -DENABLE_LAPACK=$(usex lapack)
135 + -DENABLE_MPI=$(usex mpi)
136 + -DENABLE_OPENMP=$(usex openmp)
137 + -DENABLE_PTHREAD=$(usex threads)
138 + -DENABLE_SUPERLUMT=$(usex superlumt)
139 + -DEXAMPLES_INSTALL=ON
140 + -DEXAMPLES_INSTALL_PATH="/usr/share/doc/${PF}/examples"
141 + -DSUPERLUMT_INCLUDE_DIR="${EPREFIX}/usr/include/superlu_mt"
142 + -DSUPERLUMT_LIBRARY="-lsuperlu_mt"
143 + -DUSE_GENERIC_MATH=ON
144 + )
145 + if use examples; then
146 + mycmakeargs+=(
147 + -DEXAMPLES_ENABLE_C=ON
148 + -DEXAMPLES_ENABLE_CXX=ON
149 + )
150 + if use fortran; then
151 + mycmakeargs+=(
152 + -DEXAMPLES_ENABLE_F77=ON
153 + -DEXAMPLES_ENABLE_F90=ON
154 + -DEXAMPLES_ENABLE_F2003=ON
155 + )
156 + fi
157 + fi
158 +
159 + if use fortran; then
160 + mycmakeargs+=(
161 + -DFortran_INSTALL_MODDIR="${EPREFIX}/usr/$(get_libdir)/fortran"
162 + )
163 + fi
164 +
165 + if use hypre; then
166 + mycmakeargs+=(
167 + -DHYPRE_INCLUDE_DIR="${EPREFIX}/usr/include/hypre"
168 + -DHYPRE_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libHYPRE.so"
169 + )
170 + fi
171 +
172 + if use sparse; then
173 + mycmakeargs+=(
174 + -DKLU_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libklu.so"
175 + )
176 + fi
177 + cmake_src_configure
178 +}
179 +
180 +src_install() {
181 + cmake_src_install
182 + use doc && dodoc doc/*/*.pdf
183 +}