summaryrefslogtreecommitdiff
path: root/sys-devel/automake/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-devel/automake/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-devel/automake/files')
-rw-r--r--sys-devel/automake/files/automake-1.10-ccnoco-ldflags.patch35
-rw-r--r--sys-devel/automake/files/automake-1.10-perl-5.16.patch128
-rw-r--r--sys-devel/automake/files/automake-1.13-dyn-ithreads.patch59
-rw-r--r--sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket.patch37
-rw-r--r--sys-devel/automake/files/automake-1.15-mdate-tz.patch53
-rw-r--r--sys-devel/automake/files/automake-1.15-perl-escape-curly-bracket.patch37
-rw-r--r--sys-devel/automake/files/automake-1.4-CVE-2009-4029.patch65
-rw-r--r--sys-devel/automake/files/automake-1.4-ansi2knr-stdlib.patch11
-rw-r--r--sys-devel/automake/files/automake-1.4-libtoolize.patch17
-rw-r--r--sys-devel/automake/files/automake-1.4-nls-nuisances.patch19
-rw-r--r--sys-devel/automake/files/automake-1.4-perl-5.11.patch28
-rw-r--r--sys-devel/automake/files/automake-1.4-perl-dyn-call.patch23
-rw-r--r--sys-devel/automake/files/automake-1.4-subdirs-89656.patch22
-rw-r--r--sys-devel/automake/files/automake-1.5-CVE-2009-4029.patch60
-rw-r--r--sys-devel/automake/files/automake-1.5-perl-5.11.patch28
-rw-r--r--sys-devel/automake/files/automake-1.5-slot.patch42
-rw-r--r--sys-devel/automake/files/automake-1.5-target_hook.patch36
-rw-r--r--sys-devel/automake/files/automake-1.5-test-fixes.patch65
-rw-r--r--sys-devel/automake/files/automake-1.6.3-test-fixes.patch28
-rw-r--r--sys-devel/automake/files/automake-1.7.9-infopage-namechange.patch15
-rw-r--r--sys-devel/automake/files/automake-1.7.9-libtool-2.patch43
-rw-r--r--sys-devel/automake/files/automake-1.7.9-test-fixes.patch46
-rw-r--r--sys-devel/automake/files/automake-1.8-perl-5.11.patch30
-rw-r--r--sys-devel/automake/files/automake-1.8.2-infopage-namechange.patch36
-rw-r--r--sys-devel/automake/files/automake-1.8.5-CVE-2009-4029.patch60
-rw-r--r--sys-devel/automake/files/automake-1.8.5-test-fixes.patch43
-rw-r--r--sys-devel/automake/files/automake-1.9.6-aclocal7-test-sleep.patch39
-rw-r--r--sys-devel/automake/files/automake-1.9.6-ignore-comments.patch29
-rw-r--r--sys-devel/automake/files/automake-1.9.6-include-dir-prefix.patch31
-rw-r--r--sys-devel/automake/files/automake-1.9.6-infopage-namechange.patch33
-rw-r--r--sys-devel/automake/files/automake-1.9.6-subst-test.patch42
31 files changed, 1240 insertions, 0 deletions
diff --git a/sys-devel/automake/files/automake-1.10-ccnoco-ldflags.patch b/sys-devel/automake/files/automake-1.10-ccnoco-ldflags.patch
new file mode 100644
index 000000000000..f48c6304bdc2
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.10-ccnoco-ldflags.patch
@@ -0,0 +1,35 @@
+http://bugs.gentoo.org/203914
+
+From 6e86514729c6dccb6213fdde8d93d7061c8108a5 Mon Sep 17 00:00:00 2001
+From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+Date: Mon, 7 Jan 2008 21:53:38 +0100
+Subject: [PATCH] Fix ccnoco.test for uncommon LDFLAGS settings.
+
+* tests/ccnoco.test (Mycomp): Use a tighter match for -c -o,
+to avoid matching for example `LDFLAGS=-Wl,--sort-common'.
+* THANKS: Update.
+Report and analysis by Carsten Lohrke and Mike Frysinger.
+---
+ ChangeLog | 7 +++++++
+ THANKS | 1 +
+ tests/ccnoco.test | 6 +++---
+ 3 files changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/tests/ccnoco.test b/tests/ccnoco.test
+index 8b37fe8..ca75922 100755
+--- a/tests/ccnoco.test
++++ b/tests/ccnoco.test
+@@ -57,8 +57,8 @@ END
+ cat > Mycomp << 'END'
+ #!/bin/sh
+
+-case "$@" in
+- *-c*-o* | *-o*-c*)
++case " "$* in
++ *\ -c*\ -o* | *\ -o*\ -c*)
+ exit 1
+ ;;
+ esac
+--
+1.6.3
+
diff --git a/sys-devel/automake/files/automake-1.10-perl-5.16.patch b/sys-devel/automake/files/automake-1.10-perl-5.16.patch
new file mode 100644
index 000000000000..19fe249e0c00
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.10-perl-5.16.patch
@@ -0,0 +1,128 @@
+https://bugs.gentoo.org/424453
+
+From 6bf58a59a1f3803e57e3f0378aa9344686707b75 Mon Sep 17 00:00:00 2001
+From: Stefano Lattarini <stefano.lattarini@gmail.com>
+Date: Mon, 28 May 2012 13:32:03 +0200
+Subject: [PATCH] aclocal: declare function prototypes, do not use '&' in
+ function calls
+
+This change will also fix automake bug#11543 (from a report by Matt
+Burgess).
+
+* aclocal.in: Declare prototypes for almost all functions early, before
+any actual function definition (but omit the prototype for the dynamically
+generated '&search' function). Add prototypes to any function definition.
+Remove '&' from function invocations (i.e., simply use "func(ARGS..)"
+instead of "&func(ARGS...)").
+* THANKS, NEWS: Update.
+
+Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
+---
+ NEWS | 4 ++++
+ THANKS | 1 +
+ aclocal.in | 42 ++++++++++++++++++++++++++++++++++--------
+ 3 files changed, 39 insertions(+), 8 deletions(-)
+
+diff --git a/aclocal.in b/aclocal.in
+index dfb851b..e8855d5 100644
+--- a/aclocal.in
++++ b/aclocal.in
+@@ -152,8 +152,34 @@ my $erase_me;
+
+ ################################################################
+
++# Prototypes for all subroutines.
++
++sub unlink_tmp (;$);
++sub xmkdir_p ($);
++sub check_acinclude ();
++sub reset_maps ();
++sub install_file ($$);
++sub list_compare (\@\@);
++sub scan_m4_dirs ($@);
++sub scan_m4_files ();
++sub add_macro ($);
++sub scan_configure_dep ($);
++sub add_file ($);
++sub scan_file ($$$);
++sub strip_redundant_includes (%);
++sub trace_used_macros ();
++sub scan_configure ();
++sub write_aclocal ($@);
++sub usage ($);
++sub version ();
++sub handle_acdir_option ($$);
++sub parse_arguments ();
++sub parse_ACLOCAL_PATH ();
++
++################################################################
++
+ # Erase temporary file ERASE_ME. Handle signals.
+-sub unlink_tmp
++sub unlink_tmp (;$)
+ {
+ my ($sig) = @_;
+
+@@ -350,7 +376,7 @@ sub scan_m4_dirs ($@)
+ next if $file eq 'aclocal.m4';
+
+ my $fullfile = File::Spec->canonpath ("$m4dir/$file");
+- &scan_file ($type, $fullfile, 'aclocal');
++ scan_file ($type, $fullfile, 'aclocal');
+ }
+ closedir (DIR);
+ }
+@@ -361,12 +387,12 @@ sub scan_m4_files ()
+ {
+ # First, scan configure.ac. It may contain macro definitions,
+ # or may include other files that define macros.
+- &scan_file (FT_USER, $configure_ac, 'aclocal');
++ scan_file (FT_USER, $configure_ac, 'aclocal');
+
+ # Then, scan acinclude.m4 if it exists.
+ if (-f 'acinclude.m4')
+ {
+- &scan_file (FT_USER, 'acinclude.m4', 'aclocal');
++ scan_file (FT_USER, 'acinclude.m4', 'aclocal');
+ }
+
+ # Finally, scan all files in our search paths.
+@@ -380,7 +406,7 @@ sub scan_m4_files ()
+ my $search = "sub search {\nmy \$found = 0;\n";
+ foreach my $key (reverse sort keys %map)
+ {
+- $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { & add_macro ("' . $key
++ $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { add_macro ("' . $key
+ . '"); $found = 1; }' . "\n");
+ }
+ $search .= "return \$found;\n};\n";
+@@ -403,7 +429,7 @@ sub add_macro ($)
+
+ verb "saw macro $macro";
+ $macro_seen{$macro} = 1;
+- &add_file ($map{$macro});
++ add_file ($map{$macro});
+ }
+
+ # scan_configure_dep ($file)
+@@ -465,7 +491,7 @@ sub scan_configure_dep ($)
+ }
+
+ add_macro ($_) foreach (@rlist);
+- &scan_configure_dep ($_) foreach @ilist;
++ scan_configure_dep ($_) foreach @ilist;
+ }
+
+ # add_file ($FILE)
+@@ -931,7 +957,7 @@ EOF
+ }
+
+ # Print version and exit.
+-sub version()
++sub version ()
+ {
+ print <<EOF;
+ aclocal (GNU $PACKAGE) $VERSION
+--
+2.1.3
+
diff --git a/sys-devel/automake/files/automake-1.13-dyn-ithreads.patch b/sys-devel/automake/files/automake-1.13-dyn-ithreads.patch
new file mode 100644
index 000000000000..f790e7724c93
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.13-dyn-ithreads.patch
@@ -0,0 +1,59 @@
+https://bugs.gentoo.org/343439
+
+From 182626687f2640609f8eb28ad1b04b078342f2c7 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 12 Jan 2013 00:19:40 -0500
+Subject: [PATCH] ithreads: use runtime (not configure time) detection of perl
+ threads
+
+I can't imagine the runtime checks being a big runtime penalty, so there
+shouldn't be a need to do the checks at configure check and hardcode the
+result in the generated automake.
+
+With the current system, it means if you change your perl config (build
+perl w/threads, build automake, build perl w/out threads), or deploy a
+compiled automake package on a different system (build had threads, but
+deployed system does not), you get errors when trying to run automake.
+
+So take the logic from configure.ac and move it to the one place where
+PERL_THREADS is used (lib/Automake/Config.in) and do the version/config
+checking at runtime.
+
+* bootstrap.sh (PERL_THREADS): Delete assignment and use in sed.
+* configure.ac (am_cv_prog_PERL_ithreads, PERL_THREADS): Delete all code
+related to these two variables.
+* lib/Automake/Config.in (perl_threads): Initialize to 0, and only set to
+1 if the perl version is at least 5.007_002, and useithreads is in Config.
+
+Copyright-paperwork-exempt: yes
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
+---
+ bootstrap.sh | 2 --
+ configure.ac | 26 --------------------------
+ lib/Automake/Config.in | 9 ++++++++-
+ 3 files changed, 8 insertions(+), 29 deletions(-)
+
+diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in
+index fe6ef9d..885e74e 100644
+--- a/lib/Automake/Config.in
++++ b/lib/Automake/Config.in
+@@ -33,7 +33,14 @@ our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
+ our $VERSION = '@VERSION@';
+ our $RELEASE_YEAR = '@RELEASE_YEAR@';
+ our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
+-our $perl_threads = @PERL_THREADS@;
++
++our $perl_threads = 0;
++# We need at least this version for CLONE support.
++if (eval { require 5.007_002; })
++ {
++ use Config;
++ $perl_threads = $Config{useithreads};
++ }
+
+ 1;
+
+--
+1.8.0.2
+
diff --git a/sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket.patch b/sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket.patch
new file mode 100644
index 000000000000..a113d09c58c6
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.13-perl-escape-curly-bracket.patch
@@ -0,0 +1,37 @@
+http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21001
+
+From 34163794a58b5bd91c5d6bd9adf5437571c7a479 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Tue, 7 Jul 2015 10:54:24 +0200
+Subject: [PATCH] bin/automake: escape '{' in regexp pattern
+
+Based on perlre(1) documentation:
+.. in Perl v5.26, literal uses of a curly bracket will be required
+to be escaped, say by preceding them with a backslash ("\{" ) or
+enclosing them within square brackets ("[{]") ..
+
+References:
+https://bugzilla.redhat.com/1239379
+
+* bin/automake.in (substitute_ac_subst_variables): Escape the
+occurrence of '{' character.
+---
+ bin/automake.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/automake.in b/bin/automake.in
+index 0c29184..c294ced 100644
+--- a/bin/automake.in
++++ b/bin/automake.in
+@@ -3898,7 +3898,7 @@ sub substitute_ac_subst_variables_worker
+ sub substitute_ac_subst_variables ($)
+ {
+ my ($text) = @_;
+- $text =~ s/\${([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge;
++ $text =~ s/\$\{([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge;
+ return $text;
+ }
+
+--
+2.1.0
+
diff --git a/sys-devel/automake/files/automake-1.15-mdate-tz.patch b/sys-devel/automake/files/automake-1.15-mdate-tz.patch
new file mode 100644
index 000000000000..e00f2bf329d1
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.15-mdate-tz.patch
@@ -0,0 +1,53 @@
+https://bugs.gentoo.org/520818
+https://bugs.gentoo.org/574492
+https://lists.gnu.org/archive/html/bug-automake/2014-10/msg00003.html
+https://lists.gnu.org/archive/html/bug-automake/2014-10/msg00004.html
+
+https://debbugs.gnu.org/20314
+https://bugs.debian.org/782345
+https://lists.gnu.org/archive/html/automake-patches/2015-04/msg00000.html
+
+From: Reiner Herrmann <reiner@reiner-h.de>
+Date: Sat, 18 Jul 2015 14:10:35 -0400
+Subject: Make output of mdate-sh deterministic
+
+mdate-sh pretty-prints the modification time of a file.
+But it's output can vary depending on the timezone of
+the caller. Someone in timezone GMT-12 will get a different
+result (day) than someone in timezone GMT+12.
+
+As this output is also used to create/update stamp files,
+which influence the further build process, the build result
+can vary.
+To enable reproducible builds and to have a more deterministic
+build behavior, this change fixes the timezone to UTC.
+
+Signed-off-by: Reiner Herrmann <reiner at reiner-h.de>
+---
+ lib/mdate-sh | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/lib/mdate-sh b/lib/mdate-sh
+index e8dfaca..9e2c0c9 100755
+--- a/lib/mdate-sh
++++ b/lib/mdate-sh
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ # Get modification time of a file or directory and pretty-print it.
+
+-scriptversion=2010-08-21.06; # UTC
++scriptversion=2015-04-09.19; # UTC
+
+ # Copyright (C) 1995-2014 Free Software Foundation, Inc.
+ # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
+@@ -74,6 +74,10 @@ export LC_ALL
+ LC_TIME=C
+ export LC_TIME
+
++# Use UTC to get reproducible result
++TZ=UTC
++export TZ
++
+ # GNU ls changes its time format in response to the TIME_STYLE
+ # variable. Since we cannot assume 'unset' works, revert this
+ # variable to its documented default.
diff --git a/sys-devel/automake/files/automake-1.15-perl-escape-curly-bracket.patch b/sys-devel/automake/files/automake-1.15-perl-escape-curly-bracket.patch
new file mode 100644
index 000000000000..268548d1e9de
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.15-perl-escape-curly-bracket.patch
@@ -0,0 +1,37 @@
+http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21001
+
+From 34163794a58b5bd91c5d6bd9adf5437571c7a479 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Tue, 7 Jul 2015 10:54:24 +0200
+Subject: [PATCH] bin/automake: escape '{' in regexp pattern
+
+Based on perlre(1) documentation:
+.. in Perl v5.26, literal uses of a curly bracket will be required
+to be escaped, say by preceding them with a backslash ("\{" ) or
+enclosing them within square brackets ("[{]") ..
+
+References:
+https://bugzilla.redhat.com/1239379
+
+* bin/automake.in (substitute_ac_subst_variables): Escape the
+occurrence of '{' character.
+---
+ bin/automake.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bin/automake.in b/bin/automake.in
+index 0c29184..c294ced 100644
+--- a/bin/automake.in
++++ b/bin/automake.in
+@@ -3898,7 +3898,7 @@ sub substitute_ac_subst_variables_worker
+ sub substitute_ac_subst_variables
+ {
+ my ($text) = @_;
+- $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
++ $text =~ s/\$\{([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
+ return $text;
+ }
+
+--
+2.1.0
+
diff --git a/sys-devel/automake/files/automake-1.4-CVE-2009-4029.patch b/sys-devel/automake/files/automake-1.4-CVE-2009-4029.patch
new file mode 100644
index 000000000000..42aef8c8e1bc
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.4-CVE-2009-4029.patch
@@ -0,0 +1,65 @@
+http://bugs.gentoo.org/295357
+
+(Makefile.in mangled a little for 1.4_p6)
+
+From 449d20aa12e13fefd848604225fc83d0c39c61d0 Mon Sep 17 00:00:00 2001
+From: Jim Meyering <meyering@redhat.com>
+Date: Tue, 1 Dec 2009 22:48:15 +0100
+Subject: [PATCH 1/1] do not put world-writable directories in distribution tarballs
+
+* automake.in (handle_dist_worker): Do not make all directories
+group- or world-writable. Instead, use 755.
+
+Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+---
+ Makefile.in | 4 ++--
+ automake.in | 4 ++--
+ 4 files changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 93da407..59eb9f4 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -456,7 +456,7 @@ dist-all: distdir
+ distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+- -chmod 777 $(distdir)
++ -chmod 755 $(distdir)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+@@ -477,7 +477,7 @@ distdir: $(DISTFILES)
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+- chmod 777 $(distdir)/$$subdir; \
++ chmod 755 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+diff --git a/automake.in b/automake.in
+index 8eceea7..8f48236 100755
+--- a/automake.in
++++ b/automake.in
+@@ -2336,7 +2336,7 @@ sub handle_dist_worker
+ # Create dist directory.
+ $output_rules .= ("\t-rm -rf \$(distdir)\n"
+ . "\tmkdir \$(distdir)\n"
+- . "\t-chmod 777 \$(distdir)\n");
++ . "\t-chmod 755 \$(distdir)\n");
+ }
+
+ # Only run automake in `dist' target if --include-deps and
+@@ -2468,7 +2468,7 @@ sub handle_dist_worker
+ . "\t" . ' test -d $(distdir)/$$subdir ' . "\\\n"
+ . "\t" . ' || mkdir $(distdir)/$$subdir ' . "\\\n"
+ . "\t" . ' || exit 1; ' . "\\\n"
+- . "\t" . ' chmod 777 $(distdir)/$$subdir; ' . "\\\n"
++ . "\t" . ' chmod 755 $(distdir)/$$subdir; ' . "\\\n"
+ . "\t" . ' (cd $$subdir'
+ . ' && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$('
+ . (($relative_dir eq '.') ? 'distdir' : 'top_distdir')
+--
+1.6.5.4
+
diff --git a/sys-devel/automake/files/automake-1.4-ansi2knr-stdlib.patch b/sys-devel/automake/files/automake-1.4-ansi2knr-stdlib.patch
new file mode 100644
index 000000000000..78aa2e3d6a3f
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.4-ansi2knr-stdlib.patch
@@ -0,0 +1,11 @@
+--- ansi2knr.c.orig 2005-01-30 06:54:09.702046352 -0500
++++ ansi2knr.c 2005-01-30 06:54:17.719827464 -0500
+@@ -132,7 +132,7 @@
+
+ #endif /* not HAVE_CONFIG_H */
+
+-#if STDC_HEADERS
++#if STDC_HEADERS || HAVE_STDLIB_H
+ # include <stdlib.h>
+ #else
+ /*
diff --git a/sys-devel/automake/files/automake-1.4-libtoolize.patch b/sys-devel/automake/files/automake-1.4-libtoolize.patch
new file mode 100644
index 000000000000..d71d66c973c5
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.4-libtoolize.patch
@@ -0,0 +1,17 @@
+Patch from redhat/fedora which made it into upstream.
+
+--- automake.in Wed Jul 12 11:40:03 2000
++++ automake.in Thu Nov 9 07:04:46 2000
+@@ -6882,9 +6882,11 @@
+ $suppress = 1;
+
+ # Maybe run libtoolize.
++ @libtoolize_args = ('--automake');
++ push @libtoolize_args, '-c' if $copy_missing;
+ if ($seen_libtool
+ && grep ($_ eq $file, @libtoolize_files)
+- && system ('libtoolize', '--automake'))
++ && system ('libtoolize', @libtoolize_args))
+ {
+ $message = "installing \`$errfile'";
+ $suppress = 0;
diff --git a/sys-devel/automake/files/automake-1.4-nls-nuisances.patch b/sys-devel/automake/files/automake-1.4-nls-nuisances.patch
new file mode 100644
index 000000000000..16aa657c8ebb
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.4-nls-nuisances.patch
@@ -0,0 +1,19 @@
+--- configure
++++ configure
+@@ -46,6 +46,16 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
++# NLS nuisances.
++# Only set these to C if already set. These must not be set unconditionally
++# because not all systems understand e.g. LANG=C (notably SCO).
++# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
++# Non-C LC_CTYPE values break the ctype check.
++if test "${LANG+set}" = set; then LANG=C; export LANG; fi
++if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
++if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
++if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
++
+ # Initialize some other variables.
+ subdirs=
+ MFLAGS= MAKEFLAGS=
diff --git a/sys-devel/automake/files/automake-1.4-perl-5.11.patch b/sys-devel/automake/files/automake-1.4-perl-5.11.patch
new file mode 100644
index 000000000000..f0423a64fbb8
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.4-perl-5.11.patch
@@ -0,0 +1,28 @@
+From 375912c466b28a6121d351b9ff5513133a1c7227 Mon Sep 17 00:00:00 2001
+From: Jim Meyering <meyering@redhat.com>
+Date: Sun, 29 Nov 2009 20:35:03 +0100
+Subject: [PATCH] avoid a warning from perl-5.11
+
+* lib/Automake/Wrap.pm (_tab_length): Remove useless use of tr's
+"/d" modifier.
+
+Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+---
+ ChangeLog | 6 ++++++
+ lib/Automake/Wrap.pm | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+--- a/automake.in
++++ b/automake.in
+@@ -5126,7 +5126,7 @@ sub pretty_print_internal
+ # character counts for eight. So we count the number of Tabs and
+ # multiply by 7.
+ local ($fill_length) = length ($fill);
+- $fill_length += 7 * ($fill =~ tr/\t/\t/d);
++ $fill_length += 7 * ($fill =~ tr/\t/\t/);
+
+ local ($bol) = ($head eq '');
+ foreach (@values)
+--
+2.1.3
+
diff --git a/sys-devel/automake/files/automake-1.4-perl-dyn-call.patch b/sys-devel/automake/files/automake-1.4-perl-dyn-call.patch
new file mode 100644
index 000000000000..9a140aa50510
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.4-perl-dyn-call.patch
@@ -0,0 +1,23 @@
+at some point, a perl update broke this syntax. use a newer style that works
+with at least perl-5.16.
+
+--- a/automake.in
++++ b/automake.in
+@@ -983,7 +983,7 @@ sub finish_languages
+
+ # Compute the function name of the finisher and then call it.
+ $name = 'lang_' . $lang . '_finish';
+- do $name ();
++ &$name ();
+ }
+
+ # If the project is entirely C++ or entirely Fortran 77, don't
+@@ -1144,7 +1144,7 @@ sub handle_single_transform_list
+ # Found the language, so see what it says.
+ local ($subr) = 'lang_' . $lang . '_rewrite';
+ # Note: computed subr call.
+- local ($r) = do $subr ($base, $extension);
++ local ($r) = &$subr ($base, $extension);
+ # Skip this entry if we were asked not to process it.
+ next if ! $r;
+
diff --git a/sys-devel/automake/files/automake-1.4-subdirs-89656.patch b/sys-devel/automake/files/automake-1.4-subdirs-89656.patch
new file mode 100644
index 000000000000..7500fc98d9ac
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.4-subdirs-89656.patch
@@ -0,0 +1,22 @@
+Patch from redhat/fedora which made it into upstream.
+
+--- automake-1.4-p6/subdirs.am.subdirs 2001-07-16 22:47:36.000000000 -0700
++++ automake-1.4-p6/subdirs.am 2003-04-25 08:24:35.000000000 -0700
+@@ -27,7 +27,7 @@
+ all-recursive install-data-recursive install-exec-recursive \
+ installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \
+ check-recursive installcheck-recursive info-recursive dvi-recursive:
+- @set fnord $(MAKEFLAGS); amf=$$2; \
++ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+@@ -55,7 +55,7 @@ check-recursive installcheck-recursive i
+ ## bombs.
+ mostlyclean-recursive clean-recursive distclean-recursive \
+ maintainer-clean-recursive:
+- @set fnord $(MAKEFLAGS); amf=$$2; \
++ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
diff --git a/sys-devel/automake/files/automake-1.5-CVE-2009-4029.patch b/sys-devel/automake/files/automake-1.5-CVE-2009-4029.patch
new file mode 100644
index 000000000000..d91139b30178
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.5-CVE-2009-4029.patch
@@ -0,0 +1,60 @@
+http://bugs.gentoo.org/295357
+
+From b1c42762931e9cd03aee3e4b4284dc2920c9eabc Mon Sep 17 00:00:00 2001
+From: Jim Meyering <meyering@redhat.com>
+Date: Tue, 1 Dec 2009 22:48:15 +0100
+Subject: [PATCH 1/1] do not put world-writable directories in distribution tarballs
+
+* lib/am/distdir.am (distdir): Do not make all directories
+group- or world-writable. Instead, use 755.
+
+Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+---
+ Makefile.in | 3 ++-
+ lib/am/distdir.am | 9 +++------
+ 4 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index ebbfd2f..76991db 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -379,7 +379,8 @@ distdir: $(DISTFILES)
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="${top_distdir}" distdir="$(distdir)" \
+ dist-info
+- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
++ -find "$(distdir)" -type d ! -perm -755 \
++ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+diff --git a/lib/am/distdir.am b/lib/am/distdir.am
+index e808966..0a01c4e 100644
+--- a/lib/am/distdir.am
++++ b/lib/am/distdir.am
+@@ -127,11 +127,7 @@ if %?DIST-TARGETS%
+ endif %?DIST-TARGETS%
+ ##
+ ## This complex find command will try to avoid changing the modes of
+-## links into the source tree, in case they're hard-linked. It will
+-## also make directories writable by everybody, because some
+-## brain-dead tar implementations change ownership and permissions of
+-## a directory before extracting the files, thus becoming unable to
+-## extract them.
++## links into the source tree, in case they're hard-linked.
+ ##
+ ## Ignore return result from chmod, because it might give an error
+ ## if we chmod a symlink.
+@@ -144,7 +140,8 @@ endif %?DIST-TARGETS%
+ ## the file in place in the source tree.
+ ##
+ if %?TOPDIR_P%
+- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
++ -find "$(distdir)" -type d ! -perm -755 \
++ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+--
+1.6.5.4
+
diff --git a/sys-devel/automake/files/automake-1.5-perl-5.11.patch b/sys-devel/automake/files/automake-1.5-perl-5.11.patch
new file mode 100644
index 000000000000..1ee36468c319
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.5-perl-5.11.patch
@@ -0,0 +1,28 @@
+From 375912c466b28a6121d351b9ff5513133a1c7227 Mon Sep 17 00:00:00 2001
+From: Jim Meyering <meyering@redhat.com>
+Date: Sun, 29 Nov 2009 20:35:03 +0100
+Subject: [PATCH] avoid a warning from perl-5.11
+
+* lib/Automake/Wrap.pm (_tab_length): Remove useless use of tr's
+"/d" modifier.
+
+Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+---
+ ChangeLog | 6 ++++++
+ lib/Automake/Wrap.pm | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+--- a/automake.in
++++ b/automake.in
+@@ -5277,7 +5277,7 @@ sub pretty_print_internal
+ # character counts for eight. So we count the number of Tabs and
+ # multiply by 7.
+ my $fill_length = length ($fill);
+- $fill_length += 7 * ($fill =~ tr/\t/\t/d);
++ $fill_length += 7 * ($fill =~ tr/\t/\t/);
+
+ foreach (@values)
+ {
+--
+2.1.3
+
diff --git a/sys-devel/automake/files/automake-1.5-slot.patch b/sys-devel/automake/files/automake-1.5-slot.patch
new file mode 100644
index 000000000000..348775abe751
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.5-slot.patch
@@ -0,0 +1,42 @@
+--- aclocal.in.orig 2004-10-22 11:11:05.361192040 -0400
++++ aclocal.in 2004-10-22 11:11:45.362110976 -0400
+@@ -33,5 +33,5 @@
+ $prefix = "@prefix@";
+ # Note that this isn't pkgdatadir, but a separate directory.
+-$acdir = "@datadir@/aclocal";
++$acdir = "@datadir@/aclocal-1.5";
+
+ # Some globals.
+@@ -116,4 +116,5 @@
+
+ local (@dirlist) = &parse_arguments (@ARGV);
++push (@dirlist, "/usr/share/aclocal") if (!grep(/^--acdir/, @ARGV));
+ &scan_m4_files (@dirlist);
+ &scan_configure;
+@@ -203,5 +204,5 @@
+ if ($print_and_exit)
+ {
+- print $acdir, "\n";
++ print "/usr/share/aclocal", "\n";
+ exit 0;
+ }
+--- automake.in.orig 2004-10-22 11:14:10.787003032 -0400
++++ automake.in 2004-10-22 11:14:22.072287408 -0400
+@@ -32,7 +32,7 @@
+ BEGIN
+ {
+ my $prefix = "@prefix@";
+- my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@";
++ my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@-1.5";
+ unshift @INC, "$perllibdir";
+ }
+
+@@ -127,7 +127,7 @@
+ my $VERSION = "@VERSION@";
+ my $PACKAGE = "@PACKAGE@";
+ my $prefix = "@prefix@";
+-my $libdir = "@datadir@/@PACKAGE@";
++my $libdir = "@datadir@/@PACKAGE@-1.5";
+
+ # String constants.
+ my $IGNORE_PATTERN = '^\s*##([^#\n].*)?\n';
diff --git a/sys-devel/automake/files/automake-1.5-target_hook.patch b/sys-devel/automake/files/automake-1.5-target_hook.patch
new file mode 100644
index 000000000000..6f40cbb67d39
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.5-target_hook.patch
@@ -0,0 +1,36 @@
+diff -C 2 -r -N /tmp/automake-1.5/automake.in automake-1.5/automake.in
+*** /tmp/automake-1.5/automake.in Thu Aug 23 07:26:53 2001
+--- automake-1.5/automake.in Tue Feb 5 20:38:55 2002
+***************
+*** 1941,1945 ****
+
+ # Let the language do some special magic if required.
+! $lang->target_hook ($aggregate, $object, $full);
+
+ if ($derived_source)
+--- 1941,1947 ----
+
+ # Let the language do some special magic if required.
+! if (defined $lang) {
+! $lang->target_hook ($aggregate, $object, $full);
+! }
+
+ if ($derived_source)
+diff -C 2 -r -N /tmp/automake-1.5/m4/depout.m4 automake-1.5/m4/depout.m4
+*** /tmp/automake-1.5/m4/depout.m4 Mon May 14 02:01:09 2001
+--- automake-1.5/m4/depout.m4 Wed Jan 30 22:03:33 2002
+***************
+*** 13,18 ****
+ for mf in $CONFIG_FILES; do
+ case "$mf" in
+! Makefile) dirpart=.;;
+! */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+ *) continue;;
+ esac
+--- 13,18 ----
+ for mf in $CONFIG_FILES; do
+ case "$mf" in
+! Makefile|GNUmakefile) dirpart=.;;
+! */Makefile|*/GNUmakefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+ *) continue;;
+ esac
diff --git a/sys-devel/automake/files/automake-1.5-test-fixes.patch b/sys-devel/automake/files/automake-1.5-test-fixes.patch
new file mode 100644
index 000000000000..8f34a793e450
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.5-test-fixes.patch
@@ -0,0 +1,65 @@
+Fix the tests so they don't fail :)
+http://bugs.gentoo.org/79505
+
+insthook:
+update the head/tail syntax since coreutils has deprecated the old style
+
+dirname:
+just disable the pos
+
+ccnoco:
+rip patches from fedora
+
+depcomp2: #181484
+fix false positive when using newer autoconf -- it throws a warning based
+on dataroot which causes a failure when there was none
+
+--- automake-1.5/tests/insthook.test
++++ automake-1.5/tests/insthook.test
+@@ -17 +17 @@
+-test x$lnum != x && tail +$lnum Makefile.in | head -3 | grep install-exec-hook
++test x$lnum != x && tail -n +$lnum Makefile.in | head -n 3 | grep install-exec-hook
+--- automake-1.5/tests/dirname.test
++++ automake-1.5/tests/dirname.test
+@@ -1,2 +1,3 @@
+ #! /bin/sh
++exit 0
+
+--- automake-1.5/tests/ccnoco.test
++++ automake-1.5/tests/ccnoco.test
+@@ -39,7 +39,6 @@
+ }
+ END
+
+-$needs_autoconf
+ gcc -v || exit 77
+
+ cat > Mycomp << 'END'
+@@ -51,7 +50,7 @@
+ ;;
+ esac
+
+-exec gcc ${1+"$@"}
++exec gcc "$@"
+ END
+
+ chmod +x Mycomp
+@@ -59,6 +58,10 @@
+ set -e
+
+
++# Ignore user CFLAGS.
++CFLAGS=
++export CFLAGS
++
+ for conf in configure.1 configure.3; do
+ cp $conf configure.in
+
+--- automake-1.5/tests/depcomp2.test
++++ automake-1.5/tests/depcomp2.test
+@@ -17,4 +17,5 @@
+ cat > Makefile.am << 'END'
+ SUBDIRS = subdir
++datarootdir = @datarootdir@
+ END
+
diff --git a/sys-devel/automake/files/automake-1.6.3-test-fixes.patch b/sys-devel/automake/files/automake-1.6.3-test-fixes.patch
new file mode 100644
index 000000000000..666517754a96
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.6.3-test-fixes.patch
@@ -0,0 +1,28 @@
+Fix the tests so they don't fail :)
+
+depcomp2: #159557 #181484
+fix false positive when using newer autoconf -- it throws a warning based
+on dataroot which causes a failure when there was none
+
+man2: #159557
+grab update from newer automake
+
+--- automake-1.6.3/tests/depcomp2.test
++++ automake-1.6.3/tests/depcomp2.test
+@@ -17,4 +17,5 @@
+ cat > Makefile.am << 'END'
+ SUBDIRS = subdir
++datarootdir = @datarootdir@
+ END
+
+--- automake-1.6.3/tests/man2.test
++++ automake-1.6.3/tests/man2.test
+@@ -23,7 +23,7 @@
+ $AUTOMAKE
+
+ # Let's play with $DESTDIR too, it shouldn't hurt.
+-./configure --prefix=''
++./configure --prefix='' --mandir=/man
+ DESTDIR="`pwd`/=inst" $MAKE -e SHELL=/bin/sh install
+
+ test -f ./=inst/man/man2/foo.2
diff --git a/sys-devel/automake/files/automake-1.7.9-infopage-namechange.patch b/sys-devel/automake/files/automake-1.7.9-infopage-namechange.patch
new file mode 100644
index 000000000000..0e6708a55099
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.7.9-infopage-namechange.patch
@@ -0,0 +1,15 @@
+--- Makefile.in 2003-06-30 17:07:30.000000000 +0000
++++ Makefile.in 2003-06-30 17:09:28.000000000 +0000
+@@ -199,8 +199,9 @@
+
+ .texi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]
+- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+- -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
++ cd $(srcdir) \
++ && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
++ `echo $< | sed 's,.*/,,'`
+
+ .texi.dvi:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
diff --git a/sys-devel/automake/files/automake-1.7.9-libtool-2.patch b/sys-devel/automake/files/automake-1.7.9-libtool-2.patch
new file mode 100644
index 000000000000..ad1d75d8caa9
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.7.9-libtool-2.patch
@@ -0,0 +1,43 @@
+fixup tests w/libtool-2
+
+https://bugs.gentoo.org/257544
+
+--- automake-1.7.9/tests/libtool5.test
++++ automake-1.7.9/tests/libtool5.test
+@@ -45,5 +45,6 @@
+ END
+
+ libtoolize
++[ -e config.guess ] || libtoolize --install
+ $ACLOCAL
+ $AUTOMAKE
+--- automake-1.7.9/tests/ltcond2.test
++++ automake-1.7.9/tests/ltcond2.test
+@@ -73,6 +73,7 @@
+ echo 'int main() { print(); return 0; }' >main.c
+
+ libtoolize
++[ -e config.guess ] || libtoolize --install
+ $ACLOCAL
+ $AUTOCONF
+ $AUTOMAKE
+--- automake-1.7.9/tests/ltcond.test
++++ automake-1.7.9/tests/ltcond.test
+@@ -62,6 +62,7 @@
+ mkdir empty
+
+ libtoolize
++[ -e config.guess ] || libtoolize --install
+ $ACLOCAL
+ $AUTOCONF
+ $AUTOMAKE
+--- automake-1.7.9/tests/ltconv.test
++++ automake-1.7.9/tests/ltconv.test
+@@ -111,6 +111,7 @@
+ EOF
+
+ libtoolize
++[ -e config.guess ] || libtoolize --install
+ $ACLOCAL
+ $AUTOCONF
+ $AUTOMAKE
diff --git a/sys-devel/automake/files/automake-1.7.9-test-fixes.patch b/sys-devel/automake/files/automake-1.7.9-test-fixes.patch
new file mode 100644
index 000000000000..00854886d66d
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.7.9-test-fixes.patch
@@ -0,0 +1,46 @@
+Fix the tests so they don't fail :)
+
+exdir2 man2 transform: #159557 #162565
+grab updates from newer automake
+
+mkdir-tests.m4:
+when mixing newer gettext with this automake, the tests bomb out
+as AM_PROG_MKDIR_P is not provided properly
+
+--- automake-1.7.9/tests/man2.test
++++ automake-1.7.9/tests/man2.test
+@@ -41,7 +41,7 @@
+ $AUTOMAKE
+
+ # Let's play with $DESTDIR too, it shouldn't hurt.
+-./configure --prefix=''
++./configure --prefix='' --mandir=/man
+ DESTDIR="`pwd`/_inst" $MAKE -e install
+
+ test -f ./_inst/man/man2/foo.2
+--- automake-1.7.9/tests/transform.test
++++ automake-1.7.9/tests/transform.test
+@@ -56,7 +56,7 @@
+ $AUTOCONF
+ $AUTOMAKE
+
+-./configure --program-prefix=gnu- --prefix `pwd`/inst
++./configure --program-prefix=gnu- --prefix `pwd`/inst --mandir `pwd`/inst/man
+ $MAKE
+ $MAKE test-install
+ $MAKE uninstall
+--- automake-1.7.9/tests/exdir2.test
++++ automake-1.7.9/tests/exdir2.test
+@@ -23,7 +23,7 @@
+ . ./defs || exit 1
+
+ cat > Makefile.am << 'EOF'
+-html_DATA = zot.html
++quuz_DATA = zot.html
+ pkgdata_DATA = qbert
+ EOF
+
+--- automake-1.7.9/m4/mkdir-tests.m4
++++ automake-1.7.9/m4/mkdir-tests.m4
+@@ -0,0 +1 @@
++AC_DEFUN([AM_PROG_MKDIR_P])
diff --git a/sys-devel/automake/files/automake-1.8-perl-5.11.patch b/sys-devel/automake/files/automake-1.8-perl-5.11.patch
new file mode 100644
index 000000000000..0808174f0102
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.8-perl-5.11.patch
@@ -0,0 +1,30 @@
+From 375912c466b28a6121d351b9ff5513133a1c7227 Mon Sep 17 00:00:00 2001
+From: Jim Meyering <meyering@redhat.com>
+Date: Sun, 29 Nov 2009 20:35:03 +0100
+Subject: [PATCH] avoid a warning from perl-5.11
+
+* lib/Automake/Wrap.pm (_tab_length): Remove useless use of tr's
+"/d" modifier.
+
+Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+---
+ ChangeLog | 6 ++++++
+ lib/Automake/Wrap.pm | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/Automake/Wrap.pm b/lib/Automake/Wrap.pm
+index 09a135a..66213d1 100644
+--- a/lib/Automake/Wrap.pm
++++ b/lib/Automake/Wrap.pm
+@@ -55,7 +55,7 @@ sub tab_length($)
+ {
+ my ($txt) = @_;
+ my $len = length ($txt);
+- $len += 7 * ($txt =~ tr/\t/\t/d);
++ $len += 7 * ($txt =~ tr/\t/\t/);
+ return $len;
+ }
+
+--
+2.1.3
+
diff --git a/sys-devel/automake/files/automake-1.8.2-infopage-namechange.patch b/sys-devel/automake/files/automake-1.8.2-infopage-namechange.patch
new file mode 100644
index 000000000000..bc7d58ed35ec
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.8.2-infopage-namechange.patch
@@ -0,0 +1,36 @@
+--- automake-1.8.2/doc/Makefile.in 2004-02-03 21:59:01.585999688 +0200
++++ automake-1.8.2.info/doc/Makefile.in 2004-02-03 22:04:03.893042032 +0200
+@@ -175,29 +175,10 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+ .texi.info:
+- restore=: && \
+- backupdir="$(am__leading_dot)am$$$$" && \
+- am__cwd=`pwd` && cd $(srcdir) && \
+- rm -rf $$backupdir && mkdir $$backupdir && \
+- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+- if test -f $$f; then \
+- mv $$f $$backupdir; \
+- restore=mv; \
+- fi; \
+- done; \
+- cd "$$am__cwd"; \
+- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+- -o $@ $<; \
+- then \
+- rc=0; \
+- cd $(srcdir); \
+- else \
+- rc=$$?; \
+- cd $(srcdir) && \
+- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+- fi; \
+- rm -rf $$backupdir; \
+- exit $$rc
++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]
++ cd $(srcdir) \
++ && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
++ `echo $< | sed 's,.*/,,'`
+
+ .texi.dvi:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
diff --git a/sys-devel/automake/files/automake-1.8.5-CVE-2009-4029.patch b/sys-devel/automake/files/automake-1.8.5-CVE-2009-4029.patch
new file mode 100644
index 000000000000..9e42e52c80bd
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.8.5-CVE-2009-4029.patch
@@ -0,0 +1,60 @@
+http://bugs.gentoo.org/295357
+
+From 4331fc7423036e68a9e480fb0ff56934b5d2be0e Mon Sep 17 00:00:00 2001
+From: Jim Meyering <meyering@redhat.com>
+Date: Tue, 1 Dec 2009 22:07:45 +0100
+Subject: [PATCH 1/1] do not put world-writable directories in distribution tarballs
+
+* lib/am/distdir.am (distdir): Do not make all directories
+group- or world-writable. Instead, use 755.
+
+Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+---
+ Makefile.in | 3 ++-
+ lib/am/distdir.am | 9 +++------
+ 4 files changed, 17 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index f6971b4..c753eaa 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -389,7 +389,8 @@ distdir: $(DISTFILES)
+ || exit 1; \
+ fi; \
+ done
+- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
++ -find "$(distdir)" -type d ! -perm -755 \
++ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+diff --git a/lib/am/distdir.am b/lib/am/distdir.am
+index 0ed0593..91dbe6b 100644
+--- a/lib/am/distdir.am
++++ b/lib/am/distdir.am
+@@ -190,11 +190,7 @@ if %?DIST-TARGETS%
+ endif %?DIST-TARGETS%
+ ##
+ ## This complex find command will try to avoid changing the modes of
+-## links into the source tree, in case they're hard-linked. It will
+-## also make directories writable by everybody, because some
+-## brain-dead tar implementations change ownership and permissions of
+-## a directory before extracting the files, thus becoming unable to
+-## extract them.
++## links into the source tree, in case they're hard-linked.
+ ##
+ ## Ignore return result from chmod, because it might give an error
+ ## if we chmod a symlink.
+@@ -207,7 +203,8 @@ endif %?DIST-TARGETS%
+ ## the file in place in the source tree.
+ ##
+ if %?TOPDIR_P%
+- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
++ -find "$(distdir)" -type d ! -perm -755 \
++ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+--
+1.6.5.4
+
diff --git a/sys-devel/automake/files/automake-1.8.5-test-fixes.patch b/sys-devel/automake/files/automake-1.8.5-test-fixes.patch
new file mode 100644
index 000000000000..43290d1e0d4b
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.8.5-test-fixes.patch
@@ -0,0 +1,43 @@
+Fix the tests so they don't fail :)
+
+exdir2 man2 transform: #159557 #162565
+grab updates from newer automake
+
+--- automake-1.8.5/tests/man2.test
++++ automake-1.8.5/tests/man2.test
+@@ -41,7 +41,7 @@
+ $AUTOMAKE
+
+ # Let's play with $DESTDIR too, it shouldn't hurt.
+-./configure --prefix=''
++./configure --prefix='' --mandir=/man
+ DESTDIR="`pwd`/_inst" $MAKE -e install
+
+ test -f ./_inst/man/man2/foo.2
+--- automake-1.8.5/tests/transform.test
++++ automake-1.8.5/tests/transform.test
+@@ -56,7 +56,7 @@
+ $AUTOCONF
+ $AUTOMAKE
+
+-./configure --program-prefix=gnu- --prefix `pwd`/inst
++./configure --program-prefix=gnu- --prefix `pwd`/inst --mandir `pwd`/inst/man
+ $MAKE
+ $MAKE test-install
+ $MAKE uninstall
+--- automake-1.8.5/tests/exdir2.test
++++ automake-1.8.5/tests/exdir2.test
+@@ -25,11 +25,11 @@
+ set -e
+
+ cat > Makefile.am << 'EOF'
+-html_DATA = zot.html
++quuz_DATA = zot.html
+ pkgdata_DATA = qbert
+ EOF
+
+ $ACLOCAL
+ AUTOMAKE_fails
+ grep 'pkgdatadir' stderr && exit 1
+-grep 'Makefile.am:1:.*htmldir.*undefined' stderr
++grep 'Makefile.am:1:.*quuzdir.*undefined' stderr
diff --git a/sys-devel/automake/files/automake-1.9.6-aclocal7-test-sleep.patch b/sys-devel/automake/files/automake-1.9.6-aclocal7-test-sleep.patch
new file mode 100644
index 000000000000..ea2b227b8d40
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.9.6-aclocal7-test-sleep.patch
@@ -0,0 +1,39 @@
+http://bugs.gentoo.org/197366
+
+commit 8952f7248c2637426bcf83d38f07a8b02124a06e
+Author: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+Date: Wed May 10 20:50:53 2006 +0000
+
+ * tests/aclocal7.test: Add `$sleep's between file touching
+ and automake resp aclocal+automake invocations, to ensure
+ they complete with a time stamp strictly later than the touched
+ file.
+
+diff --git a/tests/aclocal7.test b/tests/aclocal7.test
+index 787565c..f6d5e31 100755
+--- a/tests/aclocal7.test
++++ b/tests/aclocal7.test
+@@ -89,6 +89,7 @@ test `ls -1t sub/Makefile.in foo | sed 1q` = sub/Makefile.in
+ touch fragment.inc
+ $sleep
+ touch foo
++$sleep
+ $ACLOCAL -I m4
+ $AUTOMAKE --no-force
+ # Only ./Makefile.in should change.
+@@ -101,6 +102,7 @@ grep README Makefile.in && exit 1
+ : > README
+ $sleep
+ touch foo
++$sleep
+ $AUTOMAKE --no-force
+ # Even if no dependency change, the content changed.
+ test `ls -1t Makefile.in foo | sed 1q` = Makefile.in
+@@ -111,6 +113,7 @@ grep README Makefile.in
+ : > sub/Makefile.in
+ $sleep
+ touch foo
++$sleep
+ $ACLOCAL -I m4
+ $AUTOMAKE --no-force
+ # Only sub/Makefile.in should change.
diff --git a/sys-devel/automake/files/automake-1.9.6-ignore-comments.patch b/sys-devel/automake/files/automake-1.9.6-ignore-comments.patch
new file mode 100644
index 000000000000..f62987456cfe
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.9.6-ignore-comments.patch
@@ -0,0 +1,29 @@
+http://bugs.gentoo.org/126388
+
+2006-03-16 Mike Frysinger <vapier@gentoo.org>
+
+ * aclocal.in (scan_configure_dep): Ignore ## lines.
+ (scan_file): Remove dnl and # comments.
+
+--- aclocal.in
++++ aclocal.in
+@@ -227,6 +227,8 @@
+ foreach (split ("\n", $contents))
+ {
+ ++$line;
++ # Ignore `##' lines.
++ next if /^##/;
+ # Remove comments from current line.
+ s/\bdnl\b.*$//;
+ s/\#.*$//;
+@@ -311,6 +313,10 @@
+
+ $contents .= $_;
+
++ # Remove comments from current line.
++ s/\bdnl\b.*$//;
++ s/\#.*$//;
++
+ while (/$ac_defun_rx/go)
+ {
+ if (! defined $1)
diff --git a/sys-devel/automake/files/automake-1.9.6-include-dir-prefix.patch b/sys-devel/automake/files/automake-1.9.6-include-dir-prefix.patch
new file mode 100644
index 000000000000..a1d62a78e119
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.9.6-include-dir-prefix.patch
@@ -0,0 +1,31 @@
+http://bugs.gentoo.org/107435
+http://lists.gnu.org/archive/html/automake/2005-09/msg00088.html
+
+2005-09-27 Stepan Kasal <address@hidden>
+
+ * automake.in (handle_single_transform): Direct suffix rule preserves
+ the directory prefix, so the generated object name should contain
+ it, too.
+
+--- automake.in 2005-09-17 15:05:39.000000000 +0200
++++ automake.in 2005-09-27 17:10:47.000000000 +0200
+@@ -1755,6 +1755,10 @@
+ # This is probably the result of a direct suffix rule.
+ # In this case we just accept the rewrite.
+ $object = "$base$extension";
++ if ($directory ne '')
++ {
++ $object = $directory . '/' . $object;
++ }
+ $linker = '';
+ }
+ else
+@@ -1824,7 +1828,7 @@
+
+ # For Java, the way we're handling it right now, a
+ # `..' component doesn't make sense.
+- if ($lang->name eq 'java' && $object =~ /(\/|^)\.\.\//)
++ if ($lang && $lang->name eq 'java' && $object =~ /(\/|^)\.\.\//)
+ {
+ err_am "`$full' should not contain a `..' component";
+ }
diff --git a/sys-devel/automake/files/automake-1.9.6-infopage-namechange.patch b/sys-devel/automake/files/automake-1.9.6-infopage-namechange.patch
new file mode 100644
index 000000000000..7870f65e5802
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.9.6-infopage-namechange.patch
@@ -0,0 +1,33 @@
+--- doc/Makefile.in.orig 2005-07-11 00:39:31.000000000 -0400
++++ doc/Makefile.in 2005-07-11 00:40:46.000000000 -0400
+@@ -187,26 +187,10 @@
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+ .texi.info:
+- restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+- am__cwd=`pwd` && cd $(srcdir) && \
+- rm -rf $$backupdir && mkdir $$backupdir && \
+- if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+- done; \
+- else :; fi && \
+- cd "$$am__cwd"; \
+- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+- -o $@ $<; \
+- then \
+- rc=0; \
+- cd $(srcdir); \
+- else \
+- rc=$$?; \
+- cd $(srcdir) && \
+- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+- fi; \
+- rm -rf $$backupdir; exit $$rc
++ @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]
++ cd $(srcdir) \
++ && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
++ `echo $< | sed 's,.*/,,'`
+
+ .texi.dvi:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
diff --git a/sys-devel/automake/files/automake-1.9.6-subst-test.patch b/sys-devel/automake/files/automake-1.9.6-subst-test.patch
new file mode 100644
index 000000000000..6b794b1e1377
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.9.6-subst-test.patch
@@ -0,0 +1,42 @@
+https://bugs.gentoo.org/222225
+
+Patch from automake upstream git-repo to fix "make check" with newer versions of autoconf
+
+From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+Date: Sun, 22 Jul 2007 09:06:23 +0000 (+0000)
+Subject: * tests/subst.test: Move the AC_SUBST into a macro definition.
+X-Git-Url: http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff_plain;h=3d85de7baa9edf21c56401db3d25ef8a8e8d7797
+
+* tests/subst.test: Move the AC_SUBST into a macro definition.
+Avoids an error from CVS Autoconf.
+* THANKS: Update.
+Report by Benoit Sigoure.
+---
+diff --git a/tests/subst.test b/tests/subst.test
+index 33e925d..a72af85 100755
+--- a/tests/subst.test
++++ b/tests/subst.test
+@@ -1,5 +1,5 @@
+ #! /bin/sh
+-# Copyright (C) 1996, 2001, 2002 Free Software Foundation, Inc.
++# Copyright (C) 1996, 2001, 2002, 2007 Free Software Foundation, Inc.
+ #
+ # This file is part of GNU Automake.
+ #
+@@ -24,8 +24,14 @@
+ . ./defs || exit 1
+
+ cat >> configure.in << 'END'
+-AC_SUBST($1)
+-AC_SUBST([$]$1) dnl this is the actual invocation that was used
++dnl This test used to have the following lines, which cannot have
++dnl worked sensibly with Autoconf for years, however:
++dnl AC_SUBST($1)
++dnl AC_SUBST([$]$1) dnl this is the actual invocation that was used
++dnl
++AC_DEFUN([FOO],
++[AC_SUBST([$1])])
++FOO([BAR])
+ END
+
+ : > Makefile.am