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 77CB6158086 for ; Wed, 6 Oct 2021 01:13:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E6F19E0957; Wed, 6 Oct 2021 01:13:31 +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 CC567E0957 for ; Wed, 6 Oct 2021 01:13:31 +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 CC25F34327A for ; Wed, 6 Oct 2021 01:13:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 53E6EE5 for ; Wed, 6 Oct 2021 01:13:27 +0000 (UTC) From: "Theo Anderson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Theo Anderson" Message-ID: <1633469053.fcc3d7d78eda6e965820a39b9bbcb062cbd1549d.telans@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/R-packages.eclass X-VCS-Directories: eclass/ X-VCS-Committer: telans X-VCS-Committer-Name: Theo Anderson X-VCS-Revision: fcc3d7d78eda6e965820a39b9bbcb062cbd1549d X-VCS-Branch: master Date: Wed, 6 Oct 2021 01:13:27 +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: ba2b0dfa-ecd9-4fbf-836d-39bdf8bfc77e X-Archives-Hash: 9de25bc85798538ef7bf1a27434fb6ee commit: fcc3d7d78eda6e965820a39b9bbcb062cbd1549d Author: Alessandro Barbieri gmail com> AuthorDate: Tue Oct 5 21:23:30 2021 +0000 Commit: Theo Anderson posteo de> 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 +}