Gentoo Archives: gentoo-commits

From: Jauhien Piatlicki <jauhien@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/armadillo/
Date: Sat, 28 Jun 2014 21:24:38
Message-Id: 1403990563.b9336fb025964398de5493806df1ff3fc213a3c0.jauhien@gentoo
1 commit: b9336fb025964398de5493806df1ff3fc213a3c0
2 Author: Jauhien Piatlicki <jauhien <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 28 21:22:43 2014 +0000
4 Commit: Jauhien Piatlicki <jauhien <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 28 21:22:43 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=b9336fb0
7
8 sci-libs/armadillo: version bump to 4.300.9
9
10 ---
11 sci-libs/armadillo/ChangeLog | 6 ++
12 sci-libs/armadillo/armadillo-4.300.9.ebuild | 114 ++++++++++++++++++++++++++++
13 sci-libs/armadillo/metadata.xml | 3 -
14 3 files changed, 120 insertions(+), 3 deletions(-)
15
16 diff --git a/sci-libs/armadillo/ChangeLog b/sci-libs/armadillo/ChangeLog
17 index e7b3f37..ce386e2 100644
18 --- a/sci-libs/armadillo/ChangeLog
19 +++ b/sci-libs/armadillo/ChangeLog
20 @@ -2,6 +2,12 @@
21 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
22 # $Header: $
23
24 +*armadillo-4.300.9 (28 Jun 2014)
25 +
26 + 28 Jun 2014; Jauhien Piatlicki <jauhien@g.o>
27 + +armadillo-4.300.9.ebuild, metadata.xml:
28 + version bump, see bug #515624
29 +
30 *armadillo-4.300.8 (02 Jun 2014)
31
32 02 Jun 2014; Sébastien Fabbro <bicatali@g.o> +armadillo-4.300.8.ebuild,
33
34 diff --git a/sci-libs/armadillo/armadillo-4.300.9.ebuild b/sci-libs/armadillo/armadillo-4.300.9.ebuild
35 new file mode 100644
36 index 0000000..96ac582
37 --- /dev/null
38 +++ b/sci-libs/armadillo/armadillo-4.300.9.ebuild
39 @@ -0,0 +1,114 @@
40 +# Copyright 1999-2014 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +# $Header: $
43 +
44 +EAPI=5
45 +
46 +CMAKE_IN_SOURCE_BUILD=1
47 +
48 +inherit cmake-utils toolchain-funcs multilib eutils
49 +
50 +DESCRIPTION="Streamlined C++ linear algebra library"
51 +HOMEPAGE="http://arma.sourceforge.net/"
52 +SRC_URI="mirror://sourceforge/arma/${P}.tar.gz"
53 +
54 +LICENSE="MPL-2.0"
55 +SLOT="0/4"
56 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
57 +IUSE="arpack atlas blas debug doc examples hdf5 lapack mkl tbb test"
58 +REQUIRED_USE="test? ( lapack )"
59 +
60 +RDEPEND="
61 + dev-libs/boost
62 + arpack? ( sci-libs/arpack )
63 + atlas? ( sci-libs/atlas[lapack] )
64 + blas? ( virtual/blas )
65 + lapack? ( virtual/lapack )"
66 +DEPEND="${RDEPEND}
67 + arpack? ( virtual/pkgconfig )
68 + atlas? ( virtual/pkgconfig )
69 + blas? ( virtual/pkgconfig )
70 + hdf5? ( sci-libs/hdf5 )
71 + lapack? ( virtual/pkgconfig )
72 + mkl? ( sci-libs/mkl )
73 + tbb? ( dev-cpp/tbb )"
74 +PDEPEND="${RDEPEND}
75 + hdf5? ( sci-libs/hdf5 )
76 + mkl? ( sci-libs/mkl )
77 + tbb? ( dev-cpp/tbb )"
78 +
79 +PATCHES=( "${FILESDIR}"/${PN}-3.820.1-example-makefile.patch )
80 +
81 +src_prepare() {
82 + # avoid the automagic cmake macros
83 + sed -i -e '/ARMA_Find/d' CMakeLists.txt || die
84 + cmake-utils_src_prepare
85 +}
86 +
87 +src_configure() {
88 + local mycmakeargs=(
89 + -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)"
90 + $(cmake-utils_use debug ARMA_EXTRA_DEBUG)
91 + $(cmake-utils_use mkl ARMA_USE_MKL_ALLOC)
92 + $(cmake-utils_use tbb ARMA_USE_TBB_ALLOC)
93 + )
94 + if use arpack; then
95 + mycmakeargs+=(
96 + -DARPACK_FOUND=ON
97 + -DARPACK_LIBRARY="$($(tc-getPKG_CONFIG) --libs arpack)"
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 + fi
119 + if use hdf5; then
120 + mycmakeargs+=(
121 + -DHDF5_FOUND=ON
122 + -DHDF5_LIBRARIES="-lhdf5"
123 + )
124 + fi
125 + if use lapack; then
126 + mycmakeargs+=(
127 + -DLAPACK_FOUND=ON
128 + -DLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs lapack)"
129 + )
130 + fi
131 + cmake-utils_src_configure
132 +}
133 +
134 +src_test() {
135 + pushd examples > /dev/null
136 + emake \
137 + CXXFLAGS="-I../include ${CXXFLAGS} -DARMA_USE_BLAS -DARMA_USE_LAPACK" \
138 + EXTRA_LIB_FLAGS="-L.. $($(tc-getPKG_CONFIG) --libs blas lapack)"
139 + LD_LIBRARY_PATH="..:${LD_LIBRARY_PATH}" ./example1 || die
140 + LD_LIBRARY_PATH="..:${LD_LIBRARY_PATH}" ./example2 || die
141 + emake clean
142 + popd > /dev/null
143 +}
144 +
145 +src_install() {
146 + cmake-utils_src_install
147 + dodoc README.txt
148 + use doc && dodoc *pdf && dohtml *html
149 + if use examples; then
150 + insinto /usr/share/doc/${PF}
151 + doins -r examples
152 + fi
153 +}
154
155 diff --git a/sci-libs/armadillo/metadata.xml b/sci-libs/armadillo/metadata.xml
156 index ce0d5f9..385357d 100644
157 --- a/sci-libs/armadillo/metadata.xml
158 +++ b/sci-libs/armadillo/metadata.xml
159 @@ -19,9 +19,6 @@
160 Link with <pkg>sci-libs/atlas</pkg> libraries for cblas and
161 clapack
162 </flag>
163 - <flag name='int64'>
164 - Use 64 bits integer for matrix indexation
165 - </flag>
166 <flag name="arpack">
167 Link with <pkg>sci-libs/arpack</pkg> libraries for eigen decomposition
168 </flag>