summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-05-07 00:45:06 +0000
committerMike Frysinger <vapier@gentoo.org>2004-05-07 00:45:06 +0000
commit74bd635137d7a44dc3583e309df3b51551095aff (patch)
treef9f1054aa25a5cd716be378f5a9eab0a68eb3100 /sys-devel/gcc-config
parentadded the gtk+2.4 patch to older ebuilds (Manifest recommit) (diff)
downloadgentoo-2-74bd635137d7a44dc3583e309df3b51551095aff.tar.gz
gentoo-2-74bd635137d7a44dc3583e309df3b51551095aff.tar.bz2
gentoo-2-74bd635137d7a44dc3583e309df3b51551095aff.zip
fix #29950 #48492 and more !
Diffstat (limited to 'sys-devel/gcc-config')
-rw-r--r--sys-devel/gcc-config/ChangeLog14
-rw-r--r--sys-devel/gcc-config/files/digest-gcc-config-1.3.5-r10
-rw-r--r--sys-devel/gcc-config/files/gcc-config-1.3.553
-rw-r--r--sys-devel/gcc-config/gcc-config-1.3.5-r1.ebuild80
4 files changed, 126 insertions, 21 deletions
diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog
index 34a962adc8da..8463635602ae 100644
--- a/sys-devel/gcc-config/ChangeLog
+++ b/sys-devel/gcc-config/ChangeLog
@@ -1,11 +1,17 @@
# ChangeLog for sys-devel/gcc-config
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.42 2004/05/06 23:04:43 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.43 2004/05/07 00:45:06 vapier Exp $
+
+*gcc-config-1.3.5-r1 (06 May 2004)
06 May 2004; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.3.5,
- files/gcc-config-1.3.5-multi-ldpath, gcc-config-1.3.5.ebuild:
- clean up the help output, add support for -v|--version and -h|--help options,
- and then add the version to the gcc-config after installing
+ files/gcc-config-1.3.5-multi-ldpath, gcc-config-1.3.5.ebuild,
+ +gcc-config-1.3.5-r1.ebuild:
+ Clean up the help output, add support for -v|--version and -h|--help options,
+ and then add the version to the gcc-config after installing.
+ Unify the multi-ldpath crap since there are no real differences between
+ the two to fix #29950 by Brad House.
+ Add environment printing fix #48492 by splite.
*gcc-config-1.3.5 (08 Feb 2004)
diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.5-r1 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.5-r1
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sys-devel/gcc-config/files/digest-gcc-config-1.3.5-r1
diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.5 b/sys-devel/gcc-config/files/gcc-config-1.3.5
index 406425182c18..c1ef55efb2c3 100644
--- a/sys-devel/gcc-config/files/gcc-config-1.3.5
+++ b/sys-devel/gcc-config/files/gcc-config-1.3.5
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.5,v 1.3 2004/05/06 23:01:19 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.5,v 1.4 2004/05/07 00:45:06 vapier Exp $
# Author: Martin Schlemmer <azarah@gentoo.org>
source /etc/init.d/functions.sh || {
@@ -158,18 +158,26 @@ switch_profile() {
then
source "${x}"
- if [ -z "${MY_LDPATH}" ]
- then
- if [ -d "${LDPATH}" ]
- then
- MY_LDPATH="${LDPATH}"
- fi
- else
- if [ -d "${LDPATH}" ]
+ # Handle LDPATH's that have multiple directories
+ local old_IFS="${IFS}"
+ export IFS=":"
+ local sub_ldpath
+ for sub_ldpath in ${LDPATH}
+ do
+ if [ -z "${MY_LDPATH}" ]
then
- MY_LDPATH="${MY_LDPATH}:${LDPATH}"
+ if [ -d "${sub_ldpath}" ]
+ then
+ MY_LDPATH="${sub_ldpath}"
+ fi
+ else
+ if [ -d "${sub_ldpath}" ]
+ then
+ MY_LDPATH="${MY_LDPATH}:${sub_ldpath}"
+ fi
fi
- fi
+ done
+ export IFS="${old_IFS}"
fi
done
@@ -264,20 +272,31 @@ list_profiles() {
print_environ() {
local OLDPATH="${PATH}"
+ local ENV_CMD=""
+ local SET_ELEMENT=""
source "/etc/env.d/gcc/${CC_COMP}"
- echo "export PATH=\"${PATH}:${OLDPATH}\""
+ case ${SHELL} in
+ */csh|*/tsch)
+ ENV_CMD="setenv"
+ SET_ELEMENT=" "
+ ;;
+ *)
+ ENV_CMD="export"
+ SET_ELEMENT="="
+ ;;
+ esac
+ echo "${ENV_CMD} PATH${SET_ELEMENT}\"${PATH}:${OLDPATH}\""
# if [ -z "${LD_LIBRARY_PATH}" ]
# then
-# echo "export LD_LIBRARY_PATH=\"${LDPATH}\""
+# echo "${ENV_CMD} LD_LIBRARY_PATH${SET_ELEMENT}\"${LDPATH}\""
# else
-# echo "export LD_LIBRARY_PATH=\"${LDPATH}:${LD_LIBRARY_PATH}\""
+# echo "${ENV_CMD} LD_LIBRARY_PATH${SET_ELEMENT}\"${LDPATH}:${LD_LIBRARY_PATH}\""
# fi
-
- echo "export CC=\"${CC}\""
- echo "export CXX=\"${CXX}\""
+ echo "${ENV_CMD} CC${SET_ELEMENT}\"${CC}\""
+ echo "${ENV_CMD} CXX${SET_ELEMENT}\"${CXX}\""
}
get_bin_path() {
diff --git a/sys-devel/gcc-config/gcc-config-1.3.5-r1.ebuild b/sys-devel/gcc-config/gcc-config-1.3.5-r1.ebuild
new file mode 100644
index 000000000000..90c0f1860c03
--- /dev/null
+++ b/sys-devel/gcc-config/gcc-config-1.3.5-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.3.5-r1.ebuild,v 1.1 2004/05/07 00:45:06 vapier Exp $
+
+W_VER="1.4.2"
+
+DISABLE_GEN_GCC_WRAPPERS="yes"
+
+DESCRIPTION="Utility to change the gcc compiler being used."
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~s390"
+IUSE=""
+
+DEPEND="virtual/glibc
+ >=sys-apps/portage-2.0.47-r10" # We need portageq ...
+
+src_install() {
+ # Setup PATH just in case ...
+ if /usr/bin/gcc-config --get-current-profile &> /dev/null
+ then
+ if [ -x /usr/bin/gcc-config ]
+ then
+ export PATH="`/usr/bin/gcc-config --get-bin-path`:${PATH}"
+ else
+ export PATH="`/usr/sbin/gcc-config --get-bin-path`:${PATH}"
+ fi
+ fi
+
+ einfo "Compiling wrapper..."
+ ${CC:-gcc} -O2 -Wall -o ${WORKDIR}/wrapper \
+ ${FILESDIR}/wrapper-${W_VER}.c || die
+
+ exeinto /usr/lib/gcc-config
+ doexe ${WORKDIR}/wrapper || die
+
+ # Only setup this if we have a proper gcc version installed, else
+ # we will nuke the non gcc-config versions ...
+ if /usr/bin/gcc-config --get-current-profile &> /dev/null
+ then
+ einfo "Creating wrappers for compiler tools..."
+ exeinto /lib
+ newexe ${WORKDIR}/wrapper cpp
+
+ exeinto /usr/bin
+ for x in gcc cpp cc c++ g++ ${CHOST}-gcc ${CHOST}-c++ ${CHOST}-g++
+ do
+ newexe ${WORKDIR}/wrapper ${x}
+ done
+ fi
+
+ einfo "Installing gcc-config..."
+ newbin ${FILESDIR}/${PN}-${PV} ${PN}
+ dosed "s:PORTAGE-VERSION:${PV}:" /usr/bin/${PN}
+}
+
+pkg_postinst() {
+ # Do we have a valid multi ver setup ?
+ if ${ROOT}/usr/bin/gcc-config --get-current-profile &> /dev/null
+ then
+ # We not longer use the /usr/include/g++-v3 hacks, as
+ # it is not needed ...
+ if [ -L ${ROOT}/usr/include/g++ ]
+ then
+ rm -f ${ROOT}/usr/include/g++
+ fi
+ if [ -L ${ROOT}/usr/include/g++-v3 ]
+ then
+ rm -f ${ROOT}/usr/include/g++-v3
+ fi
+
+ if [ ${ROOT} = "/" ]
+ then
+ /usr/bin/gcc-config $(/usr/bin/gcc-config --get-current-profile)
+ fi
+ fi
+}