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 117CB158086 for ; Tue, 5 Oct 2021 21:24:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 57B6DE092C; Tue, 5 Oct 2021 21:24:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3CFC3E092C for ; Tue, 5 Oct 2021 21:24:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 455D13431CD for ; Tue, 5 Oct 2021 21:24:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7828113F for ; Tue, 5 Oct 2021 21:24:15 +0000 (UTC) From: "Alessandro Barbieri" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alessandro Barbieri" Message-ID: <1633469053.fcc3d7d78eda6e965820a39b9bbcb062cbd1549d.Alessandro-Barbieri@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/R-packages.eclass X-VCS-Directories: eclass/ X-VCS-Committer: Alessandro-Barbieri X-VCS-Committer-Name: Alessandro Barbieri X-VCS-Revision: fcc3d7d78eda6e965820a39b9bbcb062cbd1549d X-VCS-Branch: dev Date: Tue, 5 Oct 2021 21:24:15 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d39028c2-450a-4f27-96ca-8a6c9348aa91 X-Archives-Hash: 2d363077bcffc9ec29203eca17b10993 commit: fcc3d7d78eda6e965820a39b9bbcb062cbd1549d Author: Alessandro Barbieri gmail com> AuthorDate: Tue Oct 5 21:23:30 2021 +0000 Commit: Alessandro Barbieri gmail com> CommitDate: Tue Oct 5 21:24:13 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fcc3d7d7 R-packages.eclass: add SUGGESTED_PACKAGES optfeature Signed-off-by: Alessandro Barbieri gmail.com> eclass/R-packages.eclass | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass index a072e5cc2..6cbf9d7d3 100644 --- a/eclass/R-packages.eclass +++ b/eclass/R-packages.eclass @@ -1,9 +1,9 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -inherit eutils toolchain-funcs +inherit eutils optfeature toolchain-funcs -EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install +EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst SRC_URI="mirror://cran/src/contrib/${PN}_${PV}.tar.gz" HOMEPAGE="https://cran.r-project.org/package=${PN}" @@ -32,7 +32,6 @@ R-packages_src_prepare() { default } - R-packages_src_compile() { MAKEFLAGS="AR=$(tc-getAR) CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR}" "--byte-compile" || die } @@ -62,3 +61,9 @@ R-packages_src_install() { insinto "/usr/$(get_libdir)/R/site-library" doins -r "${WORKDIR}/${PN//_/.}" } + +R-packages_pkg_postinst() { + if [ -v SUGGESTED_PACKAGES ]; then + optfeature "having the upstream suggested packages" "${SUGGESTED_PACKAGES}" + fi +}