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

Diff of /eclass/libtool.eclass

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

Revision 1.16 Revision 1.17
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2002 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# Author: Martin Schlemmer <azarah@gentoo.org> 3# Author: Martin Schlemmer <azarah@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.16 2002/10/25 19:57:52 vapier Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.17 2002/11/08 22:03:45 seemant Exp $
5# This eclass patches ltmain.sh distributed with libtoolized packages with the 5# This eclass patches ltmain.sh distributed with libtoolized packages with the
6# relink and portage patch 6# relink and portage patch
7 7
8ECLASS=libtool 8ECLASS=libtool
9INHERITED="$INHERITED $ECLASS" 9INHERITED="$INHERITED $ECLASS"
23 local dorelink="yes" 23 local dorelink="yes"
24 local dotmp="yes" 24 local dotmp="yes"
25 local doportage="yes" 25 local doportage="yes"
26 local portage="no" 26 local portage="no"
27 local reversedeps="no" 27 local reversedeps="no"
28 local removeinternaldep="no"
29 local deptoremove=""
28 local mylist="" 30 local mylist=""
29 31
30 mylist="$(find_ltmain)" 32 mylist="$(find_ltmain)"
31 for x in ${*} 33 for x in ${*}
32 do 34 do
41 # http://bugzilla.gnome.org/show_bug.cgi?id=75635 43 # http://bugzilla.gnome.org/show_bug.cgi?id=75635
42 if [ "${x}" = "--reverse-deps" ] 44 if [ "${x}" = "--reverse-deps" ]
43 then 45 then
44 reversedeps="yes" 46 reversedeps="yes"
45 fi 47 fi
48 if [ `echo ${x} | grep "^--remove-internal-dep="` ]
49 then
50 removeinternaldep="yes"
51 deptoremove=`echo ${x} | sed -e 's/--remove-internal-dep=//'`
52 fi
46 # Only patch the ltmain.sh in ${S} 53 # Only patch the ltmain.sh in ${S}
47 if [ "${x}" = "--shallow" ] 54 if [ "${x}" = "--shallow" ]
48 then 55 then
49 if [ -f ${S}/ltmain.sh ] 56 if [ -f ${S}/ltmain.sh ]
50 then 57 then
143 ;; 150 ;;
144 esac 151 esac
145 152
146 einfo "Applying libtool-${y/_patch/}.patch..." 153 einfo "Applying libtool-${y/_patch/}.patch..."
147 eval ${y} $>${T}/elibtool.log 154 eval ${y} $>${T}/elibtool.log
148 elif [ "${portage}" = "no" ] && [ "${reversedeps}" = "no" ] 155 elif [ "${portage}" = "no" ] && [ "${reversedeps}" = "no" ] && [ "${removeinternaldep}" = "no" ]
149 then 156 then
150 ewarn "Cannot apply any patch, running libtoolize..." 157 ewarn "Cannot apply any patch, running libtoolize..."
151 libtoolize --copy --force 158 libtoolize --copy --force
152 break 159 break
153 fi 160 fi
157 then 164 then
158 if eval reversedeps_patch --test $>${T}/libtool.foo 165 if eval reversedeps_patch --test $>${T}/libtool.foo
159 then 166 then
160 einfo "Applying libtool-reverse-deps.patch..." 167 einfo "Applying libtool-reverse-deps.patch..."
161 eval reversedeps_patch $>${T}/libtool.foo 168 eval reversedeps_patch $>${T}/libtool.foo
169 else
170 ewarn "Not applying libtool-reverse-deps.patch..."
171 fi
172 fi
173
174 if [ "${removeinternaldep}" = "yes" ]
175 then
176 if eval remove_internal_dep_patch $deptoremove --test $>${T}/libtool.foo
177 then
178 einfo "Applying remove-internal-dep.patch (removing $deptoremove)..."
179 eval remove_internal_dep_patch $deptoremove $>${T}/libtool.foo
180 else
181 ewarn "Not applying libtool-remove-internal-dep.patch..."
162 fi 182 fi
163 fi 183 fi
164 done 184 done
165 185
166 if [ -f libtool ] 186 if [ -f libtool ]
772 ;; 792 ;;
773 *) tmp_libs="$tmp_libs $deplib" ;; 793 *) tmp_libs="$tmp_libs $deplib" ;;
774 ENDPATCH 794 ENDPATCH
775} 795}
776 796
797remove_internal_dep_patch() {
798 local opts=""
799
800 if [ "${2}" = "--test" ]
801 then
802 opts="--force --dry-run"
803 fi
804
805 patch ${opts} -p0 <<-ENDPATCH
806 --- ltmain.sh.orig 2002-11-01 19:56:50.000000000 -0600
807 +++ ltmain.sh 2002-11-01 19:57:03.000000000 -0600
808 @@ -4551,6 +4551,8 @@
809 if test "\$installed" = yes && test "\$D"; then
810 install_libdir="\`echo "\$install_libdir" |sed -e "s:\$D::g" -e 's://:/:g'\`"
811 fi
812 + # Removing $1 from dependency_libs in .la
813 + dependency_libs=\`echo \$dependency_libs | \$Xsed -e 's%\([^ ]*lib${1}\.\(so\|la\|a\)\)\|\(-l${1}\)%%g'\`
814 \$echo > \$output "\\
815 # \$outputname - a libtool library file
816 # Generated by \$PROGRAM - GNU \$PACKAGE \$VERSION\$TIMESTAMP
817 ENDPATCH
818}
819

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20