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

Diff of /eclass/libtool.eclass

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

Revision 1.1 Revision 1.3
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.1 2002/06/05 22:53:11 azarah Exp $ 5# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.3 2002/06/05 23:41:36 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
14elibtoolize() { 14elibtoolize() {
15 15
16 local x="" 16 local x=""
17 local y="" 17 local y=""
18 local dopatch="no" 18 local dopatch="no"
19 local dotest="yes"
20 local dorelink="yes"
21 local doportage="yes"
22 local portage="no"
23
24 # Only apply portage patch, and dont "libtoolize --copy --force"
25 # if all patches fail.
26 if [ "${1}" = "--portage" ]
27 then
28 portage="yes"
29 fi
19 30
20 for x in $(find_ltmain) 31 for x in $(find_ltmain)
21 do 32 do
22 cd ${x} 33 cd ${x}
23 einfo "Working directory: ${x}..." 34 einfo "Working directory: ${x}..."
24 dopatch="yes" 35 dopatch="yes"
25 36
26 for y in test_patch relink_patch portage_patch 37 for y in test_patch relink_patch portage_patch
27 do 38 do
28 if ! eval ${y} --test $>${T}/libtool.foo 39 if ! eval ${y} --test $>${T}/libtool.foo
29 then 40 then
41 case ${y} in
42 test_patch)
43 # non critical patch
44 dotest="no"
45 ;;
46 relink_patch)
47 # critical patch, but could be applied
48 if [ -z "$(grep -e "inst_prefix_dir" ltmain.sh)" ] && \
49 [ "${portage}" = "no" ]
50 then
51 dopatch="no"
52 fi
53 dorelink="no"
54 ;;
55 portage_patch)
56 # critical patch
57 if [ "${portage}" = "yes" ]
58 then
59 echo
60 eerror "Portage patch requested, but failed to apply!"
61 die
62 fi
30 dopatch="no" 63 dopatch="no"
31 break 64 doportage="no"
65 ;;
66 esac
32 fi 67 fi
33 done 68 done
34 69
35 for y in test_patch relink_patch portage_patch 70 for y in test_patch relink_patch portage_patch
36 do 71 do
37 if [ "${dopatch}" = "yes" ] 72 if [ "${dopatch}" = "yes" ]
38 then 73 then
74 case ${y} in
75 test_patch)
76 if [ "${dotest}" = "no" ]
77 then
78 continue
79 fi
80 ;;
81 relink_patch)
82 if [ "${dorelink}" = "no" ]
83 then
84 continue
85 fi
86 ;;
87 portage_patch)
88 if [ "${doportage}" = "no" ]
89 then
90 continue
91 fi
92 ;;
93 esac
94
39 einfo "Applying libtool-${y/_patch/}.patch..." 95 einfo "Applying libtool-${y/_patch/}.patch..."
40 eval ${y} $>${T}/libtool.foo 96 eval ${y} $>${T}/libtool.foo
41 else 97 elif [ "${portage}" = "no" ]
98 then
42 libtoolize --copy --force 99 libtoolize --copy --force
43 break 100 break
44 fi 101 fi
45 done 102 done
46 done 103 done

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20