From d45ddbf27a7c3a524fc553c940961a74cef8e2a627d4688c4ab83205477776f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Wed, 26 Apr 2023 09:49:46 +0000 Subject: [PATCH 1/3] Accepting request 1082927 from home:manfred-h - Re-generate fix-new-cairo-select-tile.patch against the 3.38.3 sources - Add fix-new-cairo-select-tile.patch: Fix selecting a tile since cairo 1.17.8. Cairo 1.17.8 includes a fix for out of range coordinates which exposed a problem with the values used to translate the context in GameView.find_tile() (boo#1209827). https://gitlab.gnome.org/GNOME/gnome-mahjongg/-/merge_requests/35 OBS-URL: https://build.opensuse.org/request/show/1082927 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-mahjongg?expand=0&rev=59 --- fix-new-cairo-select-tile.patch | 35 +++++++++++++++++++++++++++++++++ gnome-mahjongg.changes | 15 ++++++++++++++ gnome-mahjongg.spec | 4 +++- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 fix-new-cairo-select-tile.patch diff --git a/fix-new-cairo-select-tile.patch b/fix-new-cairo-select-tile.patch new file mode 100644 index 0000000..834c2e6 --- /dev/null +++ b/fix-new-cairo-select-tile.patch @@ -0,0 +1,35 @@ +From be2e46cc68a865669e462449dd5331016a49e36c Mon Sep 17 00:00:00 2001 +From: Chris Mayo +Date: Tue, 18 Apr 2023 19:46:57 +0100 +Subject: [PATCH] Fix selecting a tile since cairo 1.17.8 + +cairo 1.17.8 includes a fix for out of range coordinates [1] which +exposed a problem with the values used to translate the +context in GameView.find_tile(). + +[1] 47a21c6e3 ("Clamp path coordinates", 2022-05-15) +--- + src/game-view.vala | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff -rup a/src/game-view.vala b/src/game-view.vala +--- a/src/game-view.vala 2020-11-01 10:39:32.693650200 +0100 ++++ b/src/game-view.vala 2023-04-26 09:28:48.415329449 +0200 +@@ -287,7 +287,7 @@ public class GameView : Gtk.DrawingArea + return false; + + /* Get the tile under the square */ +- var tile = find_tile ((uint) event.x, (uint) event.y); ++ var tile = find_tile (event.x, event.y); + + /* If not a valid tile then ignore the event */ + if (tile == null || !game.tile_can_move (tile)) +@@ -325,7 +325,7 @@ public class GameView : Gtk.DrawingArea + return false; + } + +- private Tile? find_tile (uint x, uint y) ++ private Tile? find_tile (double x, double y) + { + /* Render a 1x1 image where the cursor is using a different color for each tile */ + var surface = new Cairo.ImageSurface (Cairo.Format.RGB24, 1, 1); diff --git a/gnome-mahjongg.changes b/gnome-mahjongg.changes index 84dd973..3563a77 100644 --- a/gnome-mahjongg.changes +++ b/gnome-mahjongg.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed Apr 26 09:03:28 UTC 2023 - Manfred Hollstein + +- Re-generate fix-new-cairo-select-tile.patch against the 3.38.3 + sources + +------------------------------------------------------------------- +Sun Apr 23 20:04:39 UTC 2023 - Bjørn Lie + +- Add fix-new-cairo-select-tile.patch: Fix selecting a tile since + cairo 1.17.8. Cairo 1.17.8 includes a fix for out of range + coordinates which exposed a problem with the values used to + translate the context in GameView.find_tile() (boo#1209827). + https://gitlab.gnome.org/GNOME/gnome-mahjongg/-/merge_requests/35 + ------------------------------------------------------------------- Wed Feb 2 15:43:11 UTC 2022 - Bjørn Lie diff --git a/gnome-mahjongg.spec b/gnome-mahjongg.spec index 350713d..8060fab 100644 --- a/gnome-mahjongg.spec +++ b/gnome-mahjongg.spec @@ -1,7 +1,7 @@ # # spec file for package gnome-mahjongg # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ URL: https://live.gnome.org/GnomeMahongg Source0: https://download.gnome.org/sources/gnome-mahjongg/3.38/%{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM 26.patch -- Fix build with meson 0.60 and newer Patch0: https://gitlab.gnome.org/GNOME/gnome-mahjongg/-/merge_requests/26.patch +# PATCH-FIX-UPSTREAM fix-new-cairo-select-tile.patch -- Fix selecting a tile since cairo 1.17.8 +Patch1: fix-new-cairo-select-tile.patch BuildRequires: fdupes BuildRequires: hicolor-icon-theme From b262476f6992af20d20dc48a497350952577141e04e5ed21a7a641f080510334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Wed, 26 Apr 2023 09:51:58 +0000 Subject: [PATCH 2/3] Refresh patch OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-mahjongg?expand=0&rev=60 --- 26.patch | 10 +++++----- gnome-mahjongg.changes | 6 ++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/26.patch b/26.patch index 1fb5e58..32ed9a4 100644 --- a/26.patch +++ b/26.patch @@ -1,4 +1,4 @@ -From 7604f8c8311f1088293596e639fefafdbeb73235 Mon Sep 17 00:00:00 2001 +From a2037b0747163601a5d5b57856d037eecf3a4db7 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Mon, 24 Jan 2022 11:22:48 +0000 Subject: [PATCH] meson: drop unused argument for i18n.merge_file() @@ -12,18 +12,18 @@ data/meson.build:45:0: ERROR: Function does not take positional arguments. 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/meson.build b/data/meson.build -index 8325c1b..063e839 100644 +index 8740503..edb8583 100644 --- a/data/meson.build +++ b/data/meson.build -@@ -22,7 +22,6 @@ install_data ('smooth.png', install_dir: join_paths (pkgdatadir, 'themes')) - install_data ('edu_kang_xi.png', install_dir: join_paths (pkgdatadir, 'themes')) +@@ -21,7 +21,6 @@ install_data ('edu_kang_xi.png', install_dir: join_paths (pkgdatadir, 'themes')) + install_data ('maya.png', install_dir: join_paths (pkgdatadir, 'themes')) desktop_file = i18n.merge_file ( - 'desktop-file', input: 'org.gnome.Mahjongg.desktop.in', output: 'org.gnome.Mahjongg.desktop', install: true, -@@ -42,7 +41,7 @@ if desktop_file_validate.found() +@@ -41,7 +40,7 @@ if desktop_file_validate.found() ) endif diff --git a/gnome-mahjongg.changes b/gnome-mahjongg.changes index 3563a77..a1ca9bd 100644 --- a/gnome-mahjongg.changes +++ b/gnome-mahjongg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 26 09:50:24 UTC 2023 - Bjørn Lie + +- Redownload 26.patch from upstream, changed since it is now + checked-in upstream, and we added pre check-in. + ------------------------------------------------------------------- Wed Apr 26 09:03:28 UTC 2023 - Manfred Hollstein From eb69fbffa627f3d015f2b8c9d74d5a4cc53f1f2ad6df9b26804b158eaf653591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Wed, 26 Apr 2023 10:48:26 +0000 Subject: [PATCH 3/3] Bah... OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-mahjongg?expand=0&rev=61 --- 26.patch | 17 +++++++---------- gnome-mahjongg.changes | 4 +++- gnome-mahjongg.spec | 4 ++-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/26.patch b/26.patch index 32ed9a4..0d28de2 100644 --- a/26.patch +++ b/26.patch @@ -11,19 +11,19 @@ data/meson.build:45:0: ERROR: Function does not take positional arguments. data/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -diff --git a/data/meson.build b/data/meson.build -index 8740503..edb8583 100644 ---- a/data/meson.build -+++ b/data/meson.build -@@ -21,7 +21,6 @@ install_data ('edu_kang_xi.png', install_dir: join_paths (pkgdatadir, 'themes')) - install_data ('maya.png', install_dir: join_paths (pkgdatadir, 'themes')) +Index: gnome-mahjongg-3.38.3/data/meson.build +=================================================================== +--- gnome-mahjongg-3.38.3.orig/data/meson.build ++++ gnome-mahjongg-3.38.3/data/meson.build +@@ -22,7 +22,6 @@ install_data ('smooth.png', install_dir: + install_data ('edu_kang_xi.png', install_dir: join_paths (pkgdatadir, 'themes')) desktop_file = i18n.merge_file ( - 'desktop-file', input: 'org.gnome.Mahjongg.desktop.in', output: 'org.gnome.Mahjongg.desktop', install: true, -@@ -41,7 +40,7 @@ if desktop_file_validate.found() +@@ -42,7 +41,7 @@ if desktop_file_validate.found() ) endif @@ -32,6 +32,3 @@ index 8740503..edb8583 100644 input: 'org.gnome.Mahjongg.appdata.xml.in', output: 'org.gnome.Mahjongg.appdata.xml', install: true, --- -GitLab - diff --git a/gnome-mahjongg.changes b/gnome-mahjongg.changes index a1ca9bd..545dda8 100644 --- a/gnome-mahjongg.changes +++ b/gnome-mahjongg.changes @@ -2,7 +2,9 @@ Wed Apr 26 09:50:24 UTC 2023 - Bjørn Lie - Redownload 26.patch from upstream, changed since it is now - checked-in upstream, and we added pre check-in. + checked-in upstream, and we added pre check-in. However this + leads to a need for rebase, do so, and no longer link to the + patch upstream in spec. ------------------------------------------------------------------- Wed Apr 26 09:03:28 UTC 2023 - Manfred Hollstein diff --git a/gnome-mahjongg.spec b/gnome-mahjongg.spec index 8060fab..c68d92f 100644 --- a/gnome-mahjongg.spec +++ b/gnome-mahjongg.spec @@ -24,8 +24,8 @@ License: GPL-2.0-or-later Group: Amusements/Games/Board/Puzzle URL: https://live.gnome.org/GnomeMahongg Source0: https://download.gnome.org/sources/gnome-mahjongg/3.38/%{name}-%{version}.tar.xz -# PATCH-FIX-UPSTREAM 26.patch -- Fix build with meson 0.60 and newer -Patch0: https://gitlab.gnome.org/GNOME/gnome-mahjongg/-/merge_requests/26.patch +# PATCH-FIX-UPSTREAM https://gitlab.gnome.org/GNOME/gnome-mahjongg/-/merge_requests/26.patch -- Fix build with meson 0.60 and newer +Patch0: 26.patch # PATCH-FIX-UPSTREAM fix-new-cairo-select-tile.patch -- Fix selecting a tile since cairo 1.17.8 Patch1: fix-new-cairo-select-tile.patch