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

Diff of /eclass/libtool.eclass

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

Revision 1.7 Revision 1.8
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.7 2002/06/24 02:06:01 azarah Exp $ 5# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.8 2002/06/26 20:17:53 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
177 fi 177 fi
178 178
179 patch ${opts} -p0 <<-"ENDPATCH" 179 patch ${opts} -p0 <<-"ENDPATCH"
180 --- ltmain.sh.orig Wed Apr 3 01:19:37 2002 180 --- ltmain.sh.orig Wed Apr 3 01:19:37 2002
181 +++ ltmain.sh Sun May 26 19:50:52 2002 181 +++ ltmain.sh Sun May 26 19:50:52 2002
182 @@ -3940,9 +3940,39 @@ 182 @@ -3940,9 +3940,40 @@
183 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 183 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
184 exit 1 184 exit 1
185 fi 185 fi
186 - newdependency_libs="$newdependency_libs $libdir/$name" 186 - newdependency_libs="$newdependency_libs $libdir/$name"
187 + # We do not want portage's install root ($D) present. Check only for 187 + # We do not want portage's install root ($D) present. Check only for
188 + # this if the .la is being installed. 188 + # this if the .la is being installed.
189 + if test "$installed" = yes; then 189 + if test "$installed" = yes && test "$D"; then
190 + mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:${D}::g" -e 's://:/:g'`" 190 + mynewdependency_lib="`echo "$libdir/$name" |sed -e "s:$D::g" -e 's://:/:g'`"
191 + else 191 + else
192 + mynewdependency_lib="$libdir/$name" 192 + mynewdependency_lib="$libdir/$name"
193 + fi 193 + fi
194 + # Do not add duplicates 194 + # Do not add duplicates
195 + if test "$mynewdependency_lib"; then
195 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`" 196 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
196 + then
197 + newdependency_libs="$newdependency_libs $mynewdependency_lib" 197 + newdependency_libs="$newdependency_libs $mynewdependency_lib"
198 + fi
198 + fi 199 + fi
199 + ;; 200 + ;;
200 + *) 201 + *)
201 + if test "$installed" = yes; then 202 + if test "$installed" = yes && test "$S"; then
202 + # We do not want portage's build root ($S} present. 203 + # We do not want portage's build root ($S) present.
203 + if test -n "`echo $deplib |grep -e "${S}"`" 204 + if test -n "`echo $deplib |grep -e "$S"`"
204 + then 205 + then
205 + newdependency_libs="" 206 + newdependency_libs=""
206 + # We do not want portage's install root ($D) present. 207 + # We do not want portage's install root ($D) present.
207 + elif test -n "`echo $deplib |grep -e "${D}"`" 208 + elif test -n "`echo $deplib |grep -e "$D"`" && test "$D"; then
208 + then
209 + mynewdependency_lib="`echo "$deplib" |sed -e "s:${D}::g" -e 's://:/:g'`" 209 + mynewdependency_lib="`echo "$deplib" |sed -e "s:$D::g" -e 's://:/:g'`"
210 + fi 210 + fi
211 + else 211 + else
212 + mynewdependency_lib="$deplib" 212 + mynewdependency_lib="$deplib"
213 + fi 213 + fi
214 + # Do not add duplicates 214 + # Do not add duplicates
215 + if test "$mynewdependency_lib"; then
215 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`" 216 + if test -z "`echo $newdependency_libs |grep -e "$mynewdependency_lib"`"; then
216 + then
217 + newdependency_libs="$newdependency_libs $mynewdependency_lib" 217 + newdependency_libs="$newdependency_libs $mynewdependency_lib"
218 + fi
218 + fi 219 + fi
219 ;; 220 ;;
220 - *) newdependency_libs="$newdependency_libs $deplib" ;; 221 - *) newdependency_libs="$newdependency_libs $deplib" ;;
221 esac 222 esac
222 done 223 done
224 @@ -3975,6 +4005,10 @@ 225 @@ -3975,6 +4005,10 @@
225 case $host,$output,$installed,$module,$dlname in 226 case $host,$output,$installed,$module,$dlname in
226 *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; 227 *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
227 esac 228 esac
228 + # Do not add duplicates 229 + # Do not add duplicates
229 + if test "$installed" = yes; then 230 + if test "$installed" = yes && test "$D"; then
230 + install_libdir="`echo "$install_libdir" |sed -e "s:${D}::g" -e 's://:/:g'`" 231 + install_libdir="`echo "$install_libdir" |sed -e "s:$D::g" -e 's://:/:g'`"
231 + fi 232 + fi
232 $echo > $output "\ 233 $echo > $output "\
233 # $outputname - a libtool library file 234 # $outputname - a libtool library file
234 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 235 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
235 ENDPATCH 236 ENDPATCH

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20