From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8EEAB138334 for ; Tue, 4 Sep 2018 09:40:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 67DC1E0824; Tue, 4 Sep 2018 09:40:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 259B1E0824 for ; Tue, 4 Sep 2018 09:40:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F3FE2335C07 for ; Tue, 4 Sep 2018 09:40:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 00FFE3C3 for ; Tue, 4 Sep 2018 09:40:01 +0000 (UTC) From: "Horea Christian" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Horea Christian" Message-ID: <1536053990.49bf91cb6d8c71e1589dd9240ebf46d12181401b.chymera@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/spams-python/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/spams-python/metadata.xml sci-libs/spams-python/spams-python-2.6.ebuild X-VCS-Directories: sci-libs/spams-python/ X-VCS-Committer: chymera X-VCS-Committer-Name: Horea Christian X-VCS-Revision: 49bf91cb6d8c71e1589dd9240ebf46d12181401b X-VCS-Branch: master Date: Tue, 4 Sep 2018 09:40:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f3a7343c-cb30-4887-a9b6-84aa66ff11ad X-Archives-Hash: f3cb5bf81a525104e340a8853d666381 commit: 49bf91cb6d8c71e1589dd9240ebf46d12181401b Author: Horea Christian yandex com> AuthorDate: Tue Sep 4 09:39:50 2018 +0000 Commit: Horea Christian gmail com> CommitDate: Tue Sep 4 09:39:50 2018 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=49bf91cb sci-libs/spams-python: new package Package-Manager: Portage-2.3.48, Repoman-2.3.10 sci-libs/spams-python/metadata.xml | 24 ++++++++++++ sci-libs/spams-python/spams-python-2.6.ebuild | 55 +++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) 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 @@ + + + + + horea.christ@gmail.com + Horea Christian + + + sci@gentoo.org + Gentoo Science Project + + + 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,...). + + + samuelstjean/spams-python + + 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 +}