From 8292b49e51b79d2d0b2f841d56efd643e13b45ac Mon Sep 17 00:00:00 2001 From: Aisha Tammy Date: Tue, 29 Sep 2020 14:09:37 +0000 Subject: sci-libs/mlpack: version bump to 3.4.1 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Aisha Tammy --- sci-libs/mlpack/Manifest | 2 +- sci-libs/mlpack/files/mlpack-1.0.4-libdir.patch | 13 --- sci-libs/mlpack/files/mlpack-1.0.8-uint32_t.patch | 16 ---- sci-libs/mlpack/metadata.xml | 25 +++-- sci-libs/mlpack/mlpack-1.0.8.ebuild | 56 ----------- sci-libs/mlpack/mlpack-3.4.1.ebuild | 112 ++++++++++++++++++++++ 6 files changed, 131 insertions(+), 93 deletions(-) delete mode 100644 sci-libs/mlpack/files/mlpack-1.0.4-libdir.patch delete mode 100644 sci-libs/mlpack/files/mlpack-1.0.8-uint32_t.patch delete mode 100644 sci-libs/mlpack/mlpack-1.0.8.ebuild create mode 100644 sci-libs/mlpack/mlpack-3.4.1.ebuild diff --git a/sci-libs/mlpack/Manifest b/sci-libs/mlpack/Manifest index d596691cd..9786cb473 100644 --- a/sci-libs/mlpack/Manifest +++ b/sci-libs/mlpack/Manifest @@ -1 +1 @@ -DIST mlpack-1.0.8.tar.gz 1141590 BLAKE2B 77410f64b5f300c98e9af9082d1b511323542ae61d4c7cd40f5a5350b199e3ad3f0e1880a46d50c682b99c4d0c6338709610190ab0975b12c0719fa6490d0d42 SHA512 ab06affb6fe60370d5c741962092926cb09b909a288c9f0bd7b392307f5f994d270bcee166ceba8fab4ee7e6389ce6738620ecd4ebd4af089107d0b0ac4147bb +DIST mlpack-3.4.1.tar.gz 5782241 BLAKE2B d5a1050489c61a934330a0f3d1142e7949f7fdd9c31f679d7963208fc8aaea8fd8c0eb7e45920c3799712cb059808c75098e31b913557ec3c2af2f1d32e561f0 SHA512 53de83c2ca36829a0ae952357b25bee44bf85d01c2414848fe2c5f09ebe4732bd0a1d3c72de202646345fa66964fbc3247ddeb6a327e87459c036a215fe55fc2 diff --git a/sci-libs/mlpack/files/mlpack-1.0.4-libdir.patch b/sci-libs/mlpack/files/mlpack-1.0.4-libdir.patch deleted file mode 100644 index c22c8110a..000000000 --- a/sci-libs/mlpack/files/mlpack-1.0.4-libdir.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- mlpack-1.0.4/src/mlpack/CMakeLists.txt.old 2013-02-08 16:45:45.218117489 -0500 -+++ mlpack-1.0.4/src/mlpack/CMakeLists.txt 2013-02-08 16:45:59.938263211 -0500 -@@ -62,8 +62,8 @@ - # be entered... - install(TARGETS mlpack - RUNTIME DESTINATION bin -- LIBRARY DESTINATION lib -- ARCHIVE DESTINATION lib) -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) - - # For 'make test'. - add_custom_target(test diff --git a/sci-libs/mlpack/files/mlpack-1.0.8-uint32_t.patch b/sci-libs/mlpack/files/mlpack-1.0.8-uint32_t.patch deleted file mode 100644 index f2dbc4176..000000000 --- a/sci-libs/mlpack/files/mlpack-1.0.8-uint32_t.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- src/mlpack/core/math/random.hpp 2014-02-15 20:47:24.897408021 +0200 -+++ src/mlpack/core/math/random.hpp 2014-02-15 20:49:36.190907865 +0200 -@@ -26,10 +26,13 @@ - #include - - #include -+#include - - namespace mlpack { - namespace math /** Miscellaneous math routines. */ { - -+using boost::uint32_t; -+ - // Annoying Boost versioning issues. - #include - diff --git a/sci-libs/mlpack/metadata.xml b/sci-libs/mlpack/metadata.xml index 1ce896b0f..f587c48a7 100644 --- a/sci-libs/mlpack/metadata.xml +++ b/sci-libs/mlpack/metadata.xml @@ -1,16 +1,27 @@ + + gentoo@aisha.cc + Aisha Tammy + sci@gentoo.org Gentoo Science Project -mlpack is a C++ machine learning library with emphasis on -scalability, speed, and ease-of-use. Its aim is to make machine -learning possible for novice users by means of a simple, consistent -API, while simultaneously exploiting C++ language features to -provide maximum performance and maximum flexibility for expert -users. - + mlpack is a C++ machine learning library with emphasis on + scalability, speed, and ease-of-use. Its aim is to make machine + learning possible for novice users by means of a simple, consistent + API, while simultaneously exploiting C++ language features to + provide maximum performance and maximum flexibility for expert + users. + + + build with armadillo dbug symbols + build go bindings + build julia bindings + build matlab bindings + build R bindings + diff --git a/sci-libs/mlpack/mlpack-1.0.8.ebuild b/sci-libs/mlpack/mlpack-1.0.8.ebuild deleted file mode 100644 index 9ef9e87ce..000000000 --- a/sci-libs/mlpack/mlpack-1.0.8.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit cmake-utils eutils toolchain-funcs - -DESCRIPTION="Scalable c++ machine learning library" -HOMEPAGE="http://www.mlpack.org/" -SRC_URI="http://www.mlpack.org/files/${P}.tar.gz" - -LICENSE="LGPL-3" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="debug doc" - -RDEPEND=" - dev-libs/boost - dev-libs/libxml2 - >=sci-libs/armadillo-3.6.0[lapack]" - -DEPEND="${DEPEND} - app-text/txt2man - virtual/pkgconfig - doc? ( app-doc/doxygen )" - -DOCS=( HISTORY.txt ) - -src_prepare() { - epatch \ - "${FILESDIR}/${PN}-1.0.4-libdir.patch" \ - "${FILESDIR}/${PN}-1.0.8-uint32_t.patch" - sed -i \ - -e "s:share/doc/mlpack:share/doc/${PF}:" \ - -e 's/-O3//g' \ - CMakeLists.txt || die - sed -i \ - -e "s|\(set(ARMADILLO_LIBRARIES\)|\1 $($(tc-getPKG_CONFIG) --libs blas lapack)|" \ - CMake/FindArmadillo.cmake || die -} - -src_configure() { - local mycmakeargs=( - $(cmake-utils_use debug DEBUG) - $(cmake-utils_use debug PROFILE) - ) - cmake-utils_src_configure -} - -src_compile() { - cmake-utils_src_compile all $(use doc && echo doc) -} - -src_test() { - emake -C "${BUILD_DIR}" test -} diff --git a/sci-libs/mlpack/mlpack-3.4.1.ebuild b/sci-libs/mlpack/mlpack-3.4.1.ebuild new file mode 100644 index 000000000..661299d6d --- /dev/null +++ b/sci-libs/mlpack/mlpack-3.4.1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit cmake python-single-r1 toolchain-funcs + +DESCRIPTION="scalable C++ machine learning library" +HOMEPAGE="http://www.mlpack.org/" +SRC_URI="http://www.mlpack.org/files/${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE+="arma-debug debug doc go julia matlab openmp profile R test" +REQUIRED_USE="${PYTHON_REQUIRED_USE} arma-debug? ( debug )" +RESTRICT="!test? ( test )" + +CDEPEND=" + ${PYTHON_DEPS} + julia? ( || ( + dev-lang/julia + dev-lang/julia-bin + ) + ) + go? ( dev-lang/go ) + R? ( dev-lang/R ) +" + +RDEPEND=" + ${CDEPEND} + $(python_gen_cond_dep ' + dev-libs/boost[${PYTHON_USEDEP}] + dev-libs/libxml2[${PYTHON_USEDEP}] + ') + dev-python/pandas + dev-python/cython + dev-python/numpy + dev-libs/stb + >=sci-libs/armadillo-8.4.0[arpack,blas,lapack] + sci-libs/ensmallen +" +DEPEND="${RDEPEND}" +BDEPEND=" + ${CDEPEND} + app-text/txt2man + virtual/pkgconfig + doc? ( + app-doc/doxygen + dev-libs/mathjax + ) + test? ( $( python_gen_cond_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + ') + ) +" + +pkg_setup() { + elog "If you want to build matlab bindings then you" + elog "need to make sure that matlab has been installed" + elog "prior to building this package and it is available" + elog "in the standard locations to be found by" + elog "CMake, library finders, header includes and other" + elog "trinkets that are used while compiling." + elog "Matlab will not be entertained as a first class" + elog "citizen until we have enough personnel" + + python-single-r1_pkg_setup +} + +src_prepare() { + sed -i \ + -e "s:share/doc/mlpack:share/doc/${PF}:" \ + -e 's/-O3//g' \ + CMakeLists.txt || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DDISABLE_DOWNLOADS=ON + -DDOWNLOAD_ENSMALLEN=OFF + -DDOWNLOAD_STB_IMAGE=OFF + -DBUILD_WITH_COVERAGE=OFF + -DBUILD_PYTHON_BINDINGS=ON + -DBUILD_SHARED_LIBS=ON + -DBUILD_CLI_EXECUTABLES=ON + -DTEST_VERBOSE=$(usex test) + -DBUILD_TESTS=$(usex test) + -DDEBUG=$(usex debug) + -DPROFILE=$(usex profile) + -DARMA_EXTRA_DEBUG=$(usex arma-debug) + -DUSE_OPENMP=$(usex openmp) + -DMATLAB_BINDINGS=$(usex matlab) + -DBUILD_GO_SHLIB=$(usex go) + -DBUILD_JULIA_BINDINGS=$(usex julia) + -DBUILD_GO_BINDINGS=$(usex go) + -DBUILD_R_BINDINGS=$(usex R) + -DBUILD_MARKDOWN_BINDINGS=$(usex doc) + -DMATHJAX=$(usex doc) + ${EXTRA_ECONF[@]} + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + + python_optimize +} -- cgit v1.2.3-65-gdbad