From a5db9800a3527802486d9fdc79d0c093859a842f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 27 2022 21:06:59 +0000 Subject: import gtk-doc-1.28-4.el8 --- diff --git a/SOURCES/gtk-doc-1.28-fix-opaque-class.patch b/SOURCES/gtk-doc-1.28-fix-opaque-class.patch new file mode 100644 index 0000000..681c757 --- /dev/null +++ b/SOURCES/gtk-doc-1.28-fix-opaque-class.patch @@ -0,0 +1,38 @@ +From c8c288ab35f913603fb3f49dd4141aacbd7e8562 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +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 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' % objectname ++ + elif re.search(r'^\s*(?:struct|union)\s+_(\w+)\s*;', line): + # Skip private structs/unions. + logging.info('private struct/union') +-- +GitLab + diff --git a/SPECS/gtk-doc.spec b/SPECS/gtk-doc.spec index a5a439a..4c06611 100644 --- a/SPECS/gtk-doc.spec +++ b/SPECS/gtk-doc.spec @@ -4,7 +4,7 @@ Name: gtk-doc Version: 1.28 -Release: 3%{?dist} +Release: 4%{?dist} Summary: API documentation generation tool for GTK+ and GNOME 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 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: docbook-utils BuildRequires: /usr/bin/xsltproc @@ -69,6 +72,9 @@ make check || make check %{_libdir}/cmake/ %changelog +* Thu Apr 07 2022 David King - 1.28-4 +- Generate documentation for forward declarations (#2052721) + * Mon Feb 01 2021 Kalev Lember - 1.28-3 - Backport an upstream patch to fix G_MAXINT appearing as G_MAXLONG on 32 bit - Related: #1853142