summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2005-12-07 22:50:05 +0000
committerMartin Schlemmer <azarah@gentoo.org>2005-12-07 22:50:05 +0000
commit4561a7cc5f2f5f368ca26048cbbb6a089dc6b4ee (patch)
tree2de70f8038da65c37d7af0ed1e98338ae3517894
parent077-r1 release (diff)
downloadgentoo-2-4561a7cc5f2f5f368ca26048cbbb6a089dc6b4ee.tar.gz
gentoo-2-4561a7cc5f2f5f368ca26048cbbb6a089dc6b4ee.tar.bz2
gentoo-2-4561a7cc5f2f5f368ca26048cbbb6a089dc6b4ee.zip
Misc cleanups for libtool.eclass. Add updates for max_cmd_len patches.
-rw-r--r--eclass/ELT-patches/max_cmd_len/1.5.1433
-rw-r--r--eclass/ELT-patches/max_cmd_len/1.5.2033
-rw-r--r--eclass/libtool.eclass9
3 files changed, 71 insertions, 4 deletions
diff --git a/eclass/ELT-patches/max_cmd_len/1.5.14 b/eclass/ELT-patches/max_cmd_len/1.5.14
new file mode 100644
index 000000000000..8f299e8b9560
--- /dev/null
+++ b/eclass/ELT-patches/max_cmd_len/1.5.14
@@ -0,0 +1,33 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -136,6 +136,30 @@
+ lo2o="s/\\.lo\$/.${objext}/"
+ o2lo="s/\\.${objext}\$/.lo/"
+ quote_scanset='[[~#^*{};<>?'"'"' ]'
++
++if test -z "$max_cmd_len"; then
++ i=0
++ testring="ABCD"
++ new_result=
++
++ # If test is not a shell built-in, we'll probably end up computing a
++ # maximum length that is only half of the actual maximum length, but
++ # we can't tell.
++ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
++ = "XX$testring") >/dev/null 2>&1 &&
++ new_result=`expr "X$testring" : ".*" 2>&1` &&
++ max_cmd_len="$new_result" &&
++ test "$i" != 17 # 1/2 MB should be enough
++ do
++ i=`expr $i + 1`
++ testring="$testring$testring"
++ done
++ testring=
++ # Add a significant safety factor because C++ compilers can tack on massive
++ # amounts of additional arguments before passing them to the linker.
++ # It appears as though 1/2 is a usable value.
++ max_cmd_len=`expr $max_cmd_len \/ 2`
++fi
+
+ #####################################
+ # Shell function definitions:
diff --git a/eclass/ELT-patches/max_cmd_len/1.5.20 b/eclass/ELT-patches/max_cmd_len/1.5.20
new file mode 100644
index 000000000000..76dc21364a54
--- /dev/null
+++ b/eclass/ELT-patches/max_cmd_len/1.5.20
@@ -0,0 +1,33 @@
+--- ltmain.sh
++++ ltmain.sh
+@@ -136,6 +136,30 @@
+ execute_dlfiles=
+ lo2o="s/\\.lo\$/.${objext}/"
+ o2lo="s/\\.${objext}\$/.lo/"
++
++if test -z "$max_cmd_len"; then
++ i=0
++ testring="ABCD"
++ new_result=
++
++ # If test is not a shell built-in, we'll probably end up computing a
++ # maximum length that is only half of the actual maximum length, but
++ # we can't tell.
++ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
++ = "XX$testring") >/dev/null 2>&1 &&
++ new_result=`expr "X$testring" : ".*" 2>&1` &&
++ max_cmd_len="$new_result" &&
++ test "$i" != 17 # 1/2 MB should be enough
++ do
++ i=`expr $i + 1`
++ testring="$testring$testring"
++ done
++ testring=
++ # Add a significant safety factor because C++ compilers can tack on massive
++ # amounts of additional arguments before passing them to the linker.
++ # It appears as though 1/2 is a usable value.
++ max_cmd_len=`expr $max_cmd_len \/ 2`
++fi
+
+ #####################################
+ # Shell function definitions:
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
index 57d48e7d326b..4dfb7b107222 100644
--- a/eclass/libtool.eclass
+++ b/eclass/libtool.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.61 2005/10/09 13:01:41 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.62 2005/12/07 22:50:05 azarah Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -47,9 +47,10 @@ ELT_try_and_apply_patch() {
local patch=$2
# We only support patchlevel of 0 - why worry if its static patches?
- if patch -p0 --dry-run "${file}" < "${patch}" &> "${T}/elibtool.log" ; then
+ if patch -p0 --dry-run "${file}" "${patch}" &> "${T}/elibtool.log" ; then
einfo " Applying $(basename "$(dirname "${patch}")")-${patch##*/}.patch ..."
- patch -p0 "${file}" < "${patch}" &> "${T}/elibtool.log"
+ patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" \
+ &> "${T}/elibtool.log"
ret=$?
export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${patch##*/}"
else
@@ -104,7 +105,7 @@ ELT_walk_patches() {
fi
# Go through the patches in reverse order (large to small)
- for x in $(ls -d "${patch_dir}"/* 2> /dev/null | sort -r) ; do
+ for x in $(ls -d "${patch_dir}"/* 2> /dev/null | grep -v 'CVS' | sort -r) ; do
if [[ -n ${x} && -f ${x} ]] ; then
local ltver=$(VER_to_int "${version}")
local ptver=$(VER_to_int "${x##*/}")