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: Thu, 23 Jul 2015 21:06:17
Message-Id: 1437401102.81a16804886701f5057843dabe07b1cc69caff39.jauhien@gentoo
1 commit: 81a16804886701f5057843dabe07b1cc69caff39
2 Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
3 AuthorDate: Mon Jul 20 14:05:02 2015 +0000
4 Commit: Jauhien Piatlicki <jauhien <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 20 14:05:02 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=81a16804
7
8 sci-libs/armadillo: Version bump
9
10 Package-Manager: portage-2.2.20
11
12 sci-libs/armadillo/ChangeLog | 6 ++
13 sci-libs/armadillo/armadillo-5.200.2.ebuild | 112 ++++++++++++++++++++++++++++
14 2 files changed, 118 insertions(+)
15
16 diff --git a/sci-libs/armadillo/ChangeLog b/sci-libs/armadillo/ChangeLog
17 index 908a93a..6f29e41 100644
18 --- a/sci-libs/armadillo/ChangeLog
19 +++ b/sci-libs/armadillo/ChangeLog
20 @@ -2,6 +2,12 @@
21 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
22 # $Header: $
23
24 +*armadillo-5.200.2 (20 Jul 2015)
25 +
26 + 20 Jul 2015; Marius Brehler <marbre@××××××××××××××.de>
27 + +armadillo-5.200.2.ebuild:
28 + sci-libs/armadillo: Version bump
29 +
30 08 Jun 2015; Justin Lecher <jlec@g.o> metadata.xml:
31 sci-libs/armadillo: Updating remote-id in metadata.xml
32
33
34 diff --git a/sci-libs/armadillo/armadillo-5.200.2.ebuild b/sci-libs/armadillo/armadillo-5.200.2.ebuild
35 new file mode 100644
36 index 0000000..8d63e06
37 --- /dev/null
38 +++ b/sci-libs/armadillo/armadillo-5.200.2.ebuild
39 @@ -0,0 +1,112 @@
40 +# Copyright 1999-2015 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/armadillo/armadillo-4.650.4.ebuild,v 1.1 2015/04/03 12:32:07 jlec Exp $
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 +src_prepare() {
80 + # avoid the automagic cmake macros
81 + sed -i -e '/ARMA_Find/d' CMakeLists.txt || die
82 + cmake-utils_src_prepare
83 +}
84 +
85 +src_configure() {
86 + local mycmakeargs=(
87 + -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)"
88 + $(cmake-utils_use debug ARMA_EXTRA_DEBUG)
89 + $(cmake-utils_use mkl ARMA_USE_MKL_ALLOC)
90 + $(cmake-utils_use tbb ARMA_USE_TBB_ALLOC)
91 + )
92 + if use arpack; then
93 + mycmakeargs+=(
94 + -DARPACK_FOUND=ON
95 + -DARPACK_LIBRARY="$($(tc-getPKG_CONFIG) --libs arpack)"
96 + )
97 + fi
98 + if use atlas; then
99 + local c=atlas-cblas l=atlas-clapack
100 + $(tc-getPKG_CONFIG) --exists ${c}-threads && c+=-threads
101 + $(tc-getPKG_CONFIG) --exists ${l}-threads && l+=-threads
102 + mycmakeargs+=(
103 + -DCBLAS_FOUND=ON
104 + -DCBLAS_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --cflags-only-I ${c} | sed 's/-I//')"
105 + -DCBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${c})"
106 + -DCLAPACK_FOUND=ON
107 + -DCLAPACK_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --cflags-only-I ${l} | sed 's/-I//')"
108 + -DCLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs ${l})"
109 + )
110 + fi
111 + if use blas; then
112 + mycmakeargs+=(
113 + -DBLAS_FOUND=ON
114 + -DBLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas)"
115 + )
116 + fi
117 + if use hdf5; then
118 + mycmakeargs+=(
119 + -DHDF5_FOUND=ON
120 + -DHDF5_LIBRARIES="-lhdf5"
121 + )
122 + fi
123 + if use lapack; then
124 + mycmakeargs+=(
125 + -DLAPACK_FOUND=ON
126 + -DLAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs lapack)"
127 + )
128 + fi
129 + cmake-utils_src_configure
130 +}
131 +
132 +src_test() {
133 + pushd examples > /dev/null
134 + emake \
135 + CXXFLAGS="-I../include ${CXXFLAGS} -DARMA_USE_BLAS -DARMA_USE_LAPACK" \
136 + EXTRA_LIB_FLAGS="-L.. $($(tc-getPKG_CONFIG) --libs blas lapack)"
137 + LD_LIBRARY_PATH="..:${LD_LIBRARY_PATH}" ./example1 || die
138 + LD_LIBRARY_PATH="..:${LD_LIBRARY_PATH}" ./example2 || die
139 + emake clean
140 + popd > /dev/null
141 +}
142 +
143 +src_install() {
144 + cmake-utils_src_install
145 + dodoc README.txt
146 + use doc && dodoc *pdf && dohtml *html
147 + if use examples; then
148 + insinto /usr/share/examples/${PF}
149 + doins -r examples/*
150 + fi
151 +}