Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Mar 2018 16:52:54 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r465819 - in head: math/gri/files math/oleo/files net/ldapsdk/files textproc/latex2html textproc/latex2html/files textproc/linuxdoc-tools/files
Message-ID:  <201803281652.w2SGqsN1071699@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Wed Mar 28 16:52:54 2018
New Revision: 465819
URL: https://svnweb.freebsd.org/changeset/ports/465819

Log:
  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

Added:
  head/net/ldapsdk/files/patch-ldap_build_replace.pm   (contents, props changed)
  head/textproc/latex2html/files/patch-latex2html.pin   (contents, props changed)
  head/textproc/latex2html/files/patch-versions_html4__0.pl   (contents, props changed)
  head/textproc/linuxdoc-tools/files/patch-lib_fmt_fmt__latex2e.pl   (contents, props changed)
Modified:
  head/math/gri/files/patch-doc__texinfo2HTML   (contents, props changed)
  head/math/oleo/files/patch-doc_texi2html.in   (contents, props changed)
  head/textproc/latex2html/Makefile   (contents, props changed)

Modified: head/math/gri/files/patch-doc__texinfo2HTML
==============================================================================
--- head/math/gri/files/patch-doc__texinfo2HTML	Wed Mar 28 16:52:49 2018	(r465818)
+++ head/math/gri/files/patch-doc__texinfo2HTML	Wed Mar 28 16:52:54 2018	(r465819)
@@ -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;

Modified: head/math/oleo/files/patch-doc_texi2html.in
==============================================================================
--- head/math/oleo/files/patch-doc_texi2html.in	Wed Mar 28 16:52:49 2018	(r465818)
+++ head/math/oleo/files/patch-doc_texi2html.in	Wed Mar 28 16:52:54 2018	(r465819)
@@ -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$'";

Added: head/net/ldapsdk/files/patch-ldap_build_replace.pm
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/ldapsdk/files/patch-ldap_build_replace.pm	Wed Mar 28 16:52:54 2018	(r465819)
@@ -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

Modified: head/textproc/latex2html/Makefile
==============================================================================
--- head/textproc/latex2html/Makefile	Wed Mar 28 16:52:49 2018	(r465818)
+++ head/textproc/latex2html/Makefile	Wed Mar 28 16:52:54 2018	(r465819)
@@ -3,6 +3,7 @@
 
 PORTNAME=	latex2html
 PORTVERSION=	2016
+PORTREVISION=	1
 CATEGORIES=	textproc
 MASTER_SITES=	TEX_CTAN/support/${PORTNAME}
 

Added: head/textproc/latex2html/files/patch-latex2html.pin
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/latex2html/files/patch-latex2html.pin	Wed Mar 28 16:52:54 2018	(r465819)
@@ -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) {

Added: head/textproc/latex2html/files/patch-versions_html4__0.pl
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/latex2html/files/patch-versions_html4__0.pl	Wed Mar 28 16:52:54 2018	(r465819)
@@ -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;
+ 	}
+     }

Added: head/textproc/linuxdoc-tools/files/patch-lib_fmt_fmt__latex2e.pl
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/linuxdoc-tools/files/patch-lib_fmt_fmt__latex2e.pl	Wed Mar 28 16:52:54 2018	(r465819)
@@ -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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803281652.w2SGqsN1071699>