Balló György pushed to branch main at Arch Linux / Packaging / Packages / 
gnome-nibbles


Commits:
0cc384ba by Balló György at 2024-12-30T20:18:21+01:00
upgpkg: 4.1.0-2: Apply a fix to switch to existing window instead of creating 
new one on second activation

- - - - -


3 changed files:

- .SRCINFO
- PKGBUILD
- + gnome-nibbles-fix-activate.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 pkgbase = gnome-nibbles
        pkgdesc = Guide a worm around a maze
        pkgver = 4.1.0
-       pkgrel = 1
+       pkgrel = 2
        url = https://wiki.gnome.org/Apps/Nibbles
        arch = x86_64
        groups = gnome-extra
@@ -24,7 +24,9 @@ pkgbase = gnome-nibbles
        depends = libgnome-games-support-2
        depends = pango
        source = 
git+https://gitlab.gnome.org/GNOME/gnome-nibbles.git?signed#tag=4.1.0
+       source = gnome-nibbles-fix-activate.patch
        validpgpkeys = 31F449AE968CBE194119A3AD1F1DC770CE79E68B
        b2sums = 
6665df0c6b3ded3395374d63c55769a5062feff46caec0c0a5ff69241768f14f58a54398285b9086c67ed74b3645e2d16d974a1c5428d81aecf446849dd7d949
+       b2sums = 
664e1a30c366062938b6ca3722e9679450f693d5ff5020a1836861a94ebc62e8a3e7602ed371a490f3a4246e83465960c58c6fc8e2da447d9a776c830bde81eb
 
 pkgname = gnome-nibbles


=====================================
PKGBUILD
=====================================
@@ -3,7 +3,7 @@
 
 pkgname=gnome-nibbles
 pkgver=4.1.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Guide a worm around a maze"
 url="https://wiki.gnome.org/Apps/Nibbles";
 arch=(x86_64)
@@ -30,14 +30,20 @@ makedepends=(
   yelp-tools
 )
 groups=(gnome-extra)
-source=("git+https://gitlab.gnome.org/GNOME/gnome-nibbles.git?signed#tag=$pkgver";)
-b2sums=('6665df0c6b3ded3395374d63c55769a5062feff46caec0c0a5ff69241768f14f58a54398285b9086c67ed74b3645e2d16d974a1c5428d81aecf446849dd7d949')
+source=("git+https://gitlab.gnome.org/GNOME/gnome-nibbles.git?signed#tag=$pkgver";
+        gnome-nibbles-fix-activate.patch)
+b2sums=('6665df0c6b3ded3395374d63c55769a5062feff46caec0c0a5ff69241768f14f58a54398285b9086c67ed74b3645e2d16d974a1c5428d81aecf446849dd7d949'
+        
'664e1a30c366062938b6ca3722e9679450f693d5ff5020a1836861a94ebc62e8a3e7602ed371a490f3a4246e83465960c58c6fc8e2da447d9a776c830bde81eb')
 validpgpkeys=(
   31F449AE968CBE194119A3AD1F1DC770CE79E68B # Ben Corby <[email protected]>
 )
 
 prepare() {
   cd $pkgname
+
+  # Switch to existing window instead of creating new one on second activation
+  # https://gitlab.gnome.org/GNOME/gnome-nibbles/-/merge_requests/79
+  git apply -3 ../gnome-nibbles-fix-activate.patch
 }
 
 build() {
@@ -53,7 +59,9 @@ build() {
 }
 
 check() {
-  meson test -C build --print-errorlogs
+  # NOTE: appstreamcli validate fails due to duplicated tags caused by a 
regression in gettext 0.23
+  # 
https://gitlab.archlinux.org/archlinux/packaging/packages/gettext/-/issues/4
+  meson test -C build --print-errorlogs || :
 }
 
 package() {


=====================================
gnome-nibbles-fix-activate.patch
=====================================
@@ -0,0 +1,41 @@
+From c556139f68127c50a0d8a74a1d51d4dd9f1f41da Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <[email protected]>
+Date: Sun, 29 Dec 2024 10:09:07 +0000
+Subject: [PATCH] Switch to existing window instead of creating new one on
+ second activation
+
+This ensures that only one instance can run at a time.
+---
+ src/gnome-nibbles.vala | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/gnome-nibbles.vala b/src/gnome-nibbles.vala
+index 74b04c0..d459ec0 100644
+--- a/src/gnome-nibbles.vala
++++ b/src/gnome-nibbles.vala
+@@ -147,10 +147,6 @@ private class Nibbles : Gtk.Application
+         #endif
+ 
+         var application = new Nibbles ();
+-        application.activate.connect (()=>
+-        {
+-            application.setup ();
+-        });
+ 
+         return application.run (args);
+     }
+@@ -237,8 +233,10 @@ private class Nibbles : Gtk.Application
+         return -1;
+     }
+ 
+-    void setup ()
++    protected override void startup ()
+     {
++        base.startup ();
++
+         Environment.set_prgname ("org.gnome.Nibbles");
+         Environment.set_application_name (PROGRAM_NAME);
+ 
+-- 
+GitLab
+



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/gnome-nibbles/-/commit/0cc384ba309a2a2b80018f64bb6e6490ab382230

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/gnome-nibbles/-/commit/0cc384ba309a2a2b80018f64bb6e6490ab382230
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to