summaryrefslogtreecommitdiff
path: root/devel/automake14/patches/patch-ac
blob: 0a27793e40533931b5554e08a04699360ff2f474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
$NetBSD: patch-ac,v 1.2 2014/05/30 10:57:44 tron Exp $

1.) Fix for CVE-2009-4029 taken from here:

http://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=449d20aa12e13fefd848604225fc83d0c39c61d0

2.) Make this work with Perl 5.20.0 and newer.

--- automake.in.orig	2002-07-27 21:55:58.000000000 +0100
+++ automake.in	2014-05-30 11:50:32.000000000 +0100
@@ -983,7 +983,7 @@
 
 	# Compute the function name of the finisher and then call it.
 	$name = 'lang_' . $lang . '_finish';
-	do $name ();
+	eval "$name()";
     }
 
     # If the project is entirely C++ or entirely Fortran 77, don't
@@ -1144,7 +1144,7 @@
 		# 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) = eval "$subr(\$base, \$extension)";
 		# Skip this entry if we were asked not to process it.
 		next if ! $r;
 
@@ -2336,7 +2336,7 @@
 	# 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 @@
 	     . "\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')