1 |
commit: 8292b49e51b79d2d0b2f841d56efd643e13b45ac |
2 |
Author: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
3 |
AuthorDate: Tue Sep 29 14:09:37 2020 +0000 |
4 |
Commit: Aisha Tammy <gentoo <AT> aisha <DOT> cc> |
5 |
CommitDate: Tue Sep 29 14:10:31 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=8292b49e |
7 |
|
8 |
sci-libs/mlpack: version bump to 3.4.1 |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
11 |
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc> |
12 |
|
13 |
sci-libs/mlpack/files/mlpack-1.0.4-libdir.patch | 13 --- |
14 |
sci-libs/mlpack/files/mlpack-1.0.8-uint32_t.patch | 16 ---- |
15 |
sci-libs/mlpack/metadata.xml | 25 +++-- |
16 |
sci-libs/mlpack/mlpack-1.0.8.ebuild | 56 ----------- |
17 |
sci-libs/mlpack/mlpack-3.4.1.ebuild | 112 ++++++++++++++++++++++ |
18 |
5 files changed, 130 insertions(+), 92 deletions(-) |
19 |
|
20 |
diff --git a/sci-libs/mlpack/files/mlpack-1.0.4-libdir.patch b/sci-libs/mlpack/files/mlpack-1.0.4-libdir.patch |
21 |
deleted file mode 100644 |
22 |
index c22c8110a..000000000 |
23 |
--- a/sci-libs/mlpack/files/mlpack-1.0.4-libdir.patch |
24 |
+++ /dev/null |
25 |
@@ -1,13 +0,0 @@ |
26 |
---- mlpack-1.0.4/src/mlpack/CMakeLists.txt.old 2013-02-08 16:45:45.218117489 -0500 |
27 |
-+++ mlpack-1.0.4/src/mlpack/CMakeLists.txt 2013-02-08 16:45:59.938263211 -0500 |
28 |
-@@ -62,8 +62,8 @@ |
29 |
- # be entered... |
30 |
- install(TARGETS mlpack |
31 |
- RUNTIME DESTINATION bin |
32 |
-- LIBRARY DESTINATION lib |
33 |
-- ARCHIVE DESTINATION lib) |
34 |
-+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
35 |
-+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
36 |
- |
37 |
- # For 'make test'. |
38 |
- add_custom_target(test |
39 |
|
40 |
diff --git a/sci-libs/mlpack/files/mlpack-1.0.8-uint32_t.patch b/sci-libs/mlpack/files/mlpack-1.0.8-uint32_t.patch |
41 |
deleted file mode 100644 |
42 |
index f2dbc4176..000000000 |
43 |
--- a/sci-libs/mlpack/files/mlpack-1.0.8-uint32_t.patch |
44 |
+++ /dev/null |
45 |
@@ -1,16 +0,0 @@ |
46 |
---- src/mlpack/core/math/random.hpp 2014-02-15 20:47:24.897408021 +0200 |
47 |
-+++ src/mlpack/core/math/random.hpp 2014-02-15 20:49:36.190907865 +0200 |
48 |
-@@ -26,10 +26,13 @@ |
49 |
- #include <float.h> |
50 |
- |
51 |
- #include <boost/random.hpp> |
52 |
-+#include <boost/cstdint.hpp> |
53 |
- |
54 |
- namespace mlpack { |
55 |
- namespace math /** Miscellaneous math routines. */ { |
56 |
- |
57 |
-+using boost::uint32_t; |
58 |
-+ |
59 |
- // Annoying Boost versioning issues. |
60 |
- #include <boost/version.hpp> |
61 |
- |
62 |
|
63 |
diff --git a/sci-libs/mlpack/metadata.xml b/sci-libs/mlpack/metadata.xml |
64 |
index 1ce896b0f..f587c48a7 100644 |
65 |
--- a/sci-libs/mlpack/metadata.xml |
66 |
+++ b/sci-libs/mlpack/metadata.xml |
67 |
@@ -1,16 +1,27 @@ |
68 |
<?xml version="1.0" encoding="UTF-8"?> |
69 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
70 |
<pkgmetadata> |
71 |
+ <maintainer type="person"> |
72 |
+ <email>gentoo@×××××.cc</email> |
73 |
+ <name>Aisha Tammy</name> |
74 |
+ </maintainer> |
75 |
<maintainer type="project"> |
76 |
<email>sci@g.o</email> |
77 |
<name>Gentoo Science Project</name> |
78 |
</maintainer> |
79 |
<longdescription lang="en"> |
80 |
-mlpack is a C++ machine learning library with emphasis on |
81 |
-scalability, speed, and ease-of-use. Its aim is to make machine |
82 |
-learning possible for novice users by means of a simple, consistent |
83 |
-API, while simultaneously exploiting C++ language features to |
84 |
-provide maximum performance and maximum flexibility for expert |
85 |
-users. |
86 |
-</longdescription> |
87 |
+ mlpack is a C++ machine learning library with emphasis on |
88 |
+ scalability, speed, and ease-of-use. Its aim is to make machine |
89 |
+ learning possible for novice users by means of a simple, consistent |
90 |
+ API, while simultaneously exploiting C++ language features to |
91 |
+ provide maximum performance and maximum flexibility for expert |
92 |
+ users. |
93 |
+ </longdescription> |
94 |
+ <use> |
95 |
+ <flag name="arma-debug">build with armadillo dbug symbols</flag> |
96 |
+ <flag name="go">build go bindings</flag> |
97 |
+ <flag name="julia">build julia bindings</flag> |
98 |
+ <flag name="matlab">build matlab bindings</flag> |
99 |
+ <flag name="R">build R bindings</flag> |
100 |
+ </use> |
101 |
</pkgmetadata> |
102 |
|
103 |
diff --git a/sci-libs/mlpack/mlpack-1.0.8.ebuild b/sci-libs/mlpack/mlpack-1.0.8.ebuild |
104 |
deleted file mode 100644 |
105 |
index 9ef9e87ce..000000000 |
106 |
--- a/sci-libs/mlpack/mlpack-1.0.8.ebuild |
107 |
+++ /dev/null |
108 |
@@ -1,56 +0,0 @@ |
109 |
-# Copyright 1999-2014 Gentoo Foundation |
110 |
-# Distributed under the terms of the GNU General Public License v2 |
111 |
- |
112 |
-EAPI=5 |
113 |
- |
114 |
-inherit cmake-utils eutils toolchain-funcs |
115 |
- |
116 |
-DESCRIPTION="Scalable c++ machine learning library" |
117 |
-HOMEPAGE="http://www.mlpack.org/" |
118 |
-SRC_URI="http://www.mlpack.org/files/${P}.tar.gz" |
119 |
- |
120 |
-LICENSE="LGPL-3" |
121 |
-SLOT="0" |
122 |
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
123 |
-IUSE="debug doc" |
124 |
- |
125 |
-RDEPEND=" |
126 |
- dev-libs/boost |
127 |
- dev-libs/libxml2 |
128 |
- >=sci-libs/armadillo-3.6.0[lapack]" |
129 |
- |
130 |
-DEPEND="${DEPEND} |
131 |
- app-text/txt2man |
132 |
- virtual/pkgconfig |
133 |
- doc? ( app-doc/doxygen )" |
134 |
- |
135 |
-DOCS=( HISTORY.txt ) |
136 |
- |
137 |
-src_prepare() { |
138 |
- epatch \ |
139 |
- "${FILESDIR}/${PN}-1.0.4-libdir.patch" \ |
140 |
- "${FILESDIR}/${PN}-1.0.8-uint32_t.patch" |
141 |
- sed -i \ |
142 |
- -e "s:share/doc/mlpack:share/doc/${PF}:" \ |
143 |
- -e 's/-O3//g' \ |
144 |
- CMakeLists.txt || die |
145 |
- sed -i \ |
146 |
- -e "s|\(set(ARMADILLO_LIBRARIES\)|\1 $($(tc-getPKG_CONFIG) --libs blas lapack)|" \ |
147 |
- CMake/FindArmadillo.cmake || die |
148 |
-} |
149 |
- |
150 |
-src_configure() { |
151 |
- local mycmakeargs=( |
152 |
- $(cmake-utils_use debug DEBUG) |
153 |
- $(cmake-utils_use debug PROFILE) |
154 |
- ) |
155 |
- cmake-utils_src_configure |
156 |
-} |
157 |
- |
158 |
-src_compile() { |
159 |
- cmake-utils_src_compile all $(use doc && echo doc) |
160 |
-} |
161 |
- |
162 |
-src_test() { |
163 |
- emake -C "${BUILD_DIR}" test |
164 |
-} |
165 |
|
166 |
diff --git a/sci-libs/mlpack/mlpack-3.4.1.ebuild b/sci-libs/mlpack/mlpack-3.4.1.ebuild |
167 |
new file mode 100644 |
168 |
index 000000000..661299d6d |
169 |
--- /dev/null |
170 |
+++ b/sci-libs/mlpack/mlpack-3.4.1.ebuild |
171 |
@@ -0,0 +1,112 @@ |
172 |
+# Copyright 1999-2020 Gentoo Authors |
173 |
+# Distributed under the terms of the GNU General Public License v2 |
174 |
+ |
175 |
+EAPI=7 |
176 |
+ |
177 |
+PYTHON_COMPAT=( python3_{6..9} ) |
178 |
+ |
179 |
+inherit cmake python-single-r1 toolchain-funcs |
180 |
+ |
181 |
+DESCRIPTION="scalable C++ machine learning library" |
182 |
+HOMEPAGE="http://www.mlpack.org/" |
183 |
+SRC_URI="http://www.mlpack.org/files/${P}.tar.gz" |
184 |
+ |
185 |
+LICENSE="LGPL-3" |
186 |
+SLOT="0" |
187 |
+KEYWORDS="~amd64" |
188 |
+IUSE+="arma-debug debug doc go julia matlab openmp profile R test" |
189 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} arma-debug? ( debug )" |
190 |
+RESTRICT="!test? ( test )" |
191 |
+ |
192 |
+CDEPEND=" |
193 |
+ ${PYTHON_DEPS} |
194 |
+ julia? ( || ( |
195 |
+ dev-lang/julia |
196 |
+ dev-lang/julia-bin |
197 |
+ ) |
198 |
+ ) |
199 |
+ go? ( dev-lang/go ) |
200 |
+ R? ( dev-lang/R ) |
201 |
+" |
202 |
+ |
203 |
+RDEPEND=" |
204 |
+ ${CDEPEND} |
205 |
+ $(python_gen_cond_dep ' |
206 |
+ dev-libs/boost[${PYTHON_USEDEP}] |
207 |
+ dev-libs/libxml2[${PYTHON_USEDEP}] |
208 |
+ ') |
209 |
+ dev-python/pandas |
210 |
+ dev-python/cython |
211 |
+ dev-python/numpy |
212 |
+ dev-libs/stb |
213 |
+ >=sci-libs/armadillo-8.4.0[arpack,blas,lapack] |
214 |
+ sci-libs/ensmallen |
215 |
+" |
216 |
+DEPEND="${RDEPEND}" |
217 |
+BDEPEND=" |
218 |
+ ${CDEPEND} |
219 |
+ app-text/txt2man |
220 |
+ virtual/pkgconfig |
221 |
+ doc? ( |
222 |
+ app-doc/doxygen |
223 |
+ dev-libs/mathjax |
224 |
+ ) |
225 |
+ test? ( $( python_gen_cond_dep ' |
226 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
227 |
+ ') |
228 |
+ ) |
229 |
+" |
230 |
+ |
231 |
+pkg_setup() { |
232 |
+ elog "If you want to build matlab bindings then you" |
233 |
+ elog "need to make sure that matlab has been installed" |
234 |
+ elog "prior to building this package and it is available" |
235 |
+ elog "in the standard locations to be found by" |
236 |
+ elog "CMake, library finders, header includes and other" |
237 |
+ elog "trinkets that are used while compiling." |
238 |
+ elog "Matlab will not be entertained as a first class" |
239 |
+ elog "citizen until we have enough personnel" |
240 |
+ |
241 |
+ python-single-r1_pkg_setup |
242 |
+} |
243 |
+ |
244 |
+src_prepare() { |
245 |
+ sed -i \ |
246 |
+ -e "s:share/doc/mlpack:share/doc/${PF}:" \ |
247 |
+ -e 's/-O3//g' \ |
248 |
+ CMakeLists.txt || die |
249 |
+ cmake_src_prepare |
250 |
+} |
251 |
+ |
252 |
+src_configure() { |
253 |
+ local mycmakeargs=( |
254 |
+ -DDISABLE_DOWNLOADS=ON |
255 |
+ -DDOWNLOAD_ENSMALLEN=OFF |
256 |
+ -DDOWNLOAD_STB_IMAGE=OFF |
257 |
+ -DBUILD_WITH_COVERAGE=OFF |
258 |
+ -DBUILD_PYTHON_BINDINGS=ON |
259 |
+ -DBUILD_SHARED_LIBS=ON |
260 |
+ -DBUILD_CLI_EXECUTABLES=ON |
261 |
+ -DTEST_VERBOSE=$(usex test) |
262 |
+ -DBUILD_TESTS=$(usex test) |
263 |
+ -DDEBUG=$(usex debug) |
264 |
+ -DPROFILE=$(usex profile) |
265 |
+ -DARMA_EXTRA_DEBUG=$(usex arma-debug) |
266 |
+ -DUSE_OPENMP=$(usex openmp) |
267 |
+ -DMATLAB_BINDINGS=$(usex matlab) |
268 |
+ -DBUILD_GO_SHLIB=$(usex go) |
269 |
+ -DBUILD_JULIA_BINDINGS=$(usex julia) |
270 |
+ -DBUILD_GO_BINDINGS=$(usex go) |
271 |
+ -DBUILD_R_BINDINGS=$(usex R) |
272 |
+ -DBUILD_MARKDOWN_BINDINGS=$(usex doc) |
273 |
+ -DMATHJAX=$(usex doc) |
274 |
+ ${EXTRA_ECONF[@]} |
275 |
+ ) |
276 |
+ cmake_src_configure |
277 |
+} |
278 |
+ |
279 |
+src_install() { |
280 |
+ cmake_src_install |
281 |
+ |
282 |
+ python_optimize |
283 |
+} |