git: 2cbbd136ada7 - 2023Q2 - lang/gcc11: Work around aarch64 extraction bug

From: Lorenzo Salvadore <salvadore_at_FreeBSD.org>
Date: Fri, 12 May 2023 17:15:31 UTC
The branch 2023Q2 has been updated by salvadore:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2cbbd136ada7dc9207759b698830d5a9d58b22df

commit 2cbbd136ada7dc9207759b698830d5a9d58b22df
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2023-05-10 15:11:05 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2023-05-12 17:15:17 +0000

    lang/gcc11: Work around aarch64 extraction bug
    
    Extraction fails with poudriere on aarch64 with the following error:
    
    => SHA256 Checksum OK for gcc-11.3.0.tar.xz.
    tar: Pathname can't be converted from UTF-8 to current locale.
    tar: Pathname can't be converted from UTF-8 to current locale.
    tar: Error exit delayed from previous errors.
    
    Enforcing use of bsdtar works around the issue. The issue is specific to
    lang/gcc11 and lang/gcc12: no other GCC port is affected.
    
    See also bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246670.
    
    PR:             271052
    Reported by:    Vidar Karlsen <vidar@karlsen.tech>
    Reviewed by:    gerald, mikael
    
    (cherry picked from commit 22530ba28be79b947e617dc1288896bfc3c6f6ef)
---
 lang/gcc11/Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lang/gcc11/Makefile b/lang/gcc11/Makefile
index ab6d3d08bd34..be843694e895 100644
--- a/lang/gcc11/Makefile
+++ b/lang/gcc11/Makefile
@@ -62,6 +62,15 @@ CONFIGURE_ARGS+=	--disable-multilib
 
 .include <bsd.port.pre.mk>
 
+# Extraction fails with poudriere on aarch64 for GCC 11.
+# It seems that the bug is specific to lang/gcc11 and lang/gcc12 only.
+# No other GCC port is affected.
+# See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271052
+# and https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246670
+.if ${ARCH} == aarch64
+EXTRACT_CMD=    ${SETENV} LC_ALL=en_US.UTF-8 /usr/bin/bsdtar
+.endif
+
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=	x86_64-portbld-${OPSYS:tl}${OSREL}