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 ECEE9138330 for ; Sat, 13 Jan 2018 04:08:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F1D2EE0942; Sat, 13 Jan 2018 04:08:11 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C27DFE0942 for ; Sat, 13 Jan 2018 04:08:11 +0000 (UTC) Received: from germanium (p212068.mirai.ne.jp [210.172.212.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: heroxbd) by smtp.gentoo.org (Postfix) with ESMTPSA id D8CEE335C36; Sat, 13 Jan 2018 04:08:09 +0000 (UTC) From: Benda Xu To: Marco Clocchiatti Cc: gentoo-science@lists.gentoo.org Subject: [gentoo-science] Re: new eclass to install R modules, such as Rcpp. References: Date: Sat, 13 Jan 2018 13:06:37 +0900 In-Reply-To: (Marco Clocchiatti's message of "Fri, 12 Jan 2018 15:41:21 +0100") Message-ID: <87mv1itnaq.fsf@gentoo.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-science@lists.gentoo.org Reply-to: gentoo-science@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain X-Archives-Salt: 305fb2c8-21cc-4544-888c-948d7c064204 X-Archives-Hash: 85708810b4068a462539a2682a6bf283 Hi Marco, Let's move the discussion to the gentoo-science public mailing list. Replied below. Marco Clocchiatti 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