diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2011-08-09 04:46:36 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2011-08-09 04:46:36 +0000 |
commit | 89749fcf2d2c681ed6ecf7bab1aa0818635a9d77 (patch) | |
tree | 68e086cfe768121d34f96887a5f1ab0f326b2343 /sci-libs/libsvm | |
parent | Bug #377907 - Use package.mask for compatibility with PMS section 5.2.7, and ... (diff) | |
download | historical-89749fcf2d2c681ed6ecf7bab1aa0818635a9d77.tar.gz historical-89749fcf2d2c681ed6ecf7bab1aa0818635a9d77.tar.bz2 historical-89749fcf2d2c681ed6ecf7bab1aa0818635a9d77.zip |
Version bump. Added openmp features, thanks to Roby, bug #360157
Package-Manager: portage-2.1.10.10/cvs/Linux x86_64
Diffstat (limited to 'sci-libs/libsvm')
-rw-r--r-- | sci-libs/libsvm/ChangeLog | 10 | ||||
-rw-r--r-- | sci-libs/libsvm/Manifest | 15 | ||||
-rw-r--r-- | sci-libs/libsvm/files/3.1-openmp.patch | 36 | ||||
-rw-r--r-- | sci-libs/libsvm/libsvm-3.1.ebuild (renamed from sci-libs/libsvm/libsvm-2.91.ebuild) | 30 |
4 files changed, 72 insertions, 19 deletions
diff --git a/sci-libs/libsvm/ChangeLog b/sci-libs/libsvm/ChangeLog index f067c647c355..b2b1f7813c78 100644 --- a/sci-libs/libsvm/ChangeLog +++ b/sci-libs/libsvm/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/libsvm -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.22 2010/12/02 19:46:10 bicatali Exp $ +# 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 $ + +*libsvm-3.1 (09 Aug 2011) + + 09 Aug 2011; SĂ©bastien Fabbro <bicatali@gentoo.org> +files/3.1-openmp.patch, + -libsvm-2.91.ebuild, +libsvm-3.1.ebuild: + Version bump. Added openmp features, thanks to Roby, bug #360157 *libsvm-3.0 (02 Dec 2010) diff --git a/sci-libs/libsvm/Manifest b/sci-libs/libsvm/Manifest index c87d56d61377..992d0511b28d 100644 --- a/sci-libs/libsvm/Manifest +++ b/sci-libs/libsvm/Manifest @@ -6,18 +6,19 @@ AUX 2.90-ldflags.patch 662 RMD160 ed4b98dc092dad67b32dbf513341dd6dbdc2f27d SHA1 AUX 2.90-python3.patch 408 RMD160 fa1a5cf9b03fe8a0c6a2aaeb3a5de4ffd81888fa SHA1 fcfbf9b8b5525cd4f408e4e3c88f7189eb4f20e2 SHA256 6c319490e6856fe5636de80a2fb89da3765511d9a1854d459a2376e7b36833c4 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 DIST libsvm-2.9.tar.gz 563829 RMD160 ff6207d399f59eea3329fd629fcdf4c399583a2b SHA1 506725e3328b7fd78b00b99b93e5fb4c90506528 SHA256 0cfb4b88c37e431490b65c97a2043f9aa9d2f1ee140344944dfea88b1136c757 -DIST libsvm-2.91.tar.gz 551593 RMD160 519dfba926e8957508e1f9a1e432b42518356b29 SHA1 4e6b3b6dde1524af665bbce531c6776a1f4c8cba SHA256 36f97dc5350d33338cf8d2401b4540cb9f19512bd71fd78fe6a3d5c4048ff577 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 EBUILD libsvm-2.90-r1.ebuild 2358 RMD160 df8c1f2d6f169df0cfd49175b8427675cd13bb2d SHA1 0077921f5e0a931b7447067b4d38ab0d125ae92f SHA256 0d0481f369bc12e3d91ada2ae9cf44dc6d53895a0b5d42c9767c8d39d97754e3 -EBUILD libsvm-2.91.ebuild 1944 RMD160 6d24285fec13225391e259781c7f3ac26ff18bc2 SHA1 9e770d3c9a9fdf600c6ad1254a48f799e533e859 SHA256 4b96acf1e9f23accee2a0c47de3c8d0de43076452b2d33419fc46b8075fb3739 EBUILD libsvm-3.0.ebuild 1894 RMD160 3daf17b8fa94d3488dedbe289c585b97417e25bb SHA1 3f569a8d05329f1fc697baa66d7bb9151ed2cf30 SHA256 21598bd08aacf474b2df92f36cbd4f7411539a51fed4117b1724e84d50b0d286 -MISC ChangeLog 3541 RMD160 d8aa4d94902adf16ad85d7b85f185bc30f2fdfd4 SHA1 f0554efb9ef77811ffe2af6a745ac3aab734b7e0 SHA256 fa30bb864c2394e536f968c4525961a7fdc37b048721179bb251d6526ddd2cec +EBUILD libsvm-3.1.ebuild 2279 RMD160 80f5e4b683dfa3d718ef03de8b44ec6d09194fc3 SHA1 d1c97f21309b92d9b353387b339f86f92a74d5fa SHA256 b6a8d4677646d8adcb1ae9d50a5ced5537c0456abd48f52469cca149685a07c9 +MISC ChangeLog 3759 RMD160 b978179462e3fde79f1078f9fcf7551c93c53a47 SHA1 502b1ff0802ca19e1d7095054c11aaf8f848bc62 SHA256 9f858161a95f8ce4a86f202218fd3ebce5f7e67d11677337960db6cdccbf09f4 MISC metadata.xml 608 RMD160 e8c540fec56d4005f16ae87cfa0ea5dd69ff7dcc SHA1 8be11762b0d8b3fc92e4db7aa5db8557c1b9e12c SHA256 a2bd424684a6efc80d929f2c47af7bf45a91209aff98a6d6058793c61d9a37e0 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.16 (GNU/Linux) +Version: GnuPG v2.0.18 (GNU/Linux) -iEYEARECAAYFAkz394wACgkQ1ycZbhPLE2AYGACgoqYx9pqqlPPpXDqEue8W2ODn -gT0AoLCZKf8K2lxWhKqMhCvMt1PBDs27 -=pJvy +iEYEARECAAYFAk5Au7UACgkQ1ycZbhPLE2DwzgCfcZabzj+YXJn7Tam/V1iNcRyn +DNQAn0tqA00rjmk2K/8xwAU6YKnP7HwU +=8Dn1 -----END PGP SIGNATURE----- diff --git a/sci-libs/libsvm/files/3.1-openmp.patch b/sci-libs/libsvm/files/3.1-openmp.patch new file mode 100644 index 000000000000..b50ad94ecf60 --- /dev/null +++ b/sci-libs/libsvm/files/3.1-openmp.patch @@ -0,0 +1,36 @@ +--- svm.cpp.orig 2011-03-08 08:25:57.000000000 -0500 ++++ svm.cpp 2011-04-25 18:07:09.000000000 -0400 +@@ -1267,6 +1267,9 @@ public: + 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)); + } +@@ -2445,8 +2448,11 @@ double svm_predict_values(const svm_mode + model->param.svm_type == NU_SVR) + { + double *sv_coef = model->sv_coef[0]; +- double sum = 0; +- for(int i=0;i<model->l;i++) ++ 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]; + *dec_values = sum; +@@ -2463,6 +2469,9 @@ double svm_predict_values(const svm_mode + 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-2.91.ebuild b/sci-libs/libsvm/libsvm-3.1.ebuild index 83e20a90f18d..ffa8d3ee625f 100644 --- a/sci-libs/libsvm/libsvm-2.91.ebuild +++ b/sci-libs/libsvm/libsvm-3.1.ebuild @@ -1,31 +1,41 @@ -# Copyright 1999-2010 Gentoo Foundation +# 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-2.91.ebuild,v 1.1 2010/08/05 20:25:14 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/libsvm-3.1.ebuild,v 1.1 2011/08/09 04:46:36 bicatali Exp $ EAPI="3" SUPPORT_PYTHON_ABIS="1" -inherit eutils java-pkg-opt-2 python +inherit eutils java-pkg-opt-2 python flag-o-matic toolchain-funcs -MY_P="${PN}-${PV%0}" - -DESCRIPTION="Library for Support Vector Machines" +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/${MY_P}.tar.gz" +SRC_URI="http://www.csie.ntu.edu.tw/~cjlin/libsvm/${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" -IUSE="java python tools" +IUSE="java openmp python tools" DEPEND="java? ( >=virtual/jdk-1.4 )" RDEPEND="${DEPEND} tools? ( sci-visualization/gnuplot )" -S="${WORKDIR}"/${MY_P} +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 +} src_prepare() { - epatch "${FILESDIR}"/${PV}-makefile.patch + epatch "${FILESDIR}"/3.0-makefile.patch + epatch "${FILESDIR}"/${PV}-openmp.patch sed -i -e "s@\.\./@${EPREFIX}/usr/bin/@g" tools/*.py \ || die "Failed to fix paths in python files" if use java; then |