Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/sundials/, sci-libs/sundials/files/
Date: Sat, 20 Apr 2019 23:22:41
Message-Id: 1555739924.456abdc06a8d0ace218031e6f1301b4cdbec568c.heroxbd@gentoo
1 commit: 456abdc06a8d0ace218031e6f1301b4cdbec568c
2 Author: Mo Zhou <cdluminate <AT> gmail <DOT> com>
3 AuthorDate: Thu Apr 18 12:43:03 2019 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 20 05:58:44 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=456abdc0
7
8 sci-libs/sundials: upgrade to 3.1.2
9
10 Closes: https://bugs.gentoo.org/679160
11 Closes: https://github.com/gentoo/gentoo/pull/11715
12 Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
13
14 sci-libs/sundials/Manifest | 1 +
15 .../sundials-3.1.2-fix-license-install-path.patch | 9 +++
16 sci-libs/sundials/sundials-3.1.2.ebuild | 78 ++++++++++++++++++++++
17 3 files changed, 88 insertions(+)
18
19 diff --git a/sci-libs/sundials/Manifest b/sci-libs/sundials/Manifest
20 index c97d47fcd0b..3e32eb9e943 100644
21 --- a/sci-libs/sundials/Manifest
22 +++ b/sci-libs/sundials/Manifest
23 @@ -1,3 +1,4 @@
24 DIST sundials-2.7.0.tar.gz 12258093 BLAKE2B 331fcf255f2bb8bcc798818b05db114feda7aacb6585177a836f17a9b58477f504099b4a33c7d71cab6e70eeb6fe47a76d101c08aa6219ee6fbac630524d5928 SHA512 c86c167538065a4109b36ae7c8f60f3d92184133cfa661b5acfccee052c38f40be865412a1746bb57907b61602c212c0f15e1e30ef29e8a49db6d46a75a28e69
25 DIST sundials-3.0.0.tar.gz 12996039 BLAKE2B 0557190f6f7550bd4d7d3df10f727c6f235ff4917f2cfd35ca77785037edc43236a82383664f6fe1579bb5b07a148875b82b22f5a9e4f5f2a0607838e8a3b286 SHA512 3c86c7f27e64c2e6732546b0b1e87ea092502e361cae09b3b7eb29795c978edf494e17be13b78541dc91cc0709d928006bd0fc62ea968f2b621efa51856cdd60
26 DIST sundials-3.1.0.tar.gz 13033516 BLAKE2B 41294c1022ab09db6fbfa0d41c169d2ead3483693653a9c0cc26fdffec61918fed5e93241f64f9bfdc6ff22812fb846f3ea8deecd82c28d179dded85ec2c69ba SHA512 288427e00f58c512583cc14d81385e82b0fdeaa4e9adca588a108ad0752341b7be62c9fa2740924ec733e3e0d5794f305dc582fc72e244e675e5ea00ac0d08ca
27 +DIST sundials-3.1.2.tar.gz 18212893 BLAKE2B cee897f59920d6530553e4005b043fe615bf86ed6cc4ecb829afc25ea46c1a37cefd5a05584bd763af29689980d7bb03442ad22c4b83dd3af2406e786540652a SHA512 b65989998b440b2b5c5d000f4b86d8bcbf03215fcee4e348cd4b8ff935ea3471a3593ab8bd0e7d5f8ba519b5a1285cc93d41ec622d0b51592d7593c7579af082
28
29 diff --git a/sci-libs/sundials/files/sundials-3.1.2-fix-license-install-path.patch b/sci-libs/sundials/files/sundials-3.1.2-fix-license-install-path.patch
30 new file mode 100644
31 index 00000000000..188e29999fc
32 --- /dev/null
33 +++ b/sci-libs/sundials/files/sundials-3.1.2-fix-license-install-path.patch
34 @@ -0,0 +1,9 @@
35 +diff -ru sundials-3.1.2.orig/CMakeLists.txt sundials-3.1.2/CMakeLists.txt
36 +--- sundials-3.1.2.orig/CMakeLists.txt 2018-07-31 17:25:19.000000000 -0000
37 ++++ sundials-3.1.2/CMakeLists.txt 2019-04-17 12:18:58.894563957 -0000
38 +@@ -1629,4 +1629,4 @@
39 + # install license file
40 + INSTALL(
41 + FILES ${PROJECT_SOURCE_DIR}/LICENSE
42 +- DESTINATION include/sundials)
43 ++ DESTINATION share/doc/sundials-3.1.2)
44
45 diff --git a/sci-libs/sundials/sundials-3.1.2.ebuild b/sci-libs/sundials/sundials-3.1.2.ebuild
46 new file mode 100644
47 index 00000000000..e5ad2325ff8
48 --- /dev/null
49 +++ b/sci-libs/sundials/sundials-3.1.2.ebuild
50 @@ -0,0 +1,78 @@
51 +# Copyright 1999-2018 Gentoo Foundation
52 +# Distributed under the terms of the GNU General Public License v2
53 +
54 +EAPI=6
55 +
56 +FORTRAN_NEEDED=fortran
57 +FORTRAN_STANDARD=90
58 +
59 +inherit cmake-utils toolchain-funcs fortran-2 versionator
60 +
61 +DESCRIPTION="Suite of nonlinear solvers"
62 +HOMEPAGE="https://computation.llnl.gov/projects/sundials"
63 +SRC_URI="https://computation.llnl.gov/projects/sundials/download/${P}.tar.gz"
64 +
65 +LICENSE="BSD"
66 +SLOT="0/$(get_major_version)"
67 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
68 +IUSE="cxx doc examples fortran hypre lapack mpi openmp sparse static-libs superlumt threads"
69 +REQUIRED_USE="hypre? ( mpi )"
70 +
71 +RDEPEND="
72 + lapack? ( virtual/lapack )
73 + mpi? ( virtual/mpi sci-libs/hypre:= )
74 + sparse? ( sci-libs/klu:= )
75 + superlumt? ( sci-libs/superlu_mt:= )
76 +"
77 +DEPEND="${RDEPEND}
78 + virtual/pkgconfig"
79 +
80 +PATCHES=( "${FILESDIR}"/${P}-fix-license-install-path.patch )
81 +
82 +pkg_setup() {
83 + if [[ ${MERGE_TYPE} != binary ]] && use openmp && [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
84 + ewarn "OpenMP is not available in your current selected gcc"
85 + die "need openmp capable gcc"
86 + fi
87 +}
88 +
89 +src_configure() {
90 + mycmakeargs+=(
91 + -DBUILD_SHARED_LIBS=ON
92 + -DBUILD_STATIC_LIBS="$(usex static-libs)"
93 + -DCXX_ENABLE="$(usex cxx)"
94 + -DFCMIX_ENABLE="$(usex fortran)"
95 + -DF90_ENABLE="$(usex fortran)"
96 + -DHYPRE_ENABLE="$(usex hypre)"
97 + -DHYPRE_INCLUDE_DIR="${EPREFIX}/usr/include/hypre"
98 + -DKLU_ENABLE="$(usex sparse)"
99 + -DKLU_LIBRARY="${EPREFIX}/usr/$(get_libdir)/libklu.so"
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 + -DSUPERLUMT_INCLUDE_DIR="${EPREFIX}/usr/include/superlu_mt"
106 + -DSUPERLUMT_LIBRARY="superlu_mt"
107 + -DEXAMPLES_ENABLE="$(usex examples)"
108 + -DEXAMPLES_INSTALL=ON
109 + -DEXAMPLES_INSTALL_PATH="/usr/share/doc/${PF}/examples"
110 + -DUSE_GENERIC_MATH=ON
111 + )
112 + cmake-utils_src_configure
113 +}
114 +
115 +src_install() {
116 + cmake-utils_src_install
117 + use doc && dodoc doc/*/*.pdf
118 + cd src
119 + for r in */README; do
120 + newdoc ${r} README-${r%/*}
121 + done
122 +
123 + # Use a sledgehammer, patching the buildsystem is too annoyoing (the
124 + # CMake build systems consists of 2000 "lib" DESTINATIONS...)
125 + if [[ lib != $(get_libdir) ]]; then
126 + mv "${ED%/}"/usr/lib "${ED%/}"/usr/$(get_libdir) || die
127 + fi
128 +}