public inbox for gentoo-science@lists.gentoo.org
 help / color / mirror / Atom feed
From: Benda Xu <heroxbd@gentoo.org>
To: Marco Clocchiatti <ziapannocchia@gmail.com>
Cc: gentoo-science@lists.gentoo.org
Subject: [gentoo-science] Re: new eclass to install R modules, such as Rcpp.
Date: Sat, 13 Jan 2018 13:06:37 +0900	[thread overview]
Message-ID: <87mv1itnaq.fsf@gentoo.org> (raw)
In-Reply-To: <CAOfEGX+oJUxkc=drxhBQ5Nv4mj7bKvsFpTL6dh7eEAjBW_yDjA@mail.gmail.com> (Marco Clocchiatti's message of "Fri, 12 Jan 2018 15:41:21 +0100")

Hi Marco,

Let's move the discussion to the gentoo-science public mailing list.

Replied below.

Marco Clocchiatti <ziapannocchia@gmail.com> 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


       reply	other threads:[~2018-01-13  4:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOfEGX+oJUxkc=drxhBQ5Nv4mj7bKvsFpTL6dh7eEAjBW_yDjA@mail.gmail.com>
2018-01-13  4:06 ` Benda Xu [this message]
     [not found]   ` <CAOfEGXLq7+=w=Uu9jc6uLfc9wmPmpZhJEAnGzsWqa7Udya_Bzw@mail.gmail.com>
2018-01-16  7:53     ` [gentoo-science] Re: new eclass to install R modules, such as Rcpp Benda Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv1itnaq.fsf@gentoo.org \
    --to=heroxbd@gentoo.org \
    --cc=gentoo-science@lists.gentoo.org \
    --cc=ziapannocchia@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox