Fix bug in parser

This commit is contained in:
Vitezslav Crhonek 2013-03-05 14:58:09 +01:00
parent 902355352c
commit 9a27f22ab7
2 changed files with 28 additions and 1 deletions

20
texinfo-5.0-parser.patch Normal file
View File

@ -0,0 +1,20 @@
diff -up texinfo-5.0/tp/Texinfo/Parser.pm.orig texinfo-5.0/tp/Texinfo/Parser.pm
--- texinfo-5.0/tp/Texinfo/Parser.pm.orig 2013-02-15 00:01:44.000000000 +0100
+++ texinfo-5.0/tp/Texinfo/Parser.pm 2013-03-05 14:33:25.384193273 +0100
@@ -1631,9 +1631,13 @@ sub _close_current($$$;$$)
my $conditional = pop @{$current->{'parent'}->{'contents'}};
}
}
- my $context = pop @{$self->{'context_stack'}} if
- ($preformatted_commands{$current->{'cmdname'}}
- or $menu_commands{$current->{'cmdname'}});
+ if ($preformatted_commands{$current->{'cmdname'}}
+ or $menu_commands{$current->{'cmdname'}}
+ or $format_raw_commands{$current->{'cmdname'}}) {
+ my $context = pop @{$self->{'context_stack'}};
+ pop @{$self->{'raw_formats_stack'}}
+ if ($format_raw_commands{$current->{'cmdname'}});
+ }
pop @{$self->{'regions_stack'}}
if ($region_commands{$current->{'cmdname'}});
$current = $current->{'parent'};

View File

@ -3,7 +3,7 @@
Summary: Tools needed to create Texinfo format documentation files
Name: texinfo
Version: 5.0
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv3+
Group: Applications/Publishing
Url: http://www.gnu.org/software/texinfo/
@ -12,6 +12,8 @@ Source1: ftp://ftp.gnu.org/gnu/texinfo/texinfo-%{version}.tar.xz.sig
Source2: info-dir
Patch0: texinfo-4.12-zlib.patch
Patch1: texinfo-4.13a-powerpc.patch
# Backported from upstream
Patch2: texinfo-5.0-parser.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Requires: perl >= 5.7.3, perl(Text::Unidecode)
@ -57,6 +59,7 @@ for printing using TeX.
%setup -q
%patch0 -p1 -b .zlib
%patch1 -p1 -b .powerpc
%patch2 -p1 -b .parser
%build
%configure --with-external-Text-Unidecode \
@ -151,6 +154,10 @@ fi
%{_mandir}/man1/pdftexi2dvi.1*
%changelog
* Tue Mar 05 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 5.0-3
- Fix bug in parser
Resolves: #917974
* Wed Feb 20 2013 Vitezslav Crhonek <vcrhonek@redhat.com> - 5.0-2
- Fix configure arguments, remove ChangeLog conversion,
move texi2any/pod2texi to main package