Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/sublime-text/
Date: Fri, 16 Jul 2021 23:12:03
Message-Id: 1626477103.9cc7d4db608bcda237a0c8edbe27c01392e76935.soap@gentoo
1 commit: 9cc7d4db608bcda237a0c8edbe27c01392e76935
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 16 23:11:43 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 16 23:11:43 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cc7d4db
7
8 app-editors/sublime-text: add 4_p4113
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 app-editors/sublime-text/Manifest | 1 +
13 .../sublime-text/sublime-text-4_p4113.ebuild | 67 ++++++++++++++++++++++
14 2 files changed, 68 insertions(+)
15
16 diff --git a/app-editors/sublime-text/Manifest b/app-editors/sublime-text/Manifest
17 index d475f09e7e4..3dde261a706 100644
18 --- a/app-editors/sublime-text/Manifest
19 +++ b/app-editors/sublime-text/Manifest
20 @@ -1,3 +1,4 @@
21 DIST sublime_text_3_build_3211_x32.tar.bz2 13806489 BLAKE2B 1e07df2fc9fb9fb60a6fbfe27a3d657ff80ef46ae91967fa384cfc84bfdc2b5952aea8dbfd9ff015f669b148c1a302cbe01521a72b584abccd51efdab51ac0d8 SHA512 4d19947459046407316382d187ea6fa4cff9b7d3e7ae3c46667d691b6ca425a1f1dfc8599a26cf61b970290a58924a3b605e111ff2802ed124683872c1802803
22 DIST sublime_text_3_build_3211_x64.tar.bz2 13677324 BLAKE2B e2ac54c1e8ab90c0fcefb4baf225b02d13a3405e846f08163773ed52c6278f8e89a7b13c15e6c2d6241139d58be9c2c5a1201abb04a3cd68efdffc723075c5af SHA512 a6a068119eff95c5360e9ccbe1d845e7a93e4ad13b3659073752a7bd0e87f4691555820185514875649e677a4e8702e2338f74f5584fc80f69c16b323685d6f1
23 DIST sublime_text_build_4107_x64.tar.xz 17096632 BLAKE2B 37c1839ef1edecb1f3017e4d99d2b8b0bf5c0aa1490495fe19a48cf38bb436e94913572a4dd5ad5f84e6b5445b6a9a2df35fec607beb0b520471b2dde7ef63fd SHA512 552051b34c612aa6ff53ef6275488467061221715de054dc1e657519c82899e24df1a9f8000086b68c5c1c6e0c98341c641f19a2d97c880efb25aa93ad82f8aa
24 +DIST sublime_text_build_4113_x64.tar.xz 17105200 BLAKE2B 6a23e9eb7ec5b7b5dfef2ef496e0b7fcf053be3349c8318e85373bc9c3d4d69da3e4e94971ae83832aa254c175a58062a33ffb14d2103c1cdb6888c1223f28ed SHA512 f0e5e8e28754c21bf5c9fc3e50502d22d72fec4819c68d8444cb341aa7ee4d6bc43edfda594fba3c446c2b252bd7a65340dd7a407d81f875971c219bb2236479
25
26 diff --git a/app-editors/sublime-text/sublime-text-4_p4113.ebuild b/app-editors/sublime-text/sublime-text-4_p4113.ebuild
27 new file mode 100644
28 index 00000000000..6b349eca211
29 --- /dev/null
30 +++ b/app-editors/sublime-text/sublime-text-4_p4113.ebuild
31 @@ -0,0 +1,67 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +inherit desktop wrapper xdg
38 +
39 +# get the major version from PV
40 +MY_PV=$(ver_cut 3)
41 +MY_PN=${PN/-/_}
42 +
43 +DESCRIPTION="Sophisticated text editor for code, markup and prose"
44 +HOMEPAGE="https://www.sublimetext.com"
45 +SRC_URI="
46 + amd64? ( https://download.sublimetext.com/sublime_text_build_${MY_PV}_x64.tar.xz )"
47 +S="${WORKDIR}/${MY_PN}"
48 +
49 +LICENSE="Sublime"
50 +SLOT="0"
51 +KEYWORDS="~amd64"
52 +IUSE="dbus"
53 +RESTRICT="bindist mirror strip"
54 +
55 +RDEPEND="
56 + dev-libs/glib:2
57 + x11-libs/gtk+:3
58 + x11-libs/libX11
59 + dbus? ( sys-apps/dbus )"
60 +
61 +PATCHES=(
62 + "${FILESDIR}"/${PN}-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch
63 + "${FILESDIR}"/${PN}-4_p4107-set-explicit-startupwmclass-in-launcher.patch
64 +)
65 +
66 +QA_PREBUILT="*"
67 +
68 +# Sublime bundles the kitchen sink, which includes python and other assorted
69 +# modules. Do not try to unbundle these because you are guaranteed to fail.
70 +
71 +src_install() {
72 + insinto /opt/${MY_PN}
73 + doins -r Packages Lib Icon # /Icon is used at runtime by the application
74 + doins changelog.txt libcrypto.so.1.1 libssl.so.1.1 sublime_text.desktop
75 +
76 + # sublime_merge looks for /opt/sublime_text/sublime_text
77 + exeinto /opt/${MY_PN}
78 + doexe crash_reporter plugin_host-3.3 plugin_host-3.8 sublime_text
79 +
80 + # sublime-text sets its WM_CLASS based on its argv[0]. A wrapper script is
81 + # used instead of a symlink to preserve a consistent WM_CLASS regardless of
82 + # how the application is launched. This causes the WM_CLASS to be
83 + # "sublime_text" which matches the .desktop entry.
84 + make_wrapper subl "/opt/${MY_PN}/sublime_text --fwdargv0 \"\$0\""
85 + domenu sublime_text.desktop
86 +
87 + local size
88 + for size in 16 32 48 128 256; do
89 + doicon --size ${size} Icon/${size}x${size}/${PN}.png
90 + done
91 +}
92 +
93 +pkg_postinst() {
94 + xdg_pkg_postinst
95 +
96 + elog 'Sublime Text 4'"'"'s window class changes from WM_CLASS="subl" to'
97 + elog 'WM_CLASS="sublime_text" matching other distributions.'
98 +}