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: Wed, 28 Dec 2022 19:16:31
Message-Id: 1672254880.47f7d0085b02dfd5f7b6f1419f03e89fa4ad9f79.sam@gentoo
1 commit: 47f7d0085b02dfd5f7b6f1419f03e89fa4ad9f79
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 28 19:13:41 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 28 19:14:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47f7d008
7
8 sys-devel/gcc-config: add 2.9
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-devel/gcc-config/Manifest | 1 +
13 sys-devel/gcc-config/gcc-config-2.9.ebuild | 60 ++++++++++++++++++++++++++++++
14 2 files changed, 61 insertions(+)
15
16 diff --git a/sys-devel/gcc-config/Manifest b/sys-devel/gcc-config/Manifest
17 index 7a6b9f24f235..d50b35cec6b8 100644
18 --- a/sys-devel/gcc-config/Manifest
19 +++ b/sys-devel/gcc-config/Manifest
20 @@ -1 +1,2 @@
21 DIST gcc-config-2.8.tar.xz 17968 BLAKE2B aa34e681ef0c86bb846d89b816b46276f5c7c32974c785a9611a903a4fe165c997a34664abe17aa4d8720a96f194054e5d8c371a6c9270b1c235d7539094436c SHA512 5e91df44fb7782b9ad41ed06fbd53f74868c059f892c6c2b8195ebaa899905dd9f502562887f1a3765dd6b61698e956d01c6fa6f97a535cf16e26e70fcd902ba
22 +DIST gcc-config-2.9.tar.xz 18032 BLAKE2B 6ee4d89a7fc2c211cb2ce0f6b0802ac300b30deccf6e54cd80a548d6e2e878097ad93cb0174485df8611780cf29e0c3c7590f726409f369a92c6d780db5c167f SHA512 11fa782699ffcca38eee9ef3ca8dbdfdda68459bdad80ca3378ae07e0ee7c114a494c3362e05dc39d69d9770808f2b97bc682aec49e3c3483e7ba0c4498d57f3
23
24 diff --git a/sys-devel/gcc-config/gcc-config-2.9.ebuild b/sys-devel/gcc-config/gcc-config-2.9.ebuild
25 new file mode 100644
26 index 000000000000..7ff12f007e38
27 --- /dev/null
28 +++ b/sys-devel/gcc-config/gcc-config-2.9.ebuild
29 @@ -0,0 +1,60 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +if [[ ${PV} == 9999 ]]; then
36 + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/gcc-config.git"
37 + inherit git-r3
38 +else
39 + SRC_URI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}.tar.xz"
40 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
41 +fi
42 +
43 +DESCRIPTION="Utility to manage compilers"
44 +HOMEPAGE="https://gitweb.gentoo.org/proj/gcc-config.git/"
45 +
46 +LICENSE="GPL-2"
47 +SLOT="0"
48 +IUSE="+cc-wrappers +native-symlinks"
49 +
50 +RDEPEND=">=sys-apps/gentoo-functions-0.10"
51 +
52 +_emake() {
53 + emake \
54 + PV="${PVR}" \
55 + SUBLIBDIR="$(get_libdir)" \
56 + USE_CC_WRAPPERS="$(usex cc-wrappers)" \
57 + USE_NATIVE_LINKS="$(usex native-symlinks)" \
58 + TOOLCHAIN_PREFIX="${CHOST}-" \
59 + "$@"
60 +}
61 +
62 +src_compile() {
63 + _emake
64 +}
65 +
66 +src_install() {
67 + _emake DESTDIR="${D}" install
68 +}
69 +
70 +pkg_postinst() {
71 + # Do we have a valid multi ver setup ?
72 + local x
73 + for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do
74 + gcc-config ${x}
75 + done
76 +
77 + # USE flag change can add or delete files in /usr/bin worth recaching
78 + if [[ ! ${ROOT} && -f ${EPREFIX}/usr/share/eselect/modules/compiler-shadow.eselect ]] ; then
79 + eselect compiler-shadow update all
80 + fi
81 +
82 + if ! has_version "sys-devel/gcc[gcj(-)]" && [[ -x "${EROOT}"/usr/bin/gcj ]] ; then
83 + # Warn about obsolete /usr/bin/gcj for bug #804178
84 + ewarn "Obsolete GCJ wrapper found: ${EROOT}/usr/bin/gcj!"
85 + ewarn "Please delete this file unless you know it is needed (e.g. custom gcj install)."
86 + ewarn "If you have no idea what this means, please delete the file:"
87 + ewarn " rm ${EROOT}/usr/bin/gcj"
88 + fi
89 +}