/[gentoo-x86]/eclass/libtool.eclass
Gentoo

Diff of /eclass/libtool.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.108 Revision 1.109
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.108 2013/12/05 16:52:35 blueness Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.109 2013/12/31 16:53:05 vapier Exp $
4 4
5# @ECLASS: libtool.eclass 5# @ECLASS: libtool.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: quickly update bundled libtool code 8# @BLURB: quickly update bundled libtool code
133# If the --shallow option is used, then only ${S}/ltmain.sh will be patched. 133# If the --shallow option is used, then only ${S}/ltmain.sh will be patched.
134# 134#
135# The other options should be avoided in general unless you know what's going on. 135# The other options should be avoided in general unless you know what's going on.
136elibtoolize() { 136elibtoolize() {
137 local x 137 local x
138 local dirs=()
138 local do_portage="no" 139 local do_portage="no"
139 local do_reversedeps="no" 140 local do_reversedeps="no"
140 local do_only_patches="no" 141 local do_only_patches="no"
141 local do_uclibc="yes" 142 local do_uclibc="yes"
142 local deptoremove= 143 local deptoremove=
177 do_uclibc="no" 178 do_uclibc="no"
178 ;; 179 ;;
179 --force) 180 --force)
180 force="true" 181 force="true"
181 ;; 182 ;;
182 *) 183 -*)
183 eerror "Invalid elibtoolize option: ${x}" 184 eerror "Invalid elibtoolize option: ${x}"
184 die "elibtoolize called with ${x} ??" 185 die "elibtoolize called with ${x} ??"
186 ;;
187 *) dirs+=( "${x}" )
185 esac 188 esac
186 done 189 done
187 190
188 [[ ${do_uclibc} == "yes" ]] && elt_patches+=" uclibc-conf uclibc-ltconf" 191 [[ ${do_uclibc} == "yes" ]] && elt_patches+=" uclibc-conf uclibc-ltconf"
189 192
199 202
200 if $(tc-getLD) --version 2>&1 | grep -qs 'GNU gold'; then 203 if $(tc-getLD) --version 2>&1 | grep -qs 'GNU gold'; then
201 elt_patches+=" gold-conf" 204 elt_patches+=" gold-conf"
202 fi 205 fi
203 206
204 # Reuse "$@" for dirs to patch 207 # Find out what dirs to scan.
205 set --
206 if [[ ${do_shallow} == "yes" ]] ; then 208 if [[ ${do_shallow} == "yes" ]] ; then
209 [[ ${#dirs[@]} -ne 0 ]] && die "Using --shallow with explicit dirs doesn't make sense"
207 [[ -f ${S}/ltmain.sh || -f ${S}/configure ]] && set -- "${S}" 210 [[ -f ${S}/ltmain.sh || -f ${S}/configure ]] && dirs+=( "${S}" )
208 else 211 else
212 [[ ${#dirs[@]} -eq 0 ]] && dirs+=( "${S}" )
209 set -- $(find "${S}" '(' -name ltmain.sh -o -name configure ')' -printf '%h\n' | sort -u) 213 dirs=( $(find "${dirs[@]}" '(' -name ltmain.sh -o -name configure ')' -printf '%h\n' | sort -u) )
210 fi 214 fi
211 215
212 local d p 216 local d p ret
213 for d in "$@" ; do 217 for d in "${dirs[@]}" ; do
214 export ELT_APPLIED_PATCHES= 218 export ELT_APPLIED_PATCHES=
215 219
216 if [[ -f ${d}/.elibtoolized ]] ; then 220 if [[ -f ${d}/.elibtoolized ]] ; then
217 ${force} || continue 221 ${force} || continue
218 fi 222 fi
222 ${outfunc} "Running elibtoolize in: ${d#${WORKDIR}/}/" 226 ${outfunc} "Running elibtoolize in: ${d#${WORKDIR}/}/"
223 if [[ ${outfunc} == "ewarn" ]] ; then 227 if [[ ${outfunc} == "ewarn" ]] ; then
224 ewarn " We've already been run in this tree; you should" 228 ewarn " We've already been run in this tree; you should"
225 ewarn " avoid this if possible (perhaps by filing a bug)" 229 ewarn " avoid this if possible (perhaps by filing a bug)"
226 fi 230 fi
227
228 local ret
229 231
230 # patching ltmain.sh 232 # patching ltmain.sh
231 [[ -f ${d}/ltmain.sh ]] && 233 [[ -f ${d}/ltmain.sh ]] &&
232 for p in ${elt_patches} ; do 234 for p in ${elt_patches} ; do
233 ret=0 235 ret=0

Legend:
Removed from v.1.108  
changed lines
  Added in v.1.109

  ViewVC Help
Powered by ViewVC 1.1.20