diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/shogun |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/shogun')
-rw-r--r-- | sci-libs/shogun/Manifest | 8 | ||||
-rw-r--r-- | sci-libs/shogun/files/shogun-4.1.0-remove-C-linkage.patch | 24 | ||||
-rw-r--r-- | sci-libs/shogun/files/shogun-5.0.0-fix-buildsystem.patch | 72 | ||||
-rw-r--r-- | sci-libs/shogun/metadata.xml | 32 | ||||
-rw-r--r-- | sci-libs/shogun/shogun-5.0.0.ebuild | 162 |
5 files changed, 298 insertions, 0 deletions
diff --git a/sci-libs/shogun/Manifest b/sci-libs/shogun/Manifest new file mode 100644 index 000000000000..9464af36d96f --- /dev/null +++ b/sci-libs/shogun/Manifest @@ -0,0 +1,8 @@ +AUX shogun-4.1.0-remove-C-linkage.patch 825 SHA256 30764cbff6d176d96780ffd8366b457081e1b2896f3248a9dbbc0206c94be675 SHA512 96bdedabcf2e5db1d37f87017c0c436acad97f4ba43a9a2f3c2bb920d8d764dfbc6a3825334e90ed19729870a283a658c24bea5f6ca0ac588a3f9b4bfae9a302 WHIRLPOOL 8d281b4f459167f68a30e485856970f67c6b0be19b58a74b9ba95c07aa2c4848ebae17f333a7d5c675fa10c0ac0f5912df5bd269f6d8dea47e2c1c8da6136235 +AUX shogun-5.0.0-fix-buildsystem.patch 2889 SHA256 97a9ebdde016ca2d6b4d0b2dd09f14b2bfc06a265ca679146e09ba7ff4a58a87 SHA512 3119a95e8fe76804eb113361e09260bbb951679faeb3360d378c0a9afcdbf322ac75f02da6e4c799102949abbd97006f2bbb7550b5f5b01fa8b4335ac530f377 WHIRLPOOL 10af9e23e3c0747f7ece19149e91a4b90e7619cd1ec315dbdcc402e778ec7ccad65deceaf6bd705c598fee8887ef6a852e95e02e7736e7e93fd6be0f297dc73d +DIST shogun-5.0.0.tar.bz2 2448509 SHA256 e82c6a58db9db6624192b018750b0e41f793481791fdc9a6d328bf278d0ae70d SHA512 fa8d9dee4596acce12022540a6927cbdb62e08f8468c8be3790de07ebf3a53055032bcc532b28334ca83284c38f2b0153602634f12bafe4019acb9121b9ff236 WHIRLPOOL 532058c44680909f3717785035c13fb3cf48efec22924101975d80990cb2a9e151814c673ad1a03fa33e363abbaf21fc9edc99d7d25686cc67e907547217bf69 +DIST shogun-data-0.9.tar.bz2 287533841 SHA256 691dd37ccc9bdd4f56d6b7a8e061e80567c241219d70210f8148bc4b7b815559 SHA512 ab501640e2db650603899c857866b451fac5c7bbbc7b4ef98559581928869cea49aa326dfca1bb398eee7ebc8843dcc8ee3105c9f462718f1af672aac6b9340a WHIRLPOOL 19aa7a6d84be9ac7d8aaf7fb12747e17e0ba5a7ec8770b83cc1833b07cd1c6c397684a96eb8ebe709d544967ffaf23bcfbeea52dc8ddedf487fcf54a6d2b3ef7 +EBUILD shogun-5.0.0.ebuild 3854 SHA256 be47b48614e18122648b2f9d4701508b485f1cb5e1c3413ccfd10fa8c40ce761 SHA512 24d638e5c341426c2264b4a16734cb29b77a116da212ce34f68b1e09cce567b926472563b317e8e11d877a1698a2b072b1996aa97bd5a62f521e39654ee8b412 WHIRLPOOL 69aba923048c4a7343481b4f49f3cbc2173de37b4b97cc1fa553c674f46c7b1504dc5541a62b0586ea2150d6ef40b0b870e915e91112815486eb55b414a2c1ca +MISC ChangeLog 3541 SHA256 43b4ca59cc67608ebd0bcc79ec7b4927171b8a956bf9c722b6515fba2fc6a66e SHA512 4c3bb4f8546cf2e62f97ef3adb7ead98ecb6016562e175e6183484cb85260f02e55f47d78f7af14bc65f0d025b7b542e4424affbf958aa611ea1d85706236380 WHIRLPOOL 240d5e1f8e5e395452b2d76f2feb4c8b7e969cf53116b84c799531b931fae99cc4fa5911f284edbe86b0664ab406b18eca2dbc2fd4276a96ea65406c9a60f301 +MISC ChangeLog-2015 1823 SHA256 9a878739985928327fd518ff87ca7e0e1d437a77763f49aa35b98a034871b0dd SHA512 cd7db9d1890d582829acca75709da6cb01ee208426306cd8ecdf24ab3d3b7c40f17db36a250a043a26d5e32a289413ce86a8f6c3dc980f201a9c1f4cc9e538c1 WHIRLPOOL 9cade256956523411e9588d23d1c116ba8ba0b468164e000f3aaca6344a286e976f2fcd8d97cb9f18b1d595a78694e8376a2b48b43476254b2111b2ec343a2fc +MISC metadata.xml 1627 SHA256 d338147b78ac563de703f1fa60d157ea9de0541fe8b87bd3e43632223ce7a34e SHA512 babaf4f8a5d4a7d83e678d2ba1cb4f29a15a928740e7c2b312fe03ffd2c909f1f867a071573954269a03bd8f915f38f82c4c11782573ae08be6ec053cf3b54c6 WHIRLPOOL fc01a70c3c89bfb7137f79094e994d1d97a429b7c4fb662f1149548adb6c255524f6582f8fa77ffac4e6f673830135eb48f326f85d4f595122ad76949b871c01 diff --git a/sci-libs/shogun/files/shogun-4.1.0-remove-C-linkage.patch b/sci-libs/shogun/files/shogun-4.1.0-remove-C-linkage.patch new file mode 100644 index 000000000000..08edcfac97a2 --- /dev/null +++ b/sci-libs/shogun/files/shogun-4.1.0-remove-C-linkage.patch @@ -0,0 +1,24 @@ +Prevent C linkage errors due to templates in extern "C" blocks: +* /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/bits/cpp_type_traits.h:85:3: error: template with C linkage +* template<bool> +* ^ +* /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/bits/cpp_type_traits.h:89:3: error: template specialization with C linkage +* template<> +* ^ +extern "C" blocks can be removed in shogun, as R internally correctly protects C symbols + +--- shogun-4.1.0/src/interfaces/r_modular/sg_print_functions.cpp ++++ shogun-4.1.0/src/interfaces/r_modular/sg_print_functions.cpp +@@ -1,4 +1,3 @@ +-extern "C" { + #include <R.h> + #include <Rinternals.h> + #include <Rdefines.h> +@@ -7,7 +6,6 @@ + #include <Rinterface.h> + #include <R_ext/RS.h> + #include <R_ext/Error.h> +-} + + #include <shogun/base/SGObject.h> + #include <stdio.h> diff --git a/sci-libs/shogun/files/shogun-5.0.0-fix-buildsystem.patch b/sci-libs/shogun/files/shogun-5.0.0-fix-buildsystem.patch new file mode 100644 index 000000000000..1eb7cd075ece --- /dev/null +++ b/sci-libs/shogun/files/shogun-5.0.0-fix-buildsystem.patch @@ -0,0 +1,72 @@ +* Remove setting of user flags +* Remove erroneous bundling of Eigen + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,15 +33,6 @@ + SET(EIGEN_VERSION_MINIMUM 3.1.2) + SET(VIENNACL_VERSION_MINIMUM 1.5.0) + +-# Store system's or distribution's C[XX]FLAGS. +-SET(SYSTEM_C_FLAGS "${CMAKE_C_FLAGS}") +-SET(SYSTEM_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +-STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UC) +-IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) +- SET(CMAKE_C_FLAGS "") +- SET(CMAKE_CXX_FLAGS "") +-ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) +- + # CCACHE + OPTION(ENABLE_CCACHE "Enable ccache for compilation" ON) + FIND_PACKAGE(CCache) +@@ -174,24 +165,6 @@ + SET(COMPILER_WARNINGS "-Wall -Wno-unused-parameter -Wformat -Wformat-security -Wparentheses -Wshadow -Wno-unknown-pragmas -Wno-deprecated") + ENDIF() + +-IF(CMAKE_COMPILER_IS_GNUCXX) +- SET(RELEASE_COMPILER_FLAGS "-fexpensive-optimizations -frerun-cse-after-loop -fcse-follow-jumps -finline-functions -fschedule-insns2 -fthread-jumps -fforce-addr -fstrength-reduce -funroll-loops") +- IF (${MACHINE} MATCHES "x86_64" OR ${MACHINE} MATCHES "i686") +- SET(RELEASE_COMPILER_FLAGS "${RELEASE_COMPILER_FLAGS} -mfpmath=sse") +- ENDIF() +-ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") +- SET(RELEASE_COMPILER_FLAGS "-funroll-loops") +-ENDIF() +-SET(SWIG_CXX_COMPILER_FLAGS "-O0 -g") +-SET(CMAKE_C_FLAGS "${COMPILER_WARNINGS} ${CMAKE_C_FLAGS}") +-SET(CMAKE_CXX_FLAGS "${COMPILER_WARNINGS} ${CMAKE_CXX_FLAGS}") +-SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}") +-SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}") +-SET(CMAKE_C_FLAGS_DISTRIBUTION "-O2") +-SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O2") +-SET(CMAKE_C_FLAGS_DEBUG "-g") +-SET(CMAKE_CXX_FLAGS_DEBUG "-g") +- + OPTION(ENABLE_COVERAGE "Enable code coverage" OFF) + IF(ENABLE_COVERAGE) + IF(NOT CMAKE_COMPILER_IS_GNUCXX) +@@ -617,13 +590,6 @@ + include(external/Eigen3) + LIST(APPEND SYSTEM_INCLUDES ${EIGEN_INCLUDE_DIR}) + ELSE() +- # eigen3 bug related to aliasing operators and self-storing. +- # TODO put in proper reference and version from when this is fixed +- IF(${EIGEN_VERSION} VERSION_GREATER 3.2.90) +- MESSAGE(WARNING "The system Eigen3 version ${EIGEN_VERSION} is buggy, manually bundling.") +- include(external/Eigen3) +- ENDIF() +- + LIST(APPEND SYSTEM_INCLUDES ${EIGEN_INCLUDE_DIR}) + ENDIF() + +@@ -957,11 +923,6 @@ + # Respect system's or distribution's C[XX]FLAGS. + OPTION(SWIG_WITH_SYSTEM_CFLAGS "Enable system's C[XX]FLAGS for compilation of swig-binaries" ON) + +-IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) +- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SYSTEM_C_FLAGS}") +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SYSTEM_CXX_FLAGS}") +-ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) +- + IF(SWIG_WITH_SYSTEM_CFLAGS) + SET(SWIG_CXX_COMPILER_FLAGS "${SWIG_CXX_COMPILER_FLAGS} ${SYSTEM_CXX_FLAGS}") + ENDIF(SWIG_WITH_SYSTEM_CFLAGS) diff --git a/sci-libs/shogun/metadata.xml b/sci-libs/shogun/metadata.xml new file mode 100644 index 000000000000..88454ce87eb6 --- /dev/null +++ b/sci-libs/shogun/metadata.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <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="R">Enable support for <pkg>dev-lang/R</pkg></flag> + <flag name="octave">Enable support for <pkg>sci-mathematics/octave</pkg></flag> + <flag name="opencl">Enable support for building against OpenCL</flag> + </use> +</pkgmetadata> diff --git a/sci-libs/shogun/shogun-5.0.0.ebuild b/sci-libs/shogun/shogun-5.0.0.ebuild new file mode 100644 index 000000000000..faf9808fd09f --- /dev/null +++ b/sci-libs/shogun/shogun-5.0.0.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5} ) + +inherit cmake-utils flag-o-matic python-single-r1 toolchain-funcs versionator + +MYPV=$(get_version_component_range 1-2) +MYPD=${PN}-data-0.9 + +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="cpu_flags_x86_sse doc examples lua octave opencl 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 + 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:0= + sys-libs/zlib + virtual/blas + virtual/cblas + virtual/lapack + lua? ( dev-lang/lua:0 ) + octave? ( >=sci-mathematics/octave-4.2.0:=[hdf5] ) + opencl? ( virtual/opencl ) + python? ( + ${PYTHON_DEPS} + dev-python/numpy[${PYTHON_USEDEP}] + ) + R? ( dev-lang/R ) + ruby? ( dev-ruby/narray )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( + >=app-doc/doxygen-1.8.13-r1[dot] + dev-python/sphinx + ) + lua? ( >=dev-lang/swig-3.0.12 ) + octave? ( >=dev-lang/swig-3.0.12 ) + python? ( + >=dev-lang/swig-3.0.12 + test? ( + sci-libs/scipy + ) + ) + R? ( >=dev-lang/swig-3.0.12 ) + ruby? ( >=dev-lang/swig-3.0.12 ) + 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}"/${PN}-5.0.0-fix-buildsystem.patch + "${FILESDIR}"/${PN}-4.1.0-remove-C-linkage.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)" + + append-cppflags "$($(tc-getPKG_CONFIG) --cflags cblas)" + + local mycmakeargs=( + -DCMAKE_SKIP_RPATH=ON + -DCMAKE_SKIP_INSTALL_RPATH=ON + -DLIB_INSTALL_DIR=$(get_libdir) + -DENABLE_TESTING=$(usex test) + -DBUILD_EXAMPLES=$(usex examples) + -DDISABLE_SSE=$(usex !cpu_flags_x86_sse) + -DCMAKE_DISABLE_FIND_PACKAGE_Pandoc=ON + $(cmake-utils_use_find_package doc Sphinx) + $(cmake-utils_use_find_package doc Doxygen) + + # Features: + -DENABLE_COVERAGE=OFF + -DENABLE_COLPACK=ON + -DENABLE_PROTOBUF=ON + -DENABLE_PYTHON_DEBUG=OFF + -DENABLE_VIENNACL=$(usex opencl) + -DUSE_ARPREC=ON + -DUSE_HDF5=ON + + # Bindings: + -DJavaModular=OFF + -DPerlModular=OFF + -DCSharpModular=OFF + -DLuaModular=$(usex lua) + -DOctaveModular=$(usex octave) + -DPythonModular=$(usex python) + -DRModular=$(usex R) + -DRubyModular=$(usex ruby) + + # Disable bundled libs + -DBUNDLE_COLPACK=OFF + -DBUNDLE_JSON=OFF + -DBUNDLE_NLOPT=OFF + ) + 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 && cmake-utils_src_compile -C doc +} + +src_install() { + cmake-utils_src_install + + if use doc; then + local i + for i in lua octave python R ruby; do + if use $i; then + docinto html/${i,}_modular + dodoc -r "${BUILD_DIR}"/src/interfaces/${i,}_modular/modshogun/doxygen_xml/. + fi + done + fi +} |