diff options
Diffstat (limited to 'games-arcade/gnome-nibbles')
4 files changed, 253 insertions, 1 deletions
diff --git a/games-arcade/gnome-nibbles/Manifest b/games-arcade/gnome-nibbles/Manifest index e9b72df374ee..14fc11c972ff 100644 --- a/games-arcade/gnome-nibbles/Manifest +++ b/games-arcade/gnome-nibbles/Manifest @@ -1,6 +1,8 @@ AUX 3.36.0-drop-unnecessary-files.patch 877 BLAKE2B f9ca65d20efbf9b40220274881328584803f0395f233062d395c21ca0192399855b78ac7e7da7ee72d08a16736bd62bbc5670f6abbaa1c98500fb4f82917c66d SHA512 9435b8aa2caf1f9cd058ed5fbda629237c67cd9ff161be57947612ed093498d3060b9130e608211b174323a83ba18d528c606a50e8cc156aa394f192a1192d93 +AUX gnome-nibbles-3.38.2-vala-0.50.4-GtkChild-1.patch 3661 BLAKE2B c62908420b4b674a763dc2554c4ed73319bb7e58e4d4f50d1ac0e87c2fda0219415a8335c1f0c1b39c8b61de461168303f34e7ab1eb6c58f44c279411675e301 SHA512 366cfb89ce6923573c66d67cbedfae11f400790a366314a77f1197734ab2ee0760418b9e3d3eb4f7a6105bb63a918f3894b452f4aae68a0a87e03704de410aa7 +AUX gnome-nibbles-3.38.2-vala-0.50.4-GtkChild-2.patch 7404 BLAKE2B b2bca8d4d93776a84b3853973cb88a1a9ab58d4ab3d78e5c0556b2557abeaeb5cc43643e25666484b9a66aa46d091abc45be18cfa5f4e2574251ae2b60451a39 SHA512 ebbae48d19a6cb7ac782db0cb57e29cde233c4f24d5d94c05203347065e0c22c6dcebb0f0202d2bc71ca0081675565f18b145dc58ebd630a30b85c4d9de4de98 DIST gnome-nibbles-3.36.1.tar.xz 323740 BLAKE2B d862900d6419505888bf3f416bb52af60186d6a3f7cb8fb52dc48fb94c3a1b99f80d262455aee335435cfef7c1573fa550d0f7595487757784a44d5e15192c3d SHA512 f7fd5c70a2ebd91d21bde26362777cecbb05bf352c13489596cbf4699f88bf93ee630a1420e91d5929ebaf05271a9006440060182d4aab9801a293559b3f2a77 DIST gnome-nibbles-3.38.2.tar.xz 337680 BLAKE2B 96ca3794d72f600608b049aafe83808e917ec8e8462b19d31af36f2570e6c3fc8b3c9e85cbaa4ec9f041ecb934aa99701d13fcf232c447f5a4f51e6a98a66173 SHA512 e0146e33efa20ca48131be76a7f1738f8e3e2503a152c879e1d0d6accb091f9c4cb36c6d3009ca824bf6c4ac0ff5249b17e6423919c615992f0c4bef6dfcd601 EBUILD gnome-nibbles-3.36.1.ebuild 1007 BLAKE2B d74c0856895eb79a5bd249cf52d7441b716806fea21e7f826edc010d573f3eebf33837e8fcf64a505eb98d933be2415174a84e9fdf13d0bb0302a85f9b6fea77 SHA512 c5986d5c5a7e56c0d5285c798b5c191d33f3e3139cf30cf650ca4dbd235217f2372a152952dd08263c4d77fc1a6a2741cba2c21141c39d4a8bbb207386c9cf41 -EBUILD gnome-nibbles-3.38.2.ebuild 933 BLAKE2B 07330969f5ab2ae8674810902089f7825a6961f3b8560cbb857798c9e943504d78d8b848c14e34b58851ff424338f3182658963081c26cf14c4deaff2fcbfc0f SHA512 96d7b3f291615bff49a937f82971d2569044702a57c52a0dbbc4bbaf1893eb8229fad49ae9abc5adf7da52afa4ef7fe5d3aa9c48811cf199a82e1bb296c7986c +EBUILD gnome-nibbles-3.38.2.ebuild 1117 BLAKE2B 47f64d35c5133cc29f66121028d26fbed889b3c017852ebcf6af634ff3c0656dd1c25ebf8a1171eb62f7429a1e12e3e44600176c3d55b865787e4b26cde92ab4 SHA512 f699f7d5b015cedc69df1e24aa279e65b7df870c8085c06965f8742fed0629507ca476a6c56a30708b2ca740a51bfc9b15ed6b9398af5821026b4f3203133bf3 MISC metadata.xml 249 BLAKE2B e71e1b95fee768c696704acbf7e3cf0e599ed2bc8de92bae0141d1194ef9e842bdc292798904487a9b90ddfda9b0e84abd3b76b1518576c1d288240e4e46f110 SHA512 c40662134899a5c9f0369a1017806f35adf3280a0b3c91726f7a8ca6012a073a8b471583f5bfb6fe95faac1dcf607e8e2e43f8c91d48ec46f4a8824e2f551506 diff --git a/games-arcade/gnome-nibbles/files/gnome-nibbles-3.38.2-vala-0.50.4-GtkChild-1.patch b/games-arcade/gnome-nibbles/files/gnome-nibbles-3.38.2-vala-0.50.4-GtkChild-1.patch new file mode 100644 index 000000000000..c7a86316925e --- /dev/null +++ b/games-arcade/gnome-nibbles/files/gnome-nibbles-3.38.2-vala-0.50.4-GtkChild-1.patch @@ -0,0 +1,66 @@ +From 1b48446068608aff9b5edf1fdbd4b8c0d9f0be94 Mon Sep 17 00:00:00 2001 +From: Rico Tzschichholz <ricotz@ubuntu.com> +Date: Sat, 16 Jan 2021 13:56:10 +0100 +Subject: [PATCH] Don't alter or try to write [GtkChild] fields + +See https://gitlab.gnome.org/GNOME/vala/issues/1121 +--- + src/controls.vala | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +diff --git a/src/controls.vala b/src/controls.vala +index 4f07358..584c9ff 100644 +--- a/src/controls.vala ++++ b/src/controls.vala +@@ -140,25 +140,25 @@ private class ControlsGrid : Button + arrow_left.set_from_pixbuf (arrow.rotate_simple (Gdk.PixbufRotation.COUNTERCLOCKWISE)); + arrow_right.set_from_pixbuf (arrow.rotate_simple (Gdk.PixbufRotation.CLOCKWISE)); + +- up_handler = worm_props.notify ["up"].connect (() => configure_label (worm_props.up, ref move_up_label)); +- down_handler = worm_props.notify ["down"].connect (() => configure_label (worm_props.down, ref move_down_label)); +- left_handler = worm_props.notify ["left"].connect (() => configure_label (worm_props.left, ref move_left_label)); +- right_handler = worm_props.notify ["right"].connect (() => configure_label (worm_props.right, ref move_right_label)); +- +- configure_label (worm_props.up, ref move_up_label); +- configure_label (worm_props.down, ref move_down_label); +- configure_label (worm_props.left, ref move_left_label); +- configure_label (worm_props.right, ref move_right_label); ++ up_handler = worm_props.notify ["up"].connect (() => configure_label (worm_props.up, move_up_label)); ++ down_handler = worm_props.notify ["down"].connect (() => configure_label (worm_props.down, move_down_label)); ++ left_handler = worm_props.notify ["left"].connect (() => configure_label (worm_props.left, move_left_label)); ++ right_handler = worm_props.notify ["right"].connect (() => configure_label (worm_props.right, move_right_label)); ++ ++ configure_label (worm_props.up, move_up_label); ++ configure_label (worm_props.down, move_down_label); ++ configure_label (worm_props.left, move_left_label); ++ configure_label (worm_props.right, move_right_label); + } + + internal void mark_duplicated_keys (GenericSet<uint> duplicate_keys) + { +- set_duplicate_class (worm_props.up in duplicate_keys, ref move_up_label); +- set_duplicate_class (worm_props.down in duplicate_keys, ref move_down_label); +- set_duplicate_class (worm_props.left in duplicate_keys, ref move_left_label); +- set_duplicate_class (worm_props.right in duplicate_keys, ref move_right_label); ++ set_duplicate_class (worm_props.up in duplicate_keys, move_up_label); ++ set_duplicate_class (worm_props.down in duplicate_keys, move_down_label); ++ set_duplicate_class (worm_props.left in duplicate_keys, move_left_label); ++ set_duplicate_class (worm_props.right in duplicate_keys, move_right_label); + } +- private static void set_duplicate_class (bool new_value, ref Label label) ++ private static void set_duplicate_class (bool new_value, Label label) + { + if (new_value) + label.get_style_context ().add_class ("duplicate"); +@@ -175,7 +175,7 @@ private class ControlsGrid : Button + worm_props.disconnect (color_handler); + } + +- private static void configure_label (uint key_value, ref Label label) ++ private static void configure_label (uint key_value, Label label) + { + string? key_name = Gdk.keyval_name (key_value); + if (key_name == "Up") +-- +GitLab + diff --git a/games-arcade/gnome-nibbles/files/gnome-nibbles-3.38.2-vala-0.50.4-GtkChild-2.patch b/games-arcade/gnome-nibbles/files/gnome-nibbles-3.38.2-vala-0.50.4-GtkChild-2.patch new file mode 100644 index 000000000000..48c565303196 --- /dev/null +++ b/games-arcade/gnome-nibbles/files/gnome-nibbles-3.38.2-vala-0.50.4-GtkChild-2.patch @@ -0,0 +1,178 @@ +From 62964e9256fcac616109af874dbb2bd8342a9853 Mon Sep 17 00:00:00 2001 +From: Rico Tzschichholz <ricotz@ubuntu.com> +Date: Wed, 17 Mar 2021 11:25:05 +0100 +Subject: [PATCH] Reference of [GtkChild] fields is handled by GtkBuilder, type + must be unowned + +--- + src/controls.vala | 20 ++++++++++---------- + src/nibbles-window.vala | 26 +++++++++++++------------- + src/players.vala | 6 +++--- + src/preferences-dialog.vala | 30 +++++++++++++++--------------- + src/scoreboard.vala | 6 +++--- + 5 files changed, 44 insertions(+), 44 deletions(-) + +diff --git a/src/controls.vala b/src/controls.vala +index 584c9ff..f95d210 100644 +--- a/src/controls.vala ++++ b/src/controls.vala +@@ -22,7 +22,7 @@ using Gtk; + [GtkTemplate (ui = "/org/gnome/Nibbles/ui/controls.ui")] + private class Controls : Box + { +- [GtkChild] private Box grids_box; ++ [GtkChild] private unowned Box grids_box; + private Gee.LinkedList<ControlsGrid> grids = new Gee.LinkedList<ControlsGrid> (); + + private Gdk.Pixbuf arrow_pixbuf; +@@ -100,15 +100,15 @@ private class Controls : Box + [GtkTemplate (ui = "/org/gnome/Nibbles/ui/controls-grid.ui")] + private class ControlsGrid : Button + { +- [GtkChild] private Label name_label; +- [GtkChild] private Image arrow_up; +- [GtkChild] private Image arrow_down; +- [GtkChild] private Image arrow_left; +- [GtkChild] private Image arrow_right; +- [GtkChild] private Label move_up_label; +- [GtkChild] private Label move_down_label; +- [GtkChild] private Label move_left_label; +- [GtkChild] private Label move_right_label; ++ [GtkChild] private unowned Label name_label; ++ [GtkChild] private unowned Image arrow_up; ++ [GtkChild] private unowned Image arrow_down; ++ [GtkChild] private unowned Image arrow_left; ++ [GtkChild] private unowned Image arrow_right; ++ [GtkChild] private unowned Label move_up_label; ++ [GtkChild] private unowned Label move_down_label; ++ [GtkChild] private unowned Label move_left_label; ++ [GtkChild] private unowned Label move_right_label; + + internal WormProperties worm_props; + internal ulong external_handler; +diff --git a/src/nibbles-window.vala b/src/nibbles-window.vala +index 6961326..6bfb74a 100644 +--- a/src/nibbles-window.vala ++++ b/src/nibbles-window.vala +@@ -40,30 +40,30 @@ private class NibblesWindow : ApplicationWindow + private int window_height; + + /* Main widgets */ +- [GtkChild] private Stack main_stack; +- [GtkChild] private Overlay overlay; ++ [GtkChild] private unowned Stack main_stack; ++ [GtkChild] private unowned Overlay overlay; + + /* HeaderBar */ +- [GtkChild] private HeaderBar headerbar; +- [GtkChild] private MenuButton hamburger_menu; +- [GtkChild] private Button new_game_button; +- [GtkChild] private Button pause_button; ++ [GtkChild] private unowned HeaderBar headerbar; ++ [GtkChild] private unowned MenuButton hamburger_menu; ++ [GtkChild] private unowned Button new_game_button; ++ [GtkChild] private unowned Button pause_button; + + /* Pre-game screen widgets */ +- [GtkChild] private Players players; +- [GtkChild] private Speed speed; +- [GtkChild] private Controls controls; ++ [GtkChild] private unowned Players players; ++ [GtkChild] private unowned Speed speed; ++ [GtkChild] private unowned Controls controls; + + /* Statusbar widgets */ +- [GtkChild] private Stack statusbar_stack; +- [GtkChild] private Label countdown; +- [GtkChild] private Scoreboard scoreboard; ++ [GtkChild] private unowned Stack statusbar_stack; ++ [GtkChild] private unowned Label countdown; ++ [GtkChild] private unowned Scoreboard scoreboard; + private Gdk.Pixbuf scoreboard_life; + + /* Rendering of the game */ + private NibblesView? view; + +- [GtkChild] private Box game_box; ++ [GtkChild] private unowned Box game_box; + private Games.GridFrame frame; + + /* Game being played */ +diff --git a/src/players.vala b/src/players.vala +index 9198412..4bde18e 100644 +--- a/src/players.vala ++++ b/src/players.vala +@@ -21,9 +21,9 @@ using Gtk; + [GtkTemplate (ui = "/org/gnome/Nibbles/ui/players.ui")] + private class Players : Box + { +- [GtkChild] private ToggleButton worms4; +- [GtkChild] private ToggleButton worms5; +- [GtkChild] private ToggleButton worms6; ++ [GtkChild] private unowned ToggleButton worms4; ++ [GtkChild] private unowned ToggleButton worms5; ++ [GtkChild] private unowned ToggleButton worms6; + + private SimpleAction nibbles_number_action; + private SimpleAction players_number_action; +diff --git a/src/preferences-dialog.vala b/src/preferences-dialog.vala +index 216a1e2..2d3a7bf 100644 +--- a/src/preferences-dialog.vala ++++ b/src/preferences-dialog.vala +@@ -24,21 +24,21 @@ private class PreferencesDialog : Window + private GLib.Settings settings; + private Gee.ArrayList<GLib.Settings> worm_settings; + +- [GtkChild] private Stack stack; +- [GtkChild] private Stack headerbar_stack; +- [GtkChild] private ComboBoxText worm_combobox; +- [GtkChild] private Gtk.ListStore list_store_1; +- [GtkChild] private Gtk.ListStore list_store_2; +- [GtkChild] private Gtk.ListStore list_store_3; +- [GtkChild] private Gtk.ListStore list_store_4; +- [GtkChild] private TreeView tree_view_1; +- [GtkChild] private TreeView tree_view_2; +- [GtkChild] private TreeView tree_view_3; +- [GtkChild] private TreeView tree_view_4; +- [GtkChild] private ComboBoxText combo_box_1; +- [GtkChild] private ComboBoxText combo_box_2; +- [GtkChild] private ComboBoxText combo_box_3; +- [GtkChild] private ComboBoxText combo_box_4; ++ [GtkChild] private unowned Stack stack; ++ [GtkChild] private unowned Stack headerbar_stack; ++ [GtkChild] private unowned ComboBoxText worm_combobox; ++ [GtkChild] private unowned Gtk.ListStore list_store_1; ++ [GtkChild] private unowned Gtk.ListStore list_store_2; ++ [GtkChild] private unowned Gtk.ListStore list_store_3; ++ [GtkChild] private unowned Gtk.ListStore list_store_4; ++ [GtkChild] private unowned TreeView tree_view_1; ++ [GtkChild] private unowned TreeView tree_view_2; ++ [GtkChild] private unowned TreeView tree_view_3; ++ [GtkChild] private unowned TreeView tree_view_4; ++ [GtkChild] private unowned ComboBoxText combo_box_1; ++ [GtkChild] private unowned ComboBoxText combo_box_2; ++ [GtkChild] private unowned ComboBoxText combo_box_3; ++ [GtkChild] private unowned ComboBoxText combo_box_4; + + private Gee.ArrayList<Gtk.ListStore> list_stores; + private Gee.ArrayList<TreeView> tree_views; +diff --git a/src/scoreboard.vala b/src/scoreboard.vala +index a41aee1..aebc1cc 100644 +--- a/src/scoreboard.vala ++++ b/src/scoreboard.vala +@@ -59,9 +59,9 @@ private class Scoreboard : Box + [GtkTemplate (ui = "/org/gnome/Nibbles/ui/player-score-box.ui")] + private class PlayerScoreBox : Box + { +- [GtkChild] private Label name_label; +- [GtkChild] private Label score_label; +- [GtkChild] private Grid lives_grid; ++ [GtkChild] private unowned Label name_label; ++ [GtkChild] private unowned Label score_label; ++ [GtkChild] private unowned Grid lives_grid; + + private Gee.LinkedList<Image> life_images = new Gee.LinkedList<Image> (); + +-- +GitLab + diff --git a/games-arcade/gnome-nibbles/gnome-nibbles-3.38.2.ebuild b/games-arcade/gnome-nibbles/gnome-nibbles-3.38.2.ebuild index 3ede22959954..a9e6f5676b0a 100644 --- a/games-arcade/gnome-nibbles/gnome-nibbles-3.38.2.ebuild +++ b/games-arcade/gnome-nibbles/gnome-nibbles-3.38.2.ebuild @@ -32,6 +32,12 @@ BDEPEND=" media-libs/gsound[vala] " +PATCHES=( + # backport for https://gitlab.gnome.org/GNOME/gnome-nibbles/-/issues/52 + "${FILESDIR}"/${P}-vala-0.50.4-GtkChild-1.patch + "${FILESDIR}"/${P}-vala-0.50.4-GtkChild-2.patch +) + src_prepare() { xdg_src_prepare vala_src_prepare |