diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-02-11 18:53:56 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-02-11 18:53:56 +0000 |
commit | 1a951820fd25ba7de6fd22a49623f37f5eddbf95 (patch) | |
tree | f81f99a622e5e52719f08c1083488bad39e68f2c /sci-libs/libsvm | |
parent | Add initial support for Jython. (diff) | |
download | historical-1a951820fd25ba7de6fd22a49623f37f5eddbf95.tar.gz historical-1a951820fd25ba7de6fd22a49623f37f5eddbf95.tar.bz2 historical-1a951820fd25ba7de6fd22a49623f37f5eddbf95.zip |
Added python3 support, thanks for help Kacper Kowalik
Package-Manager: portage-2.2_rc62/cvs/Linux x86_64
Diffstat (limited to 'sci-libs/libsvm')
-rw-r--r-- | sci-libs/libsvm/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/libsvm/Manifest | 10 | ||||
-rw-r--r-- | sci-libs/libsvm/files/2.90-python3.patch | 13 | ||||
-rw-r--r-- | sci-libs/libsvm/libsvm-2.90-r1.ebuild | 104 |
4 files changed, 130 insertions, 5 deletions
diff --git a/sci-libs/libsvm/ChangeLog b/sci-libs/libsvm/ChangeLog index e3151d4eba8e..f2ee5b0dbb70 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.16 2010/02/10 21:21:07 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.17 2010/02/11 18:53:55 jlec Exp $ + +*libsvm-2.90-r1 (11 Feb 2010) + + 11 Feb 2010; Justin Lecher (jlec) <jlec@gentoo.org> + +files/2.90-python3.patch, +libsvm-2.90-r1.ebuild: + added python3 support *libsvm-2.90 (10 Feb 2010) diff --git a/sci-libs/libsvm/Manifest b/sci-libs/libsvm/Manifest index f099c0a5ad67..1aff87fe4e03 100644 --- a/sci-libs/libsvm/Manifest +++ b/sci-libs/libsvm/Manifest @@ -3,6 +3,7 @@ Hash: SHA1 AUX 2.90-fpic.patch 713 RMD160 d2be5724cbde2aa5c7254c5be37d62cf48de0efb SHA1 231825014841bdf58b19e9f69864210b6d96416b SHA256 7b40aba4cf560488c464ede3374c455bb194b2ef6f15e7c447e823c81964fffc AUX 2.90-ldflags.patch 662 RMD160 ed4b98dc092dad67b32dbf513341dd6dbdc2f27d SHA1 55e97a9ef2bec6ba5bb7bff84892c98d6861d639 SHA256 0fb14dfeb3dc508210d2353bc9a1ab5081c7af11223f297b01c651d7a98c450b +AUX 2.90-python3.patch 408 RMD160 fa1a5cf9b03fe8a0c6a2aaeb3a5de4ffd81888fa SHA1 fcfbf9b8b5525cd4f408e4e3c88f7189eb4f20e2 SHA256 6c319490e6856fe5636de80a2fb89da3765511d9a1854d459a2376e7b36833c4 DIST libsvm-2.84.tar.gz 420750 RMD160 0b79b5a537bd9e2d6b131394e166f17356d7c348 SHA1 ba2e1dc3caec6a68541656e6556cd2bcb7a3bf00 SHA256 7a953a2b47ddd0713051b08c15867f758c06991591e6aaa223b78bfaa6dda3b1 DIST libsvm-2.88.tar.gz 548920 RMD160 022a94f0d3db3e388085785f178a671a30a62421 SHA1 92e44416eb2bc09d38f803273b659f3caff2a737 SHA256 60cf102eefc003ff94c60f671751033951390a6991e300c19332747524e65396 DIST libsvm-2.89.tar.gz 552206 RMD160 ec1071be6d77b2b7e4222f017bd9610a82615f4c SHA1 7c1a9ac280ff386dd0befad1aacdcd389fd654bc SHA256 dd47b107b0e15137d83e9b41b38c5bb2b937adaa0c8bdc85960ad485547eae09 @@ -10,13 +11,14 @@ DIST libsvm-2.9.tar.gz 563829 RMD160 ff6207d399f59eea3329fd629fcdf4c399583a2b SH EBUILD libsvm-2.84.ebuild 1629 RMD160 c71810bd9a672fba39c4734d1200ca078c5616cd SHA1 25ac0b5cb94c3b3adb79be6cd74352177e81c886 SHA256 9f3f389c8a3239145878fb60cbb6460fcf2b7eaa87d4e6333b36368fb8b9c536 EBUILD libsvm-2.88.ebuild 1971 RMD160 4c1b45c148e94d389d31f2fbfd01664b2d0ab94e SHA1 df46df1cf61a714d9725dab712c3dfce9b8c4bab SHA256 c5d627aee910ad756e07a26569da9174631429ee9424690cc6f85e902ea5cb00 EBUILD libsvm-2.89.ebuild 1971 RMD160 309738c1b21d4bf3cd863a486fb913fdf7c77e38 SHA1 4d3f13a0e362422f75bc1de6b89f11af84ccf50d SHA256 ed5928a3d03a1b14e053b308e7195afd2fa35c5914dcfc526027d026fd9fdac9 +EBUILD libsvm-2.90-r1.ebuild 2369 RMD160 a7a354d9472121e22e3ee49c963bbaa7c98743e4 SHA1 99f92330870ee2a7f8d551866def455a0c8aaa3f SHA256 b424c5f0a97851ade3472242d51638630440af32adac1ed2ca193bd91a9489df EBUILD libsvm-2.90.ebuild 2352 RMD160 504728aa482a8299195f62d9a75abf3e1a43afa7 SHA1 7aefbdf17c2f2533ec5450b712ca6c650f509bcc SHA256 2661e0a024d51f0769e327a66d4a517f40c7f0db9e36e08cb6e28589a546e069 -MISC ChangeLog 2704 RMD160 b3c2fa1459478dadc5cd37e09d15a1cfaf813b21 SHA1 e5bb1c124b429916b86239ba50a8419860c19ecc SHA256 60c4e5f75a8d1d342ce544586eca4866c76cbe4ad7b0af24d27a78f2eadb1928 +MISC ChangeLog 2867 RMD160 2e1b08c8b745c9c9d86ef7afefd05279bde2cad4 SHA1 d44fc93b709ea90c3824f137fe34c408f08787cc SHA256 c1401011962f61dc04f159e6cb63a461c8ce53cb96d94ff4cc768f41e88cd87d MISC metadata.xml 596 RMD160 fba7bdeb4607f0589d1074c6a465b9b89d7d20f9 SHA1 4b471f7db38f01e0a528fb09a6e284b53e2f29b5 SHA256 5025c0fcef24a49cf5ddec24582d1a91cf7cafe0cfab822f44c54adaf4b64e03 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) -iEYEARECAAYFAktzI0cACgkQgAnW8HDreRaqzgCZAQSmO9TFwVKXAfahom0t3Gq5 -9xAAoMij8nR0dhYyeit6h+UeSdO4tzFf -=SkZn +iEYEARECAAYFAkt0UkoACgkQgAnW8HDreRZI/QCgmXE1nI8WSypb/p7gFYlbuHCi +vqIAoIWt+pVBawrK3XEbZCWqNxOnaFse +=vZD4 -----END PGP SIGNATURE----- diff --git a/sci-libs/libsvm/files/2.90-python3.patch b/sci-libs/libsvm/files/2.90-python3.patch new file mode 100644 index 000000000000..764200498ed1 --- /dev/null +++ b/sci-libs/libsvm/files/2.90-python3.patch @@ -0,0 +1,13 @@ +diff --git a/python/svmc_wrap.c b/python/svmc_wrap.c +index 22ea45d..c4282b1 100644 +--- a/python/svmc_wrap.c ++++ b/python/svmc_wrap.c +@@ -758,7 +758,7 @@ SWIG_Python_str_AsChar(PyObject *str) + #if PY_VERSION_HEX >= 0x03000000 + char *cstr; + char *newstr; +- int len; ++ Py_ssize_t len; + str = PyUnicode_AsUTF8String(str); + PyBytes_AsStringAndSize(str, &cstr, &len); + newstr = (char *) malloc(len+1); diff --git a/sci-libs/libsvm/libsvm-2.90-r1.ebuild b/sci-libs/libsvm/libsvm-2.90-r1.ebuild new file mode 100644 index 000000000000..ad6a98a67c09 --- /dev/null +++ b/sci-libs/libsvm/libsvm-2.90-r1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/libsvm-2.90-r1.ebuild,v 1.1 2010/02/11 18:53:55 jlec Exp $ + +EAPI="3" +SUPPORT_PYTHON_ABIS="1" + +inherit eutils java-pkg-opt-2 python toolchain-funcs multilib + +MY_P="${PN}-${PV%0}" + +DESCRIPTION="Library for Support Vector Machines" +HOMEPAGE="http://www.csie.ntu.edu.tw/~cjlin/libsvm/" +SRC_URI="http://www.csie.ntu.edu.tw/~cjlin/libsvm/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="java python tools" + +DEPEND="java? ( >=virtual/jdk-1.4 )" +RDEPEND="${DEPEND} + tools? ( sci-visualization/gnuplot )" + +S="${WORKDIR}"/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${PV}-fpic.patch + epatch "${FILESDIR}"/${PV}-ldflags.patch + epatch "${FILESDIR}"/${PV}-python3.patch + python_copy_sources --no-link +} + +src_compile() { + emake \ + CXX="$(tc-getCXX)" \ + LDFLAGS="${LDFLAGS}" \ + CFLAGS="${CXXFLAGS}" \ + || die "emake failed" + + sed -i -e 's@\.\./@/usr/bin/@g' tools/*.py \ + || die "Failed to fix paths in python files" + + if use python ; then + compilation () { + pushd python + emake \ + CXX="$(tc-getCXX)" \ + LDFLAGS="${LDFLAGS} -shared" \ + CFLAGS="${CXXFLAGS} -I$(python_get_includedir) -I.." \ + all || die "emake for python modules failed" + popd + } + python_execute_function -s compilation + fi + + if use java ; then + pushd java + local JAVAC_FLAGS="$(java-pkg_javac-args)" + sed -i \ + -e "s/JAVAC_FLAGS =/JAVAC_FLAGS=${JAVAC_FLAGS}/g" \ + Makefile || die "Failed to fix java makefile" + emake || die "emake for java modules failed" + popd + fi +} + +src_install() { + dobin svm-train svm-predict svm-scale \ + || die "Failed to install binaries" + dohtml FAQ.html || die + dodoc README || die + + if use tools; then + pushd tools + insinto /usr/share/${PN}/tools + doins easy.py grid.py subset.py \ + || die "Failed to install python tools" + docinto tools + dodoc README || die + popd + fi + + if use python ; then + installation() { + pushd python + insinto $(python_get_sitedir) + doins svmc.so svm.py \ + || die "Failed to install python scripts" + docinto python + dodoc README || die + popd + } + python_execute_function -s installation + fi + + if use java; then + pushd java + java-pkg_dojar libsvm.jar + docinto java + dohtml test_applet.html || die + popd + fi +} |