Gentoo Archives: gentoo-commits

From: Michael Haubenwallner <haubi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/
Date: Tue, 29 Jan 2019 15:59:11
Message-Id: 1548696897.b109ca82c51df4073dbb37ff239f6097504582ef.haubi@gentoo
1 commit: b109ca82c51df4073dbb37ff239f6097504582ef
2 Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 28 17:28:23 2019 +0000
4 Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 28 17:34:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=b109ca82
7
8 bootstrap-prefix.sh: provide fake makeinfo early
9
10 Provide fake makeinfo scripts early enough to avoid MAKEINFO variable.
11 Closes: https://bugs.gentoo.org/673808
12
13 Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>
14
15 scripts/bootstrap-prefix.sh | 55 ++++++++++++++++++++++++---------------------
16 1 file changed, 29 insertions(+), 26 deletions(-)
17
18 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
19 index 39e508de56..d74a35372d 100755
20 --- a/scripts/bootstrap-prefix.sh
21 +++ b/scripts/bootstrap-prefix.sh
22 @@ -1539,7 +1539,30 @@ bootstrap_stage2() {
23 # GCC sometimes decides that it needs to run makeinfo to update some
24 # info pages from .texi files. Obviously we don't care at this
25 # stage and rather have it continue instead of abort the build
26 - export MAKEINFO="echo makeinfo GNU texinfo 4.13"
27 + if [[ ! -x "${ROOT}"/tmp/usr/bin/makeinfo ]]
28 + then
29 + cat > "${ROOT}"/tmp/usr/bin/makeinfo <<-EOF
30 + #!${ROOT}/bin/bash
31 + ### bootstrap-prefix.sh will act on this line ###
32 + echo "makeinfo GNU texinfo 4.13"
33 + f=
34 + while (( \$# > 0 )); do
35 + a=\$1
36 + shift
37 + case \$a in
38 + --output=) continue ;;
39 + --output=*) f=\${a#--output=} ;;
40 + -o) f=\$1; shift;;
41 + esac
42 + done
43 + [[ -z \$f ]] || [[ -e \$f ]] || touch "\$f"
44 + EOF
45 + cat > "${ROOT}"/tmp/usr/bin/install-info <<-EOF
46 + #!${ROOT}/bin/bash
47 + :
48 + EOF
49 + chmod +x "${ROOT}"/tmp/usr/bin/{makeinfo,install-info}
50 + fi
51
52 # on Solaris 64-bits, (at least up to 10) libgcc_s resides in a
53 # non-standard location, and the compiler doesn't seem to record
54 @@ -1719,32 +1742,12 @@ bootstrap_stage3() {
55 do_emerge_pkgs "$@"
56 }
57
58 - # GCC sometimes decides that it needs to run makeinfo to update some
59 - # info pages from .texi files. Obviously we don't care at this
60 - # stage and rather have it continue instead of aborting the build
61 + # Some packages fail to properly depend on sys-apps/texinfo.
62 + # We don't really need that package, so we fake it instead,
63 + # explicitly emerging it later on will overwrite the fakes.
64 if [[ ! -x "${ROOT}"/usr/bin/makeinfo ]]
65 then
66 - cat > "${ROOT}"/usr/bin/makeinfo <<-EOF
67 - #!${ROOT}/bin/bash
68 - ### bootstrap-prefix.sh will act on this line ###
69 - echo "makeinfo GNU texinfo 4.13"
70 - f=
71 - while (( \$# > 0 )); do
72 - a=\$1
73 - shift
74 - case \$a in
75 - --output=) continue ;;
76 - --output=*) f=\${a#--output=} ;;
77 - -o) f=\$1; shift;;
78 - esac
79 - done
80 - [[ -z \$f ]] || [[ -e \$f ]] || touch "\$f"
81 - EOF
82 - cat > "${ROOT}"/usr/bin/install-info <<-EOF
83 - #!${ROOT}/bin/bash
84 - :
85 - EOF
86 - chmod +x "${ROOT}"/usr/bin/{makeinfo,install-info}
87 + cp -p "${ROOT}"/tmp/usr/bin/{makeinfo,install-info} "${ROOT}"/usr/bin
88 fi
89
90 if is-rap ; then
91 @@ -1900,7 +1903,7 @@ bootstrap_stage3() {
92 emerge_pkgs "" "${pkgs[@]}" || return 1
93
94 # Switch to the proper portage.
95 - unset CONFIG_SHELL MAKEINFO CXX CPPFLAGS LDFLAGS
96 + unset CONFIG_SHELL CXX CPPFLAGS LDFLAGS
97 hash -r
98
99 # Update the portage tree.