summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-05-15 00:47:17 +0000
committerMike Frysinger <vapier@gentoo.org>2007-05-15 00:47:17 +0000
commitb54e1be6c206ee26dccf074671618ea8b609f4ea (patch)
tree963c22ec8a75300295b051a1f33df6ec3378a58c /sys-devel/gcc-config/files
parentVersion bump and cleanup. (diff)
downloadgentoo-2-b54e1be6c206ee26dccf074671618ea8b609f4ea.tar.gz
gentoo-2-b54e1be6c206ee26dccf074671618ea8b609f4ea.tar.bz2
gentoo-2-b54e1be6c206ee26dccf074671618ea8b609f4ea.zip
fix up some errors in the PATH/ROOTPATH -> GCC_PATH conversion
(Portage version: 2.1.2.7)
Diffstat (limited to 'sys-devel/gcc-config/files')
-rwxr-xr-xsys-devel/gcc-config/files/gcc-config-1.4.014
1 files changed, 11 insertions, 3 deletions
diff --git a/sys-devel/gcc-config/files/gcc-config-1.4.0 b/sys-devel/gcc-config/files/gcc-config-1.4.0
index 71357ae8b88d..c55c7a9ab0b4 100755
--- a/sys-devel/gcc-config/files/gcc-config-1.4.0
+++ b/sys-devel/gcc-config/files/gcc-config-1.4.0
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.0,v 1.15 2007/05/03 05:20:39 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.0,v 1.16 2007/05/15 00:47:17 vapier Exp $
trap ":" INT QUIT TSTP
@@ -192,10 +192,17 @@ switch_profile() {
# Translate old PATH/ROOTPATH to GCC_PATH
cp -p "${GCC_ENV_D}/${CC_COMP}" "${GCC_ENV_D}/${CC_COMP}.gcc-config-ref" || return 1
+ GCC_PATH=$(
+ unset GCC_PATH PATH ROOTPATH
+ source "${GCC_ENV_D}/${CC_COMP}"
+ echo ${GCC_PATH:-${PATH:-${ROOTPATH}}}
+ )
sed -i \
- -e 's:^PATH=:GCC_PATH=:' \
+ -e '/^PATH=/d' \
-e '/^ROOTPATH=/d' \
+ -e '/^GCC_PATH=/d' \
"${GCC_ENV_D}/${CC_COMP}" || return 1
+ echo "GCC_PATH=\"${GCC_PATH}\"" >> "${GCC_ENV_D}/${CC_COMP}" || return 1
touch -r "${GCC_ENV_D}/${CC_COMP}.gcc-config-ref" "${GCC_ENV_D}/${CC_COMP}" || return 1
rm -f "${GCC_ENV_D}/${CC_COMP}.gcc-config-ref" || return 1
@@ -207,7 +214,8 @@ switch_profile() {
# What kind of env.d entry are we going to generate ?
if is_cross_compiler ; then
- grep '^GCC_PATH=' "${GCC_ENV_D}/${CC_COMP}" > "${ENV_D}/05gcc-${CTARGET}"
+ echo "PATH=\"${GCC_PATH}\"" > "${ENV_D}/05gcc-${CTARGET}"
+ echo "ROOTPATH=\"${GCC_PATH}\"" >> "${ENV_D}/05gcc-${CTARGET}"
echo "CURRENT=${CC_COMP}" > "${GCC_ENV_D}/config-${CTARGET}"
else
# Pass all by default