commit: 1e030951dd8c4099e45395e513e3cf73b0c3d69a Author: Alexei Colin <ac <AT> alexeicolin <DOT> com> AuthorDate: Wed Dec 23 06:18:44 2020 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Wed Dec 23 07:50:29 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1e030951
bootstrap-prefix: bump tar to 1.32, apply ioctl patch On macOS 11 Big Sur, stage 1 needs to bootstrap tar but fails to build it (both 1.26 and 1.32) because sys/ioctl.h does not end up included: compare.c:550:3: error: implicit declaration of function 'ioctl' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ioctl (archive, FDFLUSH); Upstream bug report: https://savannah.gnu.org/bugs/index.php?59755 Closes: https://bugs.gentoo.org/761322 Signed-off-by: Alexei Colin <ac <AT> alexeicolin.com> Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> scripts/bootstrap-prefix.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index c085472a23..3f96bc5e33 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -862,6 +862,22 @@ bootstrap_gnu() { [[ -d ${S} ]] || return 1 cd "${S}" || return 1 + # Tar upstream bug #59755 for broken build on macOS: + # https://savannah.gnu.org/bugs/index.php?59755 + if [[ ${PN}-${PV} == "tar-1.32" ]] ; then + local tar_patch_file="tar-1.32-check-sys-ioctl-header-configure.patch" + local tar_patch_id="file_id=50554" + local tar_patch_url="https://file.savannah.gnu.org/file/${tar_patch_file}?${tar_patch_id}" + efetch "${tar_patch_url}" || return 1 + # If fetched from upstream url instead of mirror, filename will + # have a suffix. Remove suffix by copy, not move, to not + # trigger refetch on repeated invocations of this script. + if [[ -f "${DISTDIR}/${tar_patch_file}?${tar_patch_id}" ]]; then + cp ${DISTDIR}/${tar_patch_file}{?${tar_patch_id},} || return 1 + fi + patch -p1 < ${DISTDIR}/${tar_patch_file} || return 1 + fi + if [[ ${PN}-${PV} == "bash-4.3" && ${CHOST} == *-cygwin* ]] ; then local p patchopts for p in \ @@ -1309,7 +1325,7 @@ bootstrap_coreutils() { } bootstrap_tar() { - bootstrap_gnu tar 1.26 + bootstrap_gnu tar 1.32 } bootstrap_make() {