Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/armadillo/
Date: Wed, 20 Jan 2021 21:46:28
Message-Id: 1611179160.d0b14dd484a3395d343e0250bc1a09b9d3833953.dilfridge@gentoo
1 commit: d0b14dd484a3395d343e0250bc1a09b9d3833953
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 20 21:43:40 2021 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 20 21:46:00 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0b14dd4
7
8 sci-libs/armadillo: Version bump
9
10 Package-Manager: Portage-3.0.12, Repoman-3.0.2
11 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
12
13 sci-libs/armadillo/Manifest | 1 +
14 sci-libs/armadillo/armadillo-10.2.0.ebuild | 148 +++++++++++++++++++++++++++++
15 2 files changed, 149 insertions(+)
16
17 diff --git a/sci-libs/armadillo/Manifest b/sci-libs/armadillo/Manifest
18 index b81f29c2eae..d603294cedd 100644
19 --- a/sci-libs/armadillo/Manifest
20 +++ b/sci-libs/armadillo/Manifest
21 @@ -1,2 +1,3 @@
22 +DIST armadillo-10.2.0.tar.xz 6042348 BLAKE2B e85f24ca7137c3a8c8fc53db15b382f2e4d468673c99e036ef9b4a4436be47d24a37664dfa88ff9effa08a4c868bd212d03c204dda09cd26038a0f8ccbf61375 SHA512 c5d6f4bac0acba63fbd7681653d521249fd303ffbbc5b18df71500eb111514c1d09db600a580091d6a23c83748c109c30938bbcd80a3a0b2c25e2fdea932f2cd
23 DIST armadillo-8.300.2.tar.xz 4593916 BLAKE2B 0cb9082d9452b43599dea810036a1cdcd8ef4ab6ce5b2bc7b9d9201f1f396666a2aecb81ffa62388e1ee3de9a8c7df083df594224af47e5df7ee4d3c2743d6cc SHA512 df069634db377e95e02dfca02312b082b34cab91bae0b1fd04a97339477074fc50c74f8adf92786ac6f0fc148044d527461617f382cc996523251b6d1287e41c
24 DIST armadillo-9.850.1.tar.xz 4715832 BLAKE2B 41256d8f54ec1f2d4f7cfdf58bd67e66cc2ffbe0f1daf259a4d76e0816d89708fa5528d57b244000393404108c8d0d613d03321f14e5653163d0c1cc6ec7e273 SHA512 b2b9f0290f8f39a687db71a02b127086d5ff22cee77fba5211da2ea8a8d8a5edc256b31b7fce8e98aa1955a84c63e488adcd22f8cd070015a6fcd4b4f1cb37c7
25
26 diff --git a/sci-libs/armadillo/armadillo-10.2.0.ebuild b/sci-libs/armadillo/armadillo-10.2.0.ebuild
27 new file mode 100644
28 index 00000000000..baaa3579072
29 --- /dev/null
30 +++ b/sci-libs/armadillo/armadillo-10.2.0.ebuild
31 @@ -0,0 +1,148 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +CMAKE_IN_SOURCE_BUILD=1
38 +
39 +inherit cmake toolchain-funcs multilib eutils
40 +
41 +DESCRIPTION="Streamlined C++ linear algebra library"
42 +HOMEPAGE="http://arma.sourceforge.net/"
43 +SRC_URI="mirror://sourceforge/arma/${P}.tar.xz"
44 +
45 +LICENSE="Apache-2.0"
46 +SLOT="0/10"
47 +KEYWORDS="~amd64 ~arm ~ppc64 ~x86 ~amd64-linux ~x86-linux"
48 +IUSE="arpack blas doc examples hdf5 lapack mkl superlu test"
49 +RESTRICT="!test? ( test )"
50 +REQUIRED_USE="test? ( lapack )"
51 +
52 +# atlas? ( sci-libs/atlas[lapack] )
53 +
54 +RDEPEND="
55 + dev-libs/boost
56 + arpack? ( sci-libs/arpack )
57 + blas? ( virtual/blas )
58 + lapack? ( virtual/lapack )
59 + superlu? ( >=sci-libs/superlu-5.2 )
60 +"
61 +
62 +DEPEND="${RDEPEND}
63 + arpack? ( virtual/pkgconfig )
64 + blas? ( virtual/pkgconfig )
65 + hdf5? ( sci-libs/hdf5 )
66 + lapack? ( virtual/pkgconfig )
67 + mkl? ( sci-libs/mkl )
68 +"
69 +PDEPEND="${RDEPEND}
70 + hdf5? ( sci-libs/hdf5 )
71 + mkl? ( sci-libs/mkl )
72 +"
73 +
74 +src_prepare() {
75 + # avoid the automagic cmake macros...
76 + sed -i -e 's/^ *include(ARMA_Find/# No automagic include(ARMA_Find/g' CMakeLists.txt || die
77 +
78 + # ... except for mkl, since without a license it's hard to figure out what to do there
79 + if use mkl; then
80 + sed -i -e 's/^# No automagic include(ARMA_FindMKL)/include(ARMA_FindMKL)/g' CMakeLists.txt || die
81 + fi
82 +
83 + cmake_src_prepare
84 +}
85 +
86 +src_configure() {
87 + local mycmakeargs=(
88 + -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)"
89 + )
90 + if use arpack; then
91 + mycmakeargs+=(
92 + -DARPACK_FOUND=ON
93 + -DARPACK_LIBRARY="$($(tc-getPKG_CONFIG) --libs arpack)"
94 + )
95 + else
96 + mycmakeargs+=(
97 + -DARPACK_FOUND=OFF
98 + )
99 + fi
100 +# if use atlas; then
101 +# local c=atlas-cblas l=atlas-clapack
102 +# $(tc-getPKG_CONFIG) --exists ${c}-threads && c+=-threads
103 +# $(tc-getPKG_CONFIG) --exists ${l}-threads && l+=-threads
104 +# mycmakeargs+=(
105 +# -DCBLAS_FOUND=ON
106 +# -DCBLAS_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --cflags-only-I ${c} | sed 's/-I//')"
107 +# -DCBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${c})"
108 +# -DCLAPACK_FOUND=ON
109 +# -DCLAPACK_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --cflags-only-I ${l} | sed 's/-I//')"
110 +# -DCLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${l})"
111 +# )
112 +# fi
113 + if use blas; then
114 + mycmakeargs+=(
115 + -DBLAS_FOUND=ON
116 + -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)"
117 + )
118 + else
119 + mycmakeargs+=(
120 + -DBLAS_FOUND=OFF
121 + )
122 + fi
123 + if use hdf5; then
124 + mycmakeargs+=(
125 + -DDETECT_HDF5=ON
126 + -DHDF5_LIBRARIES="-lhdf5"
127 + -DHDF5_INCLUDE_DIRS=/usr/include
128 + )
129 + else
130 + mycmakeargs+=(
131 + -DDETECT_HDF5=OFF
132 + )
133 + fi
134 + if use lapack; then
135 + mycmakeargs+=(
136 + -DLAPACK_FOUND=ON
137 + -DLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs lapack)"
138 + )
139 + else
140 + mycmakeargs+=(
141 + -DLAPACK_FOUND=OFF
142 + )
143 + fi
144 + if use superlu; then
145 + mycmakeargs+=(
146 + -DSuperLU_FOUND=ON
147 + -DSuperLU_LIBRARY="$($(tc-getPKG_CONFIG) --libs superlu)"
148 + -DSuperLU_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --cflags-only-I superlu | awk '{print $1}' | sed 's/-I//')"
149 + )
150 + else
151 + mycmakeargs+=(
152 + -DSuperLU_FOUND=OFF
153 + )
154 + fi
155 +
156 + cmake_src_configure
157 +}
158 +
159 +src_test() {
160 + pushd examples > /dev/null
161 + emake \
162 + CXX="$(tc-getCXX)" \
163 + CXXFLAGS="-I../include ${CXXFLAGS} -DARMA_USE_BLAS -DARMA_USE_LAPACK" \
164 + LIB_FLAGS="-L.. -larmadillo $($(tc-getPKG_CONFIG) --libs blas lapack)"
165 + LD_LIBRARY_PATH="..:${LD_LIBRARY_PATH}" ./example1 || die
166 + emake clean
167 + popd > /dev/null
168 +}
169 +
170 +src_install() {
171 + cmake_src_install
172 + dodoc README.md
173 + use doc && dodoc *pdf *html
174 + if use examples; then
175 + docinto /usr/share/doc/${PF}/examples
176 + dodoc -r examples/*
177 + docompress -x /usr/share/doc/${PF}/examples
178 + fi
179 +}