1 |
commit: e02a6ec3dcc4ef6deb70955dd3aa9a4c3b43ba03 |
2 |
Author: webstrand <webstrand <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu May 27 21:39:56 2021 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 27 22:00:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e02a6ec3 |
7 |
|
8 |
app-editors/sublime-text: 4_p4107 |
9 |
|
10 |
Signed-off-by: webstrand <webstrand <AT> gmail.com> |
11 |
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org> |
12 |
|
13 |
app-editors/sublime-text/Manifest | 1 + |
14 |
...e-deprecated-key-onlyshowin-from-launcher.patch | 31 ++++++++++ |
15 |
...7-set-explicit-startupwmclass-in-launcher.patch | 27 ++++++++ |
16 |
.../sublime-text/sublime-text-4_p4107.ebuild | 72 ++++++++++++++++++++++ |
17 |
4 files changed, 131 insertions(+) |
18 |
|
19 |
diff --git a/app-editors/sublime-text/Manifest b/app-editors/sublime-text/Manifest |
20 |
index 173ee9fd600..d475f09e7e4 100644 |
21 |
--- a/app-editors/sublime-text/Manifest |
22 |
+++ b/app-editors/sublime-text/Manifest |
23 |
@@ -1,2 +1,3 @@ |
24 |
DIST sublime_text_3_build_3211_x32.tar.bz2 13806489 BLAKE2B 1e07df2fc9fb9fb60a6fbfe27a3d657ff80ef46ae91967fa384cfc84bfdc2b5952aea8dbfd9ff015f669b148c1a302cbe01521a72b584abccd51efdab51ac0d8 SHA512 4d19947459046407316382d187ea6fa4cff9b7d3e7ae3c46667d691b6ca425a1f1dfc8599a26cf61b970290a58924a3b605e111ff2802ed124683872c1802803 |
25 |
DIST sublime_text_3_build_3211_x64.tar.bz2 13677324 BLAKE2B e2ac54c1e8ab90c0fcefb4baf225b02d13a3405e846f08163773ed52c6278f8e89a7b13c15e6c2d6241139d58be9c2c5a1201abb04a3cd68efdffc723075c5af SHA512 a6a068119eff95c5360e9ccbe1d845e7a93e4ad13b3659073752a7bd0e87f4691555820185514875649e677a4e8702e2338f74f5584fc80f69c16b323685d6f1 |
26 |
+DIST sublime_text_build_4107_x64.tar.xz 17096632 BLAKE2B 37c1839ef1edecb1f3017e4d99d2b8b0bf5c0aa1490495fe19a48cf38bb436e94913572a4dd5ad5f84e6b5445b6a9a2df35fec607beb0b520471b2dde7ef63fd SHA512 552051b34c612aa6ff53ef6275488467061221715de054dc1e657519c82899e24df1a9f8000086b68c5c1c6e0c98341c641f19a2d97c880efb25aa93ad82f8aa |
27 |
|
28 |
diff --git a/app-editors/sublime-text/files/sublime-text-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch b/app-editors/sublime-text/files/sublime-text-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..04dfad334e2 |
31 |
--- /dev/null |
32 |
+++ b/app-editors/sublime-text/files/sublime-text-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch |
33 |
@@ -0,0 +1,31 @@ |
34 |
+From 9df21c9ec00ac34174b443cc7cd8c4053b98eb00 Mon Sep 17 00:00:00 2001 |
35 |
+From: webstrand <webstrand@×××××.com> |
36 |
+Date: Thu, 27 May 2021 17:08:03 -0400 |
37 |
+Subject: [PATCH 1/2] remove deprecated key OnlyShowIn from launcher |
38 |
+ |
39 |
+Silences a QA notice that the key "OnlyShowIn" in group |
40 |
+"Desktop Action new-file" and "Desktop Action new-window" is deprecated. |
41 |
+ |
42 |
+https://bugs.freedesktop.org/show_bug.cgi?id=66712 No replacement or |
43 |
+alternative is provided, the key is simply ignored. |
44 |
+--- |
45 |
+ sublime_text.desktop | 2 -- |
46 |
+ 1 file changed, 2 deletions(-) |
47 |
+ |
48 |
+diff --git a/sublime_text.desktop b/sublime_text.desktop |
49 |
+index 7407709..b171254 100644 |
50 |
+--- a/sublime_text.desktop |
51 |
++++ b/sublime_text.desktop |
52 |
+@@ -15,9 +15,7 @@ Actions=new-window;new-file; |
53 |
+ [Desktop Action new-window] |
54 |
+ Name=New Window |
55 |
+ Exec=/opt/sublime_text/sublime_text --launch-or-new-window |
56 |
+-OnlyShowIn=Unity; |
57 |
+ |
58 |
+ [Desktop Action new-file] |
59 |
+ Name=New File |
60 |
+ Exec=/opt/sublime_text/sublime_text --command new_file |
61 |
+-OnlyShowIn=Unity; |
62 |
+-- |
63 |
+2.31.1 |
64 |
+ |
65 |
|
66 |
diff --git a/app-editors/sublime-text/files/sublime-text-4_p4107-set-explicit-startupwmclass-in-launcher.patch b/app-editors/sublime-text/files/sublime-text-4_p4107-set-explicit-startupwmclass-in-launcher.patch |
67 |
new file mode 100644 |
68 |
index 00000000000..09e835b587a |
69 |
--- /dev/null |
70 |
+++ b/app-editors/sublime-text/files/sublime-text-4_p4107-set-explicit-startupwmclass-in-launcher.patch |
71 |
@@ -0,0 +1,27 @@ |
72 |
+From 0eff5450cba9514559eefd8c79e98fb6b8134b68 Mon Sep 17 00:00:00 2001 |
73 |
+From: webstrand <webstrand@×××××.com> |
74 |
+Date: Thu, 27 May 2021 17:09:21 -0400 |
75 |
+Subject: [PATCH 2/2] Set explicit StartupWMClass in launcher |
76 |
+ |
77 |
+Otherwise startup notification and grouping implicitly use the name of |
78 |
+the .desktop file to match against the actual WM_CLASS of windows |
79 |
+belonging to the application. |
80 |
+--- |
81 |
+ sublime_text.desktop | 2 ++ |
82 |
+ 1 file changed, 2 insertions(+) |
83 |
+ |
84 |
+diff --git a/sublime_text.desktop b/sublime_text.desktop |
85 |
+index b171254..5c812a9 100644 |
86 |
+--- a/sublime_text.desktop |
87 |
++++ b/sublime_text.desktop |
88 |
+@@ -10,6 +10,7 @@ MimeType=text/plain; |
89 |
+ Icon=sublime-text |
90 |
+ Categories=TextEditor;Development; |
91 |
+ StartupNotify=true |
92 |
++StartupWMClass=Sublime_text |
93 |
+ Actions=new-window;new-file; |
94 |
+ |
95 |
+ [Desktop Action new-window] |
96 |
+-- |
97 |
+2.31.1 |
98 |
+ |
99 |
|
100 |
diff --git a/app-editors/sublime-text/sublime-text-4_p4107.ebuild b/app-editors/sublime-text/sublime-text-4_p4107.ebuild |
101 |
new file mode 100644 |
102 |
index 00000000000..cd603261aae |
103 |
--- /dev/null |
104 |
+++ b/app-editors/sublime-text/sublime-text-4_p4107.ebuild |
105 |
@@ -0,0 +1,72 @@ |
106 |
+# Copyright 1999-2021 Gentoo Authors |
107 |
+# Distributed under the terms of the GNU General Public License v2 |
108 |
+ |
109 |
+EAPI=7 |
110 |
+ |
111 |
+inherit desktop xdg-utils wrapper |
112 |
+ |
113 |
+# get the major version from PV |
114 |
+MY_PV=$(ver_cut 3) |
115 |
+MY_PN=${PN/-/_} |
116 |
+ |
117 |
+DESCRIPTION="Sophisticated text editor for code, markup and prose" |
118 |
+HOMEPAGE="https://www.sublimetext.com" |
119 |
+SRC_URI=" |
120 |
+ amd64? ( https://download.sublimetext.com/sublime_text_build_${MY_PV}_x64.tar.xz )" |
121 |
+ |
122 |
+LICENSE="Sublime" |
123 |
+SLOT="0" |
124 |
+KEYWORDS="~amd64" |
125 |
+IUSE="dbus" |
126 |
+RESTRICT="bindist mirror strip" |
127 |
+ |
128 |
+RDEPEND=" |
129 |
+ dev-libs/glib:2 |
130 |
+ x11-libs/gtk+:3 |
131 |
+ x11-libs/libX11 |
132 |
+ dbus? ( sys-apps/dbus )" |
133 |
+ |
134 |
+PATCHES=( |
135 |
+ "${FILESDIR}"/${PN}-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch |
136 |
+ "${FILESDIR}"/${PN}-4_p4107-set-explicit-startupwmclass-in-launcher.patch |
137 |
+) |
138 |
+ |
139 |
+QA_PREBUILT="*" |
140 |
+S="${WORKDIR}/${MY_PN}" |
141 |
+ |
142 |
+# Sublime bundles the kitchen sink, which includes python and other assorted |
143 |
+# modules. Do not try to unbundle these because you are guaranteed to fail. |
144 |
+ |
145 |
+src_install() { |
146 |
+ insinto /opt/${MY_PN} |
147 |
+ doins -r Packages Lib Icon # /Icon is used at runtime by the application |
148 |
+ doins changelog.txt libcrypto.so.1.1 libssl.so.1.1 sublime_text.desktop |
149 |
+ |
150 |
+ # sublime_merge looks for /opt/sublime_text/sublime_text |
151 |
+ exeinto /opt/${MY_PN} |
152 |
+ doexe crash_reporter plugin_host-3.3 plugin_host-3.8 sublime_text |
153 |
+ |
154 |
+ # sublime-text sets its WM_CLASS based on its argv[0]. A wrapper script is |
155 |
+ # used instead of a symlink to preserve a consistent WM_CLASS regardless of |
156 |
+ # how the application is launched. This causes the WM_CLASS to be |
157 |
+ # "sublime_text" which matches the .desktop entry. |
158 |
+ make_wrapper subl "/opt/${MY_PN}/sublime_text --fwdargv0 \"\$0\"" |
159 |
+ domenu sublime_text.desktop |
160 |
+ |
161 |
+ local size |
162 |
+ for size in 16 32 48 128 256; do |
163 |
+ doicon --size "${size}" Icon/${size}x${size}/${PN}.png |
164 |
+ done |
165 |
+} |
166 |
+ |
167 |
+pkg_postrm() { |
168 |
+ xdg_icon_cache_update |
169 |
+ xdg_desktop_database_update |
170 |
+} |
171 |
+ |
172 |
+pkg_postinst() { |
173 |
+ xdg_icon_cache_update |
174 |
+ xdg_desktop_database_update |
175 |
+ elog 'Sublime Text 4'"'"'s window class changes from WM_CLASS="subl" to' |
176 |
+ elog 'WM_CLASS="sublime_text" matching other distributions.' |
177 |
+} |