diff --git a/fix-fixxref-not-found-file.patch b/fix-fixxref-not-found-file.patch new file mode 100644 index 0000000000000000000000000000000000000000..8e24478a974d42f7543d886c78d19c2e4f55cce6 --- /dev/null +++ b/fix-fixxref-not-found-file.patch @@ -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'^', 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): diff --git a/fix-mkdb-not-found-file.patch b/fix-mkdb-not-found-file.patch new file mode 100644 index 0000000000000000000000000000000000000000..329e613b587e1a693fbf90f619ad6ca2c06d4991 --- /dev/null +++ b/fix-mkdb-not-found-file.patch @@ -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('.'): diff --git a/gtk-doc.spec b/gtk-doc.spec index 78e58ba48833d72e4c64467806c418d9a335c952..7a81cc5d3f9cc2d607c3c6a2f3ce85bc1602671a 100644 --- a/gtk-doc.spec +++ b/gtk-doc.spec @@ -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 - 1.33.2-2 +- fix not found file + * Wed May 19 2021 weijin deng - 1.33.2-1 - Upgrade to 1.33.2 - Update Version