diff options
author | Jeremy Huddleston <eradicator@gentoo.org> | 2006-05-26 22:19:58 +0000 |
---|---|---|
committer | Jeremy Huddleston <eradicator@gentoo.org> | 2006-05-26 22:19:58 +0000 |
commit | 87363e50eee8cb812dedb8a87d26b2740098f2b7 (patch) | |
tree | c7b4de1b54993bc1709be7cd65c351170abba9ad /app-admin/eselect-compiler | |
parent | hppa stable (diff) | |
download | gentoo-2-87363e50eee8cb812dedb8a87d26b2740098f2b7.tar.gz gentoo-2-87363e50eee8cb812dedb8a87d26b2740098f2b7.tar.bz2 gentoo-2-87363e50eee8cb812dedb8a87d26b2740098f2b7.zip |
Added env.d entry for CONFIG_PROTECT_MASK. Just tell new users about 'eselect compiler migrate' rather than use it since most users will probably already have eselect-compiler profiles installed, and those are superior to the migrated ones. Added logic to choose the compiler during the first install.
(Portage version: 2.1_rc2-r2)
Diffstat (limited to 'app-admin/eselect-compiler')
4 files changed, 135 insertions, 1 deletions
diff --git a/app-admin/eselect-compiler/ChangeLog b/app-admin/eselect-compiler/ChangeLog index ec785edad107..b653e7f3ffc1 100644 --- a/app-admin/eselect-compiler/ChangeLog +++ b/app-admin/eselect-compiler/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for app-admin/eselect-compiler # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-compiler/ChangeLog,v 1.14 2006/05/26 14:04:35 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-compiler/ChangeLog,v 1.15 2006/05/26 22:19:58 eradicator Exp $ + +*eselect-compiler-2.0.0_rc1-r2 (26 May 2006) + + 26 May 2006; Jeremy Huddleston <eradicator@gentoo.org> + +files/25eselect-compiler, -eselect-compiler-2.0.0_rc1-r1.ebuild, + +eselect-compiler-2.0.0_rc1-r2.ebuild: + Added env.d entry for CONFIG_PROTECT_MASK. Just tell new users about + 'eselect compiler migrate' rather than use it since most users will probably + already have eselect-compiler profiles installed, and those are superior to + the migrated ones. Added logic to choose the compiler during the first + install. 26 May 2006; Diego Pettenò <flameeyes@gentoo.org> eselect-compiler-2.0.0_rc1-r1.ebuild: diff --git a/app-admin/eselect-compiler/eselect-compiler-2.0.0_rc1-r2.ebuild b/app-admin/eselect-compiler/eselect-compiler-2.0.0_rc1-r2.ebuild new file mode 100644 index 000000000000..08430b9f14b3 --- /dev/null +++ b/app-admin/eselect-compiler/eselect-compiler-2.0.0_rc1-r2.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-compiler/eselect-compiler-2.0.0_rc1-r2.ebuild,v 1.1 2006/05/26 22:19:58 eradicator Exp $ + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="Utility to configure the active toolchain compiler" +HOMEPAGE="http://www.gentoo.org/" + +MY_PN="compiler-config" +MY_P="${MY_PN}-${PV}" +S="${WORKDIR}/${MY_P}" + +SRC_URI=" http://dev.gentoo.org/~eradicator/toolchain/${MY_PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="hardened" + +RDEPEND=">=app-admin/eselect-1.0_rc1" + +# We want to verify that compiler profiles exist for our toolchain +pkg_setup() { + local abi + for abi in $(get_all_abis) ; do + local ctarget=$(get_abi_CHOST ${abi}) + if ! grep -q "^[[:space:]]*ctarget=${ctarget}$" ${ROOT}/etc/eselect/compiler/*.conf ; then + eerror "We weren't able to find a valid eselect compiler profile for ${abi}." + eerror "Please do the following to re-emerge gcc, then retry emerging" + eerror "eselect-compiler:" + eerror "# emerge -v --oneshot sys-devel/gcc" + + die "Missing eselect-compiler profile for ${abi}" + fi + done +} + +pkg_postinst() { + # Some toolchain.eclass installed confs had some bugs that need fixing + sed -i 's:chost:ctarget:g' ${ROOT}/etc/eselect/compiler/* + sed -i 's:spec=:specs=:g' ${ROOT}/etc/eselect/compiler/* + + # Activate the profiles + if [[ ! -f "${ROOT}/etc/eselect/compiler/selection.conf" ]] ; then + ewarn "This looks like the first time you are installing eselect-compiler. We are" + ewarn "activating toolchain profiles for the CTARGETs needed by your portage" + ewarn "profile You should have profiles installed from compilers that you emerged" + ewarn "after October, 2005. If a compiler you have installed is missing an" + ewarn "eselect-compiler profile, you can either re-emerge the compiler, create the" + ewarn "profile yourself, or you can migrate profiles from gcc-config-1.x by doing:" + ewarn "# eselect compiler migrate" + ewarn + ewarn "Note that if you use the migration tool, your current profiles will be" + ewarn "replaced, so you should backup the data in /etc/eselect/compiler first." + echo + einfo "The following profiles have been activated. If an incorrect profile is" + einfo "chosen or an error is reported, please use 'eselect compiler set' to" + einfo "manually choose it" + + local abi + for abi in $(get_all_abis) ; do + local ctarget=$(get_abi_CHOST ${abi}) + + local spec + if use hardened ; then + spec="hardened" + else + spec="vanilla" + fi + + local isset=0 + local tuple + for tuple in "${CHOST}" "${CTARGET}" "${ctarget}" ; do + local version + for version in "$(gcc-fullversion)" ; do + local profile + for profile in "${abi}-${spec}" "${spec}" "${abi}-default" "default" "${abi}-vanilla" "vanilla" ; do + if eselect compiler set ${tuple}-${version}/${profile} &> /dev/null ; then + einfo "${abi}: ${tuple}-${version}/${profile}" + + isset=1 + break + fi + done + [[ ${isset} == 1 ]] && break + done + [[ ${isset} == 1 ]] && break + done + + if [[ ${isset} == 0 ]] ; then + eerror "${abi}: Unable to determine an appropriate profile. Please set manually." + fi + done + else + eselect compiler update + fi + + if rm -f ${ROOT}/etc/env.d/05gcc* &> /dev/null ; then + echo + ewarn "You should source /etc/profile in your open shells." + fi +} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${P}-inherit.patch +} + +src_install() { + dodoc README + make DESTDIR="${D}" install || die + + doenvd ${FILESDIR}/25eselect-compiler + + # This is installed by sys-devel/gcc-config + rm ${D}/usr/bin/gcc-config +} diff --git a/app-admin/eselect-compiler/files/25eselect-compiler b/app-admin/eselect-compiler/files/25eselect-compiler new file mode 100644 index 000000000000..7c1c67cee31d --- /dev/null +++ b/app-admin/eselect-compiler/files/25eselect-compiler @@ -0,0 +1 @@ +CONFIG_PROTECT_MASK="/etc/eselect/compiler" diff --git a/app-admin/eselect-compiler/files/digest-eselect-compiler-2.0.0_rc1-r2 b/app-admin/eselect-compiler/files/digest-eselect-compiler-2.0.0_rc1-r2 new file mode 100644 index 000000000000..e5670a7296b1 --- /dev/null +++ b/app-admin/eselect-compiler/files/digest-eselect-compiler-2.0.0_rc1-r2 @@ -0,0 +1,3 @@ +MD5 b67d2f339f159da455d19c49e4868d9c compiler-config-2.0.0_rc1.tar.gz 117180 +RMD160 dbcd8120139c75f40ae2405746ab2a5f26e810b4 compiler-config-2.0.0_rc1.tar.gz 117180 +SHA256 a911a7b0a1184c576500df8530e77823f976dce387001c581ba89ac8edfe30c2 compiler-config-2.0.0_rc1.tar.gz 117180 |