Make sure we set env vars before trying to use them #111022 by Attila Stehr.
authorMike Frysinger <vapier@gentoo.org>
Tue, 1 Nov 2005 01:31:00 +0000 (01:31 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 1 Nov 2005 01:31:00 +0000 (01:31 +0000)
Package-Manager: portage-2.0.53_rc6

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

index 0eaca93cf942489e457c3fba9ae21ab6fa400448..e6ee745f43ea3762a19cb0dd8d8724c12fdeb382 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.109 2005/10/02 20:51:15 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.110 2005/11/01 01:31:00 vapier Exp $
+
+*gcc-config-1.3.12-r3 (01 Nov 2005)
+
+  01 Nov 2005; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.3.12,
+  +gcc-config-1.3.12-r3.ebuild:
+  Make sure we set env vars before trying to use them #111022 by Attila Stehr.
 
 *gcc-config-2.0.0_beta2 (02 Oct 2005)
 
index 184427867c157c59f56322c44ed46bc851754dcc..d3b97300b197a851d354af2fa2c03e24469039b4 100644 (file)
@@ -1,32 +1,34 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 1bf4d31230a0164479c52ff56f70be66 ChangeLog 21800
-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 4f38cac9c208dfd3f4e8b798a8108366 gcc-config-1.3.12.ebuild 1389
-MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
-MD5 e7cff05773a87f50205a8777e899b626 gcc-config-1.3.12-r1.ebuild 1392
-MD5 95389ec5fa2833933f895e112caa78c6 gcc-config-1.3.12-r2.ebuild 1381
-MD5 35fee17d74ce037258c00f8d9e9dd820 gcc-config-2.0.0_beta2.ebuild 781
+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 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 3ad3453c2b6d47e7f169f858eebce9f0 files/gcc-config-1.3.12 17101
+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 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.12-r1 0
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.12-r2 0
 MD5 1b19cf481e2777dff9722f36698c3b24 files/wrapper-1.4.7.c 9837
-MD5 c7cf3a3617d90adfaacc7c2c012ddfb0 files/digest-gcc-config-2.0.0_beta2 79
+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 35fee17d74ce037258c00f8d9e9dd820 gcc-config-2.0.0_beta2.ebuild 781
+MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2 (GNU/Linux)
 
-iD8DBQFDQEhzOpjtAl+gMRURAseyAKCF5JEXM5PRQSZsTAzmWly7fdjb6gCg061E
-OopIezq+xKgY3CJnCjPSlgg=
-=ZPLY
+iD8DBQFDZsV0gIKl8Uu19MoRAspDAJ9atkARy2KSXaIv0EgXlqWK4GqL3ACcCfKU
+kuEYjeT5oNLpB5Q6sMHCS9I=
+=nC9q
 -----END PGP SIGNATURE-----
diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.12-r3 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.12-r3
new file mode 100644 (file)
index 0000000..e69de29
index f11433a7cdc845548e0190cc7c30fc93ffc86fd7..00567f7e8893dc4570e30a86ce35d15bd8974af5 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.7 2005/09/18 04:51:24 vapier Exp $
+# $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 $
 
 trap ":" INT QUIT TSTP
 
@@ -607,6 +607,8 @@ if [[ ${DOIT} == "switch_profile" ]] && [[ -z ${CC_COMP} ]] ; then
        usage 1
 fi
 
+cmd_setup
+
 if [[ -z ${CC_COMP} ]] ; then
        if get_current_profile &>/dev/null ; then
                CC_COMP="$(get_current_profile)"
@@ -619,7 +621,6 @@ fi
 if [[ ${DOIT} != "get_current_profile" ]] ; then
        GCC_LIB=$(
                source "${GCC_ENV_D}/${CC_COMP}"
-               cmd_setup
                echo ${LDPATH} | ${AWK} -F/ '{ print  "/"$2"/"$3"/"$4"/" }'
        )
 
diff --git a/sys-devel/gcc-config/gcc-config-1.3.12-r3.ebuild b/sys-devel/gcc-config/gcc-config-1.3.12-r3.ebuild
new file mode 100644 (file)
index 0000000..bdf9db1
--- /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-r3.ebuild,v 1.1 2005/11/01 01:31:00 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
+}