1 |
commit: 8d85f22fd38976093c4b3d3a9f5d30954e689c14 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 4 21:02:10 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 4 21:07:06 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d85f22f |
7 |
|
8 |
sci-libs/shogun: Version bump to 5.0.0 |
9 |
|
10 |
Gentoo-bug: 550134, 570014, 587324, 593310, |
11 |
602534, 604670, 606770, 607122 |
12 |
|
13 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
14 |
Closes: https://github.com/gentoo/gentoo/pull/3782 |
15 |
|
16 |
sci-libs/shogun/Manifest | 1 + |
17 |
.../files/shogun-5.0.0-fix-buildsystem.patch | 72 ++++++++++ |
18 |
sci-libs/shogun/metadata.xml | 55 +++---- |
19 |
sci-libs/shogun/shogun-5.0.0.ebuild | 160 +++++++++++++++++++++ |
20 |
4 files changed, 261 insertions(+), 27 deletions(-) |
21 |
|
22 |
diff --git a/sci-libs/shogun/Manifest b/sci-libs/shogun/Manifest |
23 |
index 0469645..b92de5f 100644 |
24 |
--- a/sci-libs/shogun/Manifest |
25 |
+++ b/sci-libs/shogun/Manifest |
26 |
@@ -1,2 +1,3 @@ |
27 |
DIST shogun-4.1.0.tar.bz2 2908955 SHA256 0eb313a95606edee046768a4577d63f32f7ccce340bed7bf0ff0d69225567185 SHA512 01950d5186a94735df5331752e1b97a5464015973ddba38a70bc977f9872b3aad02b162ae87919631cce56d1f10b0bea1fa7b463bf959816e5a15a726214f52a WHIRLPOOL 300bd0d887fe8ee4a1ac2aca7f3fbaebd4344dcffe2b20f9b5bb05e83d6973e8a98e54a216d99329c03eea2c02666c557a3c50ff7e11556298d119b8c262f762 |
28 |
+DIST shogun-5.0.0.tar.bz2 2448509 SHA256 e82c6a58db9db6624192b018750b0e41f793481791fdc9a6d328bf278d0ae70d SHA512 fa8d9dee4596acce12022540a6927cbdb62e08f8468c8be3790de07ebf3a53055032bcc532b28334ca83284c38f2b0153602634f12bafe4019acb9121b9ff236 WHIRLPOOL 532058c44680909f3717785035c13fb3cf48efec22924101975d80990cb2a9e151814c673ad1a03fa33e363abbaf21fc9edc99d7d25686cc67e907547217bf69 |
29 |
DIST shogun-data-0.9.tar.bz2 287533841 SHA256 691dd37ccc9bdd4f56d6b7a8e061e80567c241219d70210f8148bc4b7b815559 SHA512 ab501640e2db650603899c857866b451fac5c7bbbc7b4ef98559581928869cea49aa326dfca1bb398eee7ebc8843dcc8ee3105c9f462718f1af672aac6b9340a WHIRLPOOL 19aa7a6d84be9ac7d8aaf7fb12747e17e0ba5a7ec8770b83cc1833b07cd1c6c397684a96eb8ebe709d544967ffaf23bcfbeea52dc8ddedf487fcf54a6d2b3ef7 |
30 |
|
31 |
diff --git a/sci-libs/shogun/files/shogun-5.0.0-fix-buildsystem.patch b/sci-libs/shogun/files/shogun-5.0.0-fix-buildsystem.patch |
32 |
new file mode 100644 |
33 |
index 00000000..1eb7cd0 |
34 |
--- /dev/null |
35 |
+++ b/sci-libs/shogun/files/shogun-5.0.0-fix-buildsystem.patch |
36 |
@@ -0,0 +1,72 @@ |
37 |
+* Remove setting of user flags |
38 |
+* Remove erroneous bundling of Eigen |
39 |
+ |
40 |
+--- a/CMakeLists.txt |
41 |
++++ b/CMakeLists.txt |
42 |
+@@ -33,15 +33,6 @@ |
43 |
+ SET(EIGEN_VERSION_MINIMUM 3.1.2) |
44 |
+ SET(VIENNACL_VERSION_MINIMUM 1.5.0) |
45 |
+ |
46 |
+-# Store system's or distribution's C[XX]FLAGS. |
47 |
+-SET(SYSTEM_C_FLAGS "${CMAKE_C_FLAGS}") |
48 |
+-SET(SYSTEM_CXX_FLAGS "${CMAKE_CXX_FLAGS}") |
49 |
+-STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UC) |
50 |
+-IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) |
51 |
+- SET(CMAKE_C_FLAGS "") |
52 |
+- SET(CMAKE_CXX_FLAGS "") |
53 |
+-ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) |
54 |
+- |
55 |
+ # CCACHE |
56 |
+ OPTION(ENABLE_CCACHE "Enable ccache for compilation" ON) |
57 |
+ FIND_PACKAGE(CCache) |
58 |
+@@ -174,24 +165,6 @@ |
59 |
+ SET(COMPILER_WARNINGS "-Wall -Wno-unused-parameter -Wformat -Wformat-security -Wparentheses -Wshadow -Wno-unknown-pragmas -Wno-deprecated") |
60 |
+ ENDIF() |
61 |
+ |
62 |
+-IF(CMAKE_COMPILER_IS_GNUCXX) |
63 |
+- SET(RELEASE_COMPILER_FLAGS "-fexpensive-optimizations -frerun-cse-after-loop -fcse-follow-jumps -finline-functions -fschedule-insns2 -fthread-jumps -fforce-addr -fstrength-reduce -funroll-loops") |
64 |
+- IF (${MACHINE} MATCHES "x86_64" OR ${MACHINE} MATCHES "i686") |
65 |
+- SET(RELEASE_COMPILER_FLAGS "${RELEASE_COMPILER_FLAGS} -mfpmath=sse") |
66 |
+- ENDIF() |
67 |
+-ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") |
68 |
+- SET(RELEASE_COMPILER_FLAGS "-funroll-loops") |
69 |
+-ENDIF() |
70 |
+-SET(SWIG_CXX_COMPILER_FLAGS "-O0 -g") |
71 |
+-SET(CMAKE_C_FLAGS "${COMPILER_WARNINGS} ${CMAKE_C_FLAGS}") |
72 |
+-SET(CMAKE_CXX_FLAGS "${COMPILER_WARNINGS} ${CMAKE_CXX_FLAGS}") |
73 |
+-SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}") |
74 |
+-SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}") |
75 |
+-SET(CMAKE_C_FLAGS_DISTRIBUTION "-O2") |
76 |
+-SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O2") |
77 |
+-SET(CMAKE_C_FLAGS_DEBUG "-g") |
78 |
+-SET(CMAKE_CXX_FLAGS_DEBUG "-g") |
79 |
+- |
80 |
+ OPTION(ENABLE_COVERAGE "Enable code coverage" OFF) |
81 |
+ IF(ENABLE_COVERAGE) |
82 |
+ IF(NOT CMAKE_COMPILER_IS_GNUCXX) |
83 |
+@@ -617,13 +590,6 @@ |
84 |
+ include(external/Eigen3) |
85 |
+ LIST(APPEND SYSTEM_INCLUDES ${EIGEN_INCLUDE_DIR}) |
86 |
+ ELSE() |
87 |
+- # eigen3 bug related to aliasing operators and self-storing. |
88 |
+- # TODO put in proper reference and version from when this is fixed |
89 |
+- IF(${EIGEN_VERSION} VERSION_GREATER 3.2.90) |
90 |
+- MESSAGE(WARNING "The system Eigen3 version ${EIGEN_VERSION} is buggy, manually bundling.") |
91 |
+- include(external/Eigen3) |
92 |
+- ENDIF() |
93 |
+- |
94 |
+ LIST(APPEND SYSTEM_INCLUDES ${EIGEN_INCLUDE_DIR}) |
95 |
+ ENDIF() |
96 |
+ |
97 |
+@@ -957,11 +923,6 @@ |
98 |
+ # Respect system's or distribution's C[XX]FLAGS. |
99 |
+ OPTION(SWIG_WITH_SYSTEM_CFLAGS "Enable system's C[XX]FLAGS for compilation of swig-binaries" ON) |
100 |
+ |
101 |
+-IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) |
102 |
+- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SYSTEM_C_FLAGS}") |
103 |
+- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SYSTEM_CXX_FLAGS}") |
104 |
+-ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) |
105 |
+- |
106 |
+ IF(SWIG_WITH_SYSTEM_CFLAGS) |
107 |
+ SET(SWIG_CXX_COMPILER_FLAGS "${SWIG_CXX_COMPILER_FLAGS} ${SYSTEM_CXX_FLAGS}") |
108 |
+ ENDIF(SWIG_WITH_SYSTEM_CFLAGS) |
109 |
|
110 |
diff --git a/sci-libs/shogun/metadata.xml b/sci-libs/shogun/metadata.xml |
111 |
index fd2f5a4..88454ce 100644 |
112 |
--- a/sci-libs/shogun/metadata.xml |
113 |
+++ b/sci-libs/shogun/metadata.xml |
114 |
@@ -1,31 +1,32 @@ |
115 |
<?xml version="1.0" encoding="UTF-8"?> |
116 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
117 |
<pkgmetadata> |
118 |
- <maintainer type="project"> |
119 |
- <email>sci@g.o</email> |
120 |
- <name>Gentoo Science Project</name> |
121 |
- </maintainer> |
122 |
- <longdescription lang="en"> |
123 |
- SHOGUN - is a new machine learning toolbox with focus on large |
124 |
- scale kernel methods and especially on Support Vector Machines |
125 |
- (SVM) with focus to bioinformatics. It provides a generic SVM |
126 |
- object interfacing to several different SVM implementations. Each |
127 |
- of the SVMs can be combined with a variety of the many kernels |
128 |
- implemented. It can deal with weighted linear combination of a |
129 |
- number of sub-kernels, each of which not necessarily working on the |
130 |
- same domain, where an optimal sub-kernel weighting can be learned |
131 |
- using Multiple Kernel Learning. Apart from SVM 2-class |
132 |
- classification and regression problems, a number of linear methods |
133 |
- like Linear Discriminant Analysis (LDA), Linear Programming Machine |
134 |
- (LPM), (Kernel) Perceptrons and also algorithms to train hidden |
135 |
- markov models are implemented. The input feature-objects can be |
136 |
- dense, sparse or strings and of type int/short/double/char and can |
137 |
- be converted into different feature types. Chains of preprocessors |
138 |
- (e.g. substracting the mean) can be attached to each feature object |
139 |
- allowing for on-the-fly pre-processing. |
140 |
-</longdescription> |
141 |
- <use> |
142 |
- <flag name="R">Enable support for <pkg>dev-lang/R</pkg></flag> |
143 |
- <flag name="octave">Enable support for <pkg>sci-mathematics/octave</pkg></flag> |
144 |
- </use> |
145 |
+ <maintainer type="project"> |
146 |
+ <email>sci@g.o</email> |
147 |
+ <name>Gentoo Science Project</name> |
148 |
+ </maintainer> |
149 |
+ <longdescription lang="en"> |
150 |
+ SHOGUN - is a new machine learning toolbox with focus on large |
151 |
+ scale kernel methods and especially on Support Vector Machines |
152 |
+ (SVM) with focus to bioinformatics. It provides a generic SVM |
153 |
+ object interfacing to several different SVM implementations. Each |
154 |
+ of the SVMs can be combined with a variety of the many kernels |
155 |
+ implemented. It can deal with weighted linear combination of a |
156 |
+ number of sub-kernels, each of which not necessarily working on the |
157 |
+ same domain, where an optimal sub-kernel weighting can be learned |
158 |
+ using Multiple Kernel Learning. Apart from SVM 2-class |
159 |
+ classification and regression problems, a number of linear methods |
160 |
+ like Linear Discriminant Analysis (LDA), Linear Programming Machine |
161 |
+ (LPM), (Kernel) Perceptrons and also algorithms to train hidden |
162 |
+ markov models are implemented. The input feature-objects can be |
163 |
+ dense, sparse or strings and of type int/short/double/char and can |
164 |
+ be converted into different feature types. Chains of preprocessors |
165 |
+ (e.g. substracting the mean) can be attached to each feature object |
166 |
+ allowing for on-the-fly pre-processing. |
167 |
+ </longdescription> |
168 |
+ <use> |
169 |
+ <flag name="R">Enable support for <pkg>dev-lang/R</pkg></flag> |
170 |
+ <flag name="octave">Enable support for <pkg>sci-mathematics/octave</pkg></flag> |
171 |
+ <flag name="opencl">Enable support for building against OpenCL</flag> |
172 |
+ </use> |
173 |
</pkgmetadata> |
174 |
|
175 |
diff --git a/sci-libs/shogun/shogun-5.0.0.ebuild b/sci-libs/shogun/shogun-5.0.0.ebuild |
176 |
new file mode 100644 |
177 |
index 00000000..b3984db |
178 |
--- /dev/null |
179 |
+++ b/sci-libs/shogun/shogun-5.0.0.ebuild |
180 |
@@ -0,0 +1,160 @@ |
181 |
+# Copyright 1999-2017 Gentoo Foundation |
182 |
+# Distributed under the terms of the GNU General Public License v2 |
183 |
+# $Id$ |
184 |
+ |
185 |
+EAPI=6 |
186 |
+ |
187 |
+PYTHON_COMPAT=( python2_7 python3_{4,5} ) |
188 |
+ |
189 |
+inherit cmake-utils flag-o-matic python-single-r1 toolchain-funcs versionator |
190 |
+ |
191 |
+MYPV=$(get_version_component_range 1-2) |
192 |
+MYPD=${PN}-data-0.9 |
193 |
+ |
194 |
+DESCRIPTION="Large Scale Machine Learning Toolbox" |
195 |
+HOMEPAGE="http://shogun-toolbox.org/" |
196 |
+SRC_URI=" |
197 |
+ ftp://shogun-toolbox.org/shogun/releases/${MYPV}/sources/${P}.tar.bz2 |
198 |
+ test? ( ftp://shogun-toolbox.org/shogun/data/${MYPD}.tar.bz2 ) |
199 |
+ examples? ( ftp://shogun-toolbox.org/shogun/data/${MYPD}.tar.bz2 )" |
200 |
+ |
201 |
+LICENSE="GPL-3 free-noncomm" |
202 |
+SLOT="0/16" |
203 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
204 |
+IUSE="cpu_flags_x86_sse doc examples lua octave opencl python R ruby static-libs test" |
205 |
+ |
206 |
+REQUIRED_USE=" |
207 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
208 |
+ test? ( python )" |
209 |
+ |
210 |
+RDEPEND=" |
211 |
+ app-arch/bzip2 |
212 |
+ app-arch/gzip |
213 |
+ app-arch/lzma |
214 |
+ app-arch/snappy |
215 |
+ dev-libs/lzo |
216 |
+ dev-cpp/eigen:3 |
217 |
+ dev-libs/json-c:= |
218 |
+ dev-libs/libxml2 |
219 |
+ dev-libs/protobuf:= |
220 |
+ net-misc/curl |
221 |
+ sci-libs/arpack |
222 |
+ sci-libs/arprec |
223 |
+ sci-libs/colpack |
224 |
+ sci-libs/hdf5:= |
225 |
+ sci-libs/nlopt |
226 |
+ sci-mathematics/glpk:= |
227 |
+ sci-mathematics/lpsolve:= |
228 |
+ sys-libs/readline:0= |
229 |
+ sys-libs/zlib |
230 |
+ virtual/blas |
231 |
+ virtual/cblas |
232 |
+ virtual/lapack |
233 |
+ lua? ( dev-lang/lua:0 ) |
234 |
+ octave? ( >=sci-mathematics/octave-4.2.0:=[hdf5] ) |
235 |
+ opencl? ( virtual/opencl ) |
236 |
+ python? ( dev-python/numpy[${PYTHON_USEDEP}] ) |
237 |
+ R? ( dev-lang/R ) |
238 |
+ ruby? ( dev-ruby/narray )" |
239 |
+DEPEND="${RDEPEND} |
240 |
+ virtual/pkgconfig |
241 |
+ doc? ( |
242 |
+ >=app-doc/doxygen-1.8.13-r1[dot] |
243 |
+ dev-python/sphinx |
244 |
+ ) |
245 |
+ lua? ( >=dev-lang/swig-3.0.12 ) |
246 |
+ octave? ( >=dev-lang/swig-3.0.12 ) |
247 |
+ python? ( |
248 |
+ >=dev-lang/swig-3.0.12 |
249 |
+ test? ( |
250 |
+ sci-libs/scipy |
251 |
+ ) |
252 |
+ ) |
253 |
+ R? ( >=dev-lang/swig-3.0.12 ) |
254 |
+ ruby? ( >=dev-lang/swig-3.0.12 ) |
255 |
+ test? ( |
256 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
257 |
+ dev-cpp/gmock |
258 |
+ )" |
259 |
+ |
260 |
+# javamodular needs jblas (painful to package properly) |
261 |
+# permodular work in progress (as 3.2.0) |
262 |
+# could actually support multiple pythons, multiple rubys |
263 |
+# feel free to do work for it |
264 |
+ |
265 |
+PATCHES=( |
266 |
+ "${FILESDIR}"/${PN}-5.0.0-fix-buildsystem.patch |
267 |
+ "${FILESDIR}"/${PN}-4.1.0-remove-C-linkage.patch |
268 |
+) |
269 |
+ |
270 |
+pkg_setup() { |
271 |
+ use python && python-single-r1_pkg_setup |
272 |
+} |
273 |
+ |
274 |
+src_configure() { |
275 |
+ export ATLAS_LIBRARY="$($(tc-getPKG_CONFIG) --libs cblas lapack)" |
276 |
+ export CBLAS_LIBRARY="$($(tc-getPKG_CONFIG) --libs cblas)" |
277 |
+ export ATLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas cblas lapack)" |
278 |
+ export LAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs lapack)" |
279 |
+ |
280 |
+ append-cppflags "$($(tc-getPKG_CONFIG) --cflags cblas)" |
281 |
+ |
282 |
+ local mycmakeargs=( |
283 |
+ -DCMAKE_SKIP_RPATH=ON |
284 |
+ -DCMAKE_SKIP_INSTALL_RPATH=ON |
285 |
+ -DLIB_INSTALL_DIR=$(get_libdir) |
286 |
+ -DENABLE_TESTING=$(usex test) |
287 |
+ -DBUILD_EXAMPLES=$(usex examples) |
288 |
+ -DDISABLE_SSE=$(usex !cpu_flags_x86_sse) |
289 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Pandoc=ON |
290 |
+ $(cmake-utils_use_find_package doc Sphinx) |
291 |
+ $(cmake-utils_use_find_package doc Doxygen) |
292 |
+ |
293 |
+ # Features: |
294 |
+ -DENABLE_COVERAGE=OFF |
295 |
+ -DENABLE_COLPACK=ON |
296 |
+ -DENABLE_PROTOBUF=ON |
297 |
+ -DENABLE_PYTHON_DEBUG=OFF |
298 |
+ -DENABLE_VIENNACL=$(usex opencl) |
299 |
+ -DUSE_ARPREC=ON |
300 |
+ -DUSE_HDF5=ON |
301 |
+ |
302 |
+ # Bindings: |
303 |
+ -DJavaModular=OFF |
304 |
+ -DPerlModular=OFF |
305 |
+ -DCSharpModular=OFF |
306 |
+ -DLuaModular=$(usex lua) |
307 |
+ -DOctaveModular=$(usex octave) |
308 |
+ -DPythonModular=$(usex python) |
309 |
+ -DRModular=$(usex R) |
310 |
+ -DRubyModular=$(usex ruby) |
311 |
+ |
312 |
+ # Disable bundled libs |
313 |
+ -DBUNDLE_COLPACK=OFF |
314 |
+ -DBUNDLE_JSON=OFF |
315 |
+ -DBUNDLE_NLOPT=OFF |
316 |
+ ) |
317 |
+ cmake-utils_src_configure |
318 |
+ |
319 |
+ # gentoo bug #302621 |
320 |
+ has_version 'sci-libs/hdf5[mpi]' && export CXX=mpicxx CC=mpicc |
321 |
+} |
322 |
+ |
323 |
+src_compile() { |
324 |
+ cmake-utils_src_compile |
325 |
+ use doc && cmake-utils_src_compile -C doc |
326 |
+} |
327 |
+ |
328 |
+src_install() { |
329 |
+ cmake-utils_src_install |
330 |
+ |
331 |
+ if use doc; then |
332 |
+ local i |
333 |
+ for i in lua octave python R ruby; do |
334 |
+ if use $i; then |
335 |
+ docinto html/${i,}_modular |
336 |
+ dodoc -r "${BUILD_DIR}"/src/interfaces/${i,}_modular/modshogun/doxygen_xml/. |
337 |
+ fi |
338 |
+ done |
339 |
+ fi |
340 |
+} |