| 1 | #!/bin/bash |
1 | #!/bin/bash |
| 2 | # Copyright 1999-2002 Gentoo Technologies, Inc. |
2 | # Copyright 1999-2002 Gentoo Technologies, Inc. |
| 3 | # Distributed under the terms of the GNU General Public License, v2 or later |
3 | # Distributed under the terms of the GNU General Public License, v2 or later |
| 4 | # Author: Martin Schlemmer <azarah@gentoo.org> |
4 | # Author: Martin Schlemmer <azarah@gentoo.org> |
| 5 | # $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.3 2002/06/05 23:41:36 azarah Exp $ |
5 | # $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.4 2002/06/10 18:23:49 azarah Exp $ |
| 6 | # This eclass patches ltmain.sh distributed with libtoolized packages with the |
6 | # This eclass patches ltmain.sh distributed with libtoolized packages with the |
| 7 | # relink and portage patch |
7 | # relink and portage patch |
| 8 | ECLASS=libtool |
8 | ECLASS=libtool |
| 9 | newdepend sys-devel/libtool |
9 | newdepend sys-devel/libtool |
| 10 | |
10 | |
| … | |
… | |
| 18 | local dopatch="no" |
18 | local dopatch="no" |
| 19 | local dotest="yes" |
19 | local dotest="yes" |
| 20 | local dorelink="yes" |
20 | local dorelink="yes" |
| 21 | local doportage="yes" |
21 | local doportage="yes" |
| 22 | local portage="no" |
22 | local portage="no" |
|
|
23 | local mylist="" |
| 23 | |
24 | |
|
|
25 | mylist="$(find_ltmain)" |
| 24 | # Only apply portage patch, and dont "libtoolize --copy --force" |
26 | # Only apply portage patch, and dont "libtoolize --copy --force" |
| 25 | # if all patches fail. |
27 | # if all patches fail. |
|
|
28 | for x in ${*} |
|
|
29 | do |
| 26 | if [ "${1}" = "--portage" ] |
30 | if [ "${1}" = "--portage" ] |
| 27 | then |
31 | then |
| 28 | portage="yes" |
32 | portage="yes" |
| 29 | fi |
33 | fi |
|
|
34 | # Only patch the ltmain.sh in ${S} |
|
|
35 | if [ "${1}" = "--shallow" ] |
|
|
36 | then |
|
|
37 | if [ -f ${S}/ltmain.sh ] |
|
|
38 | then |
|
|
39 | mylist="${S}" |
|
|
40 | else |
|
|
41 | mylist="" |
|
|
42 | fi |
|
|
43 | else |
|
|
44 | mylist="$(find_ltmain)" |
|
|
45 | fi |
|
|
46 | done |
| 30 | |
47 | |
| 31 | for x in $(find_ltmain) |
48 | for x in ${mylist} |
| 32 | do |
49 | do |
| 33 | cd ${x} |
50 | cd ${x} |
| 34 | einfo "Working directory: ${x}..." |
51 | einfo "Working directory: ${x}..." |
| 35 | dopatch="yes" |
52 | dopatch="yes" |
|
|
53 | dotest="yes" |
|
|
54 | dorelink="yes" |
|
|
55 | doportage="yes" |
| 36 | |
56 | |
| 37 | for y in test_patch relink_patch portage_patch |
57 | for y in test_patch relink_patch portage_patch |
| 38 | do |
58 | do |
| 39 | if ! eval ${y} --test $>${T}/libtool.foo |
59 | if ! eval ${y} --test $>${T}/libtool.foo |
| 40 | then |
60 | then |