public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rubygem-opengl] rawhide: Use TypedData API needed for ruby4.1
Date: Mon, 02 Nov 2026 13:54:17 GMT	[thread overview]
Message-ID: <179362765708.1.13568518328058567841.rpms-rubygem-opengl-94b1411a595f@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rubygem-opengl
Branch : rawhide
Commit : 94b1411a595fd168ffa53baf28884a6af17faa60
Author : Mamoru TASAKA <mtasaka@fedoraproject.org>
Date   : 2026-11-02T22:54:00+09:00
Stats  : +54/-3 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rubygem-opengl/c/94b1411a595fd168ffa53baf28884a6af17faa60?branch=rawhide

Log:
Use TypedData API needed for ruby4.1

---
diff --git a/opengl-0.10.0-TypedData-API.patch b/opengl-0.10.0-TypedData-API.patch
new file mode 100644
index 0000000..15d6256
--- /dev/null
+++ b/opengl-0.10.0-TypedData-API.patch
@@ -0,0 +1,47 @@
+diff -urp '--exclude=*.o' '--exclude=*.so' '--exclude=*~' '--exclude=Makefile' opengl-0.10.0.orig/ext/opengl/glimpl.c opengl-0.10.0/ext/opengl/glimpl.c
+--- opengl-0.10.0.orig/ext/opengl/glimpl.c	2026-11-02 21:43:51.739151549 +0900
++++ opengl-0.10.0/ext/opengl/glimpl.c	2026-11-02 22:24:25.861161805 +0900
+@@ -111,8 +111,9 @@ static void *load_gl_function(VALUE self
+ }
+ 
+ static void
+-rb_glimpl_mark( struct glimpl *this )
++rb_glimpl_mark( void *data )
+ {
++  struct glimpl *this = data;
+   int i;
+   rb_gc_mark(this->current_sel_buffer);
+   rb_gc_mark(this->current_feed_buffer);
+@@ -132,13 +133,22 @@ rb_glimpl_mark( struct glimpl *this )
+   }
+ }
+ 
+-static void rb_glimpl_free( struct glimpl *this )
++static void rb_glimpl_free( void *data )
+ {
++  struct glimpl *this = data;
+   if(this->dl) gl_close_library(this->dl);
+   this->dl = NULL;
+   xfree(this);
+ }
+ 
++static const rb_data_type_t rb_data_glimpl = {
++  .wrap_struct_name = "OpenGL_glimpl",
++  .function = {
++    .dmark = rb_glimpl_mark,
++    .dfree = rb_glimpl_free,
++  },
++};
++
+ static VALUE
+ rb_glimpl_s_open(int argc, VALUE *argv, VALUE klass)
+ {
+@@ -152,7 +162,7 @@ rb_glimpl_s_open(int argc, VALUE *argv,
+ 
+   p_dl_name = StringValueCStr(dl_name);
+ 
+-  self = Data_Make_Struct( klass, struct glimpl, rb_glimpl_mark, rb_glimpl_free, this );
++  self = TypedData_Make_Struct( klass, struct glimpl, &rb_data_glimpl, this );
+ 
+   this->error_checking = Qtrue;
+   this->inside_begin_end = Qfalse;

diff --git a/rubygem-opengl.spec b/rubygem-opengl.spec
index 1aacc55..033f057 100644
--- a/rubygem-opengl.spec
+++ b/rubygem-opengl.spec
@@ -14,7 +14,7 @@
 
 Name:		rubygem-%{gem_name}
 Version:	0.10.0
-Release:	42%{?dist}
+Release:	43%{?dist}
 
 Summary:	An OpenGL wrapper for Ruby
 # SPDX confirmed
@@ -34,6 +34,8 @@ Patch0:	opengl-0.10.0-pointer-types.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=2303995#c20
 # Mesa 24.2.2 swrast with dril does not expose accum buffers anymore
 Patch1:	0001-Remove-requirement-for-accum-buffers.patch
+# Use TypedData API, needed for ruby 4.1
+Patch2:	opengl-0.10.0-TypedData-API.patch
 
 # MRI (CRuby) only
 BuildRequires:	gcc
@@ -83,9 +85,8 @@ sed -i.minitest \
 	lib/opengl/test_case.rb
 
 %patch -P0 -p1 -b .types
-%if 0%{?fedora} >= 41
 %patch -P1 -p1 -b .accum
-%endif
+%patch -P2 -p1 -b .typeddata
 
 %build
 gem build %{gem_name}.gemspec
@@ -183,6 +184,9 @@ popd
 %doc	%{gem_instdir}/utils/
 
 %changelog
+* Mon Nov 02 2026 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.10.0-43
+- Use TypedData API needed for ruby4.1
+
 * Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-42
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

                 reply	other threads:[~2026-11-02 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179362765708.1.13568518328058567841.rpms-rubygem-opengl-94b1411a595f@fedoraproject.org \
    --to=mtasaka@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox