diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2012-06-14 17:16:03 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2012-06-14 17:16:03 +0000 |
commit | 0d34f46d3d455fb2c1a0315519699040fcbbb9e6 (patch) | |
tree | c192fd1f5d1f30c739d81046c6b1d8d34f720e25 | |
parent | Revbump for automake-1.12 fix, bug #420955. (diff) | |
download | gentoo-2-0d34f46d3d455fb2c1a0315519699040fcbbb9e6.tar.gz gentoo-2-0d34f46d3d455fb2c1a0315519699040fcbbb9e6.tar.bz2 gentoo-2-0d34f46d3d455fb2c1a0315519699040fcbbb9e6.zip |
Initial import
(Portage version: 2.1.10.63/cvs/Linux x86_64)
-rw-r--r-- | sci-libs/shogun/ChangeLog | 12 | ||||
-rw-r--r-- | sci-libs/shogun/Manifest | 8 | ||||
-rw-r--r-- | sci-libs/shogun/files/shogun-1.1.0-respect-ldflags.patch | 12 | ||||
-rw-r--r-- | sci-libs/shogun/files/shogun-1.1.0-test-readline.patch | 11 | ||||
-rw-r--r-- | sci-libs/shogun/files/shogun-1.1.0-test-snappy.patch | 13 | ||||
-rw-r--r-- | sci-libs/shogun/metadata.xml | 34 | ||||
-rw-r--r-- | sci-libs/shogun/shogun-1.1.0.ebuild | 157 |
7 files changed, 247 insertions, 0 deletions
diff --git a/sci-libs/shogun/ChangeLog b/sci-libs/shogun/ChangeLog new file mode 100644 index 000000000000..1e71a1977e81 --- /dev/null +++ b/sci-libs/shogun/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for sci-libs/shogun +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/shogun/ChangeLog,v 1.1 2012/06/14 17:16:03 bicatali Exp $ + +*shogun-1.1.0 (14 Jun 2012) + + 14 Jun 2012; Sébastien Fabbro <bicatali@gentoo.org> +shogun-1.1.0.ebuild, + +files/shogun-1.1.0-respect-ldflags.patch, + +files/shogun-1.1.0-test-readline.patch, + +files/shogun-1.1.0-test-snappy.patch, +metadata.xml: + Initial import + diff --git a/sci-libs/shogun/Manifest b/sci-libs/shogun/Manifest new file mode 100644 index 000000000000..d031033f89e5 --- /dev/null +++ b/sci-libs/shogun/Manifest @@ -0,0 +1,8 @@ +AUX shogun-1.1.0-respect-ldflags.patch 332 RMD160 7da4e7c1d3c1967b80128a85dc4b825657bf0d09 SHA1 2b39db7545c9fc0be983105ad6f197c0724723fe SHA256 596e37d9bac7904808cf5cd58221f97f3ce3e583aed58697b4a4f995c9dd0eff +AUX shogun-1.1.0-test-readline.patch 352 RMD160 adb00cafbbecdb81240e123a69f15126660975df SHA1 1b1539cd28fd0459b00926a301d18575ca1c9b84 SHA256 a8e0ecc78bf702bdfb8193fc94abd7745e8bfcee0fe1e6b4ba5efeac4c6df0cc +AUX shogun-1.1.0-test-snappy.patch 506 RMD160 e000b8fdd67c991bde80d8fd29d52e8bcf71e40b SHA1 8af5880abeda1ce4ad73c67d3bc32e8ff6bcf91e SHA256 ef0489b05cd1dd494c4a9b5070277dbd7733b920cfcf045e87d6abcbd871f01f +DIST shogun-1.1.0.tar.bz2 3485714 RMD160 8744c0463550d3b9b3d023ee5f236f696ca0ede2 SHA1 7847e7b365a06a01d9cd40732ca906ae464f975f SHA256 9f69638f0bc18995358c38cd6eed6437e6b90c1fceab7c6e64c9739b7e6cc40b +DIST shogun-data-0.3.tar.bz2 126676026 RMD160 2169ddc8f744529a576fcbfc2dd498cf6436cc1a SHA1 feb21b8f3f5cfbeb5c2d7910bc5481e6b0277c44 SHA256 34272e3f5e6b6989a4941b925ab3a9cd1525d73180681884e948a673aff4ef89 +EBUILD shogun-1.1.0.ebuild 4188 RMD160 9a958579ecf1058314080805e4007fd989f7b9b3 SHA1 ac03bc73f89df8dce2075102cde0dd53abaaf79c SHA256 0ea9f48162d0b559f46c3ac01544b2d2d9bdeae9aab36bc9ba05aed9ac8752bf +MISC ChangeLog 384 RMD160 c38602ed508846b9e9978309c26b4d38d1271917 SHA1 b1d0674f0c4e95f9fdd743e426fc5e2c4c3206d3 SHA256 49786d2d4b8906a0f363a7ab5ee2e29316da26e675493c8776bfc43b3eea6362 +MISC metadata.xml 1928 RMD160 1dbce3b25762793bde5017197bf0df5e090fff05 SHA1 669d72eeccfce0aa397771c3c26a4ea5084c7dff SHA256 3698c29b00d6933893b30da4ff6a0c66444cfbc7bcfcacdb5fae5dea97ac5277 diff --git a/sci-libs/shogun/files/shogun-1.1.0-respect-ldflags.patch b/sci-libs/shogun/files/shogun-1.1.0-respect-ldflags.patch new file mode 100644 index 000000000000..0e4a331d354c --- /dev/null +++ b/sci-libs/shogun/files/shogun-1.1.0-respect-ldflags.patch @@ -0,0 +1,12 @@ +diff -Nur src.orig/configure src/configure +--- src.orig/configure 2012-06-12 00:57:14.000000000 +0100 ++++ src/configure 2012-06-12 18:13:26.000000000 +0100 +@@ -164,7 +164,7 @@ + DEFINES="-DSWIG_TYPE_TABLE=shogun -DSHOGUN" + DEFINES_SWIG= + PRELINKFLAGS= +-LINKFLAGS= ++LINKFLAGS="$LDFLAGS" + POSTLINKFLAGS= + + INCLUDES_STATIC_INTERFACES= diff --git a/sci-libs/shogun/files/shogun-1.1.0-test-readline.patch b/sci-libs/shogun/files/shogun-1.1.0-test-readline.patch new file mode 100644 index 000000000000..90a18b7efa14 --- /dev/null +++ b/sci-libs/shogun/files/shogun-1.1.0-test-readline.patch @@ -0,0 +1,11 @@ +diff -Nur src.orig/configure src/configure +--- src.orig/configure 2012-06-12 00:57:14.000000000 +0100 ++++ src/configure 2012-06-12 18:19:56.000000000 +0100 +@@ -4598,6 +4598,7 @@ + if test "$_readline" = yes || test "$_readline" = auto; + then + cat > $TMPC << EOF ++#include <stdio.h> + #include <readline/readline.h> + int main(void) { return 0; } + EOF diff --git a/sci-libs/shogun/files/shogun-1.1.0-test-snappy.patch b/sci-libs/shogun/files/shogun-1.1.0-test-snappy.patch new file mode 100644 index 000000000000..5d112d861b71 --- /dev/null +++ b/sci-libs/shogun/files/shogun-1.1.0-test-snappy.patch @@ -0,0 +1,13 @@ +diff -Nur src.orig/configure src/configure +--- src.orig/configure 2012-06-12 00:57:14.000000000 +0100 ++++ src/configure 2012-06-12 18:03:33.000000000 +0100 +@@ -3512,7 +3512,8 @@ + size_t input_length = (size_t) argc; + char* output = new char[snappy::MaxCompressedLength(input_length)]; + size_t output_length; +- RawCompress(input, input_length, output, &output_length); ++ char *input; ++ snappy::RawCompress(input, input_length, output, &output_length); + delete [] output; + return int(output_length); + } diff --git a/sci-libs/shogun/metadata.xml b/sci-libs/shogun/metadata.xml new file mode 100644 index 000000000000..72a2a3c06a1a --- /dev/null +++ b/sci-libs/shogun/metadata.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci</herd> +<longdescription lang="en"> + SHOGUN - is a new machine learning toolbox with focus on large + scale kernel methods and especially on Support Vector Machines + (SVM) with focus to bioinformatics. It provides a generic SVM + object interfacing to several different SVM implementations. Each + of the SVMs can be combined with a variety of the many kernels + implemented. It can deal with weighted linear combination of a + number of sub-kernels, each of which not necessarily working on the + same domain, where an optimal sub-kernel weighting can be learned + using Multiple Kernel Learning. Apart from SVM 2-class + classification and regression problems, a number of linear methods + like Linear Discriminant Analysis (LDA), Linear Programming Machine + (LPM), (Kernel) Perceptrons and also algorithms to train hidden + markov models are implemented. The input feature-objects can be + dense, sparse or strings and of type int/short/double/char and can + be converted into different feature types. Chains of preprocessors + (e.g. substracting the mean) can be attached to each feature object + allowing for on-the-fly pre-processing. +</longdescription> +<use> + <flag name="arpack">Enable support for <pkg>sci-libs/arpack</pkg></flag> + <flag name="glpk">Enable support for <pkg>sci-mathematics/glpk</pkg></flag> + <flag name="json">Enable support for parsing JSON format</flag> + <flag name="lpsolve">Enable support for Linear Programming Solver</flag> + <flag name="R">Enable support for <pkg>dev-lang/R</pkg></flag> + <flag name="octave">Enable support for <pkg>sci-mathematics/octave</pkg></flag> + <flag name="snappy">Enable support for snappy compression</flag> + <flag name="superlu">Enable support for <pkg>sci-libs/superlu</pkg></flag> +</use> +</pkgmetadata> diff --git a/sci-libs/shogun/shogun-1.1.0.ebuild b/sci-libs/shogun/shogun-1.1.0.ebuild new file mode 100644 index 000000000000..1a99992e76dc --- /dev/null +++ b/sci-libs/shogun/shogun-1.1.0.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/shogun/shogun-1.1.0.ebuild,v 1.1 2012/06/14 17:16:03 bicatali Exp $ + +EAPI=4 + +inherit multilib versionator toolchain-funcs java-pkg-opt-2 + +MYPV=$(get_version_component_range 1-2) +MYPD=${PN}-data-0.3 + +DESCRIPTION="Large Scale Machine Learning Toolbox" +HOMEPAGE="http://shogun-toolbox.org/" +SRC_URI="ftp://shogun-toolbox.org/shogun/releases/${MYPV}/sources/${P}.tar.bz2 + test? ( ftp://shogun-toolbox.org/shogun/data/${MYPD}.tar.bz2 )" + +LICENSE="GPL-3 free-noncomm" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="arpack bzip2 doc examples glpk gzip hdf5 json lapack lpsolve mono lua lzma + lzo java R ruby octave python readline snappy static-libs superlu test xml" + +RDEPEND="sci-libs/gsl + sys-libs/zlib + arpack? ( sci-libs/arpack ) + bzip2? ( app-arch/bzip2 ) + glpk? ( sci-mathematics/glpk ) + gzip? ( app-arch/gzip ) + hdf5? ( sci-libs/hdf5 ) + java? ( >=virtual/jdk-1.5 ) + json? ( dev-libs/json-c ) + lapack? ( virtual/cblas virtual/lapack ) + lpsolve? ( sci-mathematics/lpsolve ) + lua? ( dev-lang/lua ) + lzo? ( dev-libs/lzo ) + mono? ( dev-lang/mono ) + octave? ( sci-mathematics/octave[hdf5=] ) + python? ( dev-python/numpy ) + R? ( dev-lang/R ) + readline? ( sys-libs/readline ) + ruby? ( >=dev-ruby/narray-0.6.0.1-r2 ) + snappy? ( app-arch/snappy ) + superlu? ( sci-libs/superlu ) + xml? ( dev-libs/libxml2 )" + +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen[dot] ) + java? ( dev-lang/swig dev-java/ant ) + octave? ( dev-lang/swig ) + python? ( dev-lang/swig test? ( sci-libs/scipy ) ) + ruby? ( dev-lang/swig )" + +S="${WORKDIR}/${P}/src" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-respect-ldflags.patch \ + "${FILESDIR}"/${P}-test-snappy.patch \ + "${FILESDIR}"/${P}-test-readline.patch + + # dist-packages is only for debian + # remove exagarated optimizations (-O9 does not exist...) + # use gentoo lapack framework + sed -i \ + -e 's/dist-packages/site-packages/g' \ + -e '/^COMP_OPTS=/d' \ + -e "s/-llapack -lcblas/$(pkg-config --libs cblas lapack)/g" \ + configure || die + + # disable ldconfig which violates sandbox + # install in gentoo java standard paths + sed -i \ + -e '/ldconfig/d' \ + -e '/share\/java/d' \ + -e '/jni/d' \ + Makefile.template || die +} + +src_configure() { + # define interfaces to shogun library to build + local x iface + for x in java lua octave python ruby ; do + use ${x} && iface="${iface}${x}_modular," + done + use mono && iface="${iface}csharp_modular," + use R && iface="${iface}r_modular," + if use static-libs; then + iface="${iface}cmdline_static," + use octave && iface="${iface}octave_static," + use python && iface="${iface}python_static," + use R && iface="${iface}r_static," + use octave && use python && use R && iface="${iface}elwms_static," + fi + iface="${iface%,}" + + # gentoo bug #302621 + use hdf5 && has_version sci-libs/hdf5[mpi] && export CXX=mpicxx CC=mpicc + + ./configure \ + --disable-cpudetection \ + --destdir="${ED}" \ + --prefix="${EPREFIX}/usr" \ + --mandir="${EPREFIX}/usr/share/man" \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --target="${CTARGET}" \ + --interfaces=${iface} \ + $(use_enable arpack) \ + $(use_enable bzip2) \ + $(use_enable doc doxygen) \ + $(use_enable glpk) \ + $(use_enable gzip) \ + $(use_enable hdf5) \ + $(use_enable json) \ + $(use_enable lapack) \ + $(use_enable lpsolve) \ + $(use_enable lzma) \ + $(use_enable lzo) \ + $(use_enable readline) \ + $(use_enable snappy) \ + $(use_enable static-libs static) \ + $(use_enable superlu) \ + $(use_enable xml) +} + +src_compile() { + emake + use doc && emake -C ../doc +} + +src_test() { + use lapack || return + ln -s ../../${MYPD}/* ../data/ + emake DESTDIR="${D}" install + # disable because very long and buggy dynamic paths (assumed install) + # emake tests + emake -C shogun check-examples +} + +src_install() { + default + use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a + if use java; then + java-pkg_dojar interfaces/java_modular/shogun.jar + java-pkg_doso interfaces/java_modular/libmodshogun.so + fi + + use doc && dohtml -r ../doc/html/* + if use examples; then + insinto /usr/share/doc/${PF} + emake -C ../examples clean + doins -r ../examples + newins -r ../../${MYPD} data + fi +} |