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