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-libs/glib/files/, dev-libs/glib/
Date: Thu, 22 Sep 2022 04:13:42
Message-Id: 1663820005.bab72b72ddea0be05aa764df10093086e01cbc13.sam@gentoo
1 commit: bab72b72ddea0be05aa764df10093086e01cbc13
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 22 04:13:25 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 22 04:13:25 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bab72b72
7
8 dev-libs/glib: fix build w/ Clang
9
10 Closes: https://bugs.gentoo.org/871174
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 dev-libs/glib/files/glib-2.74.0-clang-build.patch | 26 +++++++++++++++++++++++
14 dev-libs/glib/glib-2.74.0.ebuild | 1 +
15 2 files changed, 27 insertions(+)
16
17 diff --git a/dev-libs/glib/files/glib-2.74.0-clang-build.patch b/dev-libs/glib/files/glib-2.74.0-clang-build.patch
18 new file mode 100644
19 index 000000000000..23bb0630d028
20 --- /dev/null
21 +++ b/dev-libs/glib/files/glib-2.74.0-clang-build.patch
22 @@ -0,0 +1,26 @@
23 +https://gitlab.gnome.org/GNOME/glib/-/commit/37dba1c425f6c3254e9ce72f1c4b7d0f95c2be3e
24 +https://bugs.gentoo.org/871174
25 +
26 +From: Kjell Ahlstedt <kjellahlstedt@×××××.com>
27 +Date: Thu, 15 Sep 2022 12:55:18 +0200
28 +Subject: [PATCH] gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for
29 + clang
30 +
31 +The clang compiler requires the static_assert expression to be an integral
32 +constant expression. `"text"` is not, but `sizeof "text"` is.
33 +
34 +Fixes #2740
35 +--- a/gio/gio-launch-desktop.c
36 ++++ b/gio/gio-launch-desktop.c
37 +@@ -121,8 +121,8 @@ journal_stream_fd (const char *identifier,
38 + /* Arbitrary large size for the sending buffer, from systemd */
39 + int large_buffer_size = 8 * 1024 * 1024;
40 +
41 +- G_STATIC_ASSERT (LOG_EMERG == 0 && "Linux ABI defines LOG_EMERG");
42 +- G_STATIC_ASSERT (LOG_DEBUG == 7 && "Linux ABI defines LOG_DEBUG");
43 ++ G_STATIC_ASSERT (LOG_EMERG == 0 && sizeof "Linux ABI defines LOG_EMERG");
44 ++ G_STATIC_ASSERT (LOG_DEBUG == 7 && sizeof "Linux ABI defines LOG_DEBUG");
45 +
46 + fd = socket (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
47 +
48 +GitLab
49
50 diff --git a/dev-libs/glib/glib-2.74.0.ebuild b/dev-libs/glib/glib-2.74.0.ebuild
51 index db17ff43554c..2afacc7da2a4 100644
52 --- a/dev-libs/glib/glib-2.74.0.ebuild
53 +++ b/dev-libs/glib/glib-2.74.0.ebuild
54 @@ -69,6 +69,7 @@ MULTILIB_CHOST_TOOLS=(
55
56 PATCHES=(
57 "${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
58 + "${FILESDIR}"/${P}-clang-build.patch
59 )
60
61 pkg_setup() {