summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2006-06-09 19:10:50 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2006-06-09 19:10:50 +0000
commit9ef61b2cb619ec4cf7223a3fc60cbcded00b04a1 (patch)
tree21811c83ffb8ecfdc862dbd71b3ce0e867f5b4b7 /app-admin/eselect-compiler
parentxinerama added to IUSE bug #135930 (diff)
downloadhistorical-9ef61b2cb619ec4cf7223a3fc60cbcded00b04a1.tar.gz
historical-9ef61b2cb619ec4cf7223a3fc60cbcded00b04a1.tar.bz2
historical-9ef61b2cb619ec4cf7223a3fc60cbcded00b04a1.zip
Run env-update after updating /etc/env.d file.
Package-Manager: portage-2.1_rc4-r4
Diffstat (limited to 'app-admin/eselect-compiler')
-rw-r--r--app-admin/eselect-compiler/ChangeLog10
-rw-r--r--app-admin/eselect-compiler/eselect-compiler-2.0.0_rc1-r6.ebuild166
-rw-r--r--app-admin/eselect-compiler/files/digest-eselect-compiler-2.0.0_rc1-r63
-rw-r--r--app-admin/eselect-compiler/files/eselect-compiler-2.0.0_rc1-env-update.patch14
4 files changed, 192 insertions, 1 deletions
diff --git a/app-admin/eselect-compiler/ChangeLog b/app-admin/eselect-compiler/ChangeLog
index 8bc3a879f288..210839b6c3bd 100644
--- a/app-admin/eselect-compiler/ChangeLog
+++ b/app-admin/eselect-compiler/ChangeLog
@@ -1,6 +1,14 @@
# 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.21 2006/06/07 02:40:04 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-compiler/ChangeLog,v 1.22 2006/06/09 19:10:50 eradicator Exp $
+
+*eselect-compiler-2.0.0_rc1-r6 (09 Jun 2006)
+
+ 09 Jun 2006; Jeremy Huddleston <eradicator@gentoo.org>
+ +files/eselect-compiler-2.0.0_rc1-env-update.patch,
+ -eselect-compiler-2.0.0_rc1-r5.ebuild,
+ +eselect-compiler-2.0.0_rc1-r6.ebuild:
+ Run env-update after updating /etc/env.d file.
07 Jun 2006; Jeremy Huddleston <eradicator@gentoo.org>
-eselect-compiler-2.0.0_rc1-r4.ebuild:
diff --git a/app-admin/eselect-compiler/eselect-compiler-2.0.0_rc1-r6.ebuild b/app-admin/eselect-compiler/eselect-compiler-2.0.0_rc1-r6.ebuild
new file mode 100644
index 000000000000..a04069c2b549
--- /dev/null
+++ b/app-admin/eselect-compiler/eselect-compiler-2.0.0_rc1-r6.ebuild
@@ -0,0 +1,166 @@
+# 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-r6.ebuild,v 1.1 2006/06/09 19:10:50 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() {
+ delete_invalid_profiles
+
+ 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() {
+ # 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 extra_options=""
+
+ if [[ ${abi} == ${DEFAULT_ABI} ]] ; then
+ extra_options="-n"
+ fi
+
+ 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} ${extra_options} &> /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
+
+ local file
+ local resource_profile=0
+ for file in ${ROOT}/etc/env.d/05gcc* ; do
+ if [[ -f ${file} ]] ; then
+ ewarn "Removing env.d entry which was used by gcc-config:"
+ ewarn " ${file}"
+
+ rm -f ${file}
+
+ resource_profile=1
+ fi
+ done
+
+ if [[ ${resource_profile} == 1 ]] ; then
+ echo
+ ewarn "You should source /etc/profile in your open shells."
+
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/${P}-inherit.patch
+ epatch ${FILESDIR}/${P}-env-update.patch
+}
+
+src_install() {
+ dodoc README
+ make DESTDIR="${D}" install || die
+
+ # For bug #135749
+ exeinto /lib
+ newexe ${D}/usr/libexec/eselect/compiler/compiler-wrapper cpp
+
+ doenvd ${FILESDIR}/25eselect-compiler
+
+ # This is installed by sys-devel/gcc-config
+ rm ${D}/usr/bin/gcc-config
+}
+
+# The profiles are protected by CONFIG_PROJECT until eselect-compiler is installed, so we need to clean out
+# the invalid profiles when eselect-compiler is first installed
+delete_invalid_profiles() {
+ # Some toolchain.eclass installed confs had some bugs in them. We
+ # could just use sed to update them, but then portage won't remove
+ # them automatically on unmerge.
+ local file
+ for file in $(grep "^[[:space:]]*chost=" ${ROOT}/etc/eselect/compiler/*.conf | cut -f1 -d:) ; do
+ rm ${file}
+ done
+ for file in $(grep "^[[:space:]]*spec=" ${ROOT}/etc/eselect/compiler/*.conf | cut -f1 -d:) ; do
+ rm ${file}
+ done
+
+ # First we need to clean out /etc/eselect/compiler as there may
+ # be some profiles in there which were not unmerged with gcc.
+ local item
+ for item in $(grep "^[[:space:]]*binpath=" ${ROOT}/etc/eselect/compiler/*.conf | sed 's/:.*binpath=/:/') ; do
+ local file=${item%:*}
+ local binpath=${item#*:}
+ [[ -d ${binpath} ]] || rm ${file}
+ done
+}
+
diff --git a/app-admin/eselect-compiler/files/digest-eselect-compiler-2.0.0_rc1-r6 b/app-admin/eselect-compiler/files/digest-eselect-compiler-2.0.0_rc1-r6
new file mode 100644
index 000000000000..e5670a7296b1
--- /dev/null
+++ b/app-admin/eselect-compiler/files/digest-eselect-compiler-2.0.0_rc1-r6
@@ -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
diff --git a/app-admin/eselect-compiler/files/eselect-compiler-2.0.0_rc1-env-update.patch b/app-admin/eselect-compiler/files/eselect-compiler-2.0.0_rc1-env-update.patch
new file mode 100644
index 000000000000..784094b03128
--- /dev/null
+++ b/app-admin/eselect-compiler/files/eselect-compiler-2.0.0_rc1-env-update.patch
@@ -0,0 +1,14 @@
+Index: compiler.eselect.in
+===================================================================
+--- compiler-config-2.0.0_rc1.orig/src/profile-manager/compiler.eselect.in (revision 270)
++++ compiler-config-2.0.0_rc1/src/profile-manager/compiler.eselect.in (working copy)
+@@ -441,6 +443,8 @@
+
+ set_env ${preopts} || die -q "Could not set ${ENV_FILE}"
+
++ env-update
++
+ echo "Successfully set compiler for ${ctarget} to ${profile}."
+ }
+
+