Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xviewer for openSUSE:Factory checked 
in at 2026-04-18 21:35:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xviewer (Old)
 and      /work/SRC/openSUSE:Factory/.xviewer.new.11940 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xviewer"

Sat Apr 18 21:35:06 2026 rev:29 rq:1347835 version:3.4.16

Changes:
--------
--- /work/SRC/openSUSE:Factory/xviewer/xviewer.changes  2026-03-27 
06:52:53.406342142 +0100
+++ /work/SRC/openSUSE:Factory/.xviewer.new.11940/xviewer.changes       
2026-04-18 21:35:16.582877155 +0200
@@ -1,0 +2,8 @@
+Thu Apr 16 14:58:10 UTC 2026 - Bjørn Lie <[email protected]>
+
+- Add 74d7d4ba2584c658ae6fb87208543671664943cc.patch: build: Add
+  support for GIRepository-2.0 (future). Add explicit
+  pkgconfig(gobject-introspection-1.0) BuildRequires for now, as
+  libpeas1 still builds against that one.
+
+-------------------------------------------------------------------

New:
----
  74d7d4ba2584c658ae6fb87208543671664943cc.patch

----------(New B)----------
  New:
- Add 74d7d4ba2584c658ae6fb87208543671664943cc.patch: build: Add
  support for GIRepository-2.0 (future). Add explicit
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xviewer.spec ++++++
--- /var/tmp/diff_new_pack.ToGGef/_old  2026-04-18 21:35:17.294906174 +0200
+++ /var/tmp/diff_new_pack.ToGGef/_new  2026-04-18 21:35:17.298906336 +0200
@@ -23,6 +23,7 @@
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later
 URL:            https://github.com/linuxmint/xviewer
 Source:         %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Patch:          %{url}/commit/74d7d4ba2584c658ae6fb87208543671664943cc.patch
 BuildRequires:  cmake
 BuildRequires:  fdupes
 BuildRequires:  hicolor-icon-theme
@@ -34,6 +35,7 @@
 BuildRequires:  pkgconfig(exempi-2.0)
 BuildRequires:  pkgconfig(gio-unix-2.0)
 BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(gobject-introspection-1.0)
 BuildRequires:  pkgconfig(gtk+-3.0)
 BuildRequires:  pkgconfig(gtk-doc)
 BuildRequires:  pkgconfig(lcms2)
@@ -78,7 +80,7 @@
 %lang_package
 
 %prep
-%autosetup
+%autosetup -p1
 
 %build
 %meson \

++++++ 74d7d4ba2584c658ae6fb87208543671664943cc.patch ++++++
>From 74d7d4ba2584c658ae6fb87208543671664943cc Mon Sep 17 00:00:00 2001
From: Michael Webster <[email protected]>
Date: Mon, 13 Apr 2026 11:17:22 -0400
Subject: [PATCH] build: Add support for GIRepository-2.0.

Needed for libpeas-based plugins.
---
 debian/control              |  2 +-
 meson.build                 | 13 +++++++++++--
 src/main.c                  |  8 ++++++++
 src/meson.build             |  1 +
 src/xviewer-plugin-engine.c | 35 +++++++++++++++++++++++++++++++++++
 5 files changed, 56 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index 3340437e..ac670b64 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Build-Depends: debhelper-compat (= 12),
                libexempi-dev (>= 1.99.5),
                libexif-dev (>= 0.6.14),
                libgdk-pixbuf-xlib-2.0-dev,
-               libgirepository1.0-dev (>= 0.9.12),
+               libgirepository1.0-dev (>= 0.9.12) | libgirepository-2.0-dev,
                libglib2.0-dev (>= 2.38.0),
                libgtk-3-dev,
                libjpeg-dev,
diff --git a/meson.build b/meson.build
index 7ee19ac8..f4ebfcfd 100644
--- a/meson.build
+++ b/meson.build
@@ -34,20 +34,29 @@ gnome = import('gnome')
 i18n = import('i18n')
 pkgconfig = import('pkgconfig')
 
+cc = meson.get_compiler('c')
+
 # dependencies
 gio_unix = dependency('gio-unix-2.0', version: '>= 2.38.0')
 glib = dependency('glib-2.0', version: '>= 2.38.0')
 gtk = dependency('gtk+-3.0')
 libpeas = dependency('libpeas-1.0', version: '>= 0.7.4')
 libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 0.7.4')
+
+use_gir20 = cc.has_header('girepository/girepository.h', dependencies: libpeas)
+if use_gir20
+    gi = dependency('girepository-2.0')
+else
+    gi = dependency('gobject-introspection-1.0', version: '>= 0.9.2')
+endif
+xviewer_conf.set10('USE_GIR20', use_gir20)
+
 pixbuf = dependency('gdk-pixbuf-2.0', version: '>= 2.19.1')
 X11 = dependency('x11')
 zlib = dependency('zlib')
 cinnamon_desktop = dependency('cinnamon-desktop', version: '>= 3.2.0')
 xapp = dependency('xapp', version: '>= 2.5.0')
 
-cc = meson.get_compiler('c')
-
 # on some systems we need to find the math lib to make sure it builds
 math = cc.find_library('m', required: false)
 
diff --git a/src/main.c b/src/main.c
index eaf7fcb3..2745d2cf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -27,8 +27,12 @@
 #include "config.h"
 #endif
 #ifdef HAVE_INTROSPECTION
+#if USE_GIR20
+#include <girepository/girepository.h>
+#else
 #include <girepository.h>
 #endif
+#endif
 
 #include "xviewer-application.h"
 #include "xviewer-application-internal.h"
@@ -102,7 +106,11 @@ main (int argc, char **argv)
         * Using gtk_get_option_group here initializes gtk during parsing */
        g_option_context_add_group (ctx, gtk_get_option_group (FALSE));
 #ifdef HAVE_INTROSPECTION
+#if USE_GIR20
+       g_option_context_add_group (ctx, gi_repository_get_option_group ());
+#else
        g_option_context_add_group (ctx, g_irepository_get_option_group ());
+#endif
 #endif
 
        if (!g_option_context_parse (ctx, &argc, &argv, &error)) {
diff --git a/src/meson.build b/src/meson.build
index c597ce92..e046348a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -131,6 +131,7 @@ xviewer_resources = gnome.compile_resources(
 
 xviewer_deps = [
     config_h,
+    gi,
     gio_unix,
     glib,
     gtk,
diff --git a/src/xviewer-plugin-engine.c b/src/xviewer-plugin-engine.c
index 8feb747a..3671fdbb 100644
--- a/src/xviewer-plugin-engine.c
+++ b/src/xviewer-plugin-engine.c
@@ -34,7 +34,12 @@
 #include <glib/gi18n.h>
 #include <glib.h>
 #include <gio/gio.h>
+
+#if USE_GIR20
+#include <girepository/girepository.h>
+#else
 #include <girepository.h>
+#endif
 
 #define XVIEWER_PLUGIN_DATA_DIR XVIEWER_DATA_DIR G_DIR_SEPARATOR_S "plugins"
 
@@ -86,6 +91,35 @@ xviewer_plugin_engine_new (void)
        GError *error = NULL;
 
        /* This should be moved to libpeas */
+#if USE_GIR20
+       GIRepository *repo = gi_repository_dup_default ();
+
+       if (gi_repository_require (repo, "Peas", "1.0", 0, &error) == NULL)
+       {
+               g_warning ("Error loading Peas typelib: %s\n",
+                          error->message);
+               g_clear_error (&error);
+       }
+
+       if (gi_repository_require (repo, "PeasGtk", "1.0", 0, &error) == NULL)
+       {
+               g_warning ("Error loading PeasGtk typelib: %s\n",
+                          error->message);
+               g_clear_error (&error);
+       }
+
+       typelib_path = g_build_filename (LIBDIR, "xviewer", "girepository-1.0", 
NULL);
+
+       if (gi_repository_require_private (repo, typelib_path,
+                                          "Xviewer", "3.0", 0, &error) == NULL)
+       {
+               g_warning ("Error loading Xviewer typelib: %s\n",
+                          error->message);
+               g_clear_error (&error);
+       }
+
+       g_object_unref (repo);
+#else
        if (g_irepository_require (g_irepository_get_default (),
                                   "Peas", "1.0", 0, &error) == NULL)
        {
@@ -112,6 +146,7 @@ xviewer_plugin_engine_new (void)
                           error->message);
                g_clear_error (&error);
        }
+#endif
 
        engine = XVIEWER_PLUGIN_ENGINE (g_object_new 
(XVIEWER_TYPE_PLUGIN_ENGINE,
                                                  NULL));

Reply via email to