1 |
commit: fcc3d7d78eda6e965820a39b9bbcb062cbd1549d |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Oct 5 21:23:30 2021 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Tue Oct 5 21:24:13 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fcc3d7d7 |
7 |
|
8 |
R-packages.eclass: add SUGGESTED_PACKAGES optfeature |
9 |
|
10 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
11 |
|
12 |
eclass/R-packages.eclass | 11 ++++++++--- |
13 |
1 file changed, 8 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass |
16 |
index a072e5cc2..6cbf9d7d3 100644 |
17 |
--- a/eclass/R-packages.eclass |
18 |
+++ b/eclass/R-packages.eclass |
19 |
@@ -1,9 +1,9 @@ |
20 |
# Copyright 1999-2021 Gentoo Authors |
21 |
# Distributed under the terms of the GNU General Public License v2 |
22 |
|
23 |
-inherit eutils toolchain-funcs |
24 |
+inherit eutils optfeature toolchain-funcs |
25 |
|
26 |
-EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install |
27 |
+EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst |
28 |
|
29 |
SRC_URI="mirror://cran/src/contrib/${PN}_${PV}.tar.gz" |
30 |
HOMEPAGE="https://cran.r-project.org/package=${PN}" |
31 |
@@ -32,7 +32,6 @@ R-packages_src_prepare() { |
32 |
default |
33 |
} |
34 |
|
35 |
- |
36 |
R-packages_src_compile() { |
37 |
MAKEFLAGS="AR=$(tc-getAR) CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" R CMD INSTALL . -l "${WORKDIR}" "--byte-compile" || die |
38 |
} |
39 |
@@ -62,3 +61,9 @@ R-packages_src_install() { |
40 |
insinto "/usr/$(get_libdir)/R/site-library" |
41 |
doins -r "${WORKDIR}/${PN//_/.}" |
42 |
} |
43 |
+ |
44 |
+R-packages_pkg_postinst() { |
45 |
+ if [ -v SUGGESTED_PACKAGES ]; then |
46 |
+ optfeature "having the upstream suggested packages" "${SUGGESTED_PACKAGES}" |
47 |
+ fi |
48 |
+} |