From: Robert Greener <me@r0bert.dev>
To: gentoo-guru@lists.gentoo.org
Cc: Robert Greener <me@r0bert.dev>, cyber@sysrq.in, lssndrbarbieri@gmail.com
Subject: [gentoo-guru] [RFC PATCH v2 1/4] eclass/R-packages: Add CRAN_PV
Date: Wed, 6 Jul 2022 13:21:39 +0100 [thread overview]
Message-ID: <20220706122142.125975-2-me@r0bert.dev> (raw)
In-Reply-To: <20220706122142.125975-1-me@r0bert.dev>
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>
---
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 aed8cce84..982920f43 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"
--
2.35.1
next prev parent reply other threads:[~2024-11-24 22:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220705071539.2463760-1-me@r0bert.dev>
2022-07-05 7:16 ` [gentoo-guru] [RFC PATCH 2/3] eclass/R-packages: substitute _ with . in SRC_URI and HOMEPAGE Robert Greener
2022-07-06 0:49 ` Anna “CyberTailor”
2022-07-05 7:16 ` [gentoo-guru] [RFC PATCH 1/3] eclass/R-packages: Use src/contrib or src/contrib/Archive from main CRAN Robert Greener
2022-07-05 7:58 ` Anna “CyberTailor”
2022-07-07 7:17 ` Alessandro Barbieri
2022-07-08 13:09 ` Robert Greener
2022-07-05 7:16 ` [gentoo-guru] [RFC PATCH 3/3] eclass/R-packages: Add CRAN_PV Robert Greener
2022-07-06 12:21 ` [gentoo-guru] [RFC PATCH v2 0/4] eclass/R-packages: improvements Robert Greener
2022-07-06 12:21 ` Robert Greener [this message]
2022-07-11 5:04 ` [gentoo-guru] Re: [RFC PATCH v2 1/4] eclass/R-packages: Add CRAN_PV Alessandro Barbieri
2022-07-06 12:21 ` [gentoo-guru] [RFC PATCH v2 2/4] eclass/R-packages: Add CRAN_PN variable Robert Greener
2022-07-06 12:21 ` [gentoo-guru] [RFC PATCH v2 3/4] eclass/R-packages: Add CRAN_UPD_DATE and use MRAN Robert Greener
2022-07-06 12:21 ` [gentoo-guru] [RFC PATCH v2 4/4] eclass/R-packages: Add Robert Greener (myself) as author Robert Greener
2022-07-06 12:32 ` [gentoo-guru] [RFC PATCH v2 0/4] eclass/R-packages: improvements Anna “CyberTailor”
2022-07-11 5:06 ` [gentoo-guru] " Alessandro Barbieri
2022-07-12 12:06 ` Robert Greener
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=20220706122142.125975-2-me@r0bert.dev \
--to=me@r0bert.dev \
--cc=cyber@sysrq.in \
--cc=gentoo-guru@lists.gentoo.org \
--cc=lssndrbarbieri@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