[packages/goocanvas2] - rel 3 - fix building with gcc 14+ - drop python 2 module

baggins baggins at pld-linux.org
Sat Apr 25 10:44:02 CEST 2026


commit 1887a3995dff704ae20ad6908b4750fb508bb8c5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Apr 25 12:43:39 2026 +0200

    - rel 3
    - fix building with gcc 14+
    - drop python 2 module

 gcc14.patch     | 16 ++++++++++++++++
 goocanvas2.spec | 19 +++++++++++--------
 2 files changed, 27 insertions(+), 8 deletions(-)
---
diff --git a/goocanvas2.spec b/goocanvas2.spec
index 9c19aa8..c5886ac 100644
--- a/goocanvas2.spec
+++ b/goocanvas2.spec
@@ -1,12 +1,17 @@
+#
+# Conditional build:
+%bcond_with	python		# build python 2 module
+#
 Summary:	Cairo/GTK+3 Canvas
 Summary(pl.UTF-8):	Płótno Cairo/GTK+3
 Name:		goocanvas2
 Version:	2.0.4
-Release:	2
+Release:	3
 License:	LGPL v2
 Group:		X11/Libraries
 Source0:	https://download.gnome.org/sources/goocanvas/2.0/goocanvas-%{version}.tar.xz
 # Source0-md5:	a603f9459d29348b88ba3592bca03274
+Patch0:		gcc14.patch
 URL:		https://wiki.gnome.org/Projects/GooCanvas
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake >= 1:1.7
@@ -19,7 +24,7 @@ BuildRequires:	gtk+3-devel >= 3.0.0
 BuildRequires:	gtk-doc >= 1.16
 BuildRequires:	libtool
 BuildRequires:	pkgconfig
-BuildRequires:	python-pygobject3-devel >= 3
+%{?with_python:BuildRequires:	python-pygobject3-devel >= 3}
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.752
 BuildRequires:	tar >= 1:1.22
@@ -112,17 +117,13 @@ Wiązania Pythona do biblioteki GooCanvas 2.x.
 
 %prep
 %setup -q -n goocanvas-%{version}
+%patch -P0 -p1
 
 %build
-%{__gtkdocize}
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%{__automake}
 %configure \
 	--disable-silent-rules \
 	--enable-gtk-doc \
+	%{__enable_disable python} \
 	--with-html-dir=%{_gtkdocdir}
 %{__make}
 
@@ -175,6 +176,8 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_examplesdir}/%{name}-%{version}
 
+%if %{with python}
 %files -n python-%{name}
 %defattr(644,root,root,755)
 %{py_sitedir}/gi/overrides/GooCanvas.py[co]
+%endif
diff --git a/gcc14.patch b/gcc14.patch
new file mode 100644
index 0000000..c689457
--- /dev/null
+++ b/gcc14.patch
@@ -0,0 +1,16 @@
+diff --git a/src/goocanvasitemsimple.c b/src/goocanvasitemsimple.c
+index 19b3424..28edc77 100644
+--- a/src/goocanvasitemsimple.c
++++ b/src/goocanvasitemsimple.c
+@@ -1536,7 +1536,7 @@ goo_canvas_item_simple_set_model (GooCanvasItemSimple  *item,
+   goo_canvas_item_simple_free_data (item->simple_data);
+   g_slice_free (GooCanvasItemSimpleData, item->simple_data);
+ 
+-  item->model = g_object_ref (model);
++  item->model = (GooCanvasItemModelSimple *) g_object_ref (model);
+   item->simple_data = &item->model->simple_data;
+ 
+   if (accessibility_enabled)
+-- 
+2.43.0
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/goocanvas2.git/commitdiff/1887a3995dff704ae20ad6908b4750fb508bb8c5



More information about the pld-cvs-commit mailing list