dev-lang/perl: Fix variable in arithmetic expansion on older bash
authorKent Fredric <kentnl@gentoo.org>
Sun, 21 May 2017 15:44:25 +0000 (03:44 +1200)
committerKent Fredric <kentnl@gentoo.org>
Sun, 21 May 2017 15:44:50 +0000 (03:44 +1200)
Older bashes seem to think:

 $(( "26" % 2 ))

Is

  $(( ""26" % 2 " ))

Or something, and barfs.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

dev-lang/perl/perl-5.26.9999.ebuild

index 9c159ec94329fb83698b58427c5d38cb76360a0b..81ecf305054f2e18795d93c032e330766afd1ce7 100644 (file)
@@ -25,7 +25,7 @@ fi
 SHORT_PV="${DIST_VERSION%.*}"
 # Even numbered major versions are ABI intercompatible
 # Odd numbered major versions are not
-if [[ $(( "${SHORT_PV#*.}" % 2 )) == 1 ]]; then
+if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
        SUBSLOT="${DIST_VERSION%-RC*}"
 else
        SUBSLOT="${DIST_VERSION%.*}"