From 5c8596967cc7739b00e619d78d0d000597197a67 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 1 Feb 2005 05:38:27 +0000 Subject: Make gcc-config support gcc version strings containing '-'. This allows for wider multislot support. Package-Manager: portage-2.0.51-r15 --- sys-devel/gcc-config/ChangeLog | 10 ++++- sys-devel/gcc-config/Manifest | 14 +++--- .../gcc-config/files/digest-gcc-config-1.3.10 | 0 .../gcc-config/files/digest-gcc-config-1.3.10-r1 | 0 sys-devel/gcc-config/files/gcc-config-1.3.10 | 16 ++++--- sys-devel/gcc-config/gcc-config-1.3.10-r1.ebuild | 52 ++++++++++++++++++++++ sys-devel/gcc-config/gcc-config-1.3.10.ebuild | 52 ---------------------- 7 files changed, 79 insertions(+), 65 deletions(-) delete mode 100644 sys-devel/gcc-config/files/digest-gcc-config-1.3.10 create mode 100644 sys-devel/gcc-config/files/digest-gcc-config-1.3.10-r1 create mode 100644 sys-devel/gcc-config/gcc-config-1.3.10-r1.ebuild delete mode 100644 sys-devel/gcc-config/gcc-config-1.3.10.ebuild (limited to 'sys-devel') diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog index a8f873364dc5..0b66eff42590 100644 --- a/sys-devel/gcc-config/ChangeLog +++ b/sys-devel/gcc-config/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-devel/gcc-config # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.78 2005/01/31 05:39:29 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.79 2005/02/01 05:38:27 eradicator Exp $ + +*gcc-config-1.3.10-r1 (31 Jan 2005) + + 31 Jan 2005; Jeremy Huddleston + files/gcc-config-1.3.10, +gcc-config-1.3.10-r1.ebuild, + -gcc-config-1.3.10.ebuild: + Make gcc-config support gcc version strings containing '-'. This allows for + wider multislot support. *gcc-config-1.3.10 (30 Jan 2005) diff --git a/sys-devel/gcc-config/Manifest b/sys-devel/gcc-config/Manifest index 78fa4401697f..8a2f28bac817 100644 --- a/sys-devel/gcc-config/Manifest +++ b/sys-devel/gcc-config/Manifest @@ -1,11 +1,11 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 d18eee9990d63f7d65853267584e5d32 ChangeLog 15670 +MD5 ac4b2313bf51b65d7c58382a72f06a4f ChangeLog 15957 MD5 012868b502a874cc4f1abfa862bafb8a gcc-config-1.3.8-r4.ebuild 1429 MD5 14131db9b618f3ccc2efbd915e0fbaf8 gcc-config-1.3.9.ebuild 1437 MD5 567094e03359ffc1c95af7356395228d metadata.xml 162 -MD5 47ab493a752835edc3158beb3d6c8af7 gcc-config-1.3.10.ebuild 1508 +MD5 9118b0dcd3edf14c0a7cc9057af8c660 gcc-config-1.3.10-r1.ebuild 1511 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.8-r4 0 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.9 0 MD5 396974306d3ccab6db5354d94ffd21fd files/gcc-config-1.3.8 12498 @@ -13,12 +13,12 @@ MD5 e7c7a83406a374ee4262c97d6e5673b2 files/wrapper-1.4.3.c 7545 MD5 7723c767ef3e4935c2299fb253412d7e files/wrapper-1.4.4.c 10132 MD5 a6c7c0536d2ab7cfc65d7169178ab71d files/wrapper-1.4.5.c 10668 MD5 0181c8024c1c636b700dbf7a11f07fd6 files/gcc-config-1.3.9 12641 -MD5 9c5f1032109e37d3f576d3ba2d1d28a9 files/gcc-config-1.3.10 13026 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.10 0 +MD5 b979d8ab219868fc127151f6abe094eb files/gcc-config-1.3.10 13258 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.10-r1 0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) -iD8DBQFB/c1oArHZZzCEUG0RArWmAJ9ZI5bza/oSsAbqr9lwhIA83cIT8gCaAwo5 -/fVoFboXBAOcfK2GwN0QOOo= -=pYFM +iD8DBQFB/xXgArHZZzCEUG0RAlUVAJ41aZcpT1pIB/gzT2wR+y6bNhmEUwCdGbyl +eBgRemMJ81Bd+/7m+YnrvNE= +=Y20n -----END PGP SIGNATURE----- diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.10 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.10 deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.10-r1 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.10-r1 new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.10 b/sys-devel/gcc-config/files/gcc-config-1.3.10 index b0009a2a5eb8..911e33c4acfe 100755 --- a/sys-devel/gcc-config/files/gcc-config-1.3.10 +++ b/sys-devel/gcc-config/files/gcc-config-1.3.10 @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 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.10,v 1.1 2005/01/31 05:39:30 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.10,v 1.2 2005/02/01 05:38:27 eradicator Exp $ # Author: Martin Schlemmer trap ":" INT QUIT TSTP @@ -486,13 +486,18 @@ if [[ -z ${CC_COMP} ]] ; then fi if [[ ${DOIT} != "get_current_profile" ]] ; then - CC_COMP_NO_SPECS=$(echo ${CC_COMP} | awk -F- '{ print $1"-"$2"-"$3"-"$4"-"$5 }') - GCC_LIB=$(source "${GCC_ENV_D}/${CC_COMP}" cmd_setup echo ${LDPATH} | ${AWK} -F/ '{ print "/"$2"/"$3"/"$4"/" }') - if [[ ! -d ${ROOT}/${GCC_LIB}/${CC_COMP_NO_SPECS%-*}/${CC_COMP_NO_SPECS##*-} ]] || \ + CC_COMP_TARGET=$(echo ${CC_COMP} | awk -F- '{ print $1"-"$2"-"$3"-"$4 }') + CC_COMP_VERSION=${CC_COMP/${CC_COMP_TARGET}-/} + + if [[ ! -d ${ROOT}/${GCC_LIB}/${CC_COMP_TARGET}/${CC_COMP_VERSION} ]]; then + CC_COMP_VERSION=${CC_COMP_VERSION%-*} + fi + + if [[ ! -d ${ROOT}/${GCC_LIB}/${CC_COMP_TARGET}/${CC_COMP_VERSION} ]] || \ [[ ! -f ${GCC_ENV_D}/${CC_COMP} ]] then eerror "$0: Profile does not exist or invalid setting for ${GCC_ENV_D}/${CC_COMP}" 1>&2 @@ -504,7 +509,8 @@ if [[ ${CHECK_CHOST} = "yes" ]] ; then # Chosen CHOST are not the same as the real CHOST according to # make.conf, and --use-portage-chost option was given, so do nothing get_real_chost - [[ ${CC_COMP%-*} != ${REAL_CHOST} ]] && exit 0 + CC_COMP_TARGET=$(echo ${CC_COMP} | awk -F- '{ print $1"-"$2"-"$3"-"$4 }') + [[ ${CC_COMP_TARGET} != ${REAL_CHOST} ]] && exit 0 fi eval ${DOIT} diff --git a/sys-devel/gcc-config/gcc-config-1.3.10-r1.ebuild b/sys-devel/gcc-config/gcc-config-1.3.10-r1.ebuild new file mode 100644 index 000000000000..16122856cf16 --- /dev/null +++ b/sys-devel/gcc-config/gcc-config-1.3.10-r1.ebuild @@ -0,0 +1,52 @@ +# 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.10-r1.ebuild,v 1.1 2005/02/01 05:38:27 eradicator Exp $ + +inherit toolchain-funcs + +# Version of .c wrapper to use +W_VER="1.4.5" + +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 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + +# Funky fixes for multilib... please test... +KEYWORDS="-*" +IUSE="" + +DEPEND="virtual/libc + >=sys-apps/portage-2.0.47-r10" # We need portageq ... + +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/libexec/gcc-config + doexe wrapper || 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 +} diff --git a/sys-devel/gcc-config/gcc-config-1.3.10.ebuild b/sys-devel/gcc-config/gcc-config-1.3.10.ebuild deleted file mode 100644 index 6fac1019fb3e..000000000000 --- a/sys-devel/gcc-config/gcc-config-1.3.10.ebuild +++ /dev/null @@ -1,52 +0,0 @@ -# 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.10.ebuild,v 1.1 2005/01/31 05:39:29 eradicator Exp $ - -inherit toolchain-funcs - -# Version of .c wrapper to use -W_VER="1.4.5" - -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 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" - -# Funky fixes for multilib... please test... -KEYWORDS="-*" -IUSE="" - -DEPEND="virtual/libc - >=sys-apps/portage-2.0.47-r10" # We need portageq ... - -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/libexec/gcc-config - doexe wrapper || 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 -} -- cgit v1.2.3-65-gdbad