public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-libs/mlpack/files/, sci-libs/mlpack/
@ 2020-09-29 14:10 Aisha Tammy
  0 siblings, 0 replies; only message in thread
From: Aisha Tammy @ 2020-09-29 14:10 UTC (permalink / raw
  To: gentoo-commits

commit:     8292b49e51b79d2d0b2f841d56efd643e13b45ac
Author:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
AuthorDate: Tue Sep 29 14:09:37 2020 +0000
Commit:     Aisha Tammy <gentoo <AT> aisha <DOT> cc>
CommitDate: Tue Sep 29 14:10:31 2020 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=8292b49e

sci-libs/mlpack: version bump to 3.4.1

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc>

 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 ++++++++++++++++++++++
 5 files changed, 130 insertions(+), 92 deletions(-)

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 <float.h>
- 
- #include <boost/random.hpp>
-+#include <boost/cstdint.hpp>
- 
- namespace mlpack {
- namespace math /** Miscellaneous math routines. */ {
- 
-+using boost::uint32_t;
-+
- // Annoying Boost versioning issues.
- #include <boost/version.hpp>
- 

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 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
+	<maintainer type="person">
+		<email>gentoo@aisha.cc</email>
+		<name>Aisha Tammy</name>
+	</maintainer>
 	<maintainer type="project">
 		<email>sci@gentoo.org</email>
 		<name>Gentoo Science Project</name>
 	</maintainer>
 	<longdescription lang="en">
-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.
-</longdescription>
+		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.
+	</longdescription>
+	<use>
+		<flag name="arma-debug">build with armadillo dbug symbols</flag>
+		<flag name="go">build go bindings</flag>
+		<flag name="julia">build julia bindings</flag>
+		<flag name="matlab">build matlab bindings</flag>
+		<flag name="R">build R bindings</flag>
+	</use>
 </pkgmetadata>

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
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-29 14:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-29 14:10 [gentoo-commits] proj/sci:master commit in: sci-libs/mlpack/files/, sci-libs/mlpack/ Aisha Tammy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox