summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2011-12-29 19:52:41 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2011-12-29 19:52:41 +0000
commitd9759cad0d0280a705bd490320020529720b34b6 (patch)
treec16c1357348aaee6ce4bc69469132bc0be8e89c4 /sci-libs
parentUnmask dev-perl/DBD-SQLite (diff)
downloadhistorical-d9759cad0d0280a705bd490320020529720b34b6.tar.gz
historical-d9759cad0d0280a705bd490320020529720b34b6.tar.bz2
historical-d9759cad0d0280a705bd490320020529720b34b6.zip
Version bump
Package-Manager: portage-2.1.10.41/cvs/Linux x86_64
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/libsvm/ChangeLog8
-rw-r--r--sci-libs/libsvm/Manifest12
-rw-r--r--sci-libs/libsvm/files/3.11-makefile.patch32
-rw-r--r--sci-libs/libsvm/files/3.11-openmp.patch34
-rw-r--r--sci-libs/libsvm/libsvm-3.11.ebuild87
5 files changed, 168 insertions, 5 deletions
diff --git a/sci-libs/libsvm/ChangeLog b/sci-libs/libsvm/ChangeLog
index b2b1f7813c78..21305ba0af57 100644
--- a/sci-libs/libsvm/ChangeLog
+++ b/sci-libs/libsvm/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/libsvm
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.23 2011/08/09 04:46:36 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.24 2011/12/29 19:52:41 bicatali Exp $
+
+*libsvm-3.11 (29 Dec 2011)
+
+ 29 Dec 2011; SĂ©bastien Fabbro <bicatali@gentoo.org>
+ +files/3.11-makefile.patch, +files/3.11-openmp.patch, +libsvm-3.11.ebuild:
+ Version bump
*libsvm-3.1 (09 Aug 2011)
diff --git a/sci-libs/libsvm/Manifest b/sci-libs/libsvm/Manifest
index 992d0511b28d..82664277b19c 100644
--- a/sci-libs/libsvm/Manifest
+++ b/sci-libs/libsvm/Manifest
@@ -7,18 +7,22 @@ AUX 2.90-python3.patch 408 RMD160 fa1a5cf9b03fe8a0c6a2aaeb3a5de4ffd81888fa SHA1
AUX 2.91-makefile.patch 1098 RMD160 a54fb2e62c07878071a028b373b524cbb963c173 SHA1 3055121e66bf3e53273d1ff522ffc9d07c2e8720 SHA256 f62358a34f7210aa73efe5eac6a7564951a393e820c499fabbb43e9faf7d125a
AUX 3.0-makefile.patch 1213 RMD160 52c7a34819d6ef6899a5011e5d7e6d3825d821bb SHA1 1daa33709ad74d22842bc6fd0fa75ba682e016d1 SHA256 004b6f0168888716e0822fa2791530c176f3d2cb9b86d45ff583261b4c2b663e
AUX 3.1-openmp.patch 1082 RMD160 e2c4ae0be7c255a9f4a5189d74cf5301add91c90 SHA1 418d203a87cb0c794368c8d45acc2a794a4d54b6 SHA256 090054f532bf12e2ab85ea86142eb6a9dd846ea382e31f554fb93f032756f38c
+AUX 3.11-makefile.patch 1258 RMD160 118094113097207ec850502821528da64bd4aaed SHA1 e78fd98710aedff220d381c0d7f84ee5e14bacab SHA256 0f57ae5547a4278a4f28626745528a8ed19b54fe33a3d47fdc2c82d702bda311
+AUX 3.11-openmp.patch 939 RMD160 1e8cca6b9ecfad28daa48a6ba1073b21d4ed78cd SHA1 2ec5bd5a86a44e0be9e3aa7b1b3d4c54ce06d0de SHA256 642c56ffaf5cd1415b0707b25dd1c3cf1009715938d298ddb7a612bc2f3854f0
DIST libsvm-2.9.tar.gz 563829 RMD160 ff6207d399f59eea3329fd629fcdf4c399583a2b SHA1 506725e3328b7fd78b00b99b93e5fb4c90506528 SHA256 0cfb4b88c37e431490b65c97a2043f9aa9d2f1ee140344944dfea88b1136c757
DIST libsvm-3.0.tar.gz 504749 RMD160 dc7e90540161509a8b6ad77d23402a23f5676216 SHA1 134c9676422021cd763ff2eca8875784f9015fe2 SHA256 5086f8c8efbbdb5bb22b0c12515d674380d9f825f13b8bf8d836e86c6e96cc13
DIST libsvm-3.1.tar.gz 614012 RMD160 3554cbf671633af17973a25ecf1633ac013f714c SHA1 20f09f25a99850009154f6133c5d7ff74cef78a3 SHA256 d8349fdadb13b773ac2e035a7ad4ff997f0738366e012f20f3f2617fcf69794b
+DIST libsvm-3.11.tar.gz 611835 RMD160 75ad8a4380da20f0c72928bdb1b21025227f53aa SHA1 044638cb2335fa020da115dca54c0c685d15dc08 SHA256 8ff59bf7b487b339cac7ed94593f6ba5136c01c985f9a0601c145ce472a621d5
EBUILD libsvm-2.90-r1.ebuild 2358 RMD160 df8c1f2d6f169df0cfd49175b8427675cd13bb2d SHA1 0077921f5e0a931b7447067b4d38ab0d125ae92f SHA256 0d0481f369bc12e3d91ada2ae9cf44dc6d53895a0b5d42c9767c8d39d97754e3
EBUILD libsvm-3.0.ebuild 1894 RMD160 3daf17b8fa94d3488dedbe289c585b97417e25bb SHA1 3f569a8d05329f1fc697baa66d7bb9151ed2cf30 SHA256 21598bd08aacf474b2df92f36cbd4f7411539a51fed4117b1724e84d50b0d286
EBUILD libsvm-3.1.ebuild 2279 RMD160 80f5e4b683dfa3d718ef03de8b44ec6d09194fc3 SHA1 d1c97f21309b92d9b353387b339f86f92a74d5fa SHA256 b6a8d4677646d8adcb1ae9d50a5ced5537c0456abd48f52469cca149685a07c9
-MISC ChangeLog 3759 RMD160 b978179462e3fde79f1078f9fcf7551c93c53a47 SHA1 502b1ff0802ca19e1d7095054c11aaf8f848bc62 SHA256 9f858161a95f8ce4a86f202218fd3ebce5f7e67d11677337960db6cdccbf09f4
+EBUILD libsvm-3.11.ebuild 2052 RMD160 8efc41acb60452779d426d3589211b6e716ee283 SHA1 0a05111a755f0bdd44333025e36285b70a353016 SHA256 401e81502cf3d53ef691794d1ef40428672b2fd4d1fb25043d7a7d7f27976cd6
+MISC ChangeLog 3935 RMD160 13f187a0243a4e03280ca91274c131b891e9c21a SHA1 65a4abab506f1cd51a21847b359d7af47ce6e76e SHA256 91d9dff76203cbf11c67902b9165c4fab515b196c2248e5323461d5cdc7ef766
MISC metadata.xml 608 RMD160 e8c540fec56d4005f16ae87cfa0ea5dd69ff7dcc SHA1 8be11762b0d8b3fc92e4db7aa5db8557c1b9e12c SHA256 a2bd424684a6efc80d929f2c47af7bf45a91209aff98a6d6058793c61d9a37e0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iEYEARECAAYFAk5Au7UACgkQ1ycZbhPLE2DwzgCfcZabzj+YXJn7Tam/V1iNcRyn
-DNQAn0tqA00rjmk2K/8xwAU6YKnP7HwU
-=8Dn1
+iEYEARECAAYFAk78xRIACgkQ1ycZbhPLE2DAogCZARYgnZbxRahefj5FDu//o1bA
+vFsAoLQx2rs85hcPq5Lt1RRBicvP/nx8
+=ux2J
-----END PGP SIGNATURE-----
diff --git a/sci-libs/libsvm/files/3.11-makefile.patch b/sci-libs/libsvm/files/3.11-makefile.patch
new file mode 100644
index 000000000000..9de043fe62c2
--- /dev/null
+++ b/sci-libs/libsvm/files/3.11-makefile.patch
@@ -0,0 +1,32 @@
+--- Makefile.orig 2011-06-25 20:55:06.000000000 +0100
++++ Makefile 2011-12-29 19:31:07.000000000 +0000
+@@ -1,19 +1,21 @@
+ CXX ?= g++
+-CFLAGS = -Wall -Wconversion -O3 -fPIC
++CXXFLAGS ?= -Wall -Wconversion -O3
+ SHVER = 2
++PICFLAGS ?= -fPIC
+
+-all: svm-train svm-predict svm-scale
++all: svm-train svm-predict svm-scale lib
+
+ lib: svm.o
+- $(CXX) -shared -dynamiclib -Wl,-soname,libsvm.so.$(SHVER) svm.o -o libsvm.so.$(SHVER)
++ $(CXX) $(LDFLAGS) -shared -dynamiclib -Wl,-soname,libsvm.so.$(SHVER) svm.o -o libsvm.so.$(SHVER) -lm && \
++ ln -s libsvm.so.$(SHVER) libsvm.so
+
+ svm-predict: svm-predict.c svm.o
+- $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) svm-predict.c svm.o -o svm-predict -lm
+ svm-train: svm-train.c svm.o
+- $(CXX) $(CFLAGS) svm-train.c svm.o -o svm-train -lm
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) svm-train.c svm.o -o svm-train -lm
+ svm-scale: svm-scale.c
+- $(CXX) $(CFLAGS) svm-scale.c -o svm-scale
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) svm-scale.c -o svm-scale
+ svm.o: svm.cpp svm.h
+- $(CXX) $(CFLAGS) -c svm.cpp
++ $(CXX) $(CXXFLAGS) $(PICFLAGS) -c svm.cpp
+ clean:
+- rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER)
++ rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER) libsvm.so
diff --git a/sci-libs/libsvm/files/3.11-openmp.patch b/sci-libs/libsvm/files/3.11-openmp.patch
new file mode 100644
index 000000000000..6ddb6f0831f1
--- /dev/null
+++ b/sci-libs/libsvm/files/3.11-openmp.patch
@@ -0,0 +1,34 @@
+--- svm.cpp.orig 2011-05-27 04:32:19.000000000 +0100
++++ svm.cpp 2011-12-29 19:17:07.000000000 +0000
+@@ -1281,6 +1281,9 @@
+ int start, j;
+ if((start = cache->get_data(i,&data,len)) < len)
+ {
++#ifdef OPENMP
++#pragma omp parallel for private(j)
++#endif
+ for(j=start;j<len;j++)
+ data[j] = (Qfloat)(y[i]*y[j]*(this->*kernel_function)(i,j));
+ }
+@@ -2463,7 +2466,10 @@
+ model->param.svm_type == NU_SVR)
+ {
+ double *sv_coef = model->sv_coef[0];
+- double sum = 0;
++ double sum = 0; int i;
++#ifdef OPENMP
++#pragma omp parallel for private(i) reduction(+:sum)
++#endif
+ for(i=0;i<model->l;i++)
+ sum += sv_coef[i] * Kernel::k_function(x,model->SV[i],model->param);
+ sum -= model->rho[0];
+@@ -2480,6 +2486,9 @@
+ int l = model->l;
+
+ double *kvalue = Malloc(double,l);
++#ifdef OPENMP
++#pragma omp parallel for private(i)
++#endif
+ for(i=0;i<l;i++)
+ kvalue[i] = Kernel::k_function(x,model->SV[i],model->param);
+
diff --git a/sci-libs/libsvm/libsvm-3.11.ebuild b/sci-libs/libsvm/libsvm-3.11.ebuild
new file mode 100644
index 000000000000..dc80273597c3
--- /dev/null
+++ b/sci-libs/libsvm/libsvm-3.11.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/libsvm-3.11.ebuild,v 1.1 2011/12/29 19:52:41 bicatali Exp $
+
+EAPI="4"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils java-pkg-opt-2 python flag-o-matic toolchain-funcs
+
+DESCRIPTION="Library for Support Vector Mahcines"
+HOMEPAGE="http://www.csie.ntu.edu.tw/~cjlin/libsvm/"
+SRC_URI="http://www.csie.ntu.edu.tw/~cjlin/libsvm/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="java openmp python tools"
+
+DEPEND="java? ( >=virtual/jdk-1.4 )"
+RDEPEND="${DEPEND}
+ tools? ( sci-visualization/gnuplot )"
+
+pkg_setup() {
+ if use openmp; then
+ if [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp; then
+ ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 "
+ die "Need an OpenMP capable compiler"
+ else
+ append-ldflags -fopenmp
+ append-cxxflags -fopenmp
+ fi
+ append-cxxflags -DOPENMP
+ fi
+ use python && python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-{makefile,openmp}.patch
+
+ sed -i -e "s@\.\./@${EPREFIX}/usr/bin/@g" tools/*.py \
+ || die "Failed to fix paths in python files"
+ if use java; then
+ local JAVAC_FLAGS="$(java-pkg_javac-args)"
+ sed -i \
+ -e "s/JAVAC_FLAGS =/JAVAC_FLAGS=${JAVAC_FLAGS}/g" \
+ java/Makefile || die "Failed to fix java makefile"
+ fi
+}
+
+src_compile() {
+ emake
+ use java && emake -C java
+}
+
+src_install() {
+ dobin svm-train svm-predict svm-scale
+ dolib.so *.so*
+ insinto /usr/include
+ doins svm.h
+ dohtml FAQ.html
+ dodoc README
+
+ if use tools; then
+ local t
+ for t in tools/*.py; do
+ newbin ${t} svm-$(basename ${t} .py)
+ done
+ newdoc tools/README README.tools
+ insinto /usr/share/doc/${PF}
+ doins heart_scale
+ doins -r svm-toy
+ fi
+
+ if use python ; then
+ installation() {
+ insinto $(python_get_sitedir)
+ doins python/*.py
+ }
+ python_execute_function installation
+ newdoc python/README README.python
+ fi
+
+ if use java; then
+ java-pkg_dojar java/libsvm.jar
+ dohtml java/test_applet.html
+ fi
+}