diff options
author | 2018-09-04 11:39:50 +0200 | |
---|---|---|
committer | 2018-09-04 11:39:50 +0200 | |
commit | 49bf91cb6d8c71e1589dd9240ebf46d12181401b (patch) | |
tree | 43f6411b65ed378f5394ea25587c2c01cccfa48f | |
parent | sci-libs/trilinos: fix compilation with superlu 5 (diff) | |
download | sci-49bf91cb6d8c71e1589dd9240ebf46d12181401b.tar.gz sci-49bf91cb6d8c71e1589dd9240ebf46d12181401b.tar.bz2 sci-49bf91cb6d8c71e1589dd9240ebf46d12181401b.zip |
sci-libs/spams-python: new package
Package-Manager: Portage-2.3.48, Repoman-2.3.10
-rw-r--r-- | sci-libs/spams-python/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/spams-python/metadata.xml | 24 | ||||
-rw-r--r-- | sci-libs/spams-python/spams-python-2.6.ebuild | 55 |
3 files changed, 80 insertions, 0 deletions
diff --git a/sci-libs/spams-python/Manifest b/sci-libs/spams-python/Manifest new file mode 100644 index 000000000..a86d9e583 --- /dev/null +++ b/sci-libs/spams-python/Manifest @@ -0,0 +1 @@ +DIST spams-python-2.6.tar.gz 1721573 BLAKE2B b172ecb06b1bd008e9c9a7cd6b8ba41468dc5797c3f7cf7f025c49c19b78911ca346578ee7e87e6b3dfcfc97eea8e5625a4162844bc183a83f1460dbae45c3a5 SHA512 e9ddd53eacaf95aca2d1dc3e84403bf30705ec5b87969480a710ec529c7a503de7526b66bf7060e958ae090d0d25ffa82593e7bc0c902516a5c04be11f853941 diff --git a/sci-libs/spams-python/metadata.xml b/sci-libs/spams-python/metadata.xml new file mode 100644 index 000000000..d1fbb3db3 --- /dev/null +++ b/sci-libs/spams-python/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>horea.christ@gmail.com</email> + <name>Horea Christian</name> + </maintainer> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <longdescription lang="en"> + SPAMS (SPArse Modeling Software) is an optimization toolbox for solving + various sparse estimation problems, such as: Dictionary learning and + matrix factorization (NMF, sparse PCA, ...); solving sparse decomposition + problems with LARS, coordinate descent, OMP, SOMP, proximal methods; and + Solving structured sparse decomposition problems (l1/l2, l1/linf, sparse + group lasso, tree-structured regularization, structured sparsity with + overlapping groups,...). + </longdescription> + <upstream> + <remote-id type="github">samuelstjean/spams-python</remote-id> + </upstream> +</pkgmetadata> diff --git a/sci-libs/spams-python/spams-python-2.6.ebuild b/sci-libs/spams-python/spams-python-2.6.ebuild new file mode 100644 index 000000000..eb5d40777 --- /dev/null +++ b/sci-libs/spams-python/spams-python-2.6.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 toolchain-funcs + +DESCRIPTION="Optimization toolbox for solving various sparse estimation problems" +HOMEPAGE="http://spams-devel.gforge.inria.fr/index.html" +SRC_URI="https://github.com/samuelstjean/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +IUSE="" +KEYWORDS="~amd64" + +DEPEND=" + dev-python/numpy[${PYTHON_USEDEP}] + virtual/blas + virtual/lapack + " +RDEPEND="${DEPEND} + sci-libs/scipy[${PYTHON_USEDEP}] + " + +pc_libdir() { + $(tc-getPKG_CONFIG) --libs-only-L $@ | \ + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^,||' +} + +pc_libs() { + $(tc-getPKG_CONFIG) --libs-only-l $@ | \ + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \ + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \ + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||' +} +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && tc-check-openmp +} + +python_prepare_all() { + local libdir="${EPREFIX}"/usr/$(get_libdir) + MY_LAPACK=$(pc_libs lapack) + MY_BLAS=$(pc_libs blas) + MY_LIBDIRS="$(pc_libdir blas lapack)'${libdir}'" + sed -i -e "s/'blas', 'lapack'/'${MY_BLAS}', '${MY_LAPACK}'/g" setup.py || die + sed -i -e "s|libdirs = \[\]|libdirs = [${MY_LIBDIRS}]|g" setup.py || die + distutils-r1_python_prepare_all +} |