Skip to content

Instantly share code, notes, and snippets.

@xywei
Created July 26, 2017 06:07
Show Gist options
  • Save xywei/03b546054f0d2e2f76c5ac530c88268a to your computer and use it in GitHub Desktop.
Save xywei/03b546054f0d2e2f76c5ac530c88268a to your computer and use it in GitHub Desktop.
A patch for automake to compile it with later versions of Perl
--- automake.in 2015-01-06 03:25:55.000000000 +0800
+++ automake.in.patched 2017-07-26 13:58:07.086205701 +0800
@@ -3878,7 +3878,7 @@
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;
}
@zivit
Copy link

zivit commented Mar 28, 2018

@sooorajjj Edit the file automake.in and paste line

@xywei
Copy link
Author

xywei commented May 3, 2018

@sooorajjj The patch can be applied with patch command, e.g., patch automake.in < patch.txt.

@jwpeterson
Copy link

Just for future reference, this patch allowed me to build automake-1.15 successfully in Ubuntu 18.

@tejush44
Copy link

tejush44 commented Sep 9, 2020

I got this error

The text leading up to this was:

|--- automake.in 2015-01-06 03:25:55.000000000 +0800
|+++ automake.in.patched 2017-07-26 13:58:07.086205701 +0800

File to patch: patch.txt
checking file patch.txt
Using Plan A...
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 3878.
1 out of 1 hunk FAILED
done

@xywei
Copy link
Author

xywei commented Sep 9, 2020

The issue that this patch was trying to fix had been patched upstream since autotools-mirror/automake@13f00eb. There is no need to apply this patch for automake>=1.15.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment