summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2012-04-17 17:04:23 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2012-04-17 17:04:23 +0000
commit29b81b9659a2e3fba4655b1fdaa4767634bc5598 (patch)
tree42586f5b088a30c0123bdda96eb8133d8368362b /sci-libs
parentVersion bump. (diff)
downloadgentoo-2-29b81b9659a2e3fba4655b1fdaa4767634bc5598.tar.gz
gentoo-2-29b81b9659a2e3fba4655b1fdaa4767634bc5598.tar.bz2
gentoo-2-29b81b9659a2e3fba4655b1fdaa4767634bc5598.zip
Version bump. makefile patch updated
(Portage version: 2.1.10.49/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/libsvm/ChangeLog8
-rw-r--r--sci-libs/libsvm/files/3.12-makefile.patch38
-rw-r--r--sci-libs/libsvm/libsvm-3.12.ebuild88
3 files changed, 133 insertions, 1 deletions
diff --git a/sci-libs/libsvm/ChangeLog b/sci-libs/libsvm/ChangeLog
index aef3d987240c..b339b3f7b95c 100644
--- a/sci-libs/libsvm/ChangeLog
+++ b/sci-libs/libsvm/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/libsvm
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.25 2012/03/25 11:39:42 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.26 2012/04/17 17:04:23 bicatali Exp $
+
+*libsvm-3.12 (17 Apr 2012)
+
+ 17 Apr 2012; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/3.12-makefile.patch, +libsvm-3.12.ebuild:
+ Version bump. makefile patch updated
25 Mar 2012; Justin Lecher <jlec@gentoo.org> -libsvm-3.0.ebuild,
-libsvm-3.1.ebuild, libsvm-3.11.ebuild, metadata.xml:
diff --git a/sci-libs/libsvm/files/3.12-makefile.patch b/sci-libs/libsvm/files/3.12-makefile.patch
new file mode 100644
index 000000000000..5dbce864b475
--- /dev/null
+++ b/sci-libs/libsvm/files/3.12-makefile.patch
@@ -0,0 +1,38 @@
+--- Makefile.orig 2012-01-01 15:10:52.000000000 +0000
++++ Makefile 2012-04-16 17:52:32.000000000 +0100
+@@ -1,9 +1,10 @@
+ CXX ?= g++
+-CFLAGS = -Wall -Wconversion -O3 -fPIC
++CXXFLAGS ?= -Wall -Wconversion -O3
+ SHVER = 2
+ OS = $(shell uname)
++PICFLAGS ?= -fPIC
+
+-all: svm-train svm-predict svm-scale
++all: svm-train svm-predict svm-scale lib
+
+ lib: svm.o
+ if [ "$(OS)" = "Darwin" ]; then \
+@@ -11,15 +12,15 @@
+ else \
+ SHARED_LIB_FLAG="-shared -W1,-soname,libsvm.so.$(SHVER)"; \
+ fi; \
+- $(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER)
+-
++ $(CXX) $(LDFLAGS) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER); \
++ 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.12.ebuild b/sci-libs/libsvm/libsvm-3.12.ebuild
new file mode 100644
index 000000000000..30450f62f252
--- /dev/null
+++ b/sci-libs/libsvm/libsvm-3.12.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/libsvm-3.12.ebuild,v 1.1 2012/04/17 17:04:23 bicatali Exp $
+
+EAPI="4"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils java-pkg-opt-2 python flag-o-matic toolchain-funcs
+
+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 openmp python tools"
+
+DEPEND="java? ( >=virtual/jdk-1.4 )"
+RDEPEND="${DEPEND}
+ tools? ( sci-visualization/gnuplot )"
+
+pkg_setup() {
+ if use openmp; then
+ if [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp; then
+ ewarn "You are using gcc but without OpenMP capabilities"
+ die "Need an OpenMP capable compiler"
+ else
+ append-ldflags -fopenmp
+ append-cxxflags -fopenmp
+ fi
+ append-cxxflags -DOPENMP
+ fi
+ use python && python_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/3.11-openmp.patch \
+ "${FILESDIR}"/3.12-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" \
+ java/Makefile || die "Failed to fix java makefile"
+ fi
+}
+
+src_compile() {
+ emake
+ use java && emake -C java
+}
+
+src_install() {
+ dobin svm-train svm-predict svm-scale
+ dolib.so *.so*
+ insinto /usr/include
+ doins svm.h
+ dohtml FAQ.html
+ dodoc README
+
+ if use tools; then
+ local t
+ for t in tools/*.py; do
+ newbin ${t} svm-$(basename ${t} .py)
+ done
+ newdoc tools/README README.tools
+ insinto /usr/share/doc/${PF}
+ doins heart_scale
+ doins -r svm-toy
+ fi
+
+ if use python ; then
+ installation() {
+ insinto $(python_get_sitedir)
+ doins python/*.py
+ }
+ 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
+}