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

Diff of /eclass/libtool.eclass

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

Revision 1.46 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.46 2005/05/11 15:15:03 azarah 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
10ECLASS="libtool"
11INHERITED="${INHERITED} ${ECLASS}"
12 10
13# 2004.09.25 rac 11# 2004.09.25 rac
14# 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
15# build properly even without libtool installed yet, probably using 13# build properly even without libtool installed yet, probably using
16# the files in the distribution. eliminating this dependency fixes 14# the files in the distribution. eliminating this dependency fixes
86 # Go through the patches in reverse order (large to small) 84 # Go through the patches in reverse order (large to small)
87 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
88 if [[ -n ${x} && -f ${x} ]] ; then 86 if [[ -n ${x} && -f ${x} ]] ; then
89 local ltver=$(VER_to_int "${version}") 87 local ltver=$(VER_to_int "${version}")
90 local ptver=$(VER_to_int "${x##*/}") 88 local ptver=$(VER_to_int "${x##*/}")
91 89
92 # If libtool version smaller than patch version, skip patch. 90 # If libtool version smaller than patch version, skip patch.
93 [[ ${ltver} -lt ${ptver} ]] && continue 91 [[ ${ltver} -lt ${ptver} ]] && continue
94 # For --remove-internal-dep ... 92 # For --remove-internal-dep ...
95 if [[ -n $3 ]] ; then 93 if [[ -n $3 ]] ; then
96 # For replace @REM_INT_DEP@ with what was passed 94 # For replace @REM_INT_DEP@ with what was passed
167 die "elibtoolize called with $x ??" 165 die "elibtoolize called with $x ??"
168 esac 166 esac
169 done 167 done
170 168
171 if use ppc-macos ; then 169 if use ppc-macos ; then
170 local opts
171 [[ -f Makefile.am ]] && opts="--automake"
172 glibtoolize --copy --force 172 glibtoolize --copy --force ${opts}
173 darwintoolize 173 darwintoolize
174 fi 174 fi
175 175
176 for x in ${my_dirlist} ; do 176 for x in ${my_dirlist} ; do
177 local tmp=$(echo "${x}" | sed -e "s|${S}||") 177 local tmp=$(echo "${x}" | sed -e "s|${WORKDIR}||")
178 export ELT_APPLIED_PATCHES= 178 export ELT_APPLIED_PATCHES=
179 179
180 cd ${x} 180 cd ${x}
181 einfo "Patching \${S}$(echo "/${tmp}/ltmain.sh" | sed -e 's|//|/|g') ..." 181 einfo "Running elibtoolize in: $(echo "/${tmp}" | sed -e 's|//|/|g; s|^/||')"
182 182
183 for y in ${elt_patches} ; do 183 for y in ${elt_patches} ; do
184 local ret=0 184 local ret=0
185 185
186 case "${y}" in 186 case "${y}" in
226 eerror "Portage patch requested, but failed to apply!" 226 eerror "Portage patch requested, but failed to apply!"
227 die "Portage patch requested, but failed to apply!" 227 die "Portage patch requested, but failed to apply!"
228 fi 228 fi
229 else 229 else
230 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
231 ewarn " Portage patch seems to be already applied." 231 # ewarn " Portage patch seems to be already applied."
232 ewarn " Please verify that it is not needed." 232 # ewarn " Please verify that it is not needed."
233 :
233 else 234 else
234 local version=$( \ 235 local version=$( \
235 eval $(grep -e '^[[:space:]]*VERSION=' "${x}/ltmain.sh"); \ 236 eval $(grep -e '^[[:space:]]*VERSION=' "${x}/ltmain.sh"); \
236 echo "${VERSION}") 237 echo "${VERSION}")
237 238
250 if [[ ${do_portage} == "no" && \ 251 if [[ ${do_portage} == "no" && \
251 ${do_reversedeps} == "no" && \ 252 ${do_reversedeps} == "no" && \
252 ${do_only_patches} == "no" && \ 253 ${do_only_patches} == "no" && \
253 ${deptoremove} == "" ]] 254 ${deptoremove} == "" ]]
254 then 255 then
256 ewarn "Cannot apply any patches, please file a bug about this"
257 break
258
255 # Sometimes ltmain.sh is in a subdirectory ... 259 # Sometimes ltmain.sh is in a subdirectory ...
256 if [[ ! -f ${x}/configure.in && ! -f ${x}/configure.ac ]] ; then 260 if [[ ! -f ${x}/configure.in && ! -f ${x}/configure.ac ]] ; then
257 if [[ -f ${x}/../configure.in || -f ${x}/../configure.ac ]] ; then 261 if [[ -f ${x}/../configure.in || -f ${x}/../configure.ac ]] ; then
258 cd "${x}"/../ 262 cd "${x}"/../
259 fi 263 fi
260 fi 264 fi
261 265
262 if type -p libtoolize &> /dev/null ; then 266 if type -p libtoolize &> /dev/null ; then
263 ewarn "Cannot apply any patch, running libtoolize..." 267 ewarn "Cannot apply any patches, running libtoolize..."
264 libtoolize --copy --force 268 libtoolize --copy --force
265 fi 269 fi
266 cd "${x}" 270 cd "${x}"
267 break 271 break
268 fi 272 fi

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

  ViewVC Help
Powered by ViewVC 1.1.20