aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2018-03-29 00:52:54 +0800
committerMathieu Arnold <mat@FreeBSD.org>2018-03-29 00:52:54 +0800
commit8ca44828b215fb4b7e5e6cefa21a3348bb348397 (patch)
treea83c54fd533ca6d2012cc55d3f614244b45606b9
parentdfc2c35490dd84954aca7d457d8f4c9a621b154e (diff)
downloadfreebsd-ports-8ca44828b215fb4b7e5e6cefa21a3348bb348397.tar.gz
freebsd-ports-8ca44828b215fb4b7e5e6cefa21a3348bb348397.tar.zst
freebsd-ports-8ca44828b215fb4b7e5e6cefa21a3348bb348397.zip
Fix build with Perl 5.26.
Unescaped left brace in regex is illegal in regex when not used as a quantifier. - /foo{3}/ will match foofoofoo. - /\\new{bar}/ is illegal and should be written as /\\new\{bar}/. PR: 226817 Sponsored by: Absolight
Notes
Notes: svn path=/head/; revision=465819
-rw-r--r--math/gri/files/patch-doc__texinfo2HTML157
-rw-r--r--math/oleo/files/patch-doc_texi2html.in27
-rw-r--r--net/ldapsdk/files/patch-ldap_build_replace.pm11
-rw-r--r--textproc/latex2html/Makefile1
-rw-r--r--textproc/latex2html/files/patch-latex2html.pin67
-rw-r--r--textproc/latex2html/files/patch-versions_html4__0.pl11
-rw-r--r--textproc/linuxdoc-tools/files/patch-lib_fmt_fmt__latex2e.pl34
7 files changed, 305 insertions, 3 deletions
diff --git a/math/gri/files/patch-doc__texinfo2HTML b/math/gri/files/patch-doc__texinfo2HTML
index a929c9800e5c..de3f36cc683f 100644
--- a/math/gri/files/patch-doc__texinfo2HTML
+++ b/math/gri/files/patch-doc__texinfo2HTML
@@ -1,5 +1,5 @@
---- ./doc/texinfo2HTML.orig 2013-10-05 13:52:30.000000000 +0400
-+++ ./doc/texinfo2HTML 2013-10-05 13:53:16.000000000 +0400
+--- doc/texinfo2HTML.orig 2009-12-12 18:11:23 UTC
++++ doc/texinfo2HTML
@@ -1,5 +1,8 @@
#!/usr/bin/perl -w
@@ -9,7 +9,7 @@
#$example_indent = " ";
$example_indent = "";
-@@ -54,12 +57,10 @@
+@@ -54,12 +57,10 @@ BUGS:
the end is here} and more blah
will not get the \@code{} item converted correctly.
";
@@ -23,3 +23,154 @@
$print_help = 0;
$print_help = $opt_h if $opt_h;
if ($print_help) {
+@@ -120,7 +121,7 @@ while(get_a_line()) {
+ next;
+ }
+ # Process image commands (NOT...it's there already)
+- if (/\@image{(.*)}/) {
++ if (/\@image\{(.*)\}/) {
+ #print "<img src=\"$1.gif\" border=\"1\">\n";
+ next;
+ }
+@@ -208,12 +209,12 @@ while(get_a_line()) {
+ s,<,&lt;,og;
+ # Special tweak to make 'Gri' look cooler.
+ # s, Gri , G<FONT SIZE=-1>RI</FONT> ,og;
+- s,\@code{\@\@},\@code{TEXINFO2HTML-AT-AT},og;
++ s,\@code\{\@\@\},\@code\{TEXINFO2HTML-AT-AT\},og;
+ s,\@},TEXINFO2HTML-CLOSE-BRACE,og; # retain inside e.g. @code{}
+ s,\@\@,TEXINFO2HTML-AT-AT,og;
+- s,\@{,{,og;
+- s,\@TeX{},TeX,og;
+- s,\@dots{},...,og;
++ s,\@\{,\{,og;
++ s,\@TeX\{\},TeX,og;
++ s,\@dots\{\},...,og;
+ # Put in place-holders for some accents. I should check for all
+ # of them, but for now, I'm just kludging in a couple,
+ # to solve an immediate problem and to serve as a place-holder
+@@ -237,18 +238,18 @@ while(get_a_line()) {
+ }
+ next;
+ }
+- while (/\@url{([^}]*)}/) {
++ while (/\@url\{([^}]*)\}/) {
+ $the_url = $1;
+- s:\@url{[^}]*}:<a href="$the_url">\@code{$the_url}</a>:;
++ s:\@url\{[^}]*}:<a href="$the_url">\@code{$the_url}</a>:;
+ }
+- while (/\@uref{([^}]*)}/) {
++ while (/\@uref\{([^}]*)\}/) {
+ @items = split(/,/, $1);
+ if ($#items == 0) {
+- s:\@uref{[^}]*}:<a href="$items[0]">$items[0]</a>:;
++ s:\@uref\{[^}]*}:<a href="$items[0]">$items[0]</a>:;
+ } elsif ($#items == 1) {
+- s:\@uref{[^}]*}:<a href="$items[0]">$items[1]</a>:;
++ s:\@uref\{[^}]*}:<a href="$items[0]">$items[1]</a>:;
+ } elsif ($#items == 2) {
+- s:\@uref{[^}]*}:\@code{$items[2]}:;
++ s:\@uref\{[^}]*}:\@code{$items[2]}:;
+ } else {
+ die "Cannot have more than 3 items in a 'uref' at \"$_\"";
+ }
+@@ -330,7 +331,7 @@ while(get_a_line()) {
+ while(get_a_line()) {
+ next if /\@sp/;
+ next if /\@cindex/;
+- s|\@anchor{([^}]*)}|<a name=\"$1\"></a>|g;
++ s|\@anchor\{([^}]*)}|<a name=\"$1\"></a>|g;
+ &process_examples();
+ # Handle HTML inserts
+ if (/^\@c HTML (.*)/o) {
+@@ -346,10 +347,10 @@ while(get_a_line()) {
+ }
+ if (/\s*\@item\s*(.*)/o) {
+ $the_item = $1;
+- $the_item =~ s:\@{:{:og;
++ $the_item =~ s:\@\{:{:og;
+ $the_item =~ s:\@}:}:og;
+ $the_item =~ s:\@\@:\@:og;
+- $the_item =~ s:\@code{([^}]*)}:`<font color="$ex_color"><code>$1</code></font>':og;
++ $the_item =~ s:\@code\{([^}]*)}:`<font color="$ex_color"><code>$1</code></font>':og;
+ print "<dt> $start_item$the_item$end_item\n<dd>";
+ } else {
+ print "<p>" if (/^$/o);
+@@ -402,38 +403,38 @@ sub process_examples() {
+ } else {
+ s,\@value\{([^}]*)\},$value{$1},g; # Substitute set/value pair
+ s,\@},},og;
+- s,\@{,{,og;
++ s,\@\{,{,og;
+ }
+ }
+
+
+ sub sub_refs {
+- die "line $. of file: cannot have multiple refs on one line" if (/\@[px]*ref{(.*)}(.*)\@[px]*ref{(.*)}/);
++ die "line $. of file: cannot have multiple refs on one line" if (/\@[px]*ref\{(.*)}(.*)\@[px]*ref\{(.*)}/);
+ # anchors
+- s|\@anchor{([^}]*)}|<a name=\"$1\"></a>|g;
++ s|\@anchor\{([^}]*)}|<a name=\"$1\"></a>|g;
+ # Change e.g.
+ # @xref{Viewing}
+ # into
+ # <a href="#Viewing">see Viewing</a>
+
+ #if (/\@ref/){print "AAA[$_]AAA\n";
+- s|\@ref{([^}]*)}|see <a href="#$1">$1</a>|g;
++ s|\@ref\{([^}]*)}|see <a href="#$1">$1</a>|g;
+ #print "BBB[$_]BBB\n";}
+
+- s|\@xref{([^}]*)}|see <a href="#$1">$1</a>|g;
+- s|\@pxref{([^}]*)}|see <a href="#$1">$1.</a>|g;
+- while (/\@url{([^}]*)}/) {
++ s|\@xref\{([^}]*)}|see <a href="#$1">$1</a>|g;
++ s|\@pxref\{([^}]*)}|see <a href="#$1">$1.</a>|g;
++ while (/\@url\{([^}]*)}/) {
+ $the_url = $1;
+- s:\@url{[^}]*}:<a href="$the_url">\@code{$the_url}</a>:;
++ s:\@url\{[^}]*}:<a href="$the_url">\@code{$the_url}</a>:;
+ }
+- while (/\@uref{([^}]*)}/) {
++ while (/\@uref\{([^}]*)}/) {
+ @items = split(/,/, $1);
+ if ($#items == 0) {
+- s:\@uref{[^}]*}:<a href="$items[0]">$items[0]</a>:;
++ s:\@uref\{[^}]*}:<a href="$items[0]">$items[0]</a>:;
+ } elsif ($#items == 1) {
+- s:\@uref{[^}]*}:<a href="$items[0]">$items[1]</a>:;
++ s:\@uref\{[^}]*}:<a href="$items[0]">$items[1]</a>:;
+ } elsif ($#items == 2) {
+- s:\@uref{[^}]*}:\@code{$items[2]}:;
++ s:\@uref\{[^}]*}:\@code{$items[2]}:;
+ } else {
+ die "Cannot have more than 3 items in a 'uref' at \"$_\"";
+ }
+@@ -466,17 +467,17 @@ sub sub_headings {
+ sub sub_emphasis {
+ s,<<,&lt&lt,g;
+ s,>>,&gt&gt,g;
+- s,\@emph{([^}]*)},<em>$1</em>,g;
+- s,\@strong{([^}]*)},<b>$1</b>,g;
+- s,\@footnote{([^}]*)}, [$1],g;
+- s,\@b{([^}]*)},<b>$1</b>,g;
++ s,\@emph\{([^}]*)},<em>$1</em>,g;
++ s,\@strong\{([^}]*)},<b>$1</b>,g;
++ s,\@footnote\{([^}]*)}, [$1],g;
++ s,\@b\{([^}]*)},<b>$1</b>,g;
+
+- s,\@code{([^}]*)},`<font color="$ex_color"><code>$1</code></font>',g;
++ s,\@code\{([^}]*)},`<font color="$ex_color"><code>$1</code></font>',g;
+ s,\@\@,\@,g;
+- s,\@samp{([^}]*)},`<font color="$ex_color"><samp>$1</samp></font>',g;
+- s,\@key{([^}]*)},`<font color="$ex_color"><kbd>$1</kbd></font>',g;
+- s,\@kbd{([^}]*)},`<font color="$ex_color"><kbd>$1</kbd></font>',g;
+- s,\@file{([^}]*)},`<font color="$ex_color"><samp>$1</samp></font>',g;
++ s,\@samp\{([^}]*)},`<font color="$ex_color"><samp>$1</samp></font>',g;
++ s,\@key\{([^}]*)},`<font color="$ex_color"><kbd>$1</kbd></font>',g;
++ s,\@kbd\{([^}]*)},`<font color="$ex_color"><kbd>$1</kbd></font>',g;
++ s,\@file\{([^}]*)},`<font color="$ex_color"><samp>$1</samp></font>',g;
+ s,TEXINFO2HTML-CLOSE-BRACE,},g;
+ s,TEXINFO2HTML-AT-AT,\@,g;
+ s,TEXINFO2HTML-ACCENT-ACUTE-a,&#225,g;
diff --git a/math/oleo/files/patch-doc_texi2html.in b/math/oleo/files/patch-doc_texi2html.in
index 64f19ec474ab..3a68b3e6840e 100644
--- a/math/oleo/files/patch-doc_texi2html.in
+++ b/math/oleo/files/patch-doc_texi2html.in
@@ -1,5 +1,23 @@
--- doc/texi2html.in.orig 2000-04-08 12:20:05 UTC
+++ doc/texi2html.in
+@@ -2752,7 +2752,7 @@ INPUT_LINE: while ($_ = &next_line) {
+ s/\@refill\s+//g;
+ # other substitutions
+ &simple_substitutions;
+- s/\@value{($VARRE)}/$value{$1}/eg;
++ s/\@value\{($VARRE)\}/$value{$1}/eg;
+ s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4
+ #
+ # analyze the tag again
+@@ -3174,7 +3174,7 @@ while (@lines) {
+ #
+ # xref
+ #
+- while (/\@(x|px|info|)ref{([^{}]+)(}?)/) {
++ while (/\@(x|px|info|)ref\{([^{}]+)(\}?)/) {
+ # note: Texinfo may accept other characters
+ ($type, $nodes, $full) = ($1, $2, $3);
+ ($before, $after) = ($`, $');
@@ -3790,9 +3790,9 @@ sub update_sec_num {
my $ret;
@@ -21,3 +39,12 @@
{
&incr_sec_num($level, @normal_sec_num);
}
+@@ -4168,7 +4168,7 @@ sub substitute_style {
+ while ($changed) {
+ $changed = 0;
+ $done = '';
+- while (/\@(\w+){([^\{\}]+)}/ || /\@(,){([^\{\}]+)}/) {
++ while (/\@(\w+)\{([^\{\}]+)\}/ || /\@(,)\{([^\{\}]+)\}/) {
+ $text = &apply_style($1, $2);
+ if ($text) {
+ $_ = "$`$text$'";
diff --git a/net/ldapsdk/files/patch-ldap_build_replace.pm b/net/ldapsdk/files/patch-ldap_build_replace.pm
new file mode 100644
index 000000000000..cda71784b04a
--- /dev/null
+++ b/net/ldapsdk/files/patch-ldap_build_replace.pm
@@ -0,0 +1,11 @@
+--- ldap/build/replace.pm.orig 2011-01-06 12:05:39 UTC
++++ ldap/build/replace.pm
+@@ -62,7 +62,7 @@ sub GenerateHeader ($$\%) {
+ while(<TEMPLATE>) {
+ my $line = $_;
+ while(($orig, $replace) = each %$keywords) {
+- $line =~ s/{{$orig}}/$replace/g;
++ $line =~ s/\{\{$orig}}/$replace/g;
+ }
+
+ # the first line is a comment specific to the template file, which we
diff --git a/textproc/latex2html/Makefile b/textproc/latex2html/Makefile
index 000af315a944..36213cdc2965 100644
--- a/textproc/latex2html/Makefile
+++ b/textproc/latex2html/Makefile
@@ -3,6 +3,7 @@
PORTNAME= latex2html
PORTVERSION= 2016
+PORTREVISION= 1
CATEGORIES= textproc
MASTER_SITES= TEX_CTAN/support/${PORTNAME}
diff --git a/textproc/latex2html/files/patch-latex2html.pin b/textproc/latex2html/files/patch-latex2html.pin
new file mode 100644
index 000000000000..1f4af6340a16
--- /dev/null
+++ b/textproc/latex2html/files/patch-latex2html.pin
@@ -0,0 +1,67 @@
+--- latex2html.pin.orig 2016-04-19 16:52:35 UTC
++++ latex2html.pin
+@@ -1207,7 +1207,7 @@ sub process_ext_file {
+ &slurp_input($file);
+ if ($ext =~ /bbl/) {
+ # remove the \newcommand{\etalchar}{...} since not needed
+- s/^\\newcommand{\\etalchar}[^\n\r]*[\n\r]+//s;
++ s/^\\newcommand\{\\etalchar}[^\n\r]*[\n\r]+//s;
+ }
+ &pre_process;
+ &substitute_meta_cmds if (%new_command || %new_environment);
+@@ -1465,7 +1465,7 @@ sub pre_process {
+ push(@processedV,$before);
+ print "'";$before = '';
+ }
+- if ($after =~ /\s*\\end{$env[*]?}/) { # Must NOT use the s///o option!!!
++ if ($after =~ /\s*\\end\{$env[*]?}/) { # Must NOT use the s///o option!!!
+ ($contents, $after) = ($`, $');
+ $contents =~ s/^\n+/\n/s;
+ # $contents =~ s/\n+$//s;
+@@ -1898,8 +1898,8 @@ sub mark_string {
+ # local (*_) = @_; # Modifies $_ in the caller;
+ # -> MRO: changed to $_[0] (same effect)
+ # MRO: removed deprecated $*, replaced by option /m
+- $_[0] =~ s/(^|[^\\])\\{/$1tex2html_escaped_opening_bracket/gom;
+- $_[0] =~ s/(^|[^\\])\\{/$1tex2html_escaped_opening_bracket/gom; # repeat this
++ $_[0] =~ s/(^|[^\\])\\\{/$1tex2html_escaped_opening_bracket/gom;
++ $_[0] =~ s/(^|[^\\])\\\{/$1tex2html_escaped_opening_bracket/gom; # repeat this
+ $_[0] =~ s/(^|[^\\])\\}/$1tex2html_escaped_closing_bracket/gom;
+ $_[0] =~ s/(^|[^\\])\\}/$1tex2html_escaped_closing_bracket/gom; # repeat this
+ my $id = $global{'max_id'};
+@@ -1907,7 +1907,7 @@ sub mark_string {
+ # mark all balanced braces
+ # MRO: This should in fact mark all of them as the hierarchy is
+ # processed inside-out.
+- 1 while($_[0] =~ s/{([^{}]*)}/join("",$O,++$id,$C,$1,$O,$id,$C)/geo);
++ 1 while($_[0] =~ s/\{([^{}]*)}/join("",$O,++$id,$C,$1,$O,$id,$C)/geo);
+ # What follows seems esoteric...
+ my @processedB = ();
+ # Take one opening brace at a time
+@@ -2780,7 +2780,7 @@ sub translate_environments {
+ $open_tags_R = [ @save_open_tags ];
+ # check for color
+ local($color_test) = join(',',@$open_tags_R);
+- if ($color_test =~ /(color{[^}]*})/g ) {
++ if ($color_test =~ /(color\{[^}]*})/g ) {
+ $color_env = $1;
+ } # else { $color_env = '' }
+
+@@ -2791,7 +2791,7 @@ sub translate_environments {
+ $open_tags_R = [ @save_open_tags ];
+ if ($color_env) {
+ $color_test = join(',',@saved_tags);
+- if ($color_test =~ /(color{[^}]*})/g ) {
++ if ($color_test =~ /(color\{[^}]*})/g ) {
+ $color_env = $1;
+ }
+ }
+@@ -6507,7 +6507,7 @@ sub parse_keyvalues {
+ print "\nATTRIBS: $saved\n" if ($VERBOSITY > 6);
+
+ $saved =~ s/$percent_mark/%/g;
+- $saved =~ s/((^|[\s,=])')\\\W{(\w)}/$1$3/g
++ $saved =~ s/((^|[\s,=])')\\\W\{(\w)}/$1$3/g
+ if $is_german; #unwanted accents, from active "
+ if (@tags) {
+ foreach $tag (@tags) {
diff --git a/textproc/latex2html/files/patch-versions_html4__0.pl b/textproc/latex2html/files/patch-versions_html4__0.pl
new file mode 100644
index 000000000000..d88c2f0bc5a8
--- /dev/null
+++ b/textproc/latex2html/files/patch-versions_html4__0.pl
@@ -0,0 +1,11 @@
+--- versions/html4_0.pl.orig 2018-03-28 15:49:41 UTC
++++ versions/html4_0.pl
+@@ -955,7 +955,7 @@ sub process_tabular {
+
+ if ($color_env) {
+ local($color_test) = join(',',@$open_tags_R);
+- if ($color_test =~ /(color{[^}]*})/g ) {
++ if ($color_test =~ /(color\{[^}]*})/g ) {
+ $color_env = $1;
+ }
+ }
diff --git a/textproc/linuxdoc-tools/files/patch-lib_fmt_fmt__latex2e.pl b/textproc/linuxdoc-tools/files/patch-lib_fmt_fmt__latex2e.pl
new file mode 100644
index 000000000000..b96052444b9d
--- /dev/null
+++ b/textproc/linuxdoc-tools/files/patch-lib_fmt_fmt__latex2e.pl
@@ -0,0 +1,34 @@
+--- lib/fmt/fmt_latex2e.pl.orig 2018-03-28 15:14:45 UTC
++++ lib/fmt/fmt_latex2e.pl
+@@ -284,13 +284,13 @@ $latex2e->{postASP} = sub
+ push @texlines, $_;
+ # and check for nameurl
+ if ( /\\nameurl/ ){
+- ($urlid, $urlnam) = ($_ =~ /\\nameurl{(.*)}{(.*)}/);
++ ($urlid, $urlnam) = ($_ =~ /\\nameurl\{(.*)\}\{(.*)\}/);
+ print $urlnum . ": " . $urlid . "\n" if ( $global->{debug} );
+
+ $urldef = latex2e_defnam($urlnum) . "url";
+- s/\\nameurl{.*}{.*}/{\\em $urlnam} {\\tt \\$urldef}/;
++ s/\\nameurl\{.*\}\{.*\}/{\\em $urlnam} {\\tt \\$urldef}/;
+ push @urlnames, $_;
+- push @urldefines, "\\urldef{\\$urldef} \\url{$urlid}\n";
++ push @urldefines, "\\urldef\{\\$urldef\} \\url\{$urlid\}\n";
+ $urlnum++;
+ }
+ }
+@@ -367,12 +367,12 @@ $latex2e->{postASP} = sub
+ $_ = $_ . "\\makeindex\n" if ($latex2e->{makeindex});
+ }
+ # Set correct DTD name
+- elsif (/^\\usepackage{\@LINUXDOC_DTD\@-sgml}/) {
++ elsif (/^\\usepackage\{\@LINUXDOC_DTD\@-sgml\}/) {
+ my $dtd = $global->{"dtd"};
+ s/\@LINUXDOC_DTD\@/$dtd/;
+ }
+ # Set correct babel options
+- elsif (/^\\usepackage\[\@BABELOPTIONS\@\]{babel}/) {
++ elsif (/^\\usepackage\[\@BABELOPTIONS\@\]\{babel\}/) {
+ if ( $babeloptions ) {
+ s/\@BABELOPTIONS\@/$babeloptions/;
+ } else {