diff options
author | Sam James <sam@gentoo.org> | 2024-03-17 03:54:07 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-03-17 03:54:07 +0000 |
commit | 7b6faa8581ee570c3256f6700db984f394d87748 (patch) | |
tree | 4eabc63c5f91042a3cf57b71df9471f615593e28 /dev-ruby/ruby-gtk3 | |
parent | net-analyzer/fping: fix modern C issue / musl build (diff) | |
download | gentoo-7b6faa8581ee570c3256f6700db984f394d87748.tar.gz gentoo-7b6faa8581ee570c3256f6700db984f394d87748.tar.bz2 gentoo-7b6faa8581ee570c3256f6700db984f394d87748.zip |
dev-ruby/ruby-gtk3: fix modern C issue
Closes: https://bugs.gentoo.org/921145
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ruby/ruby-gtk3')
-rw-r--r-- | dev-ruby/ruby-gtk3/files/ruby-gtk3-4.1.2-c99.patch | 29 | ||||
-rw-r--r-- | dev-ruby/ruby-gtk3/ruby-gtk3-4.1.2-r1.ebuild | 34 |
2 files changed, 63 insertions, 0 deletions
diff --git a/dev-ruby/ruby-gtk3/files/ruby-gtk3-4.1.2-c99.patch b/dev-ruby/ruby-gtk3/files/ruby-gtk3-4.1.2-c99.patch new file mode 100644 index 000000000000..0da13a4a6344 --- /dev/null +++ b/dev-ruby/ruby-gtk3/files/ruby-gtk3-4.1.2-c99.patch @@ -0,0 +1,29 @@ +https://bugs.gentoo.org/921145 +https://github.com/ruby-gnome/ruby-gnome/commit/c196bf19a5d6a395011a90c3d1cb8f039d15824d + +From c196bf19a5d6a395011a90c3d1cb8f039d15824d Mon Sep 17 00:00:00 2001 +From: Sutou Kouhei <kou@clear-code.com> +Date: Sat, 19 Aug 2023 15:45:46 +0900 +Subject: [PATCH] gtk3: fix a wrong type warning + + compiling rb-gtk3-spin-button.c + rb-gtk3-spin-button.c:70:15: warning: incompatible function pointer types passing 'VALUE (VALUE)' (aka 'unsigned long (unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types] + rb_gtk3_spin_button_input_rescue, (VALUE)&input_data); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + /Users/runner/hostedtoolcache/Ruby/3.2.2/x64/include/ruby-3.2.0/ruby/internal/iterator.h:364:62: note: passing argument to parameter 'r_proc' here + VALUE rb_rescue(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2); + ^ + +Reported by MATSUMOTO Katsuyoshi. Thanks!!! +--- a/ext/gtk3/rb-gtk3-spin-button.c ++++ b/ext/gtk3/rb-gtk3-spin-button.c +@@ -46,7 +46,7 @@ rb_gtk3_spin_button_input_body(VALUE user_data) + } + + static VALUE +-rb_gtk3_spin_button_input_rescue(VALUE user_data) ++rb_gtk3_spin_button_input_rescue(VALUE user_data, VALUE error) + { + InputData *input_data = (InputData *)user_data; + g_value_set_int(input_data->data->return_value, GTK_INPUT_ERROR); + diff --git a/dev-ruby/ruby-gtk3/ruby-gtk3-4.1.2-r1.ebuild b/dev-ruby/ruby-gtk3/ruby-gtk3-4.1.2-r1.ebuild new file mode 100644 index 000000000000..0410d6b9acb2 --- /dev/null +++ b/dev-ruby/ruby-gtk3/ruby-gtk3-4.1.2-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +USE_RUBY="ruby27 ruby30 ruby31 ruby32" + +RUBY_GNOME2_NEED_VIRTX=yes + +inherit ruby-ng-gnome2 + +DESCRIPTION="Ruby Gtk2 bindings" +KEYWORDS="~amd64 ~ppc ~riscv ~x86" +IUSE="" + +DEPEND+=" dev-libs/glib + dev-libs/gobject-introspection + x11-base/xorg-proto + x11-libs/gtk+:3" +RDEPEND+=" dev-libs/glib + dev-libs/gobject-introspection + x11-libs/gtk+:3" + +ruby_add_rdepend " + ~dev-ruby/ruby-atk-${PV} + ~dev-ruby/ruby-gdk3-${PV}" +ruby_add_bdepend " + ~dev-ruby/ruby-cairo-gobject-${PV} + ~dev-ruby/ruby-glib2-${PV} + ~dev-ruby/ruby-gobject-introspection-${PV} + ~dev-ruby/ruby-pango-${PV}" + +PATCHES=( + "${FILESDIR}"/ruby-gtk3-4.1.2-c99.patch +) |