* [gentoo-commits] dev/heroxbd:master commit in: eclass/, sys-devel/gcc/files/
@ 2014-12-10 2:44 Benda XU
0 siblings, 0 replies; only message in thread
From: Benda XU @ 2014-12-10 2:44 UTC (permalink / raw
To: gentoo-commits
commit: 0662c6fe9c0f3da03f11403a145edd6113d65585
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 10 02:51:09 2014 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Wed Dec 10 02:51:09 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=dev/heroxbd.git;a=commit;h=0662c6fe
sys-devel/gcc: Prefixify fix_libtool_files.sh
---
eclass/toolchain.eclass | 14 +++++++++++---
sys-devel/gcc/files/fix_libtool_files.sh | 20 +++++++++++---------
2 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 3e422c6..d24e810 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1728,16 +1728,24 @@ toolchain_src_install() {
# Rather install the script, else portage with changing $FILESDIR
# between binary and source package borks things ....
if ! is_crosscompile ; then
+ cp "${GCC_FILESDIR}"/fix_libtool_files.sh "${T}"
+ cp "${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la "${T}"
+ cp "${GCC_FILESDIR}"/awk/fixlafiles.awk "${T}"
+ eprefixify \
+ "${T}"/fix_libtool_files.sh \
+ "${T}"/fixlafiles.awk-no_gcc_la \
+ "${T}"/fixlafiles.awk
+
insinto "${DATAPATH#${EPREFIX}}"
if tc_version_is_at_least 4.0 ; then
- newins "${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la fixlafiles.awk || die
+ newins "${T}"/fixlafiles.awk-no_gcc_la fixlafiles.awk || die
find "${D}/${LIBPATH}" -name libstdc++.la -type f -exec rm "{}" \;
find "${D}/${LIBPATH}" -name "lib?san.la" -type f -exec rm "{}" \; # 487550
else
- doins "${GCC_FILESDIR}"/awk/fixlafiles.awk || die
+ doins "${T}"/fixlafiles.awk || die
fi
exeinto "${DATAPATH#${EPREFIX}}"
- doexe "${GCC_FILESDIR}"/fix_libtool_files.sh || die
+ doexe "${T}"/fix_libtool_files.sh || die
doexe "${GCC_FILESDIR}"/c{89,99} || die
fi
diff --git a/sys-devel/gcc/files/fix_libtool_files.sh b/sys-devel/gcc/files/fix_libtool_files.sh
index 0c8a42b..4a89bae 100644
--- a/sys-devel/gcc/files/fix_libtool_files.sh
+++ b/sys-devel/gcc/files/fix_libtool_files.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@GENTOO_PORTAGE_EPREFIX@/bin/sh
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.17 2014/05/20 08:00:40 rhill Exp $
@@ -37,12 +37,14 @@ ARGV1=$1
ARGV2=$2
ARGV3=$3
-. /etc/profile || exit 1
+. "@GENTOO_PORTAGE_EPREFIX@"/etc/profile || exit 1
+. "@GENTOO_PORTAGE_EPREFIX@"/etc/init.d/functions.sh || exit 1
-if [ ${EUID:-0} -ne 0 ] ; then
- echo "${0##*/}: Must be root."
- exit 1
-fi
+# Prefix: no!
+#if [ ${EUID:-0} -ne 0 ] ; then
+# eerror "${0##*/}: Must be root."
+# exit 1
+#fi
# make sure the files come out sane
umask 0022
@@ -50,10 +52,10 @@ umask 0022
OLDCHOST=
[ "${ARGV2}" = "--oldarch" ] && OLDCHOST=${ARGV3}
-AWKDIR="/usr/share/gcc-data"
+AWKDIR="@GENTOO_PORTAGE_EPREFIX@/usr/share/gcc-data"
if [ ! -r "${AWKDIR}/fixlafiles.awk" ] ; then
- echo "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!"
+ eerror "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!"
exit 1
fi
@@ -61,7 +63,7 @@ OLDVER=${ARGV1}
export OLDVER OLDCHOST
-echo "Scanning libtool files for hardcoded gcc library paths..."
+einfo "Scanning libtool files for hardcoded gcc library paths..."
exec gawk -f "${AWKDIR}/fixlafiles.awk"
# vim:ts=4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-11 1:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 2:44 [gentoo-commits] dev/heroxbd:master commit in: eclass/, sys-devel/gcc/files/ Benda XU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox