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