Add patches to fix Perl compatibility issues reported in BZ#1582267

This commit is contained in:
Ben Cotton 2018-07-06 11:06:21 -04:00
parent 055703f9bc
commit 87ef112657
3 changed files with 62 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From ead9c5ade86d90b07f778b2fcb972f273d52c3c2 Mon Sep 17 00:00:00 2001
From: Dan Gildea <dgildea>
Date: Thu, 24 May 2018 14:01:34 -0400
Subject: [PATCH] escape var in regexp
Fixes #48
---
latex2html.pin | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/latex2html.pin b/latex2html.pin
index 116473f..398b3db 100755
--- a/latex2html.pin
+++ b/latex2html.pin
@@ -4627,7 +4627,7 @@ sub balance_tags {
$save_tags = join(',',@save_open_tags) if (@save_open_tags);
$open_tags = join(',',@$open_tags_R) if (@$open_tags_R);
if ($open_tags eq $save_tags) { return(); }
- if ($save_tags =~ s/^$open_tags//) {
+ if ($save_tags =~ s/^\Q$open_tags\E//) {
@reopen_tags = split (',',$');
} else {
@reopen_tags = @save_open_tags;
@@ -4637,7 +4637,7 @@ sub balance_tags {
$declarations{$tag_cmd} =~ m|</.*$|;
$tags .= $& unless ($` =~ /^<>$/);
$open_tags = join(',',@$open_tags_R) if (@$open_tags_R);
- last if ( $save_tags =~ s/^$open_tags/
+ last if ( $save_tags =~ s/^\Q$open_tags\E/
@reopen_tags = split (',',$');''/e);
}
}

View File

@ -0,0 +1,20 @@
From 78c9a4d6be6c403f2fbe4174a40a7a6585493793 Mon Sep 17 00:00:00 2001
From: Dan Gildea <dgildea>
Date: Thu, 24 May 2018 14:05:27 -0400
Subject: [PATCH] \usepackage{xcolor}
just loads "color" package
---
styles/xcolor.perl | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 styles/xcolor.perl
diff --git a/styles/xcolor.perl b/styles/xcolor.perl
new file mode 100644
index 0000000..90ace0a
--- /dev/null
+++ b/styles/xcolor.perl
@@ -0,0 +1,3 @@
+do_require_package('color');
+
+1;

View File

@ -3,7 +3,7 @@
Summary: Converts LaTeX documents to HTML
Name: latex2html
Version: 2018.2
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
Group: Applications/Publishing
URL: http://www.latex2html.org/
@ -17,6 +17,8 @@ Patch0: latex2html-2K.1beta-tabularx.patch
Patch1: latex2html-2018.2-teTeX-l2h-config.patch
Patch4: latex2html-2002-2-1-SHLIB.patch
Patch5: latex2html-2002-2-1-gsfont.patch
Patch6: latex2html-issue48-1.patch
Patch7: latex2html-issue48-2.patch
Requires: tex(latex), tex(dvips), tex(url.sty), netpbm-progs
BuildRequires: perl-interpreter >= 5.003, perl-generators, ghostscript >= 4.03, netpbm-progs >= 9.21, tex(latex)
BuildArch: noarch
@ -45,6 +47,10 @@ pushd %{name}-%{version}
# don't require the font directory to be ended with PATH/fonts
%patch5 -p1 -b .gsfont
# Patch Perl compatibility. Fixes are upstream but not yet released
%patch6 -p1
%patch7 -p1
# remove all platforms we don't need
for i in Dos Mac OS2 Win32; do
rm -f L2hos/${i}.pm
@ -221,6 +227,9 @@ make -C %{name}-%{version}JA check
%{_mandir}/man1/pstoimg.*
%changelog
* Fri Jul 07 2018 Ben Cotton <bcotton@fedoraproject.org> - 2018.2-3
- Add patch to fix bz#1582267 (upstream issue 48) until next upstream release
* Fri Jun 22 2018 Than Ngo <than@redhat.com> - 2018.2-2
- update l2h-2017-jp20180308