| 1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2003 Gentoo Technologies, Inc. |
| 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.22 2003/02/28 09:15:04 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.23 2003/04/08 11:34:57 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 |
8 | # relink and portage patch |
| … | |
… | |
| 22 | local y="" |
22 | local y="" |
| 23 | local dopatch="no" |
23 | local dopatch="no" |
| 24 | local dotest="yes" |
24 | local dotest="yes" |
| 25 | local dorelink="yes" |
25 | local dorelink="yes" |
| 26 | local dotmp="yes" |
26 | local dotmp="yes" |
|
|
27 | local dosed="yes" |
| 27 | local doportage="yes" |
28 | local doportage="yes" |
| 28 | local portage="no" |
29 | local portage="no" |
| 29 | local reversedeps="no" |
30 | local reversedeps="no" |
| 30 | local removeinternaldep="no" |
31 | local removeinternaldep="no" |
| 31 | local deptoremove="" |
32 | local deptoremove="" |
| … | |
… | |
| 72 | einfo "Working directory: ${x}..." |
73 | einfo "Working directory: ${x}..." |
| 73 | dopatch="yes" |
74 | dopatch="yes" |
| 74 | dotest="yes" |
75 | dotest="yes" |
| 75 | dorelink="yes" |
76 | dorelink="yes" |
| 76 | dotmp="yes" |
77 | dotmp="yes" |
|
|
78 | dosed="yes" |
| 77 | doportage="yes" |
79 | doportage="yes" |
| 78 | |
80 | |
| 79 | for y in test_patch relink_patch tmp_patch portage_patch |
81 | for y in test_patch relink_patch tmp_patch sed_patch portage_patch |
| 80 | do |
82 | do |
| 81 | if ! eval ${y} --test $>${T}/elibtool.log |
83 | if ! eval ${y} --test $>${T}/elibtool.log |
| 82 | then |
84 | then |
| 83 | case ${y} in |
85 | case ${y} in |
| 84 | test_patch) |
86 | test_patch) |
| … | |
… | |
| 95 | dorelink="no" |
97 | dorelink="no" |
| 96 | ;; |
98 | ;; |
| 97 | tmp_patch) |
99 | tmp_patch) |
| 98 | # non critical patch |
100 | # non critical patch |
| 99 | dotmp="no" |
101 | dotmp="no" |
|
|
102 | ;; |
|
|
103 | sed_patch) |
|
|
104 | # non critical patch |
|
|
105 | dosed="no" |
| 100 | ;; |
106 | ;; |
| 101 | portage_patch) |
107 | portage_patch) |
| 102 | # critical patch |
108 | # critical patch |
| 103 | if [ "${portage}" = "yes" ] |
109 | if [ "${portage}" = "yes" ] |
| 104 | then |
110 | then |
| … | |
… | |
| 119 | # dotest="no" |
125 | # dotest="no" |
| 120 | # dorelink="no" |
126 | # dorelink="no" |
| 121 | # dotmp="no" |
127 | # dotmp="no" |
| 122 | # fi |
128 | # fi |
| 123 | |
129 | |
| 124 | for y in test_patch relink_patch tmp_patch portage_patch |
130 | for y in test_patch relink_patch tmp_patch sed_patch portage_patch |
| 125 | do |
131 | do |
| 126 | if [ "${dopatch}" = "yes" ] |
132 | if [ "${dopatch}" = "yes" ] |
| 127 | then |
133 | then |
| 128 | case ${y} in |
134 | case ${y} in |
| 129 | test_patch) |
135 | test_patch) |
| … | |
… | |
| 138 | continue |
144 | continue |
| 139 | fi |
145 | fi |
| 140 | ;; |
146 | ;; |
| 141 | tmp_patch) |
147 | tmp_patch) |
| 142 | if [ "${dotmp}" = "no" ] |
148 | if [ "${dotmp}" = "no" ] |
|
|
149 | then |
|
|
150 | continue |
|
|
151 | fi |
|
|
152 | ;; |
|
|
153 | sed_patch) |
|
|
154 | if [ "${dosed}" = "no" ] |
| 143 | then |
155 | then |
| 144 | continue |
156 | continue |
| 145 | fi |
157 | fi |
| 146 | ;; |
158 | ;; |
| 147 | portage_patch) |
159 | portage_patch) |
| … | |
… | |
| 827 | # \$outputname - a libtool library file |
839 | # \$outputname - a libtool library file |
| 828 | # Generated by \$PROGRAM - GNU \$PACKAGE \$VERSION\$TIMESTAMP |
840 | # Generated by \$PROGRAM - GNU \$PACKAGE \$VERSION\$TIMESTAMP |
| 829 | ENDPATCH |
841 | ENDPATCH |
| 830 | } |
842 | } |
| 831 | |
843 | |
|
|
844 | sed_patch() { |
|
|
845 | |
|
|
846 | local opts="" |
|
|
847 | |
|
|
848 | if [ "${1}" = "--test" ] |
|
|
849 | then |
|
|
850 | opts="--force --dry-run" |
|
|
851 | fi |
|
|
852 | |
|
|
853 | patch ${opts} -p1 <<-"ENDPATCH" |
|
|
854 | --- libtool-1.4.3/ltmain.sh.ltmain-SED 2003-02-13 14:54:24.000000000 +0100 |
|
|
855 | +++ libtool-1.4.3/ltmain.sh 2003-02-13 15:24:49.000000000 +0100 |
|
|
856 | @@ -48,6 +48,9 @@ EOF |
|
|
857 | exit 0 |
|
|
858 | fi |
|
|
859 | |
|
|
860 | +# define SED for historic ltconfig's generated by Libtool 1.3 |
|
|
861 | +test -z "$SED" && SED=sed |
|
|
862 | + |
|
|
863 | # The name of this program. |
|
|
864 | progname=`$echo "$0" | ${SED} 's%^.*/%%'` |
|
|
865 | modename="$progname" |
|
|
866 | ENDPATCH |
|
|
867 | } |
|
|
868 | |