[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#796944: biber: FTBFS with perl 5.22: test failures



Control: tag -1 + patch

On Fri, 28 Aug 2015 15:22:20 +0200, =?UTF-8?Q?Preu=C3=9Fe@buxtehude.debian.org wrote:

> > The issue is fixed in upstream devel branch. Basically the following commit
> > does the trick on my system:
> > https://github.com/plk/biber/commit/fe8fe2df01c507392983d5c81e5d04406ba6cec0
> > 
> > It does not fit cleanly to teh build tree, but adaption should not be hard.
> > 
> Sorry, wrong link:
> https://github.com/plk/biber/commit/d03fc1a65850213ff3254dc18dc374594e144a6c

Ha! The missing part in my patch yesterday is this hunk:

https://github.com/plk/biber/commit/d03fc1a65850213ff3254dc18dc374594e144a6c#diff-c82f170e3ed33ac555b5d6b39c50aae5L1265

With the updated attached patch, it builds with 5.22 and 5.20.


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Rolling Stones: Through
--- a/lib/Biber/Input/file/bibtex.pm
+++ b/lib/Biber/Input/file/bibtex.pm
@@ -748,7 +748,7 @@
     # Check for malformed names in names which aren't completely escaped
 
     # Too many commas
-    unless ($name =~ m/\A{\X+}\z/xms) { # Ignore these tests for escaped names
+    unless ($name =~ m/\A\{\X+\}\z/xms) { # Ignore these tests for escaped names
       my @commas = $name =~ m/,/g;
       if ($#commas > 1) {
         biber_warn("Name \"$name\" has too many commas: skipping name", $bibentry);
@@ -1251,8 +1251,8 @@
 
 sub _hack_month {
   my $in_month = shift;
-  if ($in_month =~ m/\A\s*((?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec).*)\s*\z/i) {
-    return $months{lc(Unicode::GCString->new($1)->substr(0,3)->as_string)};
+  if (my ($m) = $in_month =~ m/\A\s*((?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec).*)\s*\z/i) {
+    return $months{lc(Unicode::GCString->new($m)->substr(0,3)->as_string)};
   }
   else {
     return $in_month;
--- a/lib/Biber/LaTeX/Recode.pm
+++ b/lib/Biber/LaTeX/Recode.pm
@@ -230,13 +230,13 @@
         $text =~ s/\\not\\($re)/$map->{$1}/ge;
       }
       elsif ($type eq 'superscripts') {
-        $text =~ s/\\textsuperscript{($re)}/$map->{$1}/ge;
+        $text =~ s/\\textsuperscript\{($re)\}/$map->{$1}/ge;
       }
       elsif ($type eq 'cmdsuperscripts') {
-        $text =~ s/\\textsuperscript{\\($re)}/$map->{$1}/ge;
+        $text =~ s/\\textsuperscript\{\\($re)\}/$map->{$1}/ge;
       }
       elsif ($type eq 'dings') {
-        $text =~ s/\\ding{([2-9AF][0-9A-F])}/$map->{$1}/ge;
+        $text =~ s/\\ding\{([2-9AF][0-9A-F])\}/$map->{$1}/ge;
       }
       elsif ($type eq 'letters') {
         $text =~ s/\\($re)(?:\{\}|\s+|\b)/$map->{$1}/ge;

Attachment: signature.asc
Description: Digital Signature


Reply to: