1 |
commit: 2be4e003d90ca90e61bf9cc955e43caf28452078 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 30 21:05:17 2016 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 30 21:05:35 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2be4e003 |
7 |
|
8 |
sci-libs/libsvm: Version bump |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
sci-libs/libsvm/Manifest | 1 + |
13 |
sci-libs/libsvm/libsvm-3.21.ebuild | 114 +++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 115 insertions(+) |
15 |
|
16 |
diff --git a/sci-libs/libsvm/Manifest b/sci-libs/libsvm/Manifest |
17 |
index 1fe5b85..428fc5c 100644 |
18 |
--- a/sci-libs/libsvm/Manifest |
19 |
+++ b/sci-libs/libsvm/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST libsvm-3.17.tar.gz 607892 SHA256 46a4750d3506e6ccd8adf7e3e1f482d86ce9c5368f9c78e19c7923edf0067a12 SHA512 43f3e7cbee37b583cd65041465ef620ab7b3a24ad3f0e70cc2f41efea847e8c1c7319a92b53262bc5f721a46c0cfb4d51102d2e29c93b6ccae03ecf006e53d2d WHIRLPOOL 9518e2aeb5d2f0ac0945fa193edfaf7ba022729cc9ea91e5a773fed638fdcaef4d4bea0f284f1698571b570f5543afc8987ec81a54637d537c709b09474f6fbc |
22 |
+DIST libsvm-3.21.tar.gz 847291 SHA256 519e0bdc0e31ab8246e9035e7ca91f794c16084f80abe4dffe776261d23c772f SHA512 697a7505100e48746a87e3e4ab025524fa581856320da3a187ac501138ce0a5bc7885ff37454ae5e75d6b0eab94e368b6bcd36601ad18db3b2fb35d2f360520a WHIRLPOOL d0ef916d37a3cc24680b6eba62d29caca9c36fa41ae8f22445137e044c7cf66a754c3d12670697fce174b388fe30906b2a4dc437cb38e7c6f1dd8dde85f51b84 |
23 |
|
24 |
diff --git a/sci-libs/libsvm/libsvm-3.21.ebuild b/sci-libs/libsvm/libsvm-3.21.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000..800a7c3 |
27 |
--- /dev/null |
28 |
+++ b/sci-libs/libsvm/libsvm-3.21.ebuild |
29 |
@@ -0,0 +1,114 @@ |
30 |
+# Copyright 1999-2016 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+# $Id$ |
33 |
+ |
34 |
+EAPI=6 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} ) |
37 |
+ |
38 |
+inherit flag-o-matic java-pkg-opt-2 python-r1 toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="Library for Support Vector Machines" |
41 |
+HOMEPAGE="http://www.csie.ntu.edu.tw/~cjlin/libsvm/" |
42 |
+SRC_URI="http://www.csie.ntu.edu.tw/~cjlin/libsvm/${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="BSD" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
47 |
+IUSE="java openmp python tools" |
48 |
+ |
49 |
+DEPEND="java? ( >=virtual/jdk-1.4 )" |
50 |
+RDEPEND=" |
51 |
+ java? ( >=virtual/jre-1.4 ) |
52 |
+ tools? ( sci-visualization/gnuplot )" |
53 |
+ |
54 |
+PATCHES=( |
55 |
+ "${FILESDIR}/3.11-openmp.patch" |
56 |
+ "${FILESDIR}/3.14-makefile.patch" |
57 |
+) |
58 |
+ |
59 |
+pkg_setup() { |
60 |
+ if use openmp; then |
61 |
+ if ! tc-has-openmp; then |
62 |
+ ewarn "OpenMP is not supported by your currently selected compiler" |
63 |
+ |
64 |
+ if tc-is-clang; then |
65 |
+ ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp," |
66 |
+ ewarn "which you will need to build ${CATEGORY}/${PN} for USE=\"openmp\"" |
67 |
+ fi |
68 |
+ |
69 |
+ die "need openmp capable compiler" |
70 |
+ fi |
71 |
+ |
72 |
+ append-cflags -fopenmp |
73 |
+ append-cxxflags -fopenmp |
74 |
+ append-cppflags -DOPENMP |
75 |
+ fi |
76 |
+} |
77 |
+ |
78 |
+src_prepare() { |
79 |
+ default |
80 |
+ |
81 |
+ sed -i -e "s@\.\./@${EPREFIX}/usr/bin/@g" tools/*.py \ |
82 |
+ || die "Failed to fix paths in python files" |
83 |
+ sed -i -e "s|./grid.py|${EPREFIX}/usr/bin/svm-grid|g" tools/*.py \ |
84 |
+ || die "Failed to fix paths for svm-grid" |
85 |
+ sed -i -e 's/grid.py/svm-grid/g' tools/grid.py \ |
86 |
+ || die "Failed to rename grid.py to svm-grid" |
87 |
+ |
88 |
+ if use java; then |
89 |
+ local JAVAC_FLAGS="$(java-pkg_javac-args)" |
90 |
+ sed -i \ |
91 |
+ -e "s/JAVAC_FLAGS =/JAVAC_FLAGS=${JAVAC_FLAGS}/g" \ |
92 |
+ java/Makefile || die "Failed to fix java makefile" |
93 |
+ fi |
94 |
+ tc-export CXX CC |
95 |
+} |
96 |
+ |
97 |
+src_compile() { |
98 |
+ default |
99 |
+ use java && emake -C java |
100 |
+} |
101 |
+ |
102 |
+src_install() { |
103 |
+ dobin svm-train svm-predict svm-scale |
104 |
+ dolib.so *.so* |
105 |
+ doheader svm.h |
106 |
+ |
107 |
+ DOCS=( README ) |
108 |
+ |
109 |
+ if use tools; then |
110 |
+ local t |
111 |
+ for t in tools/*.py; do |
112 |
+ python_foreach_impl python_newscript ${t} svm-$(basename ${t} .py) |
113 |
+ done |
114 |
+ |
115 |
+ mv tools/README{,.tools} || die |
116 |
+ DOCS+=( tools/README.tools ) |
117 |
+ |
118 |
+ insinto /usr/share/doc/${PF}/examples |
119 |
+ docompress -x /usr/share/doc/${PF}/examples |
120 |
+ doins heart_scale |
121 |
+ doins -r svm-toy |
122 |
+ fi |
123 |
+ |
124 |
+ if use python ; then |
125 |
+ installation() { |
126 |
+ touch python/__init__.py || die |
127 |
+ python_moduleinto libsvm |
128 |
+ python_domodule python/*.py |
129 |
+ } |
130 |
+ python_foreach_impl installation |
131 |
+ |
132 |
+ mv python/README{,.python} || die |
133 |
+ DOCS+=( python/README.python ) |
134 |
+ fi |
135 |
+ |
136 |
+ HTML_DOCS=( FAQ.html ) |
137 |
+ if use java; then |
138 |
+ java-pkg_dojar java/libsvm.jar |
139 |
+ HTML_DOCS+=( java/test_applet.html ) |
140 |
+ fi |
141 |
+ |
142 |
+ einstalldocs |
143 |
+} |