Skip to content

Commit b7ef438

Browse files
hsk17grobian
authored andcommitted
scripts/bootstrap-prefix: work around bash + gcc14 bootstrap problem
Fetch patch from upstream to address /usr/include/termcap.h requirement. Closes: https://bugs.gentoo.org/946257 Signed-off-by: Fabian Groffen <[email protected]>
1 parent 0e8cc09 commit b7ef438

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

scripts/bootstrap-prefix.sh

+17-1
Original file line numberDiff line numberDiff line change
@@ -818,8 +818,24 @@ bootstrap_gnu() {
818818
patch -p1 < "${DISTDIR}/${tar_patch_file}" || return 1
819819
fi
820820

821+
# gcc14 fails to build bash if host lacks /usr/include/termcap.h
822+
# fixed upstream in devel branch
823+
if [[ ${PN}-${PV} == "bash-5.2" ]] ; then
824+
local bash_patch_file="tparam.c"
825+
local bash_patch_id="id=5b239ebbd2b1251c03b8e5591fe797a791266799"
826+
local bash_patch_url="https://git.savannah.gnu.org/cgit/bash.git/patch/lib/termcap/${bash_patch_file}?${bash_patch_id}"
827+
efetch "${bash_patch_url}" || return 1
828+
# If fetched from upstream url instead of mirror, filename will
829+
# have a suffix. Remove suffix by copy, not move, to not
830+
# trigger refetch on repeated invocations of this script.
831+
if [[ -f "${DISTDIR}/${bash_patch_file}?${bash_patch_id}" ]]; then
832+
cp "${DISTDIR}/${bash_patch_file}"{"?${bash_patch_id}",} || return 1
833+
fi
834+
patch -p1 < "${DISTDIR}/${bash_patch_file}" || return 1
835+
fi
836+
821837
local -a myconf
822-
if [[ ${PN} == "make" && ${PV} == "4.2.1" ]] ; then
838+
if [[ ${PN}-${PV} == "make-4.2.1" ]] ; then
823839
if [[ ${CHOST} == *-linux-gnu* ]] ; then
824840
# force this, macros aren't set correctly with newer glibc
825841
export CPPFLAGS="${CPPFLAGS} -D__alloca=alloca -D__stat=stat"

0 commit comments

Comments
 (0)