From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A6EB51382C5 for ; Tue, 6 Apr 2021 22:16:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 882CBE09C4; Tue, 6 Apr 2021 22:16:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CA87FE09C0 for ; Tue, 6 Apr 2021 22:16:51 +0000 (UTC) From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH] toolchain.eclass: Drop eutils in >=EAPI-8, add some missing || die Date: Wed, 07 Apr 2021 00:16:46 +0200 Message-ID: <3261942.LZWGnKmheA@tuxbrain> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6603405.9J7NaK4W3v"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Archives-Salt: 81a441e4-05fb-490b-9a39-d812677bc775 X-Archives-Hash: b09f81d1552a97355b5f9b24a034a84f --nextPart6603405.9J7NaK4W3v Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org Subject: [PATCH] toolchain.eclass: Drop eutils in >=EAPI-8, add some missing || die Date: Wed, 07 Apr 2021 00:16:46 +0200 Message-ID: <3261942.LZWGnKmheA@tuxbrain> Just some cheap fixes while flag-o-matic.eclass causes cache-regen anyway. See also: https://github.com/gentoo/gentoo/pull/20207 - Add inherit guard. - Fix eclassdoc a bit. --- eclass/toolchain.eclass | 51 +++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index f41ce22c591..e7fae3aad5a 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,14 +1,37 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# Maintainer: Toolchain Ninjas +# @ECLASS: toolchain.eclass +# @MAINTAINER: +# Toolchain Ninjas # @SUPPORTED_EAPIS: 5 6 7 +# @BLURB: Functions to build sys-devel/gcc +# @DESCRIPTION: +# Comprehensive helper and phase functions to build sys-devel/gcc and +# adjacent packages, support for release and live ebuilds. +# +# This eclass unconditionally inherits toolchain-funcs.eclass and all its public +# variables and helper functions may be considered as part of this eclass's API. +# +# This eclass's phase functions are not intended to be mixed and matched, so if +# any phase functions are overridden, the toolchain.eclass version should also +# be called. + +case ${EAPI:-0} in + 0|1|2|3|4*) die "Need to upgrade to at least EAPI=5" ;; + 5*|6) inherit eapi7-ver eutils ;; + 7) inherit eutils ;; + *) die "I don't speak EAPI ${EAPI}." ;; +esac + +if [[ -z ${_TOOLCHAIN_ECLASS} ]]; then +_TOOLCHAIN_ECLASS=1 + +inherit flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix DESCRIPTION="The GNU Compiler Collection" HOMEPAGE="https://gcc.gnu.org/" -inherit eutils flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix - tc_is_live() { [[ ${PV} == *9999* ]] } @@ -27,13 +50,6 @@ fi FEATURES=${FEATURES/multilib-strict/} -case ${EAPI:-0} in - 0|1|2|3|4*) die "Need to upgrade to at least EAPI=5" ;; - 5*|6) inherit eapi7-ver ;; - 7) ;; - *) die "I don't speak EAPI ${EAPI}." ;; -esac - EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \ src_compile src_test src_install pkg_postinst pkg_postrm @@ -525,7 +541,7 @@ toolchain_src_prepare() { || eerror "Please file a bug about this" eend $? done - sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk #215828 + sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk || die #215828 # Prevent new texinfo from breaking old versions (see #198182, #464008) if tc_version_is_at_least 4.1; then @@ -639,17 +655,16 @@ make_gcc_hard() { # than ALL_CFLAGS... sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \ -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \ - -i "${S}"/gcc/Makefile.in + -i "${S}"/gcc/Makefile.in || die # Need to add HARD_CFLAGS to ALL_CXXFLAGS on >= 4.7 if tc_version_is_at_least 4.7 ; then sed -e '/^ALL_CXXFLAGS/iHARD_CFLAGS = ' \ -e 's|^ALL_CXXFLAGS = |ALL_CXXFLAGS = $(HARD_CFLAGS) |' \ - -i "${S}"/gcc/Makefile.in + -i "${S}"/gcc/Makefile.in || die fi - sed -i \ - -e "/^HARD_CFLAGS = /s|=|= ${gcc_hard_flags} |" \ - "${S}"/gcc/Makefile.in || die + sed -e "/^HARD_CFLAGS = /s|=|= ${gcc_hard_flags} |" \ + -i "${S}"/gcc/Makefile.in || die } @@ -2434,3 +2449,5 @@ toolchain_death_notice() { # Thus safer way to enable/disable the feature is to rely on implicit # enabled-by-default state: # econf $(usex foo '' --disable-foo) + +fi -- 2.31.1 --nextPart6603405.9J7NaK4W3v Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEE/x0UfMgLbk/MiQ+AUIqgAODug+AFAmBs3c5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZG MUQxNDdDQzgwQjZFNEZDQzg5MEY4MDUwOEFBMDAwRTBFRTgzRTAACgkQUIqgAODu g+BPtQgAmlWCVZcVjQ15Hkx93lWcMe+rVc5U1dXrXbzpDo5EtgN9d45xpikVfARX WWWDDexwUTb0KUIAhUektO5MATx4xig15rHBFaQ0ybKPy7zhQ4yxhdZvXej7sHg9 98ry6CMkkWvsdzbUQlL+4lY5MoY5UC3irtnNa5yAoQsm5rHeezzqG3bqg08EWxsa rAseAhADeOgbPicRJmQbjgePjPaW7RbjkcXoRhm47AjIjIp6fxp92kXpYtqQVN1p 3Bsxri1jtydM7LdAWleQqcdRbS7PbIOycoWTYJtyDWNLEGQ9c+vCIu9rYcX5pxex 2heI9aHUizX7dreUjkfrZeQyQ7n97g== =Cp7s -----END PGP SIGNATURE----- --nextPart6603405.9J7NaK4W3v--