fix not found file
(cherry picked from commit a18967dd424a1f5dbb60dc65025f8aaa45f1d14e)
This commit is contained in:
parent
b5cdf1ac52
commit
b2c7afea92
50
fix-fixxref-not-found-file.patch
Normal file
50
fix-fixxref-not-found-file.patch
Normal file
@ -0,0 +1,50 @@
|
||||
--- gtk-doc-1.33.2/gtkdoc/fixxref.py 2021-01-20 01:08:26.494552400 +0800
|
||||
+++ gtk-doc-1.33.2_bak/gtkdoc/fixxref.py 2021-07-26 10:52:56.295493736 +0800
|
||||
@@ -22,7 +22,7 @@
|
||||
''"Fix cross-references in the HTML documentation.''"
|
||||
|
||||
import logging
|
||||
-import os
|
||||
+import os,sys
|
||||
import re
|
||||
|
||||
from . import common, highlight
|
||||
@@ -51,6 +51,12 @@
|
||||
LoadIndicies(options.module_dir, options.html_dir, options.extra_dir)
|
||||
ReadSections(options.module)
|
||||
FixCrossReferences(options.module_dir, options.module, options.src_lang)
|
||||
+
|
||||
+
|
||||
+ if not os.path.exists(os.path.join(options.module_dir, 'style.css')):
|
||||
+ print (os.path.join(options.module_dir, 'style.css' + " file is not found"))
|
||||
+ sys.exit()
|
||||
+
|
||||
highlight.append_style_defs(os.path.join(options.module_dir, 'style.css'))
|
||||
|
||||
|
||||
@@ -187,6 +193,12 @@
|
||||
|
||||
def ReadSections(module):
|
||||
"""We don't warn on missing links to non-public sysmbols."""
|
||||
+
|
||||
+
|
||||
+ if not os.path.exists(module + '-sections.txt'):
|
||||
+ print (module + '-sections.txt' + " file is not found")
|
||||
+ sys.exit()
|
||||
+
|
||||
for line in open(module + '-sections.txt', 'r', encoding='utf-8'):
|
||||
m1 = re.search(r'^<SUBSECTION\s*(.*)>', line)
|
||||
if line.startswith('#') or line.strip() == '':
|
||||
@@ -211,6 +223,12 @@
|
||||
|
||||
def FixCrossReferences(module_dir, module, src_lang):
|
||||
# TODO(ensonic): use glob.glob()?
|
||||
+
|
||||
+
|
||||
+ if not os.path.isdir(module_dir):
|
||||
+ print (module_dir + " directory is not found")
|
||||
+ sys.exit()
|
||||
+
|
||||
for entry in sorted(os.listdir(module_dir)):
|
||||
full_entry = os.path.join(module_dir, entry)
|
||||
if os.path.isdir(full_entry):
|
||||
57
fix-mkdb-not-found-file.patch
Normal file
57
fix-mkdb-not-found-file.patch
Normal file
@ -0,0 +1,57 @@
|
||||
--- gtk-doc-1.33.2/gtkdoc/mkdb.py 2021-01-20 01:08:26.503552400 +0800
|
||||
+++ gtk-doc-1.33.2_bak/gtkdoc/mkdb.py 2021-07-26 10:50:13.896786712 +0800
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
from collections import OrderedDict
|
||||
import logging
|
||||
-import os
|
||||
+import os,sys
|
||||
import re
|
||||
import string
|
||||
|
||||
@@ -286,7 +286,11 @@
|
||||
|
||||
# extract docbook header or define default
|
||||
doctype_header = GetDocbookHeader(main_sgml_file)
|
||||
-
|
||||
+
|
||||
+ if not os.path.exists(os.path.join(ROOT_DIR, MODULE + "-sections.txt")):
|
||||
+ print (os.path.join(ROOT_DIR, MODULE + "-sections.txt") + " file is not found")
|
||||
+ sys.exit()
|
||||
+
|
||||
ReadKnownSymbols(os.path.join(ROOT_DIR, MODULE + "-sections.txt"))
|
||||
ReadSignalsFile(os.path.join(ROOT_DIR, MODULE + ".signals"))
|
||||
ReadArgsFile(os.path.join(ROOT_DIR, MODULE + ".args"))
|
||||
@@ -294,9 +298,19 @@
|
||||
obj_tree = ReadObjectHierarchy(os.path.join(ROOT_DIR, MODULE + ".hierarchy"))
|
||||
ReadInterfaces(os.path.join(ROOT_DIR, MODULE + ".interfaces"))
|
||||
ReadPrerequisites(os.path.join(ROOT_DIR, MODULE + ".prerequisites"))
|
||||
+
|
||||
+
|
||||
+ if not os.path.exists(os.path.join(ROOT_DIR, MODULE + "-decl.txt")):
|
||||
+ print (os.path.join(ROOT_DIR, MODULE + "-decl.txt") + " file is not found")
|
||||
+ sys.exit()
|
||||
|
||||
ReadDeclarationsFile(os.path.join(ROOT_DIR, MODULE + "-decl.txt"), 0)
|
||||
if os.path.isfile(os.path.join(ROOT_DIR, MODULE + "-overrides.txt")):
|
||||
+
|
||||
+ if not os.path.exists(os.path.join(ROOT_DIR, MODULE + "-overrides.txt")):
|
||||
+ print (os.path.join(ROOT_DIR, MODULE + "-overrides.txt") + " file is not found")
|
||||
+ sys.exit()
|
||||
+
|
||||
ReadDeclarationsFile(os.path.join(ROOT_DIR, MODULE + "-overrides.txt"), 1)
|
||||
|
||||
logging.info("Data files read")
|
||||
@@ -3758,6 +3772,12 @@
|
||||
# This array holds any subdirectories found.
|
||||
subdirs = []
|
||||
|
||||
+
|
||||
+
|
||||
+ if not os.path.isdir(source_dir):
|
||||
+ print (source_dir + " directory is not found")
|
||||
+ sys.exit()
|
||||
+
|
||||
for ifile in sorted(os.listdir(source_dir)):
|
||||
logging.debug("... : %s", ifile)
|
||||
if ifile.startswith('.'):
|
||||
@ -3,11 +3,13 @@
|
||||
|
||||
Name: gtk-doc
|
||||
Version: 1.33.2
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Generate API documentation from comments that can be added to C code
|
||||
License: GPLv2+ and GFDL
|
||||
URL: https://www.gtk.org/gtk-doc/
|
||||
Source0: https://download.gnome.org/sources/gtk-doc/1.33/%{name}-%{version}.tar.xz
|
||||
Patch0: fix-fixxref-not-found-file.patch
|
||||
Patch1: fix-mkdb-not-found-file.patch
|
||||
|
||||
BuildRequires: python3-devel docbook-utils libxslt gettext
|
||||
BuildRequires: itstool yelp-tools docbook-style-xsl gcc gdb
|
||||
@ -52,6 +54,9 @@ export PYTHON=%{__python3}
|
||||
%{_datadir}/help/*/%{name}-manual/
|
||||
|
||||
%changelog
|
||||
* Sun Jul 25 2021 liyanan <liyanan32@huawei.com> - 1.33.2-2
|
||||
- fix not found file
|
||||
|
||||
* Wed May 19 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 1.33.2-1
|
||||
- Upgrade to 1.33.2
|
||||
- Update Version
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user