From f4fb9fe6a8b37092bb3f26d29ba8c727bfd5cfbe Mon Sep 17 00:00:00 2001 From: David Seifert Date: Thu, 22 May 2025 08:57:00 +0200 Subject: [PATCH] app-editors/sublime-text: add 4_p4200 Signed-off-by: David Seifert --- app-editors/sublime-text/Manifest | 1 + .../sublime-text/sublime-text-4_p4200.ebuild | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 app-editors/sublime-text/sublime-text-4_p4200.ebuild diff --git a/app-editors/sublime-text/Manifest b/app-editors/sublime-text/Manifest index b3a79deb86e08..5fe989ffe6740 100644 --- a/app-editors/sublime-text/Manifest +++ b/app-editors/sublime-text/Manifest @@ -1,2 +1,3 @@ DIST sublime_text_build_4189_x64.tar.xz 16156292 BLAKE2B e8d4f6d2b8c9e9a2dddafbe83501ce83e4a0b9ff0b4fb7f8e3aef812b963ee2f588c3191af74e0dddc8f62f9f321e13df915a5d499e34ca9847f80b2469cb540 SHA512 7413f9655367ef57285f8e79b42947e1cb1c316baed6e89c6e3cea9c76d4c8f819684ce383e4c97ba8d369608dbe264445e6e21ebb42961fd282298db90d2b49 DIST sublime_text_build_4192_x64.tar.xz 16157072 BLAKE2B c073c7fd6ea287be784ef6e97acaa254dffe68440282e61b75dbb3edf4c40ac1a095d8dff183fd5e5de10871e2c5148c5f583957f6e8745da8f36b1f9495b1c2 SHA512 083bf22aef7425cd30164bd3f3a420bbea3c7be3c9702f221c9075d4ddbe9d4b271efc2f491cbfa9d61ec7d41e30e26b8ad38e7dfcc5509d3bade16296cdb88c +DIST sublime_text_build_4200_x64.tar.xz 16340980 BLAKE2B bba5f66f0b0f6ae78784def78ad574c5c3799dff0b918555b119a3138968095bab61b1fdf65001beb1f690c9d639971f738ca763805f43b86ab7959086eb9246 SHA512 0a6ff4be7ae35ce80d568a2bf8dc5ed6fcf9f845517f7a1b8b24f180842f72ef16f9792e91fc70a277cfaf66bf1be482bb1328c98252d7c524d3412cfe9f22e3 diff --git a/app-editors/sublime-text/sublime-text-4_p4200.ebuild b/app-editors/sublime-text/sublime-text-4_p4200.ebuild new file mode 100644 index 0000000000000..d88a341fb94c6 --- /dev/null +++ b/app-editors/sublime-text/sublime-text-4_p4200.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop wrapper xdg + +# get the major version from PV +MY_PV=$(ver_cut 3) +MY_PN=${PN/-/_} + +DESCRIPTION="Sophisticated text editor for code, markup and prose" +HOMEPAGE="https://www.sublimetext.com" +SRC_URI=" + amd64? ( https://download.sublimetext.com/sublime_text_build_${MY_PV}_x64.tar.xz )" +S="${WORKDIR}/${MY_PN}" + +LICENSE="Sublime" +SLOT="0" +KEYWORDS="~amd64" +IUSE="dbus" +RESTRICT="bindist mirror strip" + +RDEPEND=" + dev-libs/glib:2 + sys-libs/glibc + x11-libs/gtk+:3 + x11-libs/libX11 + dbus? ( sys-apps/dbus )" + +PATCHES=( + "${FILESDIR}"/${PN}-4_p4107-remove-deprecated-key-onlyshowin-from-launcher.patch + "${FILESDIR}"/${PN}-4_p4107-set-explicit-startupwmclass-in-launcher.patch +) + +QA_PREBUILT="*" + +# Sublime bundles the kitchen sink, which includes python and other assorted +# modules. Do not try to unbundle these because you are guaranteed to fail. + +src_install() { + insinto /opt/${MY_PN} + doins -r Packages Lib Icon # /Icon is used at runtime by the application + doins changelog.txt libcrypto.so.1.1 libssl.so.1.1 libsqlite3.so sublime_text.desktop + + # sublime_merge looks for /opt/sublime_text/sublime_text + exeinto /opt/${MY_PN} + doexe crash_handler plugin_host-3.3 plugin_host-3.8 sublime_text + + # sublime-text sets its WM_CLASS based on its argv[0]. A wrapper script is + # used instead of a symlink to preserve a consistent WM_CLASS regardless of + # how the application is launched. This causes the WM_CLASS to be + # "sublime_text" which matches the .desktop entry. + make_wrapper subl "/opt/${MY_PN}/sublime_text --fwdargv0 \"\$0\"" + domenu sublime_text.desktop + + local size + for size in 16 32 48 128 256; do + doicon --size ${size} Icon/${size}x${size}/${PN}.png + done +} + +pkg_postinst() { + xdg_pkg_postinst + + elog 'Sublime Text 4'"'"'s window class changes from WM_CLASS="subl" to' + elog 'WM_CLASS="sublime_text" matching other distributions.' +}