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

Diff of /eclass/libtool.eclass

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

Revision 1.10 Revision 1.13
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.10 2002/06/29 23:50:56 azarah Exp $ 5# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.13 2002/08/29 23:56:15 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
8ECLASS=libtool 8ECLASS=libtool
9INHERITED="$INHERITED $ECLASS"
10
9newdepend sys-devel/libtool 11newdepend sys-devel/libtool
10 12
11DESCRIPTION="Based on the ${ECLASS} eclass" 13DESCRIPTION="Based on the ${ECLASS} eclass"
12 14
13ELIBTOOL_VERSION=1.8.1 15ELIBTOOL_VERSION=1.8.1
65 dotmp="yes" 67 dotmp="yes"
66 doportage="yes" 68 doportage="yes"
67 69
68 for y in test_patch relink_patch tmp_patch portage_patch 70 for y in test_patch relink_patch tmp_patch portage_patch
69 do 71 do
70 if ! eval ${y} --test $>${T}/libtool.foo 72 if ! eval ${y} --test $>${T}/elibtool.log
71 then 73 then
72 case ${y} in 74 case ${y} in
73 test_patch) 75 test_patch)
74 # non critical patch 76 # non critical patch
75 dotest="no" 77 dotest="no"
100 ;; 102 ;;
101 esac 103 esac
102 fi 104 fi
103 done 105 done
104 106
107# Only apply portage patch ... I think if other can apply, they should.
108# if [ "${portage}" = "yes" ]
109# then
110# dotest="no"
111# dorelink="no"
112# dotmp="no"
113# fi
114
105 for y in test_patch relink_patch tmp_patch portage_patch 115 for y in test_patch relink_patch tmp_patch portage_patch
106 do 116 do
107 if [ "${dopatch}" = "yes" ] 117 if [ "${dopatch}" = "yes" ]
108 then 118 then
109 case ${y} in 119 case ${y} in
132 fi 142 fi
133 ;; 143 ;;
134 esac 144 esac
135 145
136 einfo "Applying libtool-${y/_patch/}.patch..." 146 einfo "Applying libtool-${y/_patch/}.patch..."
137 eval ${y} $>${T}/libtool.foo 147 eval ${y} $>${T}/elibtool.log
138 elif [ "${portage}" = "no" ] && [ "${reversedeps}" = "no" ] 148 elif [ "${portage}" = "no" ] && [ "${reversedeps}" = "no" ]
139 then 149 then
140 ewarn "Cannot apply any patch, running libtoolize..." 150 ewarn "Cannot apply any patch, running libtoolize..."
141 libtoolize --copy --force 151 libtoolize --copy --force
142 break 152 break
196 fi 206 fi
197 207
198 patch ${opts} -p0 <<-"ENDPATCH" 208 patch ${opts} -p0 <<-"ENDPATCH"
199 --- ltmain.sh.orig Wed Apr 3 01:19:37 2002 209 --- ltmain.sh.orig Wed Apr 3 01:19:37 2002
200 +++ ltmain.sh Sun May 26 19:50:52 2002 210 +++ ltmain.sh Sun May 26 19:50:52 2002
201 @@ -3940,9 +3940,41 @@ 211 @@ -3940,9 +3940,46 @@
202 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 212 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
203 exit 1 213 exit 1
204 fi 214 fi
205 - newdependency_libs="$newdependency_libs $libdir/$name" 215 - newdependency_libs="$newdependency_libs $libdir/$name"
206 + # We do not want portage's install root ($D) present. Check only for 216 + # We do not want portage's install root ($D) present. Check only for
207 + # this if the .la is being installed. 217 + # this if the .la is being installed.
208 + if test "$installed" = yes && test "$D"; then 218 + if test "$installed" = yes && test "$D"; then
209 + mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`" 219 + eval mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`"
210 + else 220 + else
211 + mynewdependency_lib="$libdir/$name" 221 + mynewdependency_lib="$libdir/$name"
212 + fi 222 + fi
213 + # Do not add duplicates 223 + # Do not add duplicates
214 + if test "$mynewdependency_lib"; then 224 + if test "$mynewdependency_lib"; then
215 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then 225 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
216 + newdependency_libs="$newdependency_libs $mynewdependency_lib" 226 + newdependency_libs="$newdependency_libs $mynewdependency_lib"
217 + fi 227 + fi
218 + fi 228 + fi
219 + ;; 229 + ;;
220 + *) 230 + *)
221 + if test "$installed" = yes; then 231 + if test "$installed" = yes; then
232 + # Rather use S=WORKDIR if our version of portage supports it.
233 + # This is because some ebuild (gcc) do not use $S as buildroot.
234 + if test "$PWORKDIR"; then
235 + S="$PWORKDIR"
236 + fi
222 + # We do not want portage's build root ($S) present. 237 + # We do not want portage's build root ($S) present.
223 + if test -n "`echo $deplib |grep -e "$S"`" && test "$S"; then 238 + if test -n "`echo $deplib |grep -e "$S"`" && test "$S"; then
224 + newdependency_libs="" 239 + mynewdependency_lib=""
225 + # We do not want portage's install root ($D) present. 240 + # We do not want portage's install root ($D) present.
226 + elif test -n "`echo $deplib |grep -e "$D"`" && test "$D"; then 241 + elif test -n "`echo $deplib |grep -e "$D"`" && test "$D"; then
227 + mynewdependency_lib="`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`" 242 + eval mynewdependency_lib="`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`"
228 + else 243 + else
229 + mynewdependency_lib="$deplib" 244 + mynewdependency_lib="$deplib"
230 + fi 245 + fi
231 + else 246 + else
232 + mynewdependency_lib="$deplib" 247 + mynewdependency_lib="$deplib"
233 + fi 248 + fi
234 + # Do not add duplicates 249 + # Do not add duplicates
235 + if test "$mynewdependency_lib"; then 250 + if test "$mynewdependency_lib"; then
236 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then 251 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
237 + newdependency_libs="$newdependency_libs $mynewdependency_lib" 252 + newdependency_libs="$newdependency_libs $mynewdependency_lib"
238 + fi 253 + fi
239 + fi 254 + fi
240 ;; 255 ;;
241 - *) newdependency_libs="$newdependency_libs $deplib" ;; 256 - *) newdependency_libs="$newdependency_libs $deplib" ;;
242 esac 257 esac

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20