diff options
author | Kent Fredric <kentnl@gentoo.org> | 2017-05-22 01:54:15 +1200 |
---|---|---|
committer | Kent Fredric <kentnl@gentoo.org> | 2017-05-22 03:05:01 +1200 |
commit | b36f6d0b0366f389a35e547d4b79881c11e354a3 (patch) | |
tree | 2e38e6eea110f58a05321adb57a407ac8e0e2ff1 /dev-lang/perl/perl-5.26.9999.ebuild | |
parent | dev-lang/perl: Commonize SHORT_PV/MY_P/MY_PV calculation (diff) | |
download | gentoo-b36f6d0b0366f389a35e547d4b79881c11e354a3.tar.gz gentoo-b36f6d0b0366f389a35e547d4b79881c11e354a3.tar.bz2 gentoo-b36f6d0b0366f389a35e547d4b79881c11e354a3.zip |
dev-lang/perl: Use modulo arithmetic to determine subslot from version
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-lang/perl/perl-5.26.9999.ebuild')
-rw-r--r-- | dev-lang/perl/perl-5.26.9999.ebuild | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/dev-lang/perl/perl-5.26.9999.ebuild b/dev-lang/perl/perl-5.26.9999.ebuild index 58540d5d313e..5cc952c7498a 100644 --- a/dev-lang/perl/perl-5.26.9999.ebuild +++ b/dev-lang/perl/perl-5.26.9999.ebuild @@ -19,15 +19,17 @@ 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 - # Devel Releases are not ABI-intercompatible - # remove only trailing RC - SUBSLOT="${DIST_VERSION%-RC*}" else DIST_VERSION="${PV/_rc/-RC}" - # First 2 digits only - SUBSLOT="${DIST_VERSION%.*}" fi SHORT_PV="${DIST_VERSION%.*}" +# Even numbered major versions are ABI intercompatible +# Odd numbered major versions are not +if [[ $(( "${SHORT_PV#*.}" % 2 )) == 1 ]]; then + SUBSLOT="${DIST_VERSION%-RC*}" +else + SUBSLOT="${DIST_VERSION%.*}" +fi # Used only in tar paths MY_P="perl-${DIST_VERSION}" # Used in library paths |