summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2003-03-09 03:23:08 +0000
committerMartin Schlemmer <azarah@gentoo.org>2003-03-09 03:23:08 +0000
commit5b00d5588b9f681e89b611410ab9631c9f1d2b55 (patch)
treece631967d71e30a23326387fbb905a9a78015095 /sys-devel/gcc
parenttouchups + fix for #17074 (diff)
downloadhistorical-5b00d5588b9f681e89b611410ab9631c9f1d2b55.tar.gz
historical-5b00d5588b9f681e89b611410ab9631c9f1d2b55.tar.bz2
historical-5b00d5588b9f681e89b611410ab9631c9f1d2b55.zip
change handeling for fix_libtool_files.sh. set LD_LIBRARY_PATH to prevent problems of missing libstdc++.so.5
Diffstat (limited to 'sys-devel/gcc')
-rw-r--r--sys-devel/gcc/ChangeLog8
-rw-r--r--sys-devel/gcc/files/awk/fixlafiles.awk6
-rw-r--r--sys-devel/gcc/files/fix_libtool_files.sh13
-rw-r--r--sys-devel/gcc/gcc-3.2.2-r1.ebuild46
-rw-r--r--sys-devel/gcc/gcc-3.2.2-r3.ebuild46
-rw-r--r--sys-devel/gcc/gcc-3.2.2.ebuild46
6 files changed, 115 insertions, 50 deletions
diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog
index 12bd096c193a..8a3a169a93e4 100644
--- a/sys-devel/gcc/ChangeLog
+++ b/sys-devel/gcc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-devel/gcc
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.77 2003/03/05 19:46:22 method Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.78 2003/03/09 03:23:08 azarah Exp $
+
+ 09 Mar 2003; Martin Schlemmer <azarah@gentoo.org> gcc-3.2.2*.ebuild :
+ Fix handling of fix_libtool_files.sh to be more $FILESDIR independant.
+ We basically install it to /sbin now, and then call it from there. Also
+ export LD_LIBRARY_PATH with new gcc library path in it to prevent gcc-config
+ from borking when run. This will hopefully fix bugs #15288, #16632, #16797.
*gcc-3.2.2-r3 (03 Mar 2003)
diff --git a/sys-devel/gcc/files/awk/fixlafiles.awk b/sys-devel/gcc/files/awk/fixlafiles.awk
index 29d86f07c7ed..c65e235ee2e9 100644
--- a/sys-devel/gcc/files/awk/fixlafiles.awk
+++ b/sys-devel/gcc/files/awk/fixlafiles.awk
@@ -1,7 +1,7 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# Author: Martin Schlemmer <azarah@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/fixlafiles.awk,v 1.5 2003/02/03 18:35:40 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/awk/fixlafiles.awk,v 1.6 2003/03/09 03:23:08 azarah Exp $
function einfo(string)
{
@@ -79,7 +79,7 @@ BEGIN {
if (DIRLIST[x] ~ GCCLIB) continue
- einfo("Scanning " DIRLIST[x] "...")
+ einfo(" Scanning " DIRLIST[x] "...")
pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null"
while (((pipe) | getline la_files) > 0) {
@@ -100,7 +100,7 @@ BEGIN {
if (CHANGED) {
- ewarn(" FIXING: " la_files)
+ ewarn(" FIXING: " la_files)
while ((getline la_data < (la_files)) > 0) {
diff --git a/sys-devel/gcc/files/fix_libtool_files.sh b/sys-devel/gcc/files/fix_libtool_files.sh
index 9d1865fc7e1a..12f3bcbee9d7 100644
--- a/sys-devel/gcc/files/fix_libtool_files.sh
+++ b/sys-devel/gcc/files/fix_libtool_files.sh
@@ -2,10 +2,10 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# Author: Martin Schlemmer <azarah@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.4 2002/11/25 06:45:53 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.5 2003/03/09 03:23:08 azarah Exp $
source /etc/profile
-source /etc/init.d/functions.sh
+source /sbin/functions.sh
if [ "`id -u`" -ne 0 ]
then
@@ -33,17 +33,16 @@ then
usage
fi
-PORTDIR="`/usr/bin/python -c 'import portage; print portage.settings[\"PORTDIR\"];'`"
+AWKDIR="/lib/rcscripts/awk"
-AWKDIR="${PORTDIR}/sys-devel/gcc/files/awk"
-
-if [ ! -r ${AWKDIR}/fixlafiles.awk ]
+if [ ! -r "${AWKDIR}/fixlafiles.awk" ]
then
eerror "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!"
exit 1
fi
-/bin/gawk -v OLDVER="$1" -f ${AWKDIR}/fixlafiles.awk
+einfo "Scannig libtool files for hardcoded gcc $1 library path..."
+/bin/gawk -v OLDVER="$1" -f "${AWKDIR}/fixlafiles.awk"
# vim:ts=4
diff --git a/sys-devel/gcc/gcc-3.2.2-r1.ebuild b/sys-devel/gcc/gcc-3.2.2-r1.ebuild
index 66c25ffa62f0..e8c1e4f2a7c7 100644
--- a/sys-devel/gcc/gcc-3.2.2-r1.ebuild
+++ b/sys-devel/gcc/gcc-3.2.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.2.2-r1.ebuild,v 1.3 2003/02/25 13:50:16 dragon Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.2.2-r1.ebuild,v 1.4 2003/03/09 03:23:08 azarah Exp $
IUSE="static nls bootstrap java build"
@@ -116,6 +116,19 @@ PDEPEND="sys-devel/gcc-config"
# Hack used to patch Makefiles to install into the build dir
FAKE_ROOT=""
+chk_gcc_version() {
+ # This next bit is for updating libtool linker scripts ...
+ OLD_GCC_VERSION="`gcc -dumpversion`"
+
+ if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
+ then
+ echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion
+ fi
+
+ # Did we check the version ?
+ touch ${WORKDIR}/.chkgccversion
+}
+
src_unpack() {
if [ -z "${SNAPSHOT}" ]
then
@@ -209,14 +222,6 @@ src_unpack() {
rm -f ${x}.orig
done
-
- # This next bit is for updating libtool linker scripts ...
- OLD_GCC_VERSION="`gcc -dumpversion`"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion
- fi
}
src_compile() {
@@ -464,13 +469,30 @@ src_install() {
rm -rf ${D}/usr/share/{man,info}
fi
+ # Rather install the script, else portage with changing $FILESDIR
+ # between binary and source package borks things ....
+ insinto /lib/rcscripts/awk
+ doins ${FILESDIR}/awk/fixlafiles.awk
+ exeinto /sbin
+ doexe ${FILESDIR}/fix_libtool_files.sh
+
# Fix ncurses b0rking
find ${D}/ -name '*curses.h' -exec rm -f {} \;
}
+pkg_preinst() {
+
+ if [ ! -f "${WORKDIR}/.chkgccversion" ]
+ then
+ chk_gcc_version
+ fi
+}
+
pkg_postinst() {
- if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" == "${CCHOST}" ]
+ export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
+
+ if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" = "${CCHOST}" ]
then
gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
fi
@@ -480,9 +502,7 @@ pkg_postinst() {
then
OLD_GCC_VERSION="`cat ${WORKDIR}/.oldgccversion`"
- cp -f ${FILESDIR}/fix_libtool_files.sh ${T}
- chmod +x ${T}/fix_libtool_files.sh
- ${T}/fix_libtool_files.sh ${OLD_GCC_VERSION}
+ /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION}
fi
# Fix ncurses b0rking (if r5 isn't unmerged)
diff --git a/sys-devel/gcc/gcc-3.2.2-r3.ebuild b/sys-devel/gcc/gcc-3.2.2-r3.ebuild
index e96763a832fd..0711fc2a44a7 100644
--- a/sys-devel/gcc/gcc-3.2.2-r3.ebuild
+++ b/sys-devel/gcc/gcc-3.2.2-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.2.2-r3.ebuild,v 1.3 2003/03/05 19:46:22 method Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.2.2-r3.ebuild,v 1.4 2003/03/09 03:23:08 azarah Exp $
IUSE="static nls bootstrap java build"
@@ -126,6 +126,19 @@ PDEPEND="sys-devel/gcc-config"
# Hack used to patch Makefiles to install into the build dir
FAKE_ROOT=""
+chk_gcc_version() {
+ # This next bit is for updating libtool linker scripts ...
+ OLD_GCC_VERSION="`gcc -dumpversion`"
+
+ if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
+ then
+ echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion
+ fi
+
+ # Did we check the version ?
+ touch ${WORKDIR}/.chkgccversion
+}
+
src_unpack() {
if [ -z "${SNAPSHOT}" ]
then
@@ -219,14 +232,6 @@ src_unpack() {
rm -f ${x}.orig
done
-
- # This next bit is for updating libtool linker scripts ...
- OLD_GCC_VERSION="`gcc -dumpversion`"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion
- fi
}
src_compile() {
@@ -479,13 +484,30 @@ src_install() {
rm -rf ${D}/usr/share/{man,info}
fi
+ # Rather install the script, else portage with changing $FILESDIR
+ # between binary and source package borks things ....
+ insinto /lib/rcscripts/awk
+ doins ${FILESDIR}/awk/fixlafiles.awk
+ exeinto /sbin
+ doexe ${FILESDIR}/fix_libtool_files.sh
+
# Fix ncurses b0rking
find ${D}/ -name '*curses.h' -exec rm -f {} \;
}
+pkg_preinst() {
+
+ if [ ! -f "${WORKDIR}/.chkgccversion" ]
+ then
+ chk_gcc_version
+ fi
+}
+
pkg_postinst() {
- if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" == "${CCHOST}" ]
+ export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
+
+ if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" = "${CCHOST}" ]
then
gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
fi
@@ -495,9 +517,7 @@ pkg_postinst() {
then
OLD_GCC_VERSION="`cat ${WORKDIR}/.oldgccversion`"
- cp -f ${FILESDIR}/fix_libtool_files.sh ${T}
- chmod +x ${T}/fix_libtool_files.sh
- ${T}/fix_libtool_files.sh ${OLD_GCC_VERSION}
+ /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION}
fi
# Fix ncurses b0rking (if r5 isn't unmerged)
diff --git a/sys-devel/gcc/gcc-3.2.2.ebuild b/sys-devel/gcc/gcc-3.2.2.ebuild
index 4c38d5895cf9..73f86990941e 100644
--- a/sys-devel/gcc/gcc-3.2.2.ebuild
+++ b/sys-devel/gcc/gcc-3.2.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.2.2.ebuild,v 1.11 2003/02/25 13:50:16 dragon Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.2.2.ebuild,v 1.12 2003/03/09 03:23:08 azarah Exp $
IUSE="static nls bootstrap java build"
@@ -115,6 +115,19 @@ PDEPEND="sys-devel/gcc-config"
# Hack used to patch Makefiles to install into the build dir
FAKE_ROOT=""
+chk_gcc_version() {
+ # This next bit is for updating libtool linker scripts ...
+ OLD_GCC_VERSION="`gcc -dumpversion`"
+
+ if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
+ then
+ echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion
+ fi
+
+ # Did we check the version ?
+ touch ${WORKDIR}/.chkgccversion
+}
+
src_unpack() {
if [ -z "${SNAPSHOT}" ]
then
@@ -205,14 +218,6 @@ src_unpack() {
rm -f ${x}.orig
done
-
- # This next bit is for updating libtool linker scripts ...
- OLD_GCC_VERSION="`gcc -dumpversion`"
-
- if [ "${OLD_GCC_VERSION}" != "${MY_PV_FULL}" ]
- then
- echo "${OLD_GCC_VERSION}" > ${WORKDIR}/.oldgccversion
- fi
}
src_compile() {
@@ -477,13 +482,30 @@ src_install() {
rm -rf ${D}/usr/share/{man,info}
fi
+ # Rather install the script, else portage with changing $FILESDIR
+ # between binary and source package borks things ....
+ insinto /lib/rcscripts/awk
+ doins ${FILESDIR}/awk/fixlafiles.awk
+ exeinto /sbin
+ doexe ${FILESDIR}/fix_libtool_files.sh
+
# Fix ncurses b0rking
find ${D}/ -name '*curses.h' -exec rm -f {} \;
}
+pkg_preinst() {
+
+ if [ ! -f "${WORKDIR}/.chkgccversion" ]
+ then
+ chk_gcc_version
+ fi
+}
+
pkg_postinst() {
- if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" == "${CCHOST}" ]
+ export LD_LIBRARY_PATH="${LIBPATH}:${LD_LIBRARY_PATH}"
+
+ if [ "${ROOT}" = "/" -a "${COMPILER}" = "gcc3" -a "${CHOST}" = "${CCHOST}" ]
then
gcc-config --use-portage-chost ${CCHOST}-${MY_PV_FULL}
fi
@@ -493,9 +515,7 @@ pkg_postinst() {
then
OLD_GCC_VERSION="`cat ${WORKDIR}/.oldgccversion`"
- cp -f ${FILESDIR}/fix_libtool_files.sh ${T}
- chmod +x ${T}/fix_libtool_files.sh
- ${T}/fix_libtool_files.sh ${OLD_GCC_VERSION}
+ /sbin/fix_libtool_files.sh ${OLD_GCC_VERSION}
fi
# Fix ncurses b0rking (if r5 isn't unmerged)