summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2010-12-02 19:46:11 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2010-12-02 19:46:11 +0000
commit456a54acb6bda830f344f52a1b0406b3c633de67 (patch)
tree1822c96a6b7525feafbc60777b0eff2961b599db
parentCheck that webstart flag is enabled if nsplugin flag is enabled. Document thi... (diff)
downloadgentoo-2-456a54acb6bda830f344f52a1b0406b3c633de67.tar.gz
gentoo-2-456a54acb6bda830f344f52a1b0406b3c633de67.tar.bz2
gentoo-2-456a54acb6bda830f344f52a1b0406b3c633de67.zip
Version bump
(Portage version: 2.1.9.25/cvs/Linux x86_64)
-rw-r--r--sci-libs/libsvm/ChangeLog8
-rw-r--r--sci-libs/libsvm/files/3.0-makefile.patch32
-rw-r--r--sci-libs/libsvm/libsvm-3.0.ebuild74
3 files changed, 113 insertions, 1 deletions
diff --git a/sci-libs/libsvm/ChangeLog b/sci-libs/libsvm/ChangeLog
index b8a3513494ee..f067c647c355 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.21 2010/08/05 20:25:14 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.22 2010/12/02 19:46:10 bicatali Exp $
+
+*libsvm-3.0 (02 Dec 2010)
+
+ 02 Dec 2010; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/3.0-makefile.patch, +libsvm-3.0.ebuild:
+ Version bump
*libsvm-2.91 (05 Aug 2010)
diff --git a/sci-libs/libsvm/files/3.0-makefile.patch b/sci-libs/libsvm/files/3.0-makefile.patch
new file mode 100644
index 000000000000..25a1eaebbca7
--- /dev/null
+++ b/sci-libs/libsvm/files/3.0-makefile.patch
@@ -0,0 +1,32 @@
+--- Makefile.orig 2010-12-02 19:44:31.000000000 +0000
++++ Makefile 2010-12-02 19:43:59.000000000 +0000
+@@ -1,19 +1,21 @@
+ CXX ?= g++
+-CFLAGS = -Wall -Wconversion -O3 -fPIC
++CFLAGS ?= -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 svm.o -o libsvm.so.$(SHVER)
++ $(CXX) $(LDFLAGS) -shared -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/libsvm-3.0.ebuild b/sci-libs/libsvm/libsvm-3.0.ebuild
new file mode 100644
index 000000000000..eb9722e193b3
--- /dev/null
+++ b/sci-libs/libsvm/libsvm-3.0.ebuild
@@ -0,0 +1,74 @@
+# 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-3.0.ebuild,v 1.1 2010/12/02 19:46:11 bicatali Exp $
+
+EAPI="3"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils java-pkg-opt-2 python
+
+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/${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 )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-makefile.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" \
+ Makefile || die "Failed to fix java makefile"
+ fi
+}
+
+src_compile() {
+ emake || die "emake failed"
+ if use java ; then
+ emake -C java || die "emake for java modules failed"
+ fi
+}
+
+src_install() {
+ dobin svm-train svm-predict svm-scale \
+ || die "failed to install binaries"
+ dolib.so *.so* || die "failed to install library"
+ insinto /usr/include
+ doins svm.h || die
+ dohtml FAQ.html || die
+ dodoc README
+
+ if use tools; then
+ for t in tools/*.py; do
+ newbin ${t} svm-$(basename ${t} .py) || die "install tools failes"
+ done
+ newdoc tools/README README.tools
+ insinto /usr/share/doc/${PF}
+ doins heart_scale || die
+ doins -r svm-toy || die
+ fi
+
+ if use python ; then
+ installation() {
+ insinto $(python_get_sitedir)
+ doins python/*.py || die "python modules install failed"
+ }
+ 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
+}