commit:     53b514a5ab5b3b23240f9ad5790a76209c29f55a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed May 25 00:19:40 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 25 00:19:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53b514a5

sys-devel/gcc: fix TOOLCHAIN_GCC_PV in 13.0.9999

Closes: https://bugs.gentoo.org/847226
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/gcc/gcc-13.0.9999.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys-devel/gcc/gcc-13.0.9999.ebuild 
b/sys-devel/gcc/gcc-13.0.9999.ebuild
index 39b0e5637249..a9ec2dbc272b 100644
--- a/sys-devel/gcc/gcc-13.0.9999.ebuild
+++ b/sys-devel/gcc/gcc-13.0.9999.ebuild
@@ -10,14 +10,16 @@ MUSL_GCC_VER="12.0.0"
 
 if [[ $(ver_cut 3) == 9999 ]] ; then
        MY_PV_2=$(ver_cut 2)
+       MY_PV_3=$(($(ver_cut 3) - 9998))
        if [[ ${MY_PV_2} == 0 ]] ; then
                MY_PV_2=0
+               MY_PV_3=0
        else
                MY_PV_2=$(($(ver_cut 2) - 1))
        fi
 
        # e.g. 12.2.9999 -> 12.1.1
-       TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.$(($(ver_cut 3) - 9998))
+       TOOLCHAIN_GCC_PV=$(ver_cut 1).${MY_PV_2}.${MY_PV_3}
 fi
 
 inherit toolchain

Reply via email to