Add po4a-0.45-perl-5.22-hacks.diff

(Address perl-5.22 FTBFS; RHBZ #1230977).
- Add %license.
This commit is contained in:
Ralf Corsépius 2015-06-17 09:46:39 +02:00
parent eecf76ed5f
commit 9431c483f8
2 changed files with 43 additions and 2 deletions

View File

@ -0,0 +1,33 @@
diff -Naur po4a-0.45.orig/lib/Locale/Po4a/Sgml.pm po4a-0.45/lib/Locale/Po4a/Sgml.pm
--- po4a-0.45.orig/lib/Locale/Po4a/Sgml.pm 2013-08-21 22:11:04.000000000 +0200
+++ po4a-0.45/lib/Locale/Po4a/Sgml.pm 2015-06-17 09:28:09.334279033 +0200
@@ -413,7 +413,7 @@
$lvl=1;
while ($lvl != 0) {
# Eat comments in the prolog, since there may be some '>' or '<' in them.
- if ($origfile =~ m/^.{$pos}?(<!--.*?-->)/s) {
+ if ($origfile =~ m/^.{$pos}(<!--.*?-->)/s) {
print "Found a comment in the prolog: $1\n" if ($debug{'generic'});
$pos += length($1);
# take care of the line numbers
@@ -672,7 +672,7 @@
}
}
}
- $prolog =~ s/<!--{PO4A-ent-beg-(.*?)}(.*?){PO4A-ent-end}-->/<!ENTITY % $1 SYSTEM "$2">/g;
+ $prolog =~ s/<!--\{PO4A-ent-beg-(.*?)}(.*?){PO4A-ent-end}-->/<!ENTITY % $1 SYSTEM "$2">/g;
# Unprotect undefined inclusions, and die of them
$prolog =~ s/{PO4A-percent}/%/sg;
if ($prolog =~ /%([^;\s]*);/) {
diff -Naur po4a-0.45.orig/lib/Locale/Po4a/TeX.pm po4a-0.45/lib/Locale/Po4a/TeX.pm
--- po4a-0.45.orig/lib/Locale/Po4a/TeX.pm 2013-08-21 22:11:04.000000000 +0200
+++ po4a-0.45/lib/Locale/Po4a/TeX.pm 2015-06-17 09:22:04.712690691 +0200
@@ -1168,7 +1168,7 @@
# environment contains an un-closed bracket)
if ( ($closed and ($line =~ /^\s*$/ or
$line =~ /^\s*$RE_VERBATIM\s*$/))
- or (in_verbatim(@env) and $line =~ /^\s*\Q$ESCAPE\Eend{$env[-1]}\s*$/)
+ or (in_verbatim(@env) and $line =~ /^\s*\Q$ESCAPE\Eend\{$env[-1]}\s*$/)
) {
# An empty line. This indicates the end of the current
# paragraph.

View File

@ -1,11 +1,12 @@
Name: po4a Name: po4a
Version: 0.45 Version: 0.45
Release: 5%{?dist} Release: 6%{?dist}
Summary: A tool maintaining translations anywhere Summary: A tool maintaining translations anywhere
License: GPL+ License: GPL+
URL: https://po4a.alioth.debian.org/ URL: https://po4a.alioth.debian.org/
Source0: http://alioth.debian.org/frs/download.php/file/3942/%{name}-%{version}.tar.gz Source0: http://alioth.debian.org/frs/download.php/file/3942/%{name}-%{version}.tar.gz
Patch1: po4a-%{version}-perl-5.22-hacks.diff
BuildArch: noarch BuildArch: noarch
BuildRequires: perl(Locale::gettext) >= 1.01 BuildRequires: perl(Locale::gettext) >= 1.01
@ -49,6 +50,7 @@ tools on areas where they were not expected like documentation.
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch1 -p1
chmod +x scripts/* chmod +x scripts/*
@ -76,7 +78,8 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
%files -f %{name}.lang %files -f %{name}.lang
%doc README* COPYING TODO %doc README* TODO
%license COPYING
%{_bindir}/po4a* %{_bindir}/po4a*
%{_bindir}/msguntypot %{_bindir}/msguntypot
%{perl_vendorlib}/Locale %{perl_vendorlib}/Locale
@ -94,6 +97,11 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
%{_mandir}/*/man7/po4a-runtime.7* %{_mandir}/*/man7/po4a-runtime.7*
%changelog %changelog
* Wed Jun 17 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 0.45-6
- Add po4a-0.45-perl-5.22-hacks.diff
(Address perl-5.22 FTBFS; RHBZ #1230977).
- Add %%license.
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.45-5 * Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.45-5
- Perl 5.22 rebuild - Perl 5.22 rebuild