[packages/gtk-doc] - added struct-end patch (fix for indented struct end); release 4

qboosh qboosh at pld-linux.org
Wed Jun 23 06:27:48 CEST 2021


commit 5ea2d35e56dde95d6e32e446b0ab67bd96a954d6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Jun 23 06:30:48 2021 +0200

    - added struct-end patch (fix for indented struct end); release 4

 gtk-doc-struct-end.patch | 13 +++++++++++++
 gtk-doc.spec             |  4 +++-
 2 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/gtk-doc.spec b/gtk-doc.spec
index 258ffcf..f338126 100644
--- a/gtk-doc.spec
+++ b/gtk-doc.spec
@@ -9,13 +9,14 @@ Summary(pl.UTF-8):	Narzędzie do generowania dokumentacji API do GTK+ i GNOME
 Summary(pt_BR.UTF-8):	O gerador de documentação do GTK
 Name:		gtk-doc
 Version:	1.33.2
-Release:	3
+Release:	4
 License:	GPL v2+
 Group:		Development/Tools
 Source0:	https://download.gnome.org/sources/gtk-doc/1.33/%{name}-%{version}.tar.xz
 # Source0-md5:	ea6563421abe964d02135ca0d5b8dd8e
 Patch0:		%{name}-noarch.patch
 Patch1:		%{name}-cmake.patch
+Patch2:		%{name}-struct-end.patch
 URL:		https://wiki.gnome.org/DocumentationProject/GtkDoc
 BuildRequires:	autoconf >= 2.63
 BuildRequires:	automake >= 1:1.11
@@ -86,6 +87,7 @@ pomocą gtk-doc.
 %setup -q
 %{!?with_tests:%patch0 -p1}
 %patch1 -p1
+%patch2 -p1
 
 %{__mv} doc/README doc/README.docs
 
diff --git a/gtk-doc-struct-end.patch b/gtk-doc-struct-end.patch
new file mode 100644
index 0000000..d637385
--- /dev/null
+++ b/gtk-doc-struct-end.patch
@@ -0,0 +1,13 @@
+Detect struct end (and don't crash) on indented "}".
+
+--- gtk-doc-1.33.2/gtkdoc/scan.py.orig	2021-06-21 17:26:04.628579149 +0200
++++ gtk-doc-1.33.2/gtkdoc/scan.py	2021-06-21 17:26:07.118565660 +0200
+@@ -941,7 +941,7 @@
+         # comments will cause problems.
+         if in_declaration == 'struct' or in_declaration == 'union':
+             # Same regex as for enum
+-            sm = re.search(r'\n\}\s*(?:(\w+)?%s)?;\s*$' % optional_decorators_regex, decl)
++            sm = re.search(r'\n\s*\}\s*(?:(\w+)?%s)?;\s*$' % optional_decorators_regex, decl)
+             if level <= 1 and sm:
+                 if symbol == '':
+                     symbol = sm.group(1)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gtk-doc.git/commitdiff/5ea2d35e56dde95d6e32e446b0ab67bd96a954d6



More information about the pld-cvs-commit mailing list