Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc-config/
Date: Mon, 22 Nov 2021 07:11:11
Message-Id: 1637564843.6f46c580900c559ff34f27f4118e9bb70b510c8b.sam@gentoo
1 commit: 6f46c580900c559ff34f27f4118e9bb70b510c8b
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 18 09:25:39 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 22 07:07:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f46c580
7
8 sys-devel/gcc-config: warn on obsolete gcj wrapper
9
10 Bug: https://bugs.gentoo.org/804178
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12 Closes: https://github.com/gentoo/gentoo/pull/22985
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 ...gcc-config-2.5.ebuild => gcc-config-2.5-r1.ebuild} | 8 ++++++++
16 sys-devel/gcc-config/gcc-config-9999.ebuild | 19 +++++++++----------
17 2 files changed, 17 insertions(+), 10 deletions(-)
18
19 diff --git a/sys-devel/gcc-config/gcc-config-2.5.ebuild b/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild
20 similarity index 76%
21 rename from sys-devel/gcc-config/gcc-config-2.5.ebuild
22 rename to sys-devel/gcc-config/gcc-config-2.5-r1.ebuild
23 index 692103f6a084..67c6a7ee6316 100644
24 --- a/sys-devel/gcc-config/gcc-config-2.5.ebuild
25 +++ b/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild
26 @@ -49,4 +49,12 @@ pkg_postinst() {
27 if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
28 eselect compiler-shadow update all
29 fi
30 +
31 + if ! has_version "sys-devel/gcc[gcj(-)]" && [[ -x "${EROOT}"/usr/bin/gcj ]] ; then
32 + # Warn about obsolete /usr/bin/gcj for bug #804178
33 + ewarn "Obsolete GCJ wrapper found: ${EROOT}/usr/bin/gcj!"
34 + ewarn "Please delete this file unless you know it is needed (e.g. custom gcj install)."
35 + ewarn "If you have no idea what this means, please delete the file:"
36 + ewarn " rm ${EROOT}/usr/bin/gcj"
37 + fi
38 }
39
40 diff --git a/sys-devel/gcc-config/gcc-config-9999.ebuild b/sys-devel/gcc-config/gcc-config-9999.ebuild
41 index 7e58334302bb..67c6a7ee6316 100644
42 --- a/sys-devel/gcc-config/gcc-config-9999.ebuild
43 +++ b/sys-devel/gcc-config/gcc-config-9999.ebuild
44 @@ -7,7 +7,7 @@ if [[ ${PV} == 9999 ]]; then
45 EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git"
46 inherit git-r3
47 else
48 - SRC_URI="https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz"
49 + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
50 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
51 fi
52
53 @@ -39,15 +39,6 @@ src_install() {
54 }
55
56 pkg_postinst() {
57 - # Scrub eselect-compiler remains.
58 - # To be removed in 2021.
59 - rm -f "${ROOT}"/etc/env.d/05compiler
60 -
61 - # We not longer use the /usr/include/g++-v3 hacks, as
62 - # it is not needed ...
63 - # To be removed in 2021.
64 - rm -f "${ROOT}"/usr/include/g++{,-v3}
65 -
66 # Do we have a valid multi ver setup ?
67 local x
68 for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do
69 @@ -58,4 +49,12 @@ pkg_postinst() {
70 if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
71 eselect compiler-shadow update all
72 fi
73 +
74 + if ! has_version "sys-devel/gcc[gcj(-)]" && [[ -x "${EROOT}"/usr/bin/gcj ]] ; then
75 + # Warn about obsolete /usr/bin/gcj for bug #804178
76 + ewarn "Obsolete GCJ wrapper found: ${EROOT}/usr/bin/gcj!"
77 + ewarn "Please delete this file unless you know it is needed (e.g. custom gcj install)."
78 + ewarn "If you have no idea what this means, please delete the file:"
79 + ewarn " rm ${EROOT}/usr/bin/gcj"
80 + fi
81 }