From 9b76dee78fe5ee80050e55b0506a38aad676eff0425f11684d1073fda0b63588 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 12 Sep 2023 08:21:48 +0000 Subject: [PATCH] Accepting request 1109857 from GNOME:Next Pushing GNOME 45.rc packages OBS-URL: https://build.opensuse.org/request/show/1109857 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/polari?expand=0&rev=123 --- 41256a58.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ polari.changes | 7 +++++++ polari.spec | 5 ++++- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 41256a58.patch diff --git a/41256a58.patch b/41256a58.patch new file mode 100644 index 0000000..e4c6b9a --- /dev/null +++ b/41256a58.patch @@ -0,0 +1,52 @@ +From 41256a5842dc9d95494bf0bbd6e97875b817197f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Fri, 16 Jun 2023 21:40:24 +0200 +Subject: [PATCH] build: Only define GjsContext autocleanup if necessary + +Gjs now calls G_DEFINE_AUTOPTR_CLEANUP_FUNC itself, so only define +it for older versions to avoid a compiler warning. + +Part-of: +--- + meson.build | 8 ++++++++ + src/polari.c | 2 ++ + 2 files changed, 10 insertions(+) + +diff --git a/meson.build b/meson.build +index b667f931..a2f74160 100644 +--- a/meson.build ++++ b/meson.build +@@ -42,8 +42,16 @@ conf = configuration_data() + conf.set_quoted('PKGLIBDIR', pkglibdir) + + cc = meson.get_compiler('c') ++gjs_has_autocleanup = cc.compiles( ++''' ++#include ++void main(void) { g_autoptr(GjsContext) context = NULL; } ++''', ++ dependencies: [gjs]) ++ + conf.set('HAVE_STRCASESTR', cc.has_function('strcasestr')) + conf.set('SNAPSHOT', get_option('snapshot')) ++conf.set('GJS_HAS_AUTOCLEANUP', gjs_has_autocleanup) + + config_h = declare_dependency( + sources: configure_file( +diff --git a/src/polari.c b/src/polari.c +index 8cb9d454..8f3ddc18 100644 +--- a/src/polari.c ++++ b/src/polari.c +@@ -3,7 +3,9 @@ + + #include "config.h" + ++#ifndef GJS_HAS_AUTOCLEANUP + G_DEFINE_AUTOPTR_CLEANUP_FUNC (GjsContext, g_object_unref) ++#endif + + #define JS_MAIN "resource:///org/gnome/Polari/js/main.js" + +-- +GitLab + diff --git a/polari.changes b/polari.changes index 1594622..3b99484 100644 --- a/polari.changes +++ b/polari.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jul 11 17:53:48 UTC 2023 - Bjørn Lie + +- Add 41256a58.patch: build: Only define GjsContext autocleanup if + necessary. Gjs now calls G_DEFINE_AUTOPTR_CLEANUP_FUNC itself, so + only define it for older versions to avoid a compiler warning. + ------------------------------------------------------------------- Mon Oct 10 20:52:47 UTC 2022 - Bjørn Lie diff --git a/polari.spec b/polari.spec index 3db57d6..412425e 100644 --- a/polari.spec +++ b/polari.spec @@ -1,7 +1,7 @@ # # spec file for package polari # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2013 Dominique Leuenberger, Amsterdam, The Netherlands # # All modifications and additions to the file contributed by third parties @@ -26,6 +26,9 @@ Group: Productivity/Networking/IRC URL: https://wiki.gnome.org/Apps/Polari Source0: https://download.gnome.org/sources/polari/43/%{name}-%{version}.tar.xz Source99: polari-rpmlintrc +# PATCH-FIX-UPSTREAM 41256a58.patch -- build: Only define GjsContext autocleanup if necessary +Patch1: https://gitlab.gnome.org/GNOME/polari/-/commit/41256a58.patch + BuildRequires: appstream-glib BuildRequires: desktop-file-utils