1 |
Hi Marco, |
2 |
|
3 |
Let's move the discussion to the gentoo-science public mailing list. |
4 |
|
5 |
Replied below. |
6 |
|
7 |
Marco Clocchiatti <ziapannocchia@×××××.com> writes: |
8 |
|
9 |
> In gentoo there is no way to install R modules, such as Rcpp |
10 |
> http://rcpp.org. |
11 |
> |
12 |
> I think it should be easy to prepare an ebuild to do the trick. |
13 |
> perhaps, the best way should be to have a specific eclass. |
14 |
> The following lines may be sufficent to prepare a basic Rutils.eclass |
15 |
> to install R modules: |
16 |
> |
17 |
> ... |
18 |
> cloc3Lnv ~ # cat /usr/local/portage/eclass/Rutils.eclass |grep -v ^#|grep -v ^$ |
19 |
> EXPORT_FUNCTIONS src_unpack src_compile src_install |
20 |
> DEPEND="dev-lang/R" |
21 |
> Rutils_src_unpack() { |
22 |
> mkdir -p "$S" |
23 |
> } |
24 |
> Rutils_src_compile() { |
25 |
> CMD="install.packages(pkgs='${PN}',repos='${CRAN_REPO_URI}', lib='${S}')" |
26 |
> /usr/bin/R -q -e "$CMD" |
27 |
> } |
28 |
> Rutils_src_install() { |
29 |
> R_LIBRARY="${ED}/usr/lib/R/library" |
30 |
> mkdir -p "$R_LIBRARY" |
31 |
> mv "${PN}" "${R_LIBRARY}" |
32 |
> } |
33 |
> ... |
34 |
> |
35 |
> This eclass may be used by ebuilds in this way: |
36 |
> |
37 |
> ... |
38 |
> cloc3Lnv ~ # cat /usr/local/portage/sci-misc/Rcpp/Rcpp-9999.ebuild |
39 |
> |grep -v ^#|grep -v ^$ |
40 |
> EAPI=6 |
41 |
> inherit Rutils |
42 |
> DESCRIPTION="Seamless R and C++ Integration" |
43 |
> HOMEPAGE="http://rcpp.org" |
44 |
> SRC_URI="" |
45 |
> CRAN_REPO_URI="https://ftp.gwdg.de/pub/misc/cran" |
46 |
> LICENSE="GPL-2" |
47 |
> SLOT="0" |
48 |
> KEYWORDS="~amd64 ~x86" |
49 |
> IUSE="" |
50 |
> DEPEND=" |
51 |
> " |
52 |
> RDEPEND="${CDEPEND} |
53 |
> " |
54 |
> |
55 |
> Please consider the opportunity to add a Rutils.eclass to portage. |
56 |
|
57 |
Thanks for the suggestion! That's what we are doing in R_Overlay, |
58 |
|
59 |
https://wiki.gentoo.org/wiki/Project:Science/Overlay |
60 |
|
61 |
It is available via layman. It has an eclass very similar to your |
62 |
proposal. |
63 |
|
64 |
https://github.com/gentoo-mirror/R_Overlay/blob/master/eclass/R-packages.eclass |
65 |
|
66 |
The R_Overlay is automatically generated from CRAN and BIOC. |
67 |
|
68 |
Cheers, |
69 |
Benda |