Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/ruby-glib2/, dev-ruby/ruby-glib2/files/
Date: Sat, 18 Mar 2023 01:22:26
Message-Id: 1679102375.37370dd2b82721da4aedeeaaabafb10c12e89eac.sam@gentoo
1 commit: 37370dd2b82721da4aedeeaaabafb10c12e89eac
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 18 00:50:29 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 18 01:19:35 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37370dd2
7
8 dev-ruby/ruby-glib2: fix build w/ glib-2.76
9
10 Closes: https://bugs.gentoo.org/900921
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../files/ruby-glib2-3.5.1-glib-2.76.patch | 23 ++++++++++++++++++++
14 dev-ruby/ruby-glib2/ruby-glib2-3.5.1-r1.ebuild | 25 ++++++++++++++++++++++
15 2 files changed, 48 insertions(+)
16
17 diff --git a/dev-ruby/ruby-glib2/files/ruby-glib2-3.5.1-glib-2.76.patch b/dev-ruby/ruby-glib2/files/ruby-glib2-3.5.1-glib-2.76.patch
18 new file mode 100644
19 index 000000000000..b575530551c8
20 --- /dev/null
21 +++ b/dev-ruby/ruby-glib2/files/ruby-glib2-3.5.1-glib-2.76.patch
22 @@ -0,0 +1,23 @@
23 +https://bugs.gentoo.org/900921
24 +https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270087
25 +https://cgit.freebsd.org/ports/commit/?id=9a23b33ce95593af78f9b973c1fba4fa8835cc25
26 +
27 +--- a/ext/glib2/rbglib_bookmarkfile.c
28 ++++ b/ext/glib2/rbglib_bookmarkfile.c
29 +@@ -35,6 +35,7 @@ bookmarkfile_copy(const GBookmarkFile* file)
30 + return (GBookmarkFile*)file;
31 + }
32 +
33 ++#if !GLIB_CHECK_VERSION(2, 76, 0)
34 + static GType
35 + g_bookmark_file_get_type(void)
36 + {
37 +@@ -48,6 +49,7 @@ g_bookmark_file_get_type(void)
38 + /************************************************/
39 +
40 + #define G_TYPE_BOOKMARK_FILE (g_bookmark_file_get_type())
41 ++#endif
42 +
43 + #define RG_TARGET_NAMESPACE cBookmarkFile
44 + #define _SELF(self) ((GBookmarkFile*)(RVAL2BOXED(self, G_TYPE_BOOKMARK_FILE)))
45 +
46
47 diff --git a/dev-ruby/ruby-glib2/ruby-glib2-3.5.1-r1.ebuild b/dev-ruby/ruby-glib2/ruby-glib2-3.5.1-r1.ebuild
48 new file mode 100644
49 index 000000000000..1789b42c0dae
50 --- /dev/null
51 +++ b/dev-ruby/ruby-glib2/ruby-glib2-3.5.1-r1.ebuild
52 @@ -0,0 +1,25 @@
53 +# Copyright 1999-2023 Gentoo Authors
54 +# Distributed under the terms of the GNU General Public License v2
55 +
56 +EAPI=7
57 +USE_RUBY="ruby27 ruby30 ruby31 ruby32"
58 +
59 +inherit ruby-ng-gnome2
60 +
61 +DESCRIPTION="Ruby Glib2 bindings"
62 +KEYWORDS="~amd64 ~ppc ~ppc64 ~riscv ~x86"
63 +IUSE=""
64 +RDEPEND+=" >=dev-libs/glib-2"
65 +DEPEND+=" >=dev-libs/glib-2"
66 +
67 +PATCHES=(
68 + "${FILESDIR}"/${PN}-3.5.1-glib-2.76.patch
69 +)
70 +
71 +all_ruby_prepare() {
72 + ruby-ng-gnome2_all_ruby_prepare
73 +
74 + # Skip spawn tests since our sandbox also provides items in the
75 + # environment and this makes the test fragile.
76 + rm -v test/test-spawn.rb || die
77 +}