# ChangeLog for sys-devel/gcc-config
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.196 2011/11/11 12:15:40 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.197 2011/11/11 16:12:49 vapier Exp $
+
+*gcc-config-1.5-r2 (11 Nov 2011)
+
+ 11 Nov 2011; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.5,
+ +gcc-config-1.5-r2.ebuild:
+ Add a fallback when tac is unavailable as suggested by Alexis Ballier
+ #390179.
11 Nov 2011; Alexis Ballier <aballier@gentoo.org> gcc-config-1.5-r1.ebuild:
unkeyword 1.5 on fbsd due to bug #390179
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
AUX gcc-config-1.4.1 21703 RMD160 cb01cc5713dec475ff07cfe4f94c038520692a8b SHA1 cae8ea36b179057979dcbe1122ef886d02bae679 SHA256 809e8c3234bf4138d5274ab2934c95e4d281fbea09d89e46ea0f686c4ca23c16
-AUX gcc-config-1.5 19498 RMD160 804f6fcc4cc32497287075c31b33ace61b13c2ba SHA1 9d3477e9382fe606a9c25999ec147f464019d04e SHA256 12363295a56d32b77018ee94e8cf93aa707bf692bb928c0b6b3769c4be5de0ec
+AUX gcc-config-1.5 20073 RMD160 d74b1f29f1f2f2a7ecec11ce869fc5eaa72eb080 SHA1 38caed35e10df7f5163a43b2769e95aed7890601 SHA256 11e72ed88ab2adab94b6004d8a5b5891e2de711ada82581a8dde6d905d713845
AUX wrapper-1.5.1.c 9788 RMD160 b628944ee01dd772eb917cd08d13dc41bf58409f SHA1 51ac1f9419bc2230a9ce2196e70b5ee4ba61be18 SHA256 991981059fdcd0a9c76d73ff2ce576e553f37ae7d3b378b92ead553963f7339a
AUX wrapper-1.5.2.c 8021 RMD160 1b008c513fc38009665964b6dfeafa66e1899fb8 SHA1 1a83c24b859b0b61fe6dc420debe57054eb87a1b SHA256 5ed07f88103ecea30f66a4415421f90d1ddfdd4a902aa34a346a7883cd947e36
EBUILD gcc-config-1.4.1-r1.ebuild 1645 RMD160 4d94a4a9be9fe092e6b6ba3f0cb665641271e58a SHA1 d9aa6e233c13827c6a551b9b6b3a21efe5eb230c SHA256 f19f05b52db8eb0816ad4953ecba68a28943a6c8948439edc35c56ce18761b1d
EBUILD gcc-config-1.5-r1.ebuild 1647 RMD160 ebd03e749a514a0cf446ae323e7bf8e6926621e2 SHA1 da17446b4b83cce6d3d488b77eab1b1d7a496db8 SHA256 96e9b0e83ac1ce0e194f839b0dbfa713beb3951c7c53619fe80afaacba8f0c7b
-MISC ChangeLog 35108 RMD160 3d1dc7e2f1104ff13ea80176d02c444b5d85963f SHA1 3defb83ac6e3adb6e91b8105992c4c031290d1a9 SHA256 7dbec2c927e7683af9c929769aa42cbb6f85dcee981b82fc013093be142a52ba
+EBUILD gcc-config-1.5-r2.ebuild 1645 RMD160 faef9289957d5773629265777703b0d5c843067a SHA1 78e489d76d35ca3d1babc30cc7765a2cd37ad4e1 SHA256 754b43200ea77533efa3d582a457c960d864a3e1ab25c1abd49afeba5391f2c4
+MISC ChangeLog 35325 RMD160 fc99e00b6d910635b83c99bba21abde1f667edbf SHA1 849f6ef328fe21ff32a0b160119030c63dcb6025 SHA256 0ff1fd7b1a08b596ffb87ccb5abe39a623a88eeeb388e61c5f13e880a5f81048
MISC metadata.xml 162 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 SHA1 d6b4923897f6ae673b4f93646f5b4ba61d5a2c3c SHA256 65a915d44de1f01d4b7f72d313b4192c38374a9835d24988c00c1e73dca5805a
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iEYEARECAAYFAk69EfEACgkQvFcC4BYPU0oYMgCfWW0S4cjvOPITJxTZWHpPYWU9
-kc8AoL2ToPBX8MP56CXlo297TE6pY5jJ
-=cdrO
+iF4EAREIAAYFAk69SYcACgkQaC/OocHi7JbpnQEAml6T/6pgnlBNLIvMiGDr/LZE
+JY+f6DOo92P3TgZ8hC8A/2nxTU8C2OeiYen1CyUE04TEeuZkNbO/XwZ0IBQb9tm1
+=MUWB
-----END PGP SIGNATURE-----
#!/bin/bash
# Copyright 1999-2011 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.5,v 1.5 2011/03/21 13:49:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.5,v 1.6 2011/11/11 16:12:49 vapier Exp $
# Format of /etc/env.d/gcc/:
# config-TARGET: CURRENT=version for TARGET
SED=$(type -P gsed)
: ${SED:=$(type -P sed)}
+# Further pain: `tac` is not available everywhere #390179
+if ! type -P tac >/dev/null ; then
+ tac() { ${SED} -e '1!G;h;$!d' "$@" ; }
+fi
+
GENTOO_LIBDIR="lib"
[[ ${GENTOO_LIBDIR} == @*@ ]] && GENTOO_LIBDIR="lib"
[[ -e ${wrapper} ]] && break
done
- # Update the wrappers for this profile
+ # Update the wrappers for this profile. We maintain this list
+ # by hand as the tools that are available can come & go if the
+ # user re-emerges gcc with dif USE flags. We need to clean out
+ # the old wrappers if the functionality no longer exists.
+ # XXX: Future work: save the list of wrappers we generated in
+ # the generated env.d file so we can scrub things better.
+ # After that, we can use a dynamic list based on what tools are
+ # actually available in ${GCC_PATH}/.
for x in {,${CTARGET}-}{cpp,cc,gcc,c++,g++,f77,g77,gcj,gcjh,gcov,gdc,gdmd,gfortran,gccgo} ; do
# Obviously don't want to touch native stuff for cross-compilers
[[ ${x} != ${CTARGET}-* ]] && is_cross_compiler && continue
rcsfile="$RCSfile: gcc-config-1.5,v $"
rcsfile=${rcsfile#: }
rcsfile=${rcsfile%,v*}
- cvsrev="$Revision: 1.5 $"
+ cvsrev="$Revision: 1.6 $"
cvsrev=${cvsrev#: }
- cvsdate="$Date: 2011/03/21 13:49:02 $"
+ cvsdate="$Date: 2011/11/11 16:12:49 $"
cvsdate=${cvsdate#: }
echo "${rcsfile} (r${cvsrev% *} @ ${cvsdate% *})"
exit 0
--- /dev/null
+# Copyright 1999-2011 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.5-r2.ebuild,v 1.1 2011/11/11 16:12:49 vapier Exp $
+
+inherit flag-o-matic toolchain-funcs multilib
+
+# Version of .c wrapper to use
+W_VER="1.5.2"
+
+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 ~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="!app-admin/eselect-compiler"
+
+S=${WORKDIR}
+
+src_unpack() {
+ cp "${FILESDIR}"/wrapper-${W_VER}.c "${S}"/wrapper.c || die
+}
+
+src_compile() {
+ strip-flags
+ emake CC="$(tc-getCC)" wrapper || die "compile wrapper"
+}
+
+src_install() {
+ newbin "${FILESDIR}"/${PN}-${PV} ${PN} || die "install gcc-config"
+ sed -i \
+ -e "s:@GENTOO_LIBDIR@:$(get_libdir):g" \
+ "${D}"/usr/bin/${PN}
+
+ exeinto /usr/$(get_libdir)/misc
+ newexe wrapper gcc-config || die "install wrapper"
+}
+
+pkg_postinst() {
+ # Scrub eselect-compiler remains
+ if [[ -e ${ROOT}/etc/env.d/05compiler ]] ; then
+ rm -f "${ROOT}"/etc/env.d/05compiler
+ fi
+
+ # Make sure old versions dont exist #79062
+ rm -f "${ROOT}"/usr/sbin/gcc-config
+
+ # 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
+
+ # Do we have a valid multi ver setup ?
+ local x
+ for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do
+ gcc-config ${x}
+ done
+}