commit: 6f46c580900c559ff34f27f4118e9bb70b510c8b Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Nov 18 09:25:39 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Nov 22 07:07:23 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f46c580
sys-devel/gcc-config: warn on obsolete gcj wrapper Bug: https://bugs.gentoo.org/804178 Signed-off-by: Sam James <sam <AT> gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/22985 Signed-off-by: Sam James <sam <AT> gentoo.org> ...gcc-config-2.5.ebuild => gcc-config-2.5-r1.ebuild} | 8 ++++++++ sys-devel/gcc-config/gcc-config-9999.ebuild | 19 +++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/sys-devel/gcc-config/gcc-config-2.5.ebuild b/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild similarity index 76% rename from sys-devel/gcc-config/gcc-config-2.5.ebuild rename to sys-devel/gcc-config/gcc-config-2.5-r1.ebuild index 692103f6a084..67c6a7ee6316 100644 --- a/sys-devel/gcc-config/gcc-config-2.5.ebuild +++ b/sys-devel/gcc-config/gcc-config-2.5-r1.ebuild @@ -49,4 +49,12 @@ pkg_postinst() { if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then eselect compiler-shadow update all fi + + if ! has_version "sys-devel/gcc[gcj(-)]" && [[ -x "${EROOT}"/usr/bin/gcj ]] ; then + # Warn about obsolete /usr/bin/gcj for bug #804178 + ewarn "Obsolete GCJ wrapper found: ${EROOT}/usr/bin/gcj!" + ewarn "Please delete this file unless you know it is needed (e.g. custom gcj install)." + ewarn "If you have no idea what this means, please delete the file:" + ewarn " rm ${EROOT}/usr/bin/gcj" + fi } diff --git a/sys-devel/gcc-config/gcc-config-9999.ebuild b/sys-devel/gcc-config/gcc-config-9999.ebuild index 7e58334302bb..67c6a7ee6316 100644 --- a/sys-devel/gcc-config/gcc-config-9999.ebuild +++ b/sys-devel/gcc-config/gcc-config-9999.ebuild @@ -7,7 +7,7 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git" inherit git-r3 else - SRC_URI="https://dev.gentoo.org/~sam/distfiles/${P}.tar.xz" + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" fi @@ -39,15 +39,6 @@ src_install() { } pkg_postinst() { - # Scrub eselect-compiler remains. - # To be removed in 2021. - rm -f "${ROOT}"/etc/env.d/05compiler - - # We not longer use the /usr/include/g++-v3 hacks, as - # it is not needed ... - # To be removed in 2021. - rm -f "${ROOT}"/usr/include/g++{,-v3} - # Do we have a valid multi ver setup ? local x for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do @@ -58,4 +49,12 @@ pkg_postinst() { if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then eselect compiler-shadow update all fi + + if ! has_version "sys-devel/gcc[gcj(-)]" && [[ -x "${EROOT}"/usr/bin/gcj ]] ; then + # Warn about obsolete /usr/bin/gcj for bug #804178 + ewarn "Obsolete GCJ wrapper found: ${EROOT}/usr/bin/gcj!" + ewarn "Please delete this file unless you know it is needed (e.g. custom gcj install)." + ewarn "If you have no idea what this means, please delete the file:" + ewarn " rm ${EROOT}/usr/bin/gcj" + fi }
