From 5c61b9e3558712d0ac800e56eb0347c66ae51582 Mon Sep 17 00:00:00 2001 From: Robert Greener Date: Wed, 6 Jul 2022 13:21:39 +0100 Subject: [PATCH] eclass/R-packages: Add CRAN_PV Add a variable CRAN_PV which defaults to PV, but can be overridden in the ebuild. This is useful for the case where the version number is something like "1.2-24" as it often is with R packages, this would mean that a variable like "CRAN_PV=$(ver_rs 2 -)" could be defined in the ebuild, which is used in the SRC_URI of the eclass. If CRAN_PV isn't defined, it just defaults to PV. Signed-off-by: Robert Greener --- eclass/R-packages.eclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass index aed8cce84c..982920f437 100644 --- a/eclass/R-packages.eclass +++ b/eclass/R-packages.eclass @@ -21,7 +21,9 @@ esac EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst -SRC_URI="mirror://cran/src/contrib/${PN}_${PV}.tar.gz" +CRAN_PV=${CRAN_PV:-$PV} + +SRC_URI="mirror://cran/src/contrib/${PN}_${CRAN_PV}.tar.gz" HOMEPAGE="https://cran.r-project.org/package=${PN}" SLOT="0"