commit:     50d3d23d9c063541f9adce95d4dc7d3e3a4c7042
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Sun May 21 13:44:29 2017 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Sun May 21 15:05:00 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d3d23d

dev-lang/perl: Commonize SHORT_PV/MY_P/MY_PV calculation

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 dev-lang/perl/perl-5.26.9999.ebuild | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/dev-lang/perl/perl-5.26.9999.ebuild 
b/dev-lang/perl/perl-5.26.9999.ebuild
index 5162f548470..58540d5d313 100644
--- a/dev-lang/perl/perl-5.26.9999.ebuild
+++ b/dev-lang/perl/perl-5.26.9999.ebuild
@@ -19,18 +19,19 @@ PERL_BIN_OLDVERSEN=""
 PERL_OLDVERSEN="5.26.0-RC1 5.25.12 5.25.11 5.24.2 5.24.1 5.24.0 5.22.3 5.22.2 
5.22.1 5.22.0"
 if [[ "${PV##*.}" == "9999" ]]; then
        DIST_VERSION=5.26.0-RC1
-       SHORT_PV="${DIST_VERSION%.*}"
        # Devel Releases are not ABI-intercompatible
+       # remove only trailing RC
        SUBSLOT="${DIST_VERSION%-RC*}"
-       MY_P="perl-${DIST_VERSION/_rc/-RC}"
-       MY_PV="${DIST_VERSION%-RC*}"
 else
+       DIST_VERSION="${PV/_rc/-RC}"
        # First 2 digits only
-       SHORT_PV="${PV%.*}"
-       SUBSLOT="${SHORT_PV}"
-       MY_P="perl-${PV/_rc/-RC}"
-       MY_PV="${PV%_rc*}"
+       SUBSLOT="${DIST_VERSION%.*}"
 fi
+SHORT_PV="${DIST_VERSION%.*}"
+# Used only in tar paths
+MY_P="perl-${DIST_VERSION}"
+# Used in library paths
+MY_PV="${DIST_VERSION%-RC*}"
 
 DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
 

Reply via email to