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 <me@r0bert.dev>
This commit is contained in:
Robert Greener
2022-07-06 13:21:39 +01:00
parent 66b0a79cff
commit 5c61b9e355

View File

@@ -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"