dev-lang/perl: Commonize SHORT_PV/MY_P/MY_PV calculation
authorKent Fredric <kentnl@gentoo.org>
Sun, 21 May 2017 13:44:29 +0000 (01:44 +1200)
committerKent Fredric <kentnl@gentoo.org>
Sun, 21 May 2017 15:05:00 +0000 (03:05 +1200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

dev-lang/perl/perl-5.26.9999.ebuild

index 5162f54847097fe0bf76b7124ef24133c3983074..58540d5d313e38af818958b201e753a675047f6f 100644 (file)
@@ -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"