Hi Marco, Let's move the discussion to the gentoo-science public mailing list.
Replied below. Marco Clocchiatti <[email protected]> writes: > In gentoo there is no way to install R modules, such as Rcpp > http://rcpp.org. > > I think it should be easy to prepare an ebuild to do the trick. > perhaps, the best way should be to have a specific eclass. > The following lines may be sufficent to prepare a basic Rutils.eclass > to install R modules: > > ... > cloc3Lnv ~ # cat /usr/local/portage/eclass/Rutils.eclass |grep -v ^#|grep -v > ^$ > EXPORT_FUNCTIONS src_unpack src_compile src_install > DEPEND="dev-lang/R" > Rutils_src_unpack() { > mkdir -p "$S" > } > Rutils_src_compile() { > CMD="install.packages(pkgs='${PN}',repos='${CRAN_REPO_URI}', > lib='${S}')" > /usr/bin/R -q -e "$CMD" > } > Rutils_src_install() { > R_LIBRARY="${ED}/usr/lib/R/library" > mkdir -p "$R_LIBRARY" > mv "${PN}" "${R_LIBRARY}" > } > ... > > This eclass may be used by ebuilds in this way: > > ... > cloc3Lnv ~ # cat /usr/local/portage/sci-misc/Rcpp/Rcpp-9999.ebuild > |grep -v ^#|grep -v ^$ > EAPI=6 > inherit Rutils > DESCRIPTION="Seamless R and C++ Integration" > HOMEPAGE="http://rcpp.org" > SRC_URI="" > CRAN_REPO_URI="https://ftp.gwdg.de/pub/misc/cran" > LICENSE="GPL-2" > SLOT="0" > KEYWORDS="~amd64 ~x86" > IUSE="" > DEPEND=" > " > RDEPEND="${CDEPEND} > " > > Please consider the opportunity to add a Rutils.eclass to portage. Thanks for the suggestion! That's what we are doing in R_Overlay, https://wiki.gentoo.org/wiki/Project:Science/Overlay It is available via layman. It has an eclass very similar to your proposal. https://github.com/gentoo-mirror/R_Overlay/blob/master/eclass/R-packages.eclass The R_Overlay is automatically generated from CRAN and BIOC. Cheers, Benda
