import gtk-doc-1.28-4.el8

This commit is contained in:
CentOS Sources 2022-09-27 17:06:59 -04:00 committed by Stepan Oksanichenko
parent 5638371f2c
commit bcf80ca9c8
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From c8c288ab35f913603fb3f49dd4141aacbd7e8562 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Fri, 29 Jun 2018 21:45:28 +0200
Subject: [PATCH] scan: set title also when the class structure is opaque
libnm doesn't like to include the structure definitions of many object
types in a public header, since they're not supposed to be subclassed
and maintaining a stable ABI would me a maintanance burden:
nm-setting-user.c: struct _NMSettingUserClass { ... };
nm-setting-user.h: typedef struct _NMSettingUserClass NMSettingUserClass;
However, gtkdoc-scan only sets <TITLE> for Class/Iface typedefs only when the
structs are defined in the header. Fix that.
---
gtkdoc/scan.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gtkdoc/scan.py b/gtkdoc/scan.py
index f1f1672..b59dd17 100644
--- a/gtkdoc/scan.py
+++ b/gtkdoc/scan.py
@@ -434,6 +434,12 @@ def ScanHeader(input_file, section_list, decl_list, get_types, options):
forward_decls[m9.group(2)] = '<%s>\n<NAME>%s</NAME>\n%s</%s>\n' % (
structsym, m9.group(2), deprecated, structsym)
+ bm = re.search(r'^(\S+)(Class|Iface|Interface)\b', m9.group(2))
+ if bm:
+ objectname = bm.group(1)
+ logging.info('Found object: "%s"', objectname)
+ title = '<TITLE>%s</TITLE>' % objectname
+
elif re.search(r'^\s*(?:struct|union)\s+_(\w+)\s*;', line):
# Skip private structs/unions.
logging.info('private struct/union')
--
GitLab

View File

@ -4,7 +4,7 @@
Name: gtk-doc Name: gtk-doc
Version: 1.28 Version: 1.28
Release: 3%{?dist} Release: 4%{?dist}
Summary: API documentation generation tool for GTK+ and GNOME Summary: API documentation generation tool for GTK+ and GNOME
License: GPLv2+ and GFDL License: GPLv2+ and GFDL
@ -19,6 +19,9 @@ Patch0: 0001-Please-make-the-output-reproducible.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1853142 # https://bugzilla.redhat.com/show_bug.cgi?id=1853142
Patch1: 0001-scangobj-Make-G_MAXINT-appear-as-such-on-32-bit.patch Patch1: 0001-scangobj-Make-G_MAXINT-appear-as-such-on-32-bit.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2052721
Patch2: gtk-doc-1.28-fix-opaque-class.patch
BuildRequires: dblatex BuildRequires: dblatex
BuildRequires: docbook-utils BuildRequires: docbook-utils
BuildRequires: /usr/bin/xsltproc BuildRequires: /usr/bin/xsltproc
@ -69,6 +72,9 @@ make check || make check
%{_libdir}/cmake/ %{_libdir}/cmake/
%changelog %changelog
* Thu Apr 07 2022 David King <dking@redhat.com> - 1.28-4
- Generate documentation for forward declarations (#2052721)
* Mon Feb 01 2021 Kalev Lember <klember@redhat.com> - 1.28-3 * Mon Feb 01 2021 Kalev Lember <klember@redhat.com> - 1.28-3
- Backport an upstream patch to fix G_MAXINT appearing as G_MAXLONG on 32 bit - Backport an upstream patch to fix G_MAXINT appearing as G_MAXLONG on 32 bit
- Related: #1853142 - Related: #1853142