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

Diff of /eclass/libtool.eclass

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

Revision 1.48 Revision 1.51
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.48 2005/07/06 20:20:03 agriffis Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.51 2005/09/02 09:35:17 azarah Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass patches ltmain.sh distributed with libtoolized packages with the 7# This eclass patches ltmain.sh distributed with libtoolized packages with the
8# relink and portage patch among others 8# relink and portage patch among others
9 9
10INHERITED="${INHERITED} ${ECLASS}"
11 10
12# 2004.09.25 rac 11# 2004.09.25 rac
13# i have verified that at least one package can use this eclass and 12# i have verified that at least one package can use this eclass and
14# build properly even without libtool installed yet, probably using 13# build properly even without libtool installed yet, probably using
15# the files in the distribution. eliminating this dependency fixes 14# the files in the distribution. eliminating this dependency fixes
85 # Go through the patches in reverse order (large to small) 84 # Go through the patches in reverse order (large to small)
86 for x in $(ls -d "${patch_dir}"/* 2> /dev/null | sort -r) ; do 85 for x in $(ls -d "${patch_dir}"/* 2> /dev/null | sort -r) ; do
87 if [[ -n ${x} && -f ${x} ]] ; then 86 if [[ -n ${x} && -f ${x} ]] ; then
88 local ltver=$(VER_to_int "${version}") 87 local ltver=$(VER_to_int "${version}")
89 local ptver=$(VER_to_int "${x##*/}") 88 local ptver=$(VER_to_int "${x##*/}")
90 89
91 # If libtool version smaller than patch version, skip patch. 90 # If libtool version smaller than patch version, skip patch.
92 [[ ${ltver} -lt ${ptver} ]] && continue 91 [[ ${ltver} -lt ${ptver} ]] && continue
93 # For --remove-internal-dep ... 92 # For --remove-internal-dep ...
94 if [[ -n $3 ]] ; then 93 if [[ -n $3 ]] ; then
95 # For replace @REM_INT_DEP@ with what was passed 94 # For replace @REM_INT_DEP@ with what was passed
166 die "elibtoolize called with $x ??" 165 die "elibtoolize called with $x ??"
167 esac 166 esac
168 done 167 done
169 168
170 if use ppc-macos ; then 169 if use ppc-macos ; then
170 local opts
171 [[ -f Makefile.am ]] && opts="--automake"
171 glibtoolize --copy --force 172 glibtoolize --copy --force ${opts}
172 darwintoolize 173 darwintoolize
173 fi 174 fi
174 175
175 for x in ${my_dirlist} ; do 176 for x in ${my_dirlist} ; do
176 local tmp=$(echo "${x}" | sed -e "s|${S}||") 177 local tmp=$(echo "${x}" | sed -e "s|${WORKDIR}||")
177 export ELT_APPLIED_PATCHES= 178 export ELT_APPLIED_PATCHES=
178 179
179 cd ${x} 180 cd ${x}
180 einfo "Patching \${S}$(echo "/${tmp}/ltmain.sh" | sed -e 's|//|/|g') ..." 181 einfo "Running elibtoolize in: $(echo "/${tmp}" | sed -e 's|//|/|g; s|^/||')"
181 182
182 for y in ${elt_patches} ; do 183 for y in ${elt_patches} ; do
183 local ret=0 184 local ret=0
184 185
185 case "${y}" in 186 case "${y}" in
225 eerror "Portage patch requested, but failed to apply!" 226 eerror "Portage patch requested, but failed to apply!"
226 die "Portage patch requested, but failed to apply!" 227 die "Portage patch requested, but failed to apply!"
227 fi 228 fi
228 else 229 else
229 if [[ -n $(grep 'We do not want portage' "${x}/ltmain.sh") ]] ; then 230 if [[ -n $(grep 'We do not want portage' "${x}/ltmain.sh") ]] ; then
230 ewarn " Portage patch seems to be already applied." 231 # ewarn " Portage patch seems to be already applied."
231 ewarn " Please verify that it is not needed." 232 # ewarn " Please verify that it is not needed."
233 :
232 else 234 else
233 local version=$( \ 235 local version=$( \
234 eval $(grep -e '^[[:space:]]*VERSION=' "${x}/ltmain.sh"); \ 236 eval $(grep -e '^[[:space:]]*VERSION=' "${x}/ltmain.sh"); \
235 echo "${VERSION}") 237 echo "${VERSION}")
236 238

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.51

  ViewVC Help
Powered by ViewVC 1.1.20