diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-15 18:53:37 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-15 18:53:37 +0000 |
commit | 7fdd7de5ef5ef46a2481546e8265849be62d40e5 (patch) | |
tree | 9540b1888627c41ad09ce19404930d0547de546c /sys-devel/gcc | |
parent | install .awk into /usr/share/gcc-data/ to avoid /lib/ mess, and we dont need ... (diff) | |
download | gentoo-2-7fdd7de5ef5ef46a2481546e8265849be62d40e5.tar.gz gentoo-2-7fdd7de5ef5ef46a2481546e8265849be62d40e5.tar.bz2 gentoo-2-7fdd7de5ef5ef46a2481546e8265849be62d40e5.zip |
Use awk file in /usr/share/gcc-data and tweak the code to be POSIX since it is so simple. #415947 by Jim Faulkner.
(Portage version: 2.2.0_alpha102/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel/gcc')
-rw-r--r-- | sys-devel/gcc/ChangeLog | 6 | ||||
-rw-r--r-- | sys-devel/gcc/files/fix_libtool_files.sh | 30 |
2 files changed, 18 insertions, 18 deletions
diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog index 793a5040d174..f62ed32ee615 100644 --- a/sys-devel/gcc/ChangeLog +++ b/sys-devel/gcc/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-devel/gcc # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.874 2012/05/11 08:49:24 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.875 2012/05/15 18:53:37 vapier Exp $ + + 15 May 2012; Mike Frysinger <vapier@gentoo.org> files/fix_libtool_files.sh: + Use awk file in /usr/share/gcc-data and tweak the code to be POSIX since it is + so simple. #415947 by Jim Faulkner. 11 May 2012; Mike Frysinger <vapier@gentoo.org> gcc-4.5.3-r2.ebuild, gcc-4.6.3.ebuild: diff --git a/sys-devel/gcc/files/fix_libtool_files.sh b/sys-devel/gcc/files/fix_libtool_files.sh index c3a3c61f6774..2aae3a10a55e 100644 --- a/sys-devel/gcc/files/fix_libtool_files.sh +++ b/sys-devel/gcc/files/fix_libtool_files.sh @@ -1,7 +1,7 @@ -#!/bin/bash -# Copyright 1999-2007 Gentoo Foundation +#!/bin/sh +# Copyright 1999-2012 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.14 2007/09/06 11:00:44 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/files/fix_libtool_files.sh,v 1.15 2012/05/15 18:53:36 vapier Exp $ usage() { cat << "USAGE_END" @@ -28,11 +28,10 @@ USAGE_END exit 1 } -if [[ $2 != "--oldarch" && $# -ne 1 ]] || \ - [[ $2 == "--oldarch" && $# -ne 3 ]] -then - usage -fi +case $2 in +--oldarch) [ $# -ne 3 ] && usage ;; +*) [ $# -ne 1 ] && usage ;; +esac ARGV1=$1 ARGV2=$2 @@ -41,7 +40,7 @@ ARGV3=$3 source /etc/profile || exit 1 source /etc/init.d/functions.sh || exit 1 -if [[ ${EUID} -ne 0 ]] ; then +if [ ${EUID:-0} -ne 0 ] ; then eerror "${0##*/}: Must be root." exit 1 fi @@ -49,15 +48,12 @@ fi # make sure the files come out sane umask 0022 -if [[ ${ARGV2} == "--oldarch" ]] && [[ -n ${ARGV3} ]] ; then - OLDCHOST=${ARGV3} -else - OLDCHOST= -fi +OLDCHOST= +[ "${ARGV2}" = "--oldarch" ] && OLDCHOST=${ARGV3} -AWKDIR="/lib/rcscripts/awk" +AWKDIR="/usr/share/gcc-data" -if [[ ! -r ${AWKDIR}/fixlafiles.awk ]] ; then +if [ ! -r "${AWKDIR}/fixlafiles.awk" ] ; then eerror "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!" exit 1 fi @@ -67,6 +63,6 @@ OLDVER=${ARGV1} export OLDVER OLDCHOST einfo "Scanning libtool files for hardcoded gcc library paths..." -gawk -f "${AWKDIR}/fixlafiles.awk" +exec gawk -f "${AWKDIR}/fixlafiles.awk" # vim:ts=4 |