public inbox for gentoo-guru@lists.gentoo.org
 help / color / mirror / Atom feed
From: Robert Greener <me@r0bert.dev>
To: gentoo-guru@lists.gentoo.org
Cc: Robert Greener <me@r0bert.dev>
Subject: [gentoo-guru] [RFC PATCH 3/3] eclass/R-packages: Add CRAN_PV
Date: Tue, 5 Jul 2022 07:16:32 +0000	[thread overview]
Message-ID: <010b0181cd37c44f-78394810-f98f-4283-bd86-ea865d7c6fd0-000000@eu-west-2.amazonses.com> (raw)
In-Reply-To: <20220705071539.2463760-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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass
index a9bb32980..144734b21 100644
--- a/eclass/R-packages.eclass
+++ b/eclass/R-packages.eclass
@@ -21,9 +21,10 @@ esac
 
 EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_postinst
 
+CRAN_PV=${CRAN_PV:-$PV}
 SRC_URI="
-	https://cran.r-project.org/src/contrib/${PN//_/.}_${PV}.tar.gz
-	https://cran.r-project.org/src/contrib/Archive/${PN//_/.}/${PN//_/.}_${PV}.tar.gz
+	https://cran.r-project.org/src/contrib/${PN//_/.}_${CRAN_PV}.tar.gz
+	https://cran.r-project.org/src/contrib/Archive/${PN//_/.}/${PN//_/.}_${CRAN_PV}.tar.gz
 "
 HOMEPAGE="https://cran.r-project.org/package=${PN//_/.}"
 
-- 
2.35.1



  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 ` Robert Greener [this message]
2022-07-06 12:21 ` [gentoo-guru] [RFC PATCH v2 0/4] eclass/R-packages: improvements Robert Greener
2022-07-06 12:21   ` [gentoo-guru] [RFC PATCH v2 1/4] eclass/R-packages: Add CRAN_PV Robert Greener
2022-07-11  5:04     ` [gentoo-guru] " 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=010b0181cd37c44f-78394810-f98f-4283-bd86-ea865d7c6fd0-000000@eu-west-2.amazonses.com \
    --to=me@r0bert.dev \
    --cc=gentoo-guru@lists.gentoo.org \
    /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