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

Diff of /eclass/libtool.eclass

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

Revision 1.9 Revision 1.10
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.9 2002/06/26 22:38:07 azarah Exp $ 5# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.10 2002/06/29 23:50:56 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
20 local dotest="yes" 20 local dotest="yes"
21 local dorelink="yes" 21 local dorelink="yes"
22 local dotmp="yes" 22 local dotmp="yes"
23 local doportage="yes" 23 local doportage="yes"
24 local portage="no" 24 local portage="no"
25 local reversedeps="no"
25 local mylist="" 26 local mylist=""
26 27
27 mylist="$(find_ltmain)" 28 mylist="$(find_ltmain)"
28 # Only apply portage patch, and dont "libtoolize --copy --force"
29 # if all patches fail.
30 for x in ${*} 29 for x in ${*}
31 do 30 do
31 # Only apply portage patch, and dont "libtoolize --copy --force"
32 # if all patches fail.
32 if [ "${x}" = "--portage" ] 33 if [ "${x}" = "--portage" ]
33 then 34 then
34 portage="yes" 35 portage="yes"
36 fi
37 # Apply the reverse-deps patch
38 #
39 # http://bugzilla.gnome.org/show_bug.cgi?id=75635
40 if [ "${x}" = "--reverse-deps" ]
41 then
42 reversedeps="yes"
35 fi 43 fi
36 # Only patch the ltmain.sh in ${S} 44 # Only patch the ltmain.sh in ${S}
37 if [ "${x}" = "--shallow" ] 45 if [ "${x}" = "--shallow" ]
38 then 46 then
39 if [ -f ${S}/ltmain.sh ] 47 if [ -f ${S}/ltmain.sh ]
125 ;; 133 ;;
126 esac 134 esac
127 135
128 einfo "Applying libtool-${y/_patch/}.patch..." 136 einfo "Applying libtool-${y/_patch/}.patch..."
129 eval ${y} $>${T}/libtool.foo 137 eval ${y} $>${T}/libtool.foo
130 elif [ "${portage}" = "no" ] 138 elif [ "${portage}" = "no" ] && [ "${reversedeps}" = "no" ]
131 then 139 then
140 ewarn "Cannot apply any patch, running libtoolize..."
132 libtoolize --copy --force 141 libtoolize --copy --force
133 break 142 break
134 fi 143 fi
135 done 144 done
145
146 if [ "${reversedeps}" = "yes" ]
147 then
148 if eval reversedeps_patch --test $>${T}/libtool.foo
149 then
150 einfo "Applying libtool-reverse-deps.patch..."
151 eval reversedeps_patch $>${T}/libtool.foo
152 fi
153 fi
136 done 154 done
137 155
138 if [ -f libtool ] 156 if [ -f libtool ]
139 then 157 then
140 rm -f libtool 158 rm -f libtool
697 hardcode_libdirs= 715 hardcode_libdirs=
698 dep_rpath= 716 dep_rpath=
699 ENDPATCH 717 ENDPATCH
700} 718}
701 719
720reversedeps_patch() {
721
722 local opts=""
723
724 if [ "${1}" = "--test" ]
725 then
726 opts="--force --dry-run"
727 fi
728
729 patch ${opts} -p0 <<-"ENDPATCH"
730 --- ltmain.sh.orig Sat Mar 23 22:48:45 2002
731 +++ ltmain.sh Sat Mar 23 22:45:38 2002
732 @@ -1553,6 +1553,8 @@
733 convenience="$convenience $ladir/$objdir/$old_library"
734 old_convenience="$old_convenience $ladir/$objdir/$old_library"
735 tmp_libs=
736 + # PKGW
737 + dependency_libs=
738 for deplib in $dependency_libs; do
739 deplibs="$deplib $deplibs"
740 case "$tmp_libs " in
741 @@ -1668,6 +1670,8 @@
742 fi
743
744 tmp_libs=
745 + #PKGW
746 + dependency_libs=
747 for deplib in $dependency_libs; do
748 case $deplib in
749 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
750 @@ -2081,7 +2085,7 @@
751 -L*)
752 case " $tmp_libs " in
753 *" $deplib "*) ;;
754 - *) tmp_libs="$tmp_libs $deplib" ;;
755 + *) tmp_libs="$deplib $tmp_libs" ;;
756 esac
757 ;;
758 *) tmp_libs="$tmp_libs $deplib" ;;
759 ENDPATCH
760}
761

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

  ViewVC Help
Powered by ViewVC 1.1.20