diff options
author | 2002-06-24 02:06:01 +0000 | |
---|---|---|
committer | 2002-06-24 02:06:01 +0000 | |
commit | 3eda055a3a5d715adff90bc38fe0167213fc94ab (patch) | |
tree | e00140cfde91dca58bf989e601d7b12cfdd49473 /eclass/libtool.eclass | |
parent | hacking around a .desktop install entry (diff) | |
download | gentoo-2-3eda055a3a5d715adff90bc38fe0167213fc94ab.tar.gz gentoo-2-3eda055a3a5d715adff90bc38fe0167213fc94ab.tar.bz2 gentoo-2-3eda055a3a5d715adff90bc38fe0167213fc94ab.zip |
small fixes
Diffstat (limited to 'eclass/libtool.eclass')
-rw-r--r-- | eclass/libtool.eclass | 64 |
1 files changed, 48 insertions, 16 deletions
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass index 95adb737cc75..c11cf21d1d23 100644 --- a/eclass/libtool.eclass +++ b/eclass/libtool.eclass @@ -2,7 +2,7 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # Author: Martin Schlemmer <azarah@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.6 2002/06/18 08:43:28 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.7 2002/06/24 02:06:01 azarah Exp $ # This eclass patches ltmain.sh distributed with libtoolized packages with the # relink and portage patch ECLASS=libtool @@ -18,6 +18,7 @@ elibtoolize() { local dopatch="no" local dotest="yes" local dorelink="yes" + local dotmp="yes" local doportage="yes" local portage="no" local mylist="" @@ -52,9 +53,10 @@ elibtoolize() { dopatch="yes" dotest="yes" dorelink="yes" + dotmp="yes" doportage="yes" - for y in test_patch relink_patch portage_patch + for y in test_patch relink_patch tmp_patch portage_patch do if ! eval ${y} --test $>${T}/libtool.foo then @@ -72,6 +74,10 @@ elibtoolize() { fi dorelink="no" ;; + tmp_patch) + # non critical patch + dotmp="no" + ;; portage_patch) # critical patch if [ "${portage}" = "yes" ] @@ -87,7 +93,7 @@ elibtoolize() { fi done - for y in test_patch relink_patch portage_patch + for y in test_patch relink_patch tmp_patch portage_patch do if [ "${dopatch}" = "yes" ] then @@ -104,6 +110,12 @@ elibtoolize() { continue fi ;; + tmp_patch) + if [ "${dotmp}" = "no" ] + then + continue + fi + ;; portage_patch) if [ "${doportage}" = "no" ] then @@ -122,6 +134,11 @@ elibtoolize() { done done + if [ -f libtool ] + then + rm -f libtool + fi + # We need to change the pwd back to $S, as we may be called in # src_compile() cd ${S} @@ -331,6 +348,34 @@ relink_patch() { fi fi + ENDPATCH + + retval=$? + + # This one dont apply clean to libtool-1.4.2a, so do it manually. + if [ "${1}" != "--test" ] && [ "${retval}" -eq 0 ] + then + cp ltmain.sh ltmain.sh.orig + sed -e 's:cd `pwd`; $SHELL $0 --mode=relink $libtool_args:cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@:' \ + ltmain.sh.orig > ltmain.sh + rm -f ltmain.sh.orig + fi + + return ${retval} +} + +tmp_patch() { + + local opts="" + + if [ "${1}" = "--test" ] + then + opts="--force --dry-run" + fi + + patch ${opts} -p0 <<-"ENDPATCH" + --- ltmain.sh Sun Aug 12 18:08:05 2001 + +++ ltmain-relinkable.sh Tue Aug 28 18:55:13 2001 @@ -4782,7 +4829,11 @@ if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" @@ -345,19 +390,6 @@ relink_patch() { else $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 ENDPATCH - - retval=$? - - # This one dont apply clean to libtool-1.4.2a, so do it manually. - if [ "${1}" != "--test" ] && [ "${retval}" -eq 0 ] - then - cp ltmain.sh ltmain.sh.orig - sed -e 's:cd `pwd`; $SHELL $0 --mode=relink $libtool_args:cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@:' \ - ltmain.sh.orig > ltmain.sh - rm -f ltmain.sh.orig - fi - - return ${retval} } test_patch() { |