summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2010-08-05 20:25:15 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2010-08-05 20:25:15 +0000
commit4e7af4a4612359b71429cbcb9f02ea3a63d13a95 (patch)
tree57eabc9becb58b691d6c6a8f2826dd0ee6c5d210 /sci-libs
parentppc64 stable wrt #324691 (diff)
downloadgentoo-2-4e7af4a4612359b71429cbcb9f02ea3a63d13a95.tar.gz
gentoo-2-4e7af4a4612359b71429cbcb9f02ea3a63d13a95.tar.bz2
gentoo-2-4e7af4a4612359b71429cbcb9f02ea3a63d13a95.zip
Version bump. Now install library. Tools are installed as executables. Clean-up.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/libsvm/ChangeLog9
-rw-r--r--sci-libs/libsvm/files/2.91-makefile.patch30
-rw-r--r--sci-libs/libsvm/libsvm-2.91.ebuild78
-rw-r--r--sci-libs/libsvm/metadata.xml2
4 files changed, 117 insertions, 2 deletions
diff --git a/sci-libs/libsvm/ChangeLog b/sci-libs/libsvm/ChangeLog
index c53b59a08b49..b8a3513494ee 100644
--- a/sci-libs/libsvm/ChangeLog
+++ b/sci-libs/libsvm/ChangeLog
@@ -1,6 +1,13 @@
# 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.20 2010/04/18 17:37:00 nixnut Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.21 2010/08/05 20:25:14 bicatali Exp $
+
+*libsvm-2.91 (05 Aug 2010)
+
+ 05 Aug 2010; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/2.91-makefile.patch, +libsvm-2.91.ebuild, metadata.xml:
+ Version bump. Now install library. Tools are installed as executables.
+ Clean-up.
18 Apr 2010; <nixnut@gentoo.org> libsvm-2.90-r1.ebuild:
ppc stable #313139
diff --git a/sci-libs/libsvm/files/2.91-makefile.patch b/sci-libs/libsvm/files/2.91-makefile.patch
new file mode 100644
index 000000000000..b9b97e8a7cbd
--- /dev/null
+++ b/sci-libs/libsvm/files/2.91-makefile.patch
@@ -0,0 +1,30 @@
+--- Makefile.orig 2010-08-05 20:36:16.000000000 +0100
++++ Makefile 2010-08-05 21:30:42.000000000 +0100
+@@ -1,19 +1,19 @@
+-CXX ?= g++
+-CFLAGS = -Wall -Wconversion -O3 -fPIC
+ SHVER = 1
++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)
diff --git a/sci-libs/libsvm/libsvm-2.91.ebuild b/sci-libs/libsvm/libsvm-2.91.ebuild
new file mode 100644
index 000000000000..83e20a90f18d
--- /dev/null
+++ b/sci-libs/libsvm/libsvm-2.91.ebuild
@@ -0,0 +1,78 @@
+# 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.91.ebuild,v 1.1 2010/08/05 20:25:14 bicatali Exp $
+
+EAPI="3"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils java-pkg-opt-2 python
+
+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}-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
+}
diff --git a/sci-libs/libsvm/metadata.xml b/sci-libs/libsvm/metadata.xml
index 0b62464e7215..27b4207dccd1 100644
--- a/sci-libs/libsvm/metadata.xml
+++ b/sci-libs/libsvm/metadata.xml
@@ -10,6 +10,6 @@
researchers and artificial intelligence application developers.
</longdescription>
<use>
- <flag name='tools'>Install support tools</flag>
+ <flag name='tools'>Install python based tool scripts</flag>
</use>
</pkgmetadata>