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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A9EEC158095 for ; Tue, 12 Jul 2022 12:06:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 817C2E0E1A; Tue, 12 Jul 2022 12:06:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1BFEAE0F75 for ; Tue, 12 Jul 2022 12:06:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C2D1F340C96 for ; Tue, 12 Jul 2022 12:06:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E6E4F474 for ; Tue, 12 Jul 2022 12:06:34 +0000 (UTC) From: "Robert Greener" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robert Greener" Message-ID: <1657627531.5c61b9e3558712d0ac800e56eb0347c66ae51582.me@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: eclass/ X-VCS-Repository: repo/proj/guru X-VCS-Files: eclass/R-packages.eclass X-VCS-Directories: eclass/ X-VCS-Committer: me X-VCS-Committer-Name: Robert Greener X-VCS-Revision: 5c61b9e3558712d0ac800e56eb0347c66ae51582 X-VCS-Branch: dev Date: Tue, 12 Jul 2022 12:06:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: db1303c5-68b4-4e0c-9ef8-6d2710c183cb X-Archives-Hash: c90f619595ff39378833b90d14768626 commit: 5c61b9e3558712d0ac800e56eb0347c66ae51582 Author: Robert Greener r0bert dev> AuthorDate: Wed Jul 6 12:21:39 2022 +0000 Commit: Robert Greener r0bert dev> CommitDate: Tue Jul 12 12:05:31 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5c61b9e3 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 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"