| 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.50 2005/07/11 15:08:06 swegener 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 |
| … | |
… | |
| 165 | die "elibtoolize called with $x ??" |
165 | die "elibtoolize called with $x ??" |
| 166 | esac |
166 | esac |
| 167 | done |
167 | done |
| 168 | |
168 | |
| 169 | if use ppc-macos ; then |
169 | if use ppc-macos ; then |
|
|
170 | local opts |
|
|
171 | [[ -f Makefile.am ]] && opts="--automake" |
| 170 | glibtoolize --copy --force |
172 | glibtoolize --copy --force ${opts} |
| 171 | darwintoolize |
173 | darwintoolize |
| 172 | fi |
174 | fi |
| 173 | |
175 | |
| 174 | for x in ${my_dirlist} ; do |
176 | for x in ${my_dirlist} ; do |
| 175 | local tmp=$(echo "${x}" | sed -e "s|${S}||") |
177 | local tmp=$(echo "${x}" | sed -e "s|${WORKDIR}||") |
| 176 | export ELT_APPLIED_PATCHES= |
178 | export ELT_APPLIED_PATCHES= |
| 177 | |
179 | |
| 178 | cd ${x} |
180 | cd ${x} |
| 179 | einfo "Patching \${S}$(echo "/${tmp}/ltmain.sh" | sed -e 's|//|/|g') ..." |
181 | einfo "Running elibtoolize in: $(echo "/${tmp}" | sed -e 's|//|/|g; s|^/||')" |
| 180 | |
182 | |
| 181 | for y in ${elt_patches} ; do |
183 | for y in ${elt_patches} ; do |
| 182 | local ret=0 |
184 | local ret=0 |
| 183 | |
185 | |
| 184 | case "${y}" in |
186 | case "${y}" in |
| … | |
… | |
| 224 | eerror "Portage patch requested, but failed to apply!" |
226 | eerror "Portage patch requested, but failed to apply!" |
| 225 | die "Portage patch requested, but failed to apply!" |
227 | die "Portage patch requested, but failed to apply!" |
| 226 | fi |
228 | fi |
| 227 | else |
229 | else |
| 228 | 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 |
| 229 | ewarn " Portage patch seems to be already applied." |
231 | # ewarn " Portage patch seems to be already applied." |
| 230 | ewarn " Please verify that it is not needed." |
232 | # ewarn " Please verify that it is not needed." |
|
|
233 | : |
| 231 | else |
234 | else |
| 232 | local version=$( \ |
235 | local version=$( \ |
| 233 | eval $(grep -e '^[[:space:]]*VERSION=' "${x}/ltmain.sh"); \ |
236 | eval $(grep -e '^[[:space:]]*VERSION=' "${x}/ltmain.sh"); \ |
| 234 | echo "${VERSION}") |
237 | echo "${VERSION}") |
| 235 | |
238 | |