summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-19 05:23:08 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-19 05:23:08 +0000
commitbf52ab80a07f1de3ab883d62fa7df60056e3e48e (patch)
tree1d14ff167b5540f0ba8ccd2caa804676cf32b686 /sys-devel
parentold (diff)
downloadgentoo-2-bf52ab80a07f1de3ab883d62fa7df60056e3e48e.tar.gz
gentoo-2-bf52ab80a07f1de3ab883d62fa7df60056e3e48e.tar.bz2
gentoo-2-bf52ab80a07f1de3ab883d62fa7df60056e3e48e.zip
Add support for selecting profiles by version only.
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gcc-config/ChangeLog8
-rw-r--r--sys-devel/gcc-config/files/digest-gcc-config-1.3.12-r40
-rwxr-xr-xsys-devel/gcc-config/files/gcc-config-1.3.1216
-rw-r--r--sys-devel/gcc-config/gcc-config-1.3.12-r4.ebuild48
4 files changed, 66 insertions, 6 deletions
diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog
index e6ee745f43ea..4d4618d60437 100644
--- a/sys-devel/gcc-config/ChangeLog
+++ b/sys-devel/gcc-config/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-devel/gcc-config
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.110 2005/11/01 01:31:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.111 2005/11/19 05:23:08 vapier Exp $
+
+*gcc-config-1.3.12-r4 (19 Nov 2005)
+
+ 19 Nov 2005; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.3.12,
+ +gcc-config-1.3.12-r4.ebuild:
+ Add support for selecting profiles by version only.
*gcc-config-1.3.12-r3 (01 Nov 2005)
diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.12-r4 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.12-r4
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sys-devel/gcc-config/files/digest-gcc-config-1.3.12-r4
diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.12 b/sys-devel/gcc-config/files/gcc-config-1.3.12
index 00567f7e8893..3105577d8e15 100755
--- a/sys-devel/gcc-config/files/gcc-config-1.3.12
+++ b/sys-devel/gcc-config/files/gcc-config-1.3.12
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 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.3.12,v 1.8 2005/11/01 01:31:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.12,v 1.9 2005/11/19 05:23:08 vapier Exp $
trap ":" INT QUIT TSTP
@@ -579,7 +579,7 @@ for x in "$@" ; do
[[ ${y/\/config} != ${y} ]] && continue
if [[ -f ${y} ]] && [[ ${x} == ${i} ]] ; then
- CC_COMP="${y##*/}"
+ CC_COMP=${y##*/}
break
fi
((++i))
@@ -590,10 +590,16 @@ for x in "$@" ; do
if [[ ${DOIT} == "get_current_profile" && -z $(ls "${GCC_ENV_D}"/${x}-* 2>/dev/null) ]] || \
[[ ${DOIT} != "get_current_profile" && ! -f ${GCC_ENV_D}/${x} ]]
then
- eerror "$0: Could not locate '$x' in '${GCC_ENV_D}/' !"
- exit 1
+ # Maybe they just gave us a gccver ...
+ get_real_chost
+ if [[ -f ${GCC_ENV_D}/${REAL_CHOST}-${x} ]] ; then
+ x=${REAL_CHOST}-${x}
+ else
+ eerror "$0: Could not locate '$x' in '${GCC_ENV_D}/' !"
+ exit 1
+ fi
fi
- CC_COMP="${x}"
+ CC_COMP=${x}
fi
else
eerror "$0: Too many arguments! Run $0 without parameters for help."
diff --git a/sys-devel/gcc-config/gcc-config-1.3.12-r4.ebuild b/sys-devel/gcc-config/gcc-config-1.3.12-r4.ebuild
new file mode 100644
index 000000000000..d66abe808ef0
--- /dev/null
+++ b/sys-devel/gcc-config/gcc-config-1.3.12-r4.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.3.12-r4.ebuild,v 1.1 2005/11/19 05:23:08 vapier Exp $
+
+inherit toolchain-funcs
+
+# Version of .c wrapper to use
+W_VER="1.4.7"
+
+DESCRIPTION="Utility to change the gcc compiler being used"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}
+
+src_compile() {
+ $(tc-getCC) -O2 -Wall -o wrapper \
+ "${FILESDIR}"/wrapper-${W_VER}.c || die "compile wrapper"
+}
+
+src_install() {
+ newbin "${FILESDIR}"/${PN}-${PV} ${PN} || die "install gcc-config"
+ dosed "s:PORTAGE-VERSION:${PVR}:" /usr/bin/${PN}
+
+ exeinto /usr/lib/misc
+ newexe wrapper gcc-config || die "install wrapper"
+}
+
+pkg_postinst() {
+ # Do we have a valid multi ver setup ?
+ if gcc-config --get-current-profile &>/dev/null ; then
+ # We not longer use the /usr/include/g++-v3 hacks, as
+ # it is not needed ...
+ [[ -L ${ROOT}/usr/include/g++ ]] && rm -f "${ROOT}"/usr/include/g++
+ [[ -L ${ROOT}/usr/include/g++-v3 ]] && rm -f "${ROOT}"/usr/include/g++-v3
+ [[ ${ROOT} = "/" ]] && gcc-config $(/usr/bin/gcc-config --get-current-profile)
+ fi
+
+ # Make sure old versions dont exist #79062
+ rm -f "${ROOT}"/usr/sbin/gcc-config
+}