Add support for selecting profiles by version only.
authorMike Frysinger <vapier@gentoo.org>
Sat, 19 Nov 2005 05:23:08 +0000 (05:23 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 19 Nov 2005 05:23:08 +0000 (05:23 +0000)
Package-Manager: portage-2.0.53_rc7

sys-devel/gcc-config/ChangeLog
sys-devel/gcc-config/Manifest
sys-devel/gcc-config/files/digest-gcc-config-1.3.12-r4 [new file with mode: 0644]
sys-devel/gcc-config/files/gcc-config-1.3.12
sys-devel/gcc-config/gcc-config-1.3.12-r4.ebuild [new file with mode: 0644]

index e6ee745f43ea3762a19cb0dd8d8724c12fdeb382..4d4618d6043755aa7114744b65884b7334233cc7 100644 (file)
@@ -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)
 
index d3b97300b197a851d354af2fa2c03e24469039b4..ad23d2eed7eb56b9a318c0de7ba43c0ef7ea3853 100644 (file)
@@ -1,34 +1,18 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 49670eec985df2467148bee2b571ce2a ChangeLog 22020
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.10-r1 0
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.11-r3 0
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.11-r4 0
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.12 0
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.12-r1 0
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.12-r2 0
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.12-r3 0
+MD5 68d7c52689871082544aeb69f4022805 ChangeLog 22219
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.12-r4 0
 MD5 c7cf3a3617d90adfaacc7c2c012ddfb0 files/digest-gcc-config-2.0.0_beta2 79
-MD5 4c31f7f5f8723588a4401dd102061301 files/gcc-config-1.3.10 13549
-MD5 d153788edf3039aa4f68ae41bf46bf0d files/gcc-config-1.3.11 15776
-MD5 8441353ab1b42b76494c8adb9d73bcab files/gcc-config-1.3.12 17100
-MD5 e3203a5aa6df669ffa479aeeb7605029 files/wrapper-1.4.5.c 10671
-MD5 72557949fda7b1226549291b8f171e15 files/wrapper-1.4.6.c 10568
+MD5 643fbfcd540ed13702f68543c7527467 files/gcc-config-1.3.12 17269
 MD5 1b19cf481e2777dff9722f36698c3b24 files/wrapper-1.4.7.c 9837
-MD5 e1e82310909ead9c8b474d56cb94ee8c gcc-config-1.3.10-r1.ebuild 1393
-MD5 8ddb51e4d22a768b490aea079b28c334 gcc-config-1.3.11-r3.ebuild 1387
-MD5 afc6f633e9ba456750668a4b552c9593 gcc-config-1.3.11-r4.ebuild 1379
-MD5 e7cff05773a87f50205a8777e899b626 gcc-config-1.3.12-r1.ebuild 1392
-MD5 95389ec5fa2833933f895e112caa78c6 gcc-config-1.3.12-r2.ebuild 1381
-MD5 556879c6484edcecb0ace55ee6531475 gcc-config-1.3.12-r3.ebuild 1379
-MD5 4f38cac9c208dfd3f4e8b798a8108366 gcc-config-1.3.12.ebuild 1389
+MD5 c9487fb4c13f7250b9dc782f6e8f5358 gcc-config-1.3.12-r4.ebuild 1379
 MD5 35fee17d74ce037258c00f8d9e9dd820 gcc-config-2.0.0_beta2.ebuild 781
 MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2 (GNU/Linux)
 
-iD8DBQFDZsV0gIKl8Uu19MoRAspDAJ9atkARy2KSXaIv0EgXlqWK4GqL3ACcCfKU
-kuEYjeT5oNLpB5Q6sMHCS9I=
-=nC9q
+iD8DBQFDfrcXgIKl8Uu19MoRApOJAJ9W5fCiNzwMSAtnT75DNfSRckdz1gCfY9wk
+ZtHzaP52oarGFYzLYeYCmRY=
+=4k4x
 -----END PGP SIGNATURE-----
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 (file)
index 0000000..e69de29
index 00567f7e8893dc4570e30a86ce35d15bd8974af5..3105577d8e15157256b49007cd4aa4bf4df9d167 100755 (executable)
@@ -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 (file)
index 0000000..d66abe8
--- /dev/null
@@ -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
+}