Add upstream patch to fix doc builds

This commit is contained in:
Orion Poplawski 2023-03-17 17:36:49 -06:00
parent 6f237bc2ed
commit 36ac824c44
3 changed files with 51 additions and 9 deletions

43
ab6d276f6fcb Normal file
View File

@ -0,0 +1,43 @@
# HG changeset patch
# User Rik <rik@octave.org>
# Date 1668451079 28800
# Node ID ab6d276f6fcb90631131eeb6668efd4f54a36204
# Parent 662499ba0d21173006f99fc3b14b9a76a0e8670a
build: Enable building of Qt documentation with Texinfo >= 7.0 (bug #62648).
* doc/interpreter/mk-qthelp.pl: Update regular expressions that find the start
of data in index.html and Function-index.html to include additional pattern
generated by Texinfo 7.0.
diff --git a/doc/interpreter/mk-qthelp.pl b/doc/interpreter/mk-qthelp.pl
--- a/doc/interpreter/mk-qthelp.pl
+++ b/doc/interpreter/mk-qthelp.pl
@@ -26,8 +26,11 @@
open (my $HTML, "<", $htmlfname) or die "Unable to open $htmlfname";
# Skip through preamble of file to find start of list
-while (($_ = <$HTML>) !~ /^<div class="contents">/ ) {;}
-while (($_ = <$HTML>) !~ /^<ul class="no-bullet">/ ) {;}
+while (defined ($_ = <$HTML>) and ! /^<div class="contents">/ ) {;}
+while (defined ($_ = <$HTML>)
+ and ! /^<ul class="(?:no-bullet|toc-numbered-mark)">/ ) {;}
+
+die "index.html: reached EOF without finding data start pattern" if eof ($HTML);
$level = 0;
while (<$HTML>)
@@ -68,7 +71,11 @@
open ($HTML, "<", $htmlfname) or die "Unable to open $htmlfname";
# Skip through preamble of file to find start of list
-while (($_ = <$HTML>) !~ /^<table class="index-fn/ ) {;}
+while (defined ($_ = <$HTML>)
+ and ! /^<table class="(?:index-fn|fn-entries)/ ) {;}
+
+die "Function-Index.html: reached EOF without finding data start pattern"
+ if eof ($HTML);
while (<$HTML>)
{

View File

@ -3,13 +3,7 @@
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
%if 0%{?fedora} >= 38
# Infinite loop with texinfo 7
# https://savannah.gnu.org/bugs/index.php?63810
%global builddocs 0
%else
%global builddocs 1
%endif
%if 0%{?fedora}
%bcond_without flexiblas
@ -43,7 +37,7 @@
Name: octave
Epoch: 6
Version: 7.3.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A high-level language for numerical computations
License: GPLv3+
URL: http://www.octave.org
@ -56,6 +50,9 @@ Source2: xorg.conf
%if !%{builddocs}
Source3: octave-%{version}-docs.tar.xz
%endif
# Infinite loop with texinfo 7
# https://savannah.gnu.org/bugs/index.php?63810
Patch0: https://hg.savannah.gnu.org/hgweb/octave/raw-rev/ab6d276f6fcb
# Add needed time.h header
Patch2: octave-time.patch
@ -464,10 +461,13 @@ make check
%{_pkgdocdir}/refcard*.pdf
%changelog
* Fri Mar 17 2023 Orion Poplawski <orion@nwra.com> - 6:7.3.0-4
- Add upstream patch to fix doc builds
* Sun Feb 26 2023 Orion Poplawski <orion@nwra.com> - 6:7.3.0-3
- Disable building docs due to texinfo 7 incompatibility
* Wed Jan 11 2023 FeRD (Frank Dana> <ferdnyc@gmail.com> - 6:7.3.0-3
* Fri Feb 10 2023 FeRD (Frank Dana> <ferdnyc@gmail.com> - 6:7.3.0-3
- Build with rapidjson to enable built-in json{decode,encode}
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6:7.3.0-2

View File

@ -1,2 +1 @@
SHA512 (octave-7.3.0.tar.lz) = 8448aa01fa2a0650993ff9e4a4a017c243d5bf4af17cc321458e583913f4a71c2a34d60c1f79b8fedd5f00604f0960b94a4e2c0d9b87f07b13e969afe2951aa2
SHA512 (octave-7.3.0-docs.tar.xz) = a902b77117cf1c361b0d7c538ac4ed52140f073c1bddda5f10fe9d61c5a608a6be6b34cbab0e585a2deee04d09ed968a2d74b77d835bdadb445162143dcebc2b