1 |
commit: 1fd5a98ac0b6f26bcde5ab7916716369ce26d990 |
2 |
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 2 16:24:38 2020 +0000 |
4 |
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 2 16:35:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fd5a98a |
7 |
|
8 |
gnome-extra/gnome-shell-extensions-topicons-plus: add snapshot for 3.34 compatibility |
9 |
|
10 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
11 |
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org> |
12 |
|
13 |
.../gnome-shell-extensions-topicons-plus/Manifest | 1 + |
14 |
.../files/restore-3.22-compat.patch | 42 +++++++++++++++++++ |
15 |
...ll-extensions-topicons-plus-22_p20190929.ebuild | 49 ++++++++++++++++++++++ |
16 |
3 files changed, 92 insertions(+) |
17 |
|
18 |
diff --git a/gnome-extra/gnome-shell-extensions-topicons-plus/Manifest b/gnome-extra/gnome-shell-extensions-topicons-plus/Manifest |
19 |
index 4fec0da8f31..7875895145f 100644 |
20 |
--- a/gnome-extra/gnome-shell-extensions-topicons-plus/Manifest |
21 |
+++ b/gnome-extra/gnome-shell-extensions-topicons-plus/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST gnome-shell-extensions-topicons-plus-22.tar.gz 2757811 BLAKE2B 8bfe719d4a0e4d58db9b21d354e841ea69b88d82c69ba6aa4ebc8db65acde9330553487d0a0d3b623d5a6a2a18ff67e6ad4e45133c6e7b8a77e07bd90c589e63 SHA512 f0589bd8ed6697d616772ab374e9aa80779512d38c50f82c375820c02c06ef26a50b2a8c78c4e5fab5dc8588ed5fdcf0b7e73e7868af0855545528e741aa280d |
24 |
+DIST gnome-shell-extensions-topicons-plus-22_p20190929.tar.gz 2759460 BLAKE2B 2eb001f472395ade58503a860d3ea8248bb8aeb36b4d6f13f65e1074694aecc02f814d18d449206e1055984177896ac787fd925b4cf2680f226ffaace042cc5d SHA512 47cb156f7a61780a53311855d716c4e4f539832080fc011db634b472b5a8aa0e9fad5b6f44bf2da30665cd97b850725822ee9fb9ed9da014388cf4adeee60fbe |
25 |
|
26 |
diff --git a/gnome-extra/gnome-shell-extensions-topicons-plus/files/restore-3.22-compat.patch b/gnome-extra/gnome-shell-extensions-topicons-plus/files/restore-3.22-compat.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..9d3104a7da5 |
29 |
--- /dev/null |
30 |
+++ b/gnome-extra/gnome-shell-extensions-topicons-plus/files/restore-3.22-compat.patch |
31 |
@@ -0,0 +1,42 @@ |
32 |
+From 0a357137c27d3e1f2f236a1e76e7b38f6e39d846 Mon Sep 17 00:00:00 2001 |
33 |
+From: "Robin A. Meade" <robin.a.meade@×××××.com> |
34 |
+Date: Thu, 31 Oct 2019 16:08:24 -1000 |
35 |
+Subject: [PATCH] Fix TopIcons no longer working with gnome-shell < 3.33.90 |
36 |
+ |
37 |
+This fixes the following error: |
38 |
+gnome-shell: JS ERROR: TypeError: Main.extensionManager is undefined |
39 |
+onTrayIconAdded@/usr/share/gnome-shell/extensions/TopIcons@×××××××.net/extension.js:85:1 |
40 |
+ |
41 |
+Related: |
42 |
+https://github.com/phocean/TopIcons-plus/commit/43f991d1533e8d4002bd25ae6afd8a1568c39b36#diff-06f1274e40de25abda72d812b1cce86a |
43 |
+https://bugzilla.redhat.com/show_bug.cgi?id=1767544 |
44 |
+--- |
45 |
+ extension.js | 15 ++++++++++++--- |
46 |
+ 1 file changed, 12 insertions(+), 3 deletions(-) |
47 |
+ |
48 |
+diff --git a/extension.js b/extension.js |
49 |
+index 191fa5c..116a60b 100644 |
50 |
+--- a/extension.js |
51 |
++++ b/extension.js |
52 |
+@@ -82,9 +82,18 @@ function onTrayIconAdded(o, icon, role, delay=1000) { |
53 |
+ // loop through the array and hide the extension if extension X is enabled and corresponding application is running |
54 |
+ let iconWmClass = icon.wm_class ? icon.wm_class.toLowerCase() : ''; |
55 |
+ for (let [wmClass, uuid] of blacklist) { |
56 |
+- if (Main.extensionManager.lookup(uuid) && |
57 |
+- iconWmClass === wmClass) |
58 |
+- return; |
59 |
++ if (Main.extensionManager === undefined) { |
60 |
++ // For gnome-shell < 3.33.90 |
61 |
++ if (ExtensionUtils.extensions[uuid] !== undefined && |
62 |
++ ExtensionUtils.extensions[uuid].state === 1 && |
63 |
++ iconWmClass === wmClass) |
64 |
++ return; |
65 |
++ } else { |
66 |
++ // For gnome-shell >= 3.33.90 |
67 |
++ if (Main.extensionManager.lookup(uuid) && |
68 |
++ iconWmClass === wmClass) |
69 |
++ return; |
70 |
++ } |
71 |
+ } |
72 |
+ |
73 |
+ let iconContainer = new St.Button({child: icon, visible: false}); |
74 |
|
75 |
diff --git a/gnome-extra/gnome-shell-extensions-topicons-plus/gnome-shell-extensions-topicons-plus-22_p20190929.ebuild b/gnome-extra/gnome-shell-extensions-topicons-plus/gnome-shell-extensions-topicons-plus-22_p20190929.ebuild |
76 |
new file mode 100644 |
77 |
index 00000000000..31bf7980e4f |
78 |
--- /dev/null |
79 |
+++ b/gnome-extra/gnome-shell-extensions-topicons-plus/gnome-shell-extensions-topicons-plus-22_p20190929.ebuild |
80 |
@@ -0,0 +1,49 @@ |
81 |
+# Copyright 1999-2020 Gentoo Authors |
82 |
+# Distributed under the terms of the GNU General Public License v2 |
83 |
+ |
84 |
+EAPI=7 |
85 |
+ |
86 |
+COMMIT_HASH="ad2dd1ad48ad9a5899e14a9e0873244a3e15b82e" |
87 |
+DESCRIPTION="Moves legacy tray icons to top panel" |
88 |
+HOMEPAGE="https://extensions.gnome.org/extension/1031/topicons/" |
89 |
+SRC_URI="https://github.com/phocean/TopIcons-plus/archive/${COMMIT_HASH}.tar.gz -> ${P}.tar.gz" |
90 |
+S="${WORKDIR}/TopIcons-plus-${COMMIT_HASH}" |
91 |
+ |
92 |
+LICENSE="GPL-2+" |
93 |
+SLOT="0" |
94 |
+KEYWORDS="~amd64 ~x86" |
95 |
+IUSE="" |
96 |
+ |
97 |
+# glib for glib-compile-schemas at build time, needed at runtime anyways |
98 |
+DEPEND=" |
99 |
+ dev-libs/glib:2 |
100 |
+" |
101 |
+RDEPEND="${DEPEND} |
102 |
+ app-eselect/eselect-gnome-shell-extensions |
103 |
+ >=gnome-base/gnome-shell-3.16 |
104 |
+" |
105 |
+BDEPEND="" |
106 |
+ |
107 |
+PATCHES=( |
108 |
+ "${FILESDIR}"/restore-3.22-compat.patch # https://github.com/phocean/TopIcons-plus/pull/136 |
109 |
+) |
110 |
+ |
111 |
+#src_compile() { |
112 |
+ # It redoes this with "make install" later due to a dumb Makefile, so don't bother |
113 |
+ #make build |
114 |
+#} |
115 |
+ |
116 |
+src_install() { |
117 |
+ # TODO: Figure out if we can get the schemas to standard location, in a way that works properly runtime too |
118 |
+ make install INSTALL_PATH="${ED}/usr/share/gnome-shell/extensions/" |
119 |
+ rm "${ED}/usr/share/gnome-shell/extensions/TopIcons@×××××××.net/README.md" || die |
120 |
+ # Assuming it needs only compiled gettext catalogs at runtime |
121 |
+ rm "${ED}/usr/share/gnome-shell/extensions/TopIcons@×××××××.net/locale"/*/LC_MESSAGES/*.po || die |
122 |
+ dodoc README.md |
123 |
+} |
124 |
+ |
125 |
+pkg_postinst() { |
126 |
+ ebegin "Updating list of installed extensions" |
127 |
+ eselect gnome-shell-extensions update |
128 |
+ eend $? |
129 |
+} |