summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-devel/gcc-config/ChangeLog8
-rw-r--r--sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r10
-rwxr-xr-xsys-devel/gcc-config/files/gcc-config-1.3.74
-rw-r--r--sys-devel/gcc-config/gcc-config-1.3.7-r1.ebuild80
4 files changed, 90 insertions, 2 deletions
diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog
index ef102d5a8c1b..b2cbe7d36a48 100644
--- a/sys-devel/gcc-config/ChangeLog
+++ b/sys-devel/gcc-config/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-devel/gcc-config
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.61 2004/10/13 16:29:03 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.62 2004/10/26 03:14:01 vapier Exp $
+
+*gcc-config-1.3.7-r1 (25 Oct 2004)
+
+ 25 Oct 2004; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.3.7:
+ Make sure umask doesn't screw up the install #68699. Run gcc-config from
+ $S instead of expecting $PATH to contain something functional #68700.
*gcc-config-1.3.7 (13 Oct 2004)
diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r1 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r1
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/sys-devel/gcc-config/files/digest-gcc-config-1.3.7-r1
diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.7 b/sys-devel/gcc-config/files/gcc-config-1.3.7
index fa74a9c55789..b8d7e6e065cc 100755
--- a/sys-devel/gcc-config/files/gcc-config-1.3.7
+++ b/sys-devel/gcc-config/files/gcc-config-1.3.7
@@ -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.7,v 1.2 2004/10/13 19:46:19 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.7,v 1.3 2004/10/26 03:14:01 vapier Exp $
# Author: Martin Schlemmer <azarah@gentoo.org>
trap ":" INT QUIT TSTP
@@ -10,6 +10,7 @@ source /etc/init.d/functions.sh || {
echo "$0: Could not source /etc/init.d/functions.sh!"
exit 1
}
+umask 022
usage() {
cat << "USAGE_END"
@@ -182,6 +183,7 @@ switch_profile() {
GCC_BIN_PATH="${PATH}"
# Fix environment
source /etc/profile
+ umask 022
# These might not be installed, and we want to update the mtime
# for ccache and distcc anyhow ...
diff --git a/sys-devel/gcc-config/gcc-config-1.3.7-r1.ebuild b/sys-devel/gcc-config/gcc-config-1.3.7-r1.ebuild
new file mode 100644
index 000000000000..a58d1dafd74c
--- /dev/null
+++ b/sys-devel/gcc-config/gcc-config-1.3.7-r1.ebuild
@@ -0,0 +1,80 @@
+# 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/gcc-config-1.3.7-r1.ebuild,v 1.1 2004/10/26 03:14:01 vapier Exp $
+
+# Version of .c wrapper to use
+W_VER="1.4.2"
+
+DISABLE_GEN_GCC_WRAPPERS="yes"
+
+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 ~sparc ~x86"
+IUSE=""
+
+DEPEND="virtual/libc
+ >=sys-apps/portage-2.0.47-r10" # We need portageq ...
+
+src_install() {
+ einfo "Installing gcc-config..."
+ newbin ${FILESDIR}/${PN}-${PV} ${PN}
+ dosed "s:PORTAGE-VERSION:${PV}:" /usr/bin/${PN}
+
+ # Make sure we use the new version of gcc-config
+ export PATH="${D}/usr/bin:${PATH}"
+
+ einfo "Compiling wrapper..."
+ ${CC:-gcc} -O2 -Wall -o ${WORKDIR}/wrapper \
+ ${FILESDIR}/wrapper-${W_VER}.c || die
+
+ exeinto /usr/lib/gcc-config
+ doexe ${WORKDIR}/wrapper || die
+
+ # Only setup this if we have a proper gcc version installed, else
+ # we will nuke the non gcc-config versions ...
+ if gcc-config --get-current-profile &> /dev/null
+ then
+ einfo "Creating wrappers for compiler tools..."
+ exeinto /lib
+ newexe ${WORKDIR}/wrapper cpp
+
+ local gcc_bin_path="$(gcc-config --get-bin-path)"
+ exeinto /usr/bin
+ for x in gcc cpp cc c++ g++ f77 g77 gcj \
+ ${CHOST}-gcc ${CHOST}-c++ ${CHOST}-g++ \
+ ${CHOST}-f77 ${CHOST}-g77 ${CHOST}-gcj
+ do
+ # Make sure we only install wrappers for those present ...
+ [ -x "${gcc_bin_path}/${x}" -o \
+ "${x}" = "c++" -o "${x}" = "${REAL_CHOST}-c++" -o \
+ "${x}" = "cpp" -o "${x}" = "cc" ] && \
+ newexe ${WORKDIR}/wrapper ${x}
+ done
+ fi
+}
+
+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 ...
+ if [ -L ${ROOT}/usr/include/g++ ]
+ then
+ rm -f ${ROOT}/usr/include/g++
+ fi
+ if [ -L ${ROOT}/usr/include/g++-v3 ]
+ then
+ rm -f ${ROOT}/usr/include/g++-v3
+ fi
+
+ if [ ${ROOT} = "/" ]
+ then
+ gcc-config $(/usr/bin/gcc-config --get-current-profile)
+ fi
+ fi
+}