public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ruby-gnome2] rawhide: Use TypedData API needed for ruby4.1
@ 2026-11-17 6:56 Mamoru TASAKA
0 siblings, 0 replies; only message in thread
From: Mamoru TASAKA @ 2026-11-17 6:56 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ruby-gnome2
Branch : rawhide
Commit : 662f4a8e7c2e51cf5f2e15cde3e17136f63a2699
Author : Mamoru TASAKA <mtasaka@fedoraproject.org>
Date : 2026-11-17T15:55:57+09:00
Stats : +367/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/ruby-gnome2/c/662f4a8e7c2e51cf5f2e15cde3e17136f63a2699?branch=rawhide
Log:
Use TypedData API needed for ruby4.1
---
diff --git a/ruby-gnome2-all-0.90.4-TypedData_API.patch b/ruby-gnome2-all-0.90.4-TypedData_API.patch
new file mode 100644
index 0000000..3ce0250
--- /dev/null
+++ b/ruby-gnome2-all-0.90.4-TypedData_API.patch
@@ -0,0 +1,360 @@
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/bonoboui/src/rbbonobo-dock-layout.c ruby-gnome2-all-0.90.4/bonoboui/src/rbbonobo-dock-layout.c
+--- ruby-gnome2-all-0.90.4.orig/bonoboui/src/rbbonobo-dock-layout.c 2026-11-15 22:29:33.041544642 +0900
++++ ruby-gnome2-all-0.90.4/bonoboui/src/rbbonobo-dock-layout.c 2026-11-17 15:06:14.343546665 +0900
+@@ -84,12 +84,15 @@ docklayout_add_floating_item(self, item,
+ return self;
+ }
+
++static const rb_data_type_t bonobo_rb_data = {
++ .wrap_struct_name = "Bonobo::DockLayout",
++};
++
+ static VALUE
+ docklayout_get_item(self, item)
+ VALUE self, item;
+ {
+ BonoboDockLayoutItem *result;
+-
+ if (TYPE(item) == T_STRING) {
+ result = bonobo_dock_layout_get_item_by_name(_SELF(self),
+ RVAL2CSTR(item));
+@@ -97,7 +100,7 @@ docklayout_get_item(self, item)
+ result = bonobo_dock_layout_get_item(_SELF(self),
+ BONOBO_DOCK_ITEM(RVAL2GOBJ(item)));
+ }
+- return Data_Wrap_Struct(bnbDockLayoutItem, 0, 0, result);
++ return TypedData_Wrap_Struct(bnbDockLayoutItem, &bonobo_rb_data, result);
+ }
+
+ static VALUE
+Only in ruby-gnome2-all-0.90.4/gnome: ERROR.log.txt
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/gnome/src/rbgnome-app-helper.c ruby-gnome2-all-0.90.4/gnome/src/rbgnome-app-helper.c
+--- ruby-gnome2-all-0.90.4.orig/gnome/src/rbgnome-app-helper.c 2026-11-15 22:29:33.041293891 +0900
++++ ruby-gnome2-all-0.90.4/gnome/src/rbgnome-app-helper.c 2026-11-17 15:07:05.957425552 +0900
+@@ -643,9 +643,9 @@ fill_ui_info(uiinfo, ary, uitype)
+ }
+
+ static void
+-free_ui_info(uiinfo)
+- GnomeUIInfo *uiinfo;
++free_ui_info(void *data)
+ {
++ GnomeUIInfo *uiinfo = data;
+ GnomeUIInfo *inf;
+ for (inf = uiinfo; inf->type != GNOME_APP_UI_ENDOFINFO; inf++) {
+ /* free moreinfo */
+@@ -676,6 +676,13 @@ free_ui_info(uiinfo)
+ * Don't use returned value after 'ary' is GCed.
+ * This is only for short time lifetime.
+ */
++static const rb_data_type_t gnome_rb_data_ui_info = {
++ .wrap_struct_name = "Gnome::UIInfo",
++ .function = {
++ .dfree = free_ui_info,
++ },
++};
++
+ VALUE
+ rbgno_ary_to_ui_info(ary, uitype)
+ VALUE ary;
+@@ -689,7 +696,7 @@ rbgno_ary_to_ui_info(ary, uitype)
+ /* set terminator for free_ui_info. */
+ uiinfo[0].type = GNOME_APP_UI_ENDOFINFO;
+
+- obj = Data_Wrap_Struct(rb_cObject, NULL, free_ui_info, uiinfo);
++ obj = TypedData_Wrap_Struct(rb_cObject, &gnome_rb_data_ui_info, uiinfo);
+ /* uiinfo will be freed, even if any exception occurs in
+ the following function.*/
+ fill_ui_info(uiinfo, ary, uitype);
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/gnome/src/rbpopt.c ruby-gnome2-all-0.90.4/gnome/src/rbpopt.c
+--- ruby-gnome2-all-0.90.4.orig/gnome/src/rbpopt.c 2026-11-15 22:29:33.041460804 +0900
++++ ruby-gnome2-all-0.90.4/gnome/src/rbpopt.c 2026-11-17 15:10:07.793479361 +0900
+@@ -111,6 +111,13 @@ rbgno_poptoption_arg_to_hash(hash, optio
+ }
+ }
+
++static const rb_data_type_t gnome_rb_data_popt = {
++ .wrap_struct_name = "Gnome::Popt",
++ .function = {
++ .dfree = g_free,
++ },
++};
++
+ VALUE
+ rbgno_poptoption_array_to_obj(from)
+ VALUE from;
+@@ -157,7 +164,7 @@ rbgno_poptoption_array_to_obj(from)
+ options = (struct poptOption *)g_malloc(sopt + sdata + sstring);
+ data = (union popt_data *)(((char *)options) + sopt);
+ string = (char *)(((char *)options) + sopt + sdata);
+- obj = Data_Wrap_Struct(rb_cObject, NULL, g_free, options);
++ obj = TypedData_Wrap_Struct(rb_cObject, &gnome_rb_data_popt, options);
+
+ for (i = 0; i < len; i++) {
+ entry = RARRAY_PTR(from)[i];
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/gnomevfs/src/gnomevfs-file.c ruby-gnome2-all-0.90.4/gnomevfs/src/gnomevfs-file.c
+--- ruby-gnome2-all-0.90.4.orig/gnomevfs/src/gnomevfs-file.c 2026-11-15 22:29:33.047532252 +0900
++++ ruby-gnome2-all-0.90.4/gnomevfs/src/gnomevfs-file.c 2026-11-17 15:19:02.410015608 +0900
+@@ -27,6 +27,7 @@
+
+ /* Includes ******************************************************************/
+
++#include <ruby/version.h>
+ #include "gnomevfs.h"
+ #include "string.h"
+
+@@ -387,7 +388,9 @@ handle_gets(handle, sep, len)
+ }
+
+ if (!NIL_P(str)) {
++#if RUBY_API_VERSION_CODE < 40100
+ OBJ_TAINT(str);
++#endif
+ }
+ return str;
+ }
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/libart/src/rbart.c ruby-gnome2-all-0.90.4/libart/src/rbart.c
+--- ruby-gnome2-all-0.90.4.orig/libart/src/rbart.c 2007-10-23 21:51:27.000000000 +0900
++++ ruby-gnome2-all-0.90.4/libart/src/rbart.c 2026-11-17 15:23:06.728776705 +0900
+@@ -25,11 +25,18 @@ rbart_s_new(int argc, VALUE* argv, VALUE
+ }
+ #endif /* HAVE_OBJECT_ALLOCATE */
+
++static const rb_data_type_t art_rb_data_init = {
++ .wrap_struct_name = "Art::Init",
++ .function = {
++ .dfree = xfree,
++ },
++};
++
+ static VALUE
+ rbart_s_allocate(klass)
+ VALUE klass;
+ {
+- return Data_Wrap_Struct(klass, 0, xfree, 0);
++ return TypedData_Wrap_Struct(klass, &art_rb_data_init, 0);
+ }
+
+ void
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/libart/src/rbart_affine.c ruby-gnome2-all-0.90.4/libart/src/rbart_affine.c
+--- ruby-gnome2-all-0.90.4.orig/libart/src/rbart_affine.c 2026-11-15 22:29:33.041039212 +0900
++++ ruby-gnome2-all-0.90.4/libart/src/rbart_affine.c 2026-11-17 15:24:27.306048892 +0900
+@@ -30,13 +30,20 @@ get_art_affine(obj)
+ return Affine_Ptr(obj);
+ }
+
++static const rb_data_type_t art_rb_data_affine = {
++ .wrap_struct_name = "Art::Affine",
++ .function = {
++ .dfree = xfree,
++ },
++};
++
+ VALUE
+ make_art_affine(affine)
+ double affine[6];
+ {
+ double *ptr = xmalloc(sizeof(double[6]));
+ memcpy(ptr, affine, sizeof(double[6]));
+- return Data_Wrap_Struct(artAffine, 0, xfree, ptr);
++ return TypedData_Wrap_Struct(artAffine, &art_rb_data_affine, ptr);
+ }
+ /**********************************************************/
+
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/libart/src/rbart_bpath.c ruby-gnome2-all-0.90.4/libart/src/rbart_bpath.c
+--- ruby-gnome2-all-0.90.4.orig/libart/src/rbart_bpath.c 2026-11-15 22:29:33.040792809 +0900
++++ ruby-gnome2-all-0.90.4/libart/src/rbart_bpath.c 2026-11-17 15:25:54.925170085 +0900
+@@ -27,11 +27,18 @@ get_art_bpath(r_obj)
+ return Bpath_Ptr(r_obj);
+ }
+
++static const rb_data_type_t art_rb_data_bpath = {
++ .wrap_struct_name = "Art::Bpath",
++ .function = {
++ .dfree = art_free,
++ },
++};
++
+ VALUE
+ make_art_bpath(bpath)
+ ArtBpath *bpath;
+ {
+- return Data_Wrap_Struct(artBpath, 0, art_free, bpath);
++ return TypedData_Wrap_Struct(artBpath, &art_rb_data_bpath, bpath);
+ }
+ /*************************************************/
+ /*
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/libart/src/rbart_canvas.c ruby-gnome2-all-0.90.4/libart/src/rbart_canvas.c
+--- ruby-gnome2-all-0.90.4.orig/libart/src/rbart_canvas.c 2026-11-15 22:29:32.445360810 +0900
++++ ruby-gnome2-all-0.90.4/libart/src/rbart_canvas.c 2026-11-17 15:29:13.864982166 +0900
+@@ -45,20 +45,27 @@ rbart_get_art_canvas(r_obj)
+ /*************************************************/
+
+ static void
+-canvas_free(canvas)
+- ArtCanvas *canvas;
++canvas_free(void *data)
+ {
++ ArtCanvas *canvas = data;
+ xfree(canvas->rgb);
+ if (canvas->flags & ART_CANVAS_ALPHA_MASK)
+ xfree(canvas->mask);
+ xfree(canvas);
+ }
+
++static const rb_data_type_t art_rb_data_canvas = {
++ .wrap_struct_name = "Art::Canvas",
++ .function = {
++ .dfree = canvas_free,
++ },
++};
++
+ static VALUE
+ canvas_s_allocate(klass)
+ VALUE klass;
+ {
+- return Data_Wrap_Struct(klass, 0, canvas_free, 0);
++ return TypedData_Wrap_Struct(klass, &art_rb_data_canvas, 0);
+ }
+
+ static VALUE
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/libart/src/rbart_rect.c ruby-gnome2-all-0.90.4/libart/src/rbart_rect.c
+--- ruby-gnome2-all-0.90.4.orig/libart/src/rbart_rect.c 2026-11-15 22:29:33.040650512 +0900
++++ ruby-gnome2-all-0.90.4/libart/src/rbart_rect.c 2026-11-17 15:32:59.546285213 +0900
+@@ -42,7 +42,7 @@ make_art_ ## TARGET(Art ## TYPE *rect)
+ { \
+ Art ## TYPE *ptr = xmalloc(sizeof(Art ## TYPE)); \
+ memcpy(ptr, rect, sizeof(Art ## TYPE)); \
+- return Data_Wrap_Struct(art ## TYPE, 0, xfree, ptr); \
++ return TypedData_Wrap_Struct(art ## TYPE, &art_rb_data_ ## TARGET, ptr); \
+ } \
+ \
+ \
+@@ -156,6 +156,18 @@ TARGET ## _to_s(VALUE self)
+ return ret; \
+ }
+
++static const rb_data_type_t art_rb_data_irect = {
++ .wrap_struct_name = "Art::IRect",
++ .function = {
++ .dfree = xfree,
++ },
++};
++static const rb_data_type_t art_rb_data_drect = {
++ .wrap_struct_name = "Art::DRect",
++ .function = {
++ .dfree = xfree,
++ },
++};
+
+ DEF_CLASS(irect, IRect, "IRect")
+ DEF_CLASS(drect, DRect, "DRect")
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/libart/src/rbart_svp.c ruby-gnome2-all-0.90.4/libart/src/rbart_svp.c
+--- ruby-gnome2-all-0.90.4.orig/libart/src/rbart_svp.c 2026-11-15 22:29:33.040854626 +0900
++++ ruby-gnome2-all-0.90.4/libart/src/rbart_svp.c 2026-11-17 15:34:36.793261274 +0900
+@@ -26,11 +26,18 @@ get_art_svp(r_obj)
+ return SVP_Ptr(r_obj);
+ }
+
++static const rb_data_type_t art_rb_data_svp = {
++ .wrap_struct_name = "Art::SVP",
++ .function = {
++ .dfree = art_free,
++ },
++};
++
+ VALUE
+ make_art_svp(vpath)
+ ArtSVP *vpath;
+ {
+- return Data_Wrap_Struct(artSVP, 0, art_free, vpath);
++ return TypedData_Wrap_Struct(artSVP, &art_rb_data_svp, vpath);
+ }
+ /*************************************************/
+
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/libart/src/rbart_uta.c ruby-gnome2-all-0.90.4/libart/src/rbart_uta.c
+--- ruby-gnome2-all-0.90.4.orig/libart/src/rbart_uta.c 2026-11-15 22:29:33.040979831 +0900
++++ ruby-gnome2-all-0.90.4/libart/src/rbart_uta.c 2026-11-17 15:37:18.860888261 +0900
+@@ -26,11 +26,18 @@ get_art_uta(r_obj)
+ return _SELF(r_obj);
+ }
+
++static const rb_data_type_t art_rb_data_uta = {
++ .wrap_struct_name = "Art::Uta",
++ .function = {
++ .dfree = (RUBY_DATA_FUNC)art_uta_free,
++ },
++};
++
+ VALUE
+ make_art_uta(art)
+ ArtUta *art;
+ {
+- return Data_Wrap_Struct(artUta, 0, art_uta_free, art);
++ return TypedData_Wrap_Struct(artUta, &art_rb_data_uta, art);
+ }
+ /*************************************************/
+
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/libart/src/rbart_vpath.c ruby-gnome2-all-0.90.4/libart/src/rbart_vpath.c
+--- ruby-gnome2-all-0.90.4.orig/libart/src/rbart_vpath.c 2026-11-15 22:29:33.040912143 +0900
++++ ruby-gnome2-all-0.90.4/libart/src/rbart_vpath.c 2026-11-17 15:38:17.294672115 +0900
+@@ -26,11 +26,18 @@ get_art_vpath(r_obj)
+ return Vpath_Ptr(r_obj);
+ }
+
++static const rb_data_type_t art_rb_data_vpath = {
++ .wrap_struct_name = "Art::Vpath",
++ .function = {
++ .dfree = art_free,
++ },
++};
++
+ VALUE
+ make_art_vpath(vpath)
+ ArtVpath *vpath;
+ {
+- return Data_Wrap_Struct(artVpath, 0, art_free, vpath);
++ return TypedData_Wrap_Struct(artVpath, &art_rb_data_vpath, vpath);
+ }
+ /*************************************************/
+
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' ruby-gnome2-all-0.90.4.orig/libart/src/rbart_vpathdash.c ruby-gnome2-all-0.90.4/libart/src/rbart_vpathdash.c
+--- ruby-gnome2-all-0.90.4.orig/libart/src/rbart_vpathdash.c 2026-11-15 22:29:33.041104765 +0900
++++ ruby-gnome2-all-0.90.4/libart/src/rbart_vpathdash.c 2026-11-17 15:40:35.961786123 +0900
+@@ -29,17 +29,25 @@ get_art_vpath_dash(r_obj)
+ }
+
+ static void
+-vpath_dash_free(ArtVpathDash *dash)
++vpath_dash_free(void *data)
+ {
++ ArtVpathDash *dash = data;
+ art_free(dash->dash);
+ art_free(dash);
+ }
+
++static const rb_data_type_t art_rb_data_vpath_dash = {
++ .wrap_struct_name = "Art::Vpath::Dash",
++ .function = {
++ .dfree = vpath_dash_free,
++ },
++};
++
+ VALUE
+ make_art_vpath_dash(dash)
+ ArtVpathDash *dash;
+ {
+- return Data_Wrap_Struct(artVpathDash, 0, vpath_dash_free, dash);
++ return TypedData_Wrap_Struct(artVpathDash, &art_rb_data_vpath_dash, dash);
+ }
+ /*************************************************/
+
+@@ -47,7 +55,7 @@ static VALUE
+ vpath_dash_s_allocate(klass)
+ VALUE klass;
+ {
+- return Data_Wrap_Struct(klass, 0, vpath_dash_free, 0);
++ return TypedData_Wrap_Struct(klass, &art_rb_data_vpath_dash, 0);
+ }
+
+ static VALUE
diff --git a/ruby-gnome2.spec b/ruby-gnome2.spec
index b1047ec..ed4bbdb 100644
--- a/ruby-gnome2.spec
+++ b/ruby-gnome2.spec
@@ -19,7 +19,7 @@ Version: 0.90.4
# When changing release number, please make it sure that
# the new EVR won't be higher than the one of higher branch!!
#
-Release: 28%{?dist}
+Release: 29%{?dist}
Summary: Ruby binding of libgnome/libgnomeui-2.x
# SPDX confirmed
@@ -33,6 +33,7 @@ Patch4: ruby-libart-arglength-fix.patch
Patch6: ruby-gnome2-rb_secure.patch
Patch14: ruby-gnome2-implicit-int-7.patch
Patch15: ruby-gnome2-c99.patch
+Patch16: ruby-gnome2-all-0.90.4-TypedData_API.patch
BuildRequires: make
@@ -354,6 +355,8 @@ grep -rl rb_cData . | xargs sed -i.ruby32 -e 's|rb_cData|rb_cObject|'
sed -i gnomevfs/src/gnomevfs-file.c \
-e 's|rb_tainted_str_new|rb_str_new|'
+%patch -P16 -p1
+
%build
export CFLAGS="$RPM_OPT_FLAGS -Werror=implicit-function-declaration"
ruby extconf.rb --vendor
@@ -456,6 +459,9 @@ rm -rf $RPM_BUILD_ROOT/bin
%changelog
+* Tue Nov 17 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.90.4-29
+- Use TypedData API needed for ruby4.1
+
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.90.4-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-17 6:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17 6:56 [rpms/ruby-gnome2] rawhide: Use TypedData API needed for ruby4.1 Mamoru TASAKA
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox