/[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.11
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.11 2002/07/03 19:11:27 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
9newdepend sys-devel/libtool 9newdepend sys-devel/libtool
10 10
99 doportage="no" 99 doportage="no"
100 ;; 100 ;;
101 esac 101 esac
102 fi 102 fi
103 done 103 done
104
105# Only apply portage patch ... I think if other can apply, they should.
106# if [ "${portage}" = "yes" ]
107# then
108# dotest="no"
109# dorelink="no"
110# dotmp="no"
111# fi
104 112
105 for y in test_patch relink_patch tmp_patch portage_patch 113 for y in test_patch relink_patch tmp_patch portage_patch
106 do 114 do
107 if [ "${dopatch}" = "yes" ] 115 if [ "${dopatch}" = "yes" ]
108 then 116 then
196 fi 204 fi
197 205
198 patch ${opts} -p0 <<-"ENDPATCH" 206 patch ${opts} -p0 <<-"ENDPATCH"
199 --- ltmain.sh.orig Wed Apr 3 01:19:37 2002 207 --- ltmain.sh.orig Wed Apr 3 01:19:37 2002
200 +++ ltmain.sh Sun May 26 19:50:52 2002 208 +++ ltmain.sh Sun May 26 19:50:52 2002
201 @@ -3940,9 +3940,41 @@ 209 @@ -3940,9 +3940,46 @@
202 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 210 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
203 exit 1 211 exit 1
204 fi 212 fi
205 - newdependency_libs="$newdependency_libs $libdir/$name" 213 - newdependency_libs="$newdependency_libs $libdir/$name"
206 + # We do not want portage's install root ($D) present. Check only for 214 + # We do not want portage's install root ($D) present. Check only for
207 + # this if the .la is being installed. 215 + # this if the .la is being installed.
208 + if test "$installed" = yes && test "$D"; then 216 + if test "$installed" = yes && test "$D"; then
209 + mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`" 217 + eval mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`"
210 + else 218 + else
211 + mynewdependency_lib="$libdir/$name" 219 + mynewdependency_lib="$libdir/$name"
212 + fi 220 + fi
213 + # Do not add duplicates 221 + # Do not add duplicates
214 + if test "$mynewdependency_lib"; then 222 + if test "$mynewdependency_lib"; then
215 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then 223 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
216 + newdependency_libs="$newdependency_libs $mynewdependency_lib" 224 + newdependency_libs="$newdependency_libs $mynewdependency_lib"
217 + fi 225 + fi
218 + fi 226 + fi
219 + ;; 227 + ;;
220 + *) 228 + *)
221 + if test "$installed" = yes; then 229 + if test "$installed" = yes; then
230 + # Rather use S=WORKDIR if our version of portage supports it.
231 + # This is because some ebuild (gcc) do not use $S as buildroot.
232 + if test "$PWORKDIR"; then
233 + S="$PWORKDIR"
234 + fi
222 + # We do not want portage's build root ($S) present. 235 + # We do not want portage's build root ($S) present.
223 + if test -n "`echo $deplib |grep -e "$S"`" && test "$S"; then 236 + if test -n "`echo $deplib |grep -e "$S"`" && test "$S"; then
224 + newdependency_libs="" 237 + mynewdependency_lib=""
225 + # We do not want portage's install root ($D) present. 238 + # We do not want portage's install root ($D) present.
226 + elif test -n "`echo $deplib |grep -e "$D"`" && test "$D"; then 239 + elif test -n "`echo $deplib |grep -e "$D"`" && test "$D"; then
227 + mynewdependency_lib="`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`" 240 + eval mynewdependency_lib="`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`"
228 + else 241 + else
229 + mynewdependency_lib="$deplib" 242 + mynewdependency_lib="$deplib"
230 + fi 243 + fi
231 + else 244 + else
232 + mynewdependency_lib="$deplib" 245 + mynewdependency_lib="$deplib"
233 + fi 246 + fi
234 + # Do not add duplicates 247 + # Do not add duplicates
235 + if test "$mynewdependency_lib"; then 248 + if test "$mynewdependency_lib"; then
236 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then 249 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
237 + newdependency_libs="$newdependency_libs $mynewdependency_lib" 250 + newdependency_libs="$newdependency_libs $mynewdependency_lib"
238 + fi 251 + fi
239 + fi 252 + fi
240 ;; 253 ;;
241 - *) newdependency_libs="$newdependency_libs $deplib" ;; 254 - *) newdependency_libs="$newdependency_libs $deplib" ;;
242 esac 255 esac

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

  ViewVC Help
Powered by ViewVC 1.1.20