Gentoo Archives: gentoo-commits

From: Sebastien Fabbro <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/armadillo/, sci-libs/armadillo/files/
Date: Mon, 29 Apr 2013 16:32:58
Message-Id: 1367252488.0d1553c53e3ace23b3d32ca4d8d315415b30f728.bicatali@gentoo
1 commit: 0d1553c53e3ace23b3d32ca4d8d315415b30f728
2 Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 29 16:21:28 2013 +0000
4 Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 29 16:21:28 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0d1553c5
7
8 sci-libs/armadillo: Version bump
9
10 Package-Manager: portage-2.2.01.21890-prefix
11 RepoMan-Options: --force
12
13 ---
14 sci-libs/armadillo/ChangeLog | 7 ++++
15 ...lo-3.6.3-r1.ebuild => armadillo-3.810.2.ebuild} | 35 +++++++++++++++----
16 .../files/armadillo-3.810.2-example-makefile.patch | 33 ++++++++++++++++++
17 .../armadillo/files/armadillo-3.810.2-hdf5.patch | 19 +++++++++++
18 sci-libs/armadillo/metadata.xml | 20 ++++++++---
19 5 files changed, 101 insertions(+), 13 deletions(-)
20
21 diff --git a/sci-libs/armadillo/ChangeLog b/sci-libs/armadillo/ChangeLog
22 index 71af4a9..ac1aaf0 100644
23 --- a/sci-libs/armadillo/ChangeLog
24 +++ b/sci-libs/armadillo/ChangeLog
25 @@ -2,6 +2,13 @@
26 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
27 # $Header: $
28
29 +*armadillo-3.810.2 (29 Apr 2013)
30 +
31 + 29 Apr 2013; Sébastien Fabbro <bicatali@g.o> +armadillo-3.810.2.ebuild,
32 + +files/armadillo-3.810.2-example-makefile.patch,
33 + +files/armadillo-3.810.2-hdf5.patch, -armadillo-3.6.3-r1.ebuild, metadata.xml:
34 + sci-libs/armadillo: Version bump
35 +
36 28 Feb 2013; Sébastien Fabbro <bicatali@g.o> armadillo-3.6.3-r1.ebuild:
37 sci-libs/armadillo: Small prefix fix
38
39
40 diff --git a/sci-libs/armadillo/armadillo-3.6.3-r1.ebuild b/sci-libs/armadillo/armadillo-3.810.2.ebuild
41 similarity index 60%
42 rename from sci-libs/armadillo/armadillo-3.6.3-r1.ebuild
43 rename to sci-libs/armadillo/armadillo-3.810.2.ebuild
44 index 0258f25..84523a3 100644
45 --- a/sci-libs/armadillo/armadillo-3.6.3-r1.ebuild
46 +++ b/sci-libs/armadillo/armadillo-3.810.2.ebuild
47 @@ -6,16 +6,16 @@ EAPI=5
48
49 CMAKE_IN_SOURCE_BUILD=1
50
51 -inherit cmake-utils toolchain-funcs multilib
52 +inherit cmake-utils toolchain-funcs multilib eutils
53
54 DESCRIPTION="Streamlined C++ linear algebra library"
55 HOMEPAGE="http://arma.sourceforge.net/"
56 SRC_URI="mirror://sourceforge/arma/${P}.tar.gz"
57
58 -LICENSE="LGPL-3"
59 +LICENSE="MPL-2.0"
60 SLOT="0"
61 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
62 -IUSE="atlas blas doc examples lapack"
63 +IUSE="atlas blas debug doc examples hdf5 int64 lapack tbb"
64
65 RDEPEND="
66 dev-libs/boost
67 @@ -26,14 +26,24 @@ DEPEND="${DEPEND}
68 atlas? ( virtual/pkgconfig )
69 blas? ( virtual/pkgconfig )
70 lapack? ( virtual/pkgconfig )"
71 +PDEPEND="${RDEPEND}
72 + hdf5? ( sci-libs/hdf5 )
73 + tbb? ( dev-cpp/tbb )"
74
75 src_prepare() {
76 + epatch "${FILESDIR}"/${P}-{hdf5,example-makefile}.patch
77 # avoid the automagic cmake macros
78 sed -i -e '/ARMA_Find/d' CMakeLists.txt || die
79 }
80
81 src_configure() {
82 - local mycmakeargs=( -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)" )
83 + local mycmakeargs=(
84 + -DINSTALL_LIB_DIR="${EPREFIX}/usr/$(get_libdir)"
85 + $(cmake-utils_use debug ARMA_EXTRA_DEBUG)
86 + $(cmake-utils_use hdf5 ARMA_USE_HDF5)
87 + $(cmake-utils_use int64 ARMA_64BIT_WORD)
88 + $(cmake-utils_use tbb ARMA_TBB_ALLOC)
89 + )
90 if use blas; then
91 mycmakeargs+=(
92 -DBLAS_FOUND=ON
93 @@ -47,10 +57,10 @@ src_configure() {
94 )
95 fi
96 if use atlas; then
97 - local c=atlas-cblas l=atlas-lapack
98 - $(tc-getPKG_CONFIG) --exists atlas-cblas-threads && c+=-threads
99 - $(tc-getPKG_CONFIG) --exists atlas-lapack-threads && l+=-threads
100 - mycmakeargs=(
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 -DCLAPACK_FOUND=ON
107 -DATLAS_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --cflags ${c} | sed 's/-I//')"
108 @@ -61,6 +71,15 @@ src_configure() {
109 cmake-utils_src_configure
110 }
111
112 +src_test() {
113 + pushd examples > /dev/null
114 + emake CXXFLAGS="-I../include ${CXXFLAGS}" EXTRA_LIB_FLAGS="-L.."
115 + LD_LIBRARY_PATH="..:${LD_LIBRARY_PATH}" ./example1 || die
116 + LD_LIBRARY_PATH="..:${LD_LIBRARY_PATH}" ./example2 || die
117 + emake clean
118 + popd > /dev/null
119 +}
120 +
121 src_install() {
122 cmake-utils_src_install
123 dodoc README.txt
124
125 diff --git a/sci-libs/armadillo/files/armadillo-3.810.2-example-makefile.patch b/sci-libs/armadillo/files/armadillo-3.810.2-example-makefile.patch
126 new file mode 100644
127 index 0000000..90169ed
128 --- /dev/null
129 +++ b/sci-libs/armadillo/files/armadillo-3.810.2-example-makefile.patch
130 @@ -0,0 +1,33 @@
131 +--- examples/Makefile.cmake.orig 2013-04-29 09:13:58.164963641 -0700
132 ++++ examples/Makefile.cmake 2013-04-29 09:18:42.371460644 -0700
133 +@@ -1,7 +1,7 @@
134 + # The generated "Makefile" from "Makefile.cmake" is only usable after
135 + # the Armadillo library has been configured and installed by CMake.
136 +
137 +-CXX=g++
138 ++CXX:=g++
139 + #CXX=g++-4.2
140 + ## Under MacOS you may have an old compiler as default (e.g. GCC 4.0).
141 + ## However, GCC 4.2 or later is available and preferable due to better
142 +@@ -26,7 +26,7 @@
143 +
144 +
145 +
146 +-LIB_FLAGS = -larmadillo $(EXTRA_LIB_FLAGS)
147 ++LIB_FLAGS = $(EXTRA_LIB_FLAGS) -larmadillo
148 + ## NOTE: on Ubuntu and Debian based systems you may need to add
149 + ## -lgfortran to LIB_FLAGS
150 +
151 +@@ -73,10 +73,10 @@
152 + all: example1 example2
153 +
154 + example1: example1.cpp
155 +- $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS)
156 ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $< $(LIB_FLAGS) -o $@
157 +
158 + example2: example2.cpp
159 +- $(CXX) $(CXXFLAGS) -o $@ $< $(LIB_FLAGS)
160 ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $< $(LIB_FLAGS) -o $@
161 +
162 +
163 + .PHONY: clean
164
165 diff --git a/sci-libs/armadillo/files/armadillo-3.810.2-hdf5.patch b/sci-libs/armadillo/files/armadillo-3.810.2-hdf5.patch
166 new file mode 100644
167 index 0000000..1d2e2ff
168 --- /dev/null
169 +++ b/sci-libs/armadillo/files/armadillo-3.810.2-hdf5.patch
170 @@ -0,0 +1,19 @@
171 +--- CMakeLists.txt.orig 2013-02-28 14:51:42.032554805 -0800
172 ++++ CMakeLists.txt 2013-02-28 14:53:05.730978799 -0800
173 +@@ -191,11 +191,11 @@
174 + # find_package(HDF5)
175 + # message(STATUS "HDF5_FOUND = ${HDF5_FOUND}")
176 + #
177 +-# if(HDF5_FOUND)
178 +-# set(ARMA_USE_HDF5 true)
179 +-# set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${HDF5_INCLUDE_DIRS})
180 +-# set(ARMA_LIBS ${ARMA_LIBS} ${HDF5_LIBRARIES})
181 +-# endif()
182 ++if(HDF5_FOUND)
183 ++ set(ARMA_USE_HDF5 true)
184 ++ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${HDF5_INCLUDE_DIRS})
185 ++ set(ARMA_LIBS ${ARMA_LIBS} ${HDF5_LIBRARIES})
186 ++endif()
187 +
188 + message(STATUS "*** ")
189 + message(STATUS "*** The Armadillo run-time library component will be an alias for the following libraries:")
190
191 diff --git a/sci-libs/armadillo/metadata.xml b/sci-libs/armadillo/metadata.xml
192 index 3581e19..ec31109 100644
193 --- a/sci-libs/armadillo/metadata.xml
194 +++ b/sci-libs/armadillo/metadata.xml
195 @@ -1,8 +1,8 @@
196 <?xml version="1.0" encoding="UTF-8"?>
197 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
198 <pkgmetadata>
199 - <herd>sci</herd>
200 - <longdescription lang="en">
201 +<herd>sci</herd>
202 +<longdescription lang="en">
203 Armadillo is a C++ linear algebra library (matrix maths) aiming
204 towards a good balance between speed and ease of use. Integer,
205 floating point and complex numbers are supported, as well as a
206 @@ -14,7 +14,17 @@
207 need for temporaries. This is accomplished through recursive
208 templates and template meta-programming.
209 </longdescription>
210 - <use>
211 - <flag name="atlas">Link with <pkg>sci-libs/atlas</pkg> libraries for cblas and clapack</flag>
212 - </use>
213 +<use>
214 + <flag name="atlas">
215 + Link with <pkg>sci-libs/atlas</pkg> libraries for cblas and
216 + clapack
217 + </flag>
218 + <flag name='int64'>
219 + Use 64 bits integer for matrix indexation
220 + </flag>
221 + <flag name='tbb'>
222 + Use matrix allocation from the Threads Building Blocks
223 + <pkg>dev-cpp/tbb</pkg>
224 + </flag>
225 +</use>
226 </pkgmetadata>