diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-02-10 21:21:07 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-02-10 21:21:07 +0000 |
commit | 0bb02684c397cb748a827e2d01c0e48043422691 (patch) | |
tree | 90af3ba7bad1b710880b02ac792d1b0f25e5073f /sci-libs/libsvm | |
parent | Version bump. (diff) | |
download | gentoo-2-0bb02684c397cb748a827e2d01c0e48043422691.tar.gz gentoo-2-0bb02684c397cb748a827e2d01c0e48043422691.tar.bz2 gentoo-2-0bb02684c397cb748a827e2d01c0e48043422691.zip |
Version bump per bug 304329
(Portage version: 2.2_rc62/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/libsvm')
-rw-r--r-- | sci-libs/libsvm/ChangeLog | 10 | ||||
-rw-r--r-- | sci-libs/libsvm/files/2.90-fpic.patch | 26 | ||||
-rw-r--r-- | sci-libs/libsvm/files/2.90-ldflags.patch | 19 | ||||
-rw-r--r-- | sci-libs/libsvm/libsvm-2.90.ebuild | 105 |
4 files changed, 158 insertions, 2 deletions
diff --git a/sci-libs/libsvm/ChangeLog b/sci-libs/libsvm/ChangeLog index 85c164c2185e..e3151d4eba8e 100644 --- a/sci-libs/libsvm/ChangeLog +++ b/sci-libs/libsvm/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/libsvm -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.15 2009/08/15 00:08:44 bicatali Exp $ +# 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 $ + +*libsvm-2.90 (10 Feb 2010) + + 10 Feb 2010; Justin Lecher (jlec) <jlec@gentoo.org> + +files/2.90-fpic.patch, +libsvm-2.90.ebuild, +files/2.90-ldflags.patch: + Version bump per bug 304329 *libsvm-2.89 (15 Aug 2009) diff --git a/sci-libs/libsvm/files/2.90-fpic.patch b/sci-libs/libsvm/files/2.90-fpic.patch new file mode 100644 index 000000000000..c0ead5243262 --- /dev/null +++ b/sci-libs/libsvm/files/2.90-fpic.patch @@ -0,0 +1,26 @@ +diff --git a/python/Makefile b/python/Makefile +index 32268e7..dbc128f 100644 +--- a/python/Makefile ++++ b/python/Makefile +@@ -11,8 +11,8 @@ LDFLAGS = -shared + + all: svmc.so + +-svmc.so: svmc_wrap.o ../svm.o +- $(CXX) $(LDFLAGS) -o svmc.so svmc_wrap.o ../svm.o ++svmc.so: svmc_wrap.o svm.o ++ $(CXX) $(LDFLAGS) -o svmc.so svmc_wrap.o svm.o + + svmc_wrap.o: svmc_wrap.c ../svm.h + $(CXX) $(CFLAGS) -fPIC -c svmc_wrap.c +@@ -20,8 +20,8 @@ svmc_wrap.o: svmc_wrap.c ../svm.h + svmc_wrap.c: svmc.i + $(SWIG) -python -noproxy svmc.i + +-../svm.o: ../svm.cpp ../svm.h +- cd ..; $(CXX) $(CFLAGS) -fPIC -c svm.cpp ++svm.o: ../svm.cpp ../svm.h ++ $(CXX) $(CFLAGS) -fPIC -c ../svm.cpp -o svm.o + + clean: + rm -f *~ *.o *.so *.pyc *.pyo diff --git a/sci-libs/libsvm/files/2.90-ldflags.patch b/sci-libs/libsvm/files/2.90-ldflags.patch new file mode 100644 index 000000000000..08773d44ed41 --- /dev/null +++ b/sci-libs/libsvm/files/2.90-ldflags.patch @@ -0,0 +1,19 @@ +diff --git a/Makefile b/Makefile +index 3781264..ce53201 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,11 +8,11 @@ lib: svm.o + $(CXX) -shared svm.o -o libsvm.so.$(SHVER) + + svm-predict: svm-predict.c svm.o +- $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm ++ $(CXX) $(CFLAGS) $(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) $(CFLAGS) $(LDFLAGS) svm-train.c svm.o -o svm-train -lm + svm-scale: svm-scale.c +- $(CXX) $(CFLAGS) svm-scale.c -o svm-scale ++ $(CXX) $(CFLAGS) $(LDFLAGS) svm-scale.c -o svm-scale + svm.o: svm.cpp svm.h + $(CXX) $(CFLAGS) -c svm.cpp + clean: diff --git a/sci-libs/libsvm/libsvm-2.90.ebuild b/sci-libs/libsvm/libsvm-2.90.ebuild new file mode 100644 index 000000000000..58bec5cbca5a --- /dev/null +++ b/sci-libs/libsvm/libsvm-2.90.ebuild @@ -0,0 +1,105 @@ +# 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.ebuild,v 1.1 2010/02/10 21:21:07 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 )" + +RESTRICT_PYTHON_ABIS="3.*" + +S="${WORKDIR}"/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${PV}-fpic.patch + epatch "${FILESDIR}"/${PV}-ldflags.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 +} |