diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/shogun | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/shogun')
-rw-r--r-- | sci-libs/shogun/Manifest | 6 | ||||
-rw-r--r-- | sci-libs/shogun/files/shogun-1.1.0-as-needed.patch | 48 | ||||
-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/files/shogun-3.2.0-atlas.patch | 22 | ||||
-rw-r--r-- | sci-libs/shogun/metadata.xml | 37 | ||||
-rw-r--r-- | sci-libs/shogun/shogun-1.1.0.ebuild | 160 | ||||
-rw-r--r-- | sci-libs/shogun/shogun-2.0.0.ebuild | 164 | ||||
-rw-r--r-- | sci-libs/shogun/shogun-3.2.0.ebuild | 137 |
10 files changed, 610 insertions, 0 deletions
diff --git a/sci-libs/shogun/Manifest b/sci-libs/shogun/Manifest new file mode 100644 index 00000000000..11c82bf05c0 --- /dev/null +++ b/sci-libs/shogun/Manifest @@ -0,0 +1,6 @@ +DIST shogun-1.1.0.tar.bz2 3485714 SHA256 9f69638f0bc18995358c38cd6eed6437e6b90c1fceab7c6e64c9739b7e6cc40b SHA512 853168e3d68ad02ef543391b78c51682d004af46acddfa09a76b41e373e27199fc9be0598892207e116a82f24437e3f1c0dc97c3e28ca32879594fbe112bd157 WHIRLPOOL dd044ff2cc9fd9376b80f1efd9bbcf901b11765a2f85eb2325ddd640ea547e513df8c9da548634e49758ef124147666f86b6b4082e118c6d35ef2d5010527cf9 +DIST shogun-2.0.0.tar.bz2 4106437 SHA256 b18e30515b9f4432d02602d0dd66dbc57c70a46f71636275071afaee94e245ee SHA512 e7c8d515afbcb3198aade32d2962e8d94b669b9c79ddbcd7425f04bbb0379803f7353c50ba8897356842cddb401d303fefaf8a7f9dd6a2e751e176deba1e46f1 WHIRLPOOL aa9ef89f28acc012ee2894c4ff6858f7bf01585d02160d5b2df33159c7c87593ea352833765a7a78cc0ed16fd10713d285eb711606f0e3771ec685778f703570 +DIST shogun-3.2.0.tar.bz2 4217245 SHA256 bc416b615ed90aef80c58a30546c5e2da779347bebb8742ecf11657073fc8f72 SHA512 7c420da7bf10c8971954964bce4dc13a8f64c6ff2a0976293f54947414ad2fe7171b1747cef3e2ceb969cf936d8fe862e940582f642cd2367897cda3191b186b WHIRLPOOL bce007c01ebee0e225d5cf858e042561a540416b349015ac566cce82b77096e8206b2f9e51572d9ee8149651a39aa30d6438b28d37ba43eb5aba593b10c5e497 +DIST shogun-data-0.3.tar.bz2 126676026 SHA256 34272e3f5e6b6989a4941b925ab3a9cd1525d73180681884e948a673aff4ef89 SHA512 92c7e7dae1df5a7a79428a7f2116b1d9d825a37d4145edfdff1fb7b707853eab19ffe848c4ae2bc2338a93373e78c7cae4087df260411a9576b031e7a6f0de95 WHIRLPOOL 24987580c967b05e61ee5402fe30701cabe17d7ffb29b4966ff0abd0d03e197b928f018e617e254395c6939f93de3e397f5ce7df7c3d4ae7dfe4e782c345fe85 +DIST shogun-data-0.4.tar.bz2 127377123 SHA256 103ef944c7211f64957833cd6ace85e32629d73ef286273424e239fa454ecfcc SHA512 c178f6d5d8e4b6b6a94b74da5c133b01e83a1d4c7bf5d0fd66b4812b259934dbc998cfc1ef64f19b17b5099e8c389b8e359e69f1cc1bef6b82b940dc97cac46d WHIRLPOOL cef5d84f342523bad8b810fa3018669e9cd838c7c45bb37b8e7308dce448dc9b98f9aa6716aa724d64746539ef9c041a71cd2f3a1af71ed1077d276a192573d5 +DIST shogun-data-0.8.tar.bz2 261905079 SHA256 a2a0c8ccd754f0b893d97d77cfb60e25fcdb4e7033731434fb07e5483514a047 SHA512 9ea48706aae5ca116e8cf3507d1fcd06e24a8384abe6f2ebaf3c81735237d3beceee26ce5af97b85af24409eb47da684f7e7a56c0800a82c40ed214e6382978f WHIRLPOOL 3a3120a8e982c90c670ec0c206635abdcb152ae5f312172ec58ae21e1ee11f15c406b382bd3b8e8a63300302290590b83a977bd4d90375160ceb8ae516409c12 diff --git a/sci-libs/shogun/files/shogun-1.1.0-as-needed.patch b/sci-libs/shogun/files/shogun-1.1.0-as-needed.patch new file mode 100644 index 00000000000..5d365472c2c --- /dev/null +++ b/sci-libs/shogun/files/shogun-1.1.0-as-needed.patch @@ -0,0 +1,48 @@ +diff -Nur src.orig/configure src/configure +--- src.orig/configure 2012-08-04 12:58:58.230092977 -0700 ++++ src/configure 2012-08-04 13:30:14.441859756 -0700 +@@ -4470,7 +4470,8 @@ + COMPFLAGS_C_R="$COMPFLAGS_C_R `R CMD config CPICFLAGS`" + COMPFLAGS_CPP_R="$COMPFLAGS_CPP_R `R CMD config CXXPICFLAGS`" + INCLUDES_R="$INCLUDES_R `R CMD config --cppflags`" +- LINKFLAGS_R="$LINKFLAGS_R `R CMD config --ldflags` `R CMD config DYLIB_LDFLAGS`" ++ PRELINKFLAGS_R="$PRELINKFLAGS_R `R CMD config DYLIB_LDFLAGS`" ++ LINKFLAGS_R="$LINKFLAGS_R `R CMD config --ldflags`" + fi + + +diff -Nur src.orig/Makefile.template src/Makefile.template +--- src.orig/Makefile.template 2012-08-04 12:58:58.229092986 -0700 ++++ src/Makefile.template 2012-08-04 13:00:21.340525955 -0700 +@@ -515,7 +515,7 @@ + else + $(TEMPLATE_TARGET): .depend $(OBJFILES) $(SRCFILES) $(HEADERFILES) $(OTHERDEPS) + $(LINK) $(PRELINKFLAGS) $(shell find $(SRCDIR) -name "*.$(EXT_OBJ_CPP)" -o \ +- -name "*.$(EXT_OBJ_C)" 2>/dev/null) $(LINKFLAGS) -o $@ $(POSTLINKFLAGS) ++ -name "*.$(EXT_OBJ_C)" 2>/dev/null) $(LINKFLAGS) $(POSTLINKFLAGS) -o $@ + @$(POSTLINKCMD) $@ + @$(LIBSYMLINKCMD) + endif +@@ -530,18 +530,18 @@ + ($(LIBRARY_PATH)=$(CONFIGPATH)/../shogun R --no-save) + + $(PRE_LIB_SWIG_TEMPLATE)%${EXT_LIB_SWIG_TEMPLATE}: %$(EXT_OBJ_SWIG) +- $(LINK) $(LINKFLAGS) -o $@ $^ $(POSTLINKFLAGS) ++ $(LINK) $(LINKFLAGS) $^ $(POSTLINKFLAGS) -o $@ + + %${EXT_OBJ_SWIG}: %$(EXT_SRC_SWIG) +- $(COMP_CPP) $(COMPFLAGS_SWIG_CPP) $(DEFINES) -c $(INCLUDES) -o $@ $< ++ $(COMP_CPP) $(COMPFLAGS_SWIG_CPP) $(DEFINES) -c $(INCLUDES) $< -o $@ + + %.$(EXT_OBJ_CPP): %.$(EXT_SRC_CPP) +- $(COMP_CPP) $(COMPFLAGS_CPP) $(DEFINES) -c $(INCLUDES) -o $@ $< ++ $(COMP_CPP) $(COMPFLAGS_CPP) $(DEFINES) -c $(INCLUDES) $< -o $@ + @test -f $*.$(EXT_CPP_TMP) && test "$(SRCDIR)" != "." \ + && rm -f $< || true + + %.$(EXT_OBJ_C): %.$(EXT_SRC_C) +- $(COMP_C) $(COMPFLAGS_C) $(DEFINES) -c $(INCLUDES) -o $@ $< ++ $(COMP_C) $(COMPFLAGS_C) $(DEFINES) -c $(INCLUDES) $< -o $@ + + %.$(EXT_SRC_CPP): %.$(EXT_CPP_TMP) %.$(EXT_CPP_SH) $(HEADERFILES) + @echo "generating $@ from $*.$(EXT_CPP_TMP) by running $*.$(EXT_CPP_SH)" 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 00000000000..60753606cdb --- /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 -lpthread" + 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 00000000000..90a18b7efa1 --- /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 00000000000..5d112d861b7 --- /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/files/shogun-3.2.0-atlas.patch b/sci-libs/shogun/files/shogun-3.2.0-atlas.patch new file mode 100644 index 00000000000..a4f5e1c77d7 --- /dev/null +++ b/sci-libs/shogun/files/shogun-3.2.0-atlas.patch @@ -0,0 +1,22 @@ + cmake/FindAtlas.cmake | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/cmake/FindAtlas.cmake b/cmake/FindAtlas.cmake +index 13f092d..8c2dd2f 100644 +--- a/cmake/FindAtlas.cmake ++++ b/cmake/FindAtlas.cmake +@@ -20,10 +20,10 @@ if(ATLAS_LAPACK) + endif() + unset(CMAKE_REQUIRED_LIBRARIES CACHE) + else() +- find_file(ATLAS_LAPACK liblapack.so.3 PATHS /usr/lib/atlas /usr/lib64/atlas) +- find_library(ATLAS_LAPACK NAMES lapack) +- set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${ATLAS_CBLAS}) +- check_library_exists("${ATLAS_LAPACK}" clapack_dpotrf "" FOUND_CLAPACK) ++ # find_file(ATLAS_LAPACK liblapack.so.3 PATHS /usr/lib/atlas /usr/lib64/atlas) ++ # find_library(ATLAS_LAPACK NAMES lapack) ++ # set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${ATLAS_CBLAS}) ++ check_library_exists("${ATLAS_LIBRARIES}" clapack_dpotrf "" FOUND_CLAPACK) + if(NOT FOUND_CLAPACK) + unset(ATLAS_LAPACK CACHE) + endif() diff --git a/sci-libs/shogun/metadata.xml b/sci-libs/shogun/metadata.xml new file mode 100644 index 00000000000..d0c30a0c09f --- /dev/null +++ b/sci-libs/shogun/metadata.xml @@ -0,0 +1,37 @@ +<?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="eigen">Enable support for matrix package <pkg>dev-cpp/eigen</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="nlopt">Enable support non linear optimization from + <pkg>sci-libs/nlopt</pkg></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 00000000000..477d86067fb --- /dev/null +++ b/sci-libs/shogun/shogun-1.1.0.ebuild @@ -0,0 +1,160 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils 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 ) + examples? ( ftp://shogun-toolbox.org/shogun/data/${MYPD}.tar.bz2 )" + +LICENSE="GPL-3 free-noncomm" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +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 \ + "${FILESDIR}"/${P}-as-needed.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:$($(tc-getPKG_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) || die +} + +src_compile() { + emake + use doc && emake -C ../doc +} + +src_test() { + use lapack || return + ln -s ../../${MYPD}/* ../data/ + emake DESTDIR="${ED}" 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 + insinto /usr/share/doc/${PF}/data + doins -r "${WORKDIR}"/${MYPD}/* + fi +} diff --git a/sci-libs/shogun/shogun-2.0.0.ebuild b/sci-libs/shogun/shogun-2.0.0.ebuild new file mode 100644 index 00000000000..8e26b7fb77e --- /dev/null +++ b/sci-libs/shogun/shogun-2.0.0.ebuild @@ -0,0 +1,164 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib versionator toolchain-funcs java-pkg-opt-2 + +MYPV=$(get_version_component_range 1-2) +MYPD=${PN}-data-0.4 + +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 ) + examples? ( ftp://shogun-toolbox.org/shogun/data/${MYPD}.tar.bz2 )" + +LICENSE="GPL-3 free-noncomm" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="arpack bzip2 doc eigen examples glpk gzip hdf5 json lapack lpsolve mono lua lzma + lzo nlopt java R ruby octave python readline smp snappy static-libs superlu test xml" + +RDEPEND=" + sci-libs/gsl + sys-libs/zlib + arpack? ( sci-libs/arpack ) + bzip2? ( app-arch/bzip2 ) + eigen? ( >=dev-cpp/eigen-3 ) + 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 ) + nlopt? ( sci-libs/nlopt ) + 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-2.0.4 dev-java/ant ) + octave? ( >=dev-lang/swig-2.0.4 ) + python? ( >=dev-lang/swig-2.0.4 test? ( sci-libs/scipy ) ) + ruby? ( >=dev-lang/swig-2.0.4 )" + +S="${WORKDIR}/${P}/src" + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-1.1.0-respect-ldflags.patch \ + "${FILESDIR}"/${PN}-1.1.0-test-readline.patch \ + "${FILESDIR}"/${PN}-1.1.0-as-needed.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:$($(tc-getPKG_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' \ + -e 's/OCTAVE_LOADPATH/OCTAVE_PATH/g' \ + 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="${D}" \ + --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 eigen eigen3) \ + $(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 nlopt) \ + $(use_enable readline) \ + $(use_enable smp hmm-parallel) \ + $(use_enable snappy) \ + $(use_enable static-libs static) \ + $(use_enable superlu) \ + $(use_enable xml) || die +} + +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 + # emake tests + emake -C shogun check-examples +} + +src_install() { + default + use static-libs || rm "${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 + insinto /usr/share/doc/${PF}/data + doins -r "${WORKDIR}"/${MYPD}/* + fi +} diff --git a/sci-libs/shogun/shogun-3.2.0.ebuild b/sci-libs/shogun/shogun-3.2.0.ebuild new file mode 100644 index 00000000000..51cfb508525 --- /dev/null +++ b/sci-libs/shogun/shogun-3.2.0.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{3,4} ) + +inherit cmake-utils multilib python-single-r1 toolchain-funcs versionator + +MYPV=$(get_version_component_range 1-2) +MYPD=${PN}-data-0.8 + +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 ) + examples? ( ftp://shogun-toolbox.org/shogun/data/${MYPD}.tar.bz2 )" + +LICENSE="GPL-3 free-noncomm" +SLOT="0/16" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples lua mono octave python R ruby static-libs test" + +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + test? ( python ) + " + +RDEPEND=" + app-arch/bzip2:= + app-arch/gzip:= + app-arch/lzma:= + app-arch/snappy:= + dev-libs/lzo:= + >=dev-cpp/eigen-3.1 + dev-libs/json-c:= + dev-libs/libxml2:= + dev-libs/protobuf:= + net-misc/curl:= + sci-libs/arpack:= + sci-libs/arprec:= + sci-libs/colpack:= + sci-libs/hdf5:= + sci-libs/nlopt:= + sci-mathematics/glpk:= + sci-mathematics/lpsolve:= + sys-libs/readline + sys-libs/zlib:= + virtual/blas + virtual/cblas + virtual/lapack + lua? ( dev-lang/lua ) + mono? ( dev-lang/mono ) + octave? ( sci-mathematics/octave[hdf5] ) + python? ( dev-python/numpy[${PYTHON_USEDEP}] ) + R? ( dev-lang/R ) + ruby? ( dev-ruby/narray )" + +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen[dot] ) + lua? ( >=dev-lang/swig-2.0.4 ) + mono? ( >=dev-lang/swig-2.0.4 ) + octave? ( >=dev-lang/swig-2.0.4 ) + python? ( >=dev-lang/swig-2.0.4 test? ( sci-libs/scipy ) ) + R? ( >=dev-lang/swig-2.0.4 ) + ruby? ( >=dev-lang/swig-2.0.4 ) + test? ( + dev-python/jinja[${PYTHON_USEDEP}] + dev-cpp/gmock + )" + +# javamodular needs jblas (painful to package properly) +# permodular work in progress (as 3.2.0) +# could actually support multiple pythons, multiple rubys +# feel free to do work for it + +PATCHES=( + "${FILESDIR}"/${P}-atlas.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_configure() { + export ATLAS_LIBRARY="$($(tc-getPKG_CONFIG) --libs cblas lapack)" + export CBLAS_LIBRARY="$($(tc-getPKG_CONFIG) --libs cblas)" + export ATLAS_LIBRARIES="$($(tc-getPKG_CONFIG) --libs blas cblas lapack)" + export LAPACK_LIBRARIES="$($(tc-getPKG_CONFIG) --libs lapack)" + local mycmakeargs=( + -DBUILD_EXAMPLES=OFF + -DBUNDLE_ARPREC=OFF + -DBUNDLE_COLPACK=OFF + -DBUNDLE_EIGEN=OFF + -DBUNDLE_JSON=OFF + -DBUNDLE_NLOPT=OFF + -DENABLE_COVERAGE=OFF + -DJavaModular=OFF + -DPerlModular=OFF + -DLIB_INSTALL_DIR=$(get_libdir) + $(cmake-utils_use lua LuaModular) + $(cmake-utils_use mono CSharpModular) + $(cmake-utils_use octave OctaveModular) + $(cmake-utils_use octave OctaveStatic) + $(cmake-utils_use python PythonModular) + $(cmake-utils_use python PythonStatic) + $(cmake-utils_use R RModular) + $(cmake-utils_use R RStatic) + $(cmake-utils_use ruby RubyModular) + $(cmake-utils_use test ENABLE_TESTING) + ) + cmake-utils_src_configure + # gentoo bug #302621 + has_version sci-libs/hdf5[mpi] && export CXX=mpicxx CC=mpicc +} + +src_compile() { + cmake-utils_src_compile + use doc && emake -C doc +} + +src_install() { + cmake-utils_src_install + use doc && dohtml -r doc/html/* + if use examples; then + insinto /usr/share/doc/${PF} + emake -C examples clean + doins -r examples + docompress -x /usr/share/doc/${PF}/examples + insinto /usr/share/doc/${PF}/data + doins -r "${WORKDIR}"/${MYPD}/* + + fi +} |