Skip to content

Commit

Permalink
app-editors/sublime-text: add 4_p4180
Browse files Browse the repository at this point in the history
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Aug 7, 2024
1 parent 400fbcf commit daf1f55
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions app-editors/sublime-text/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST sublime_text_build_4169_x64.tar.xz 16572760 BLAKE2B 1760e6a763b58e24c7360bb0068704b820b0ba91169c1e80b9b46ca728eaedd04bd2bca75d602b24034fff895c093131d30209c48c3e7b1c56941da7cf1d3296 SHA512 6764363f8f92f65532d64ba014023e28b18f40dc62a1b114239b59360257d445494f9a2f57580174b5f4994c8fa06cd8f562c9419cfda92324c9ebf25d15e576
DIST sublime_text_build_4180_x64.tar.xz 15767020 BLAKE2B 44850b6fffd959361f80f43508b7c9767a5f87a52c9d124cd68dd6eb975c362ca56815c6264f96ca02d836f6184038972539462c6dd8f314430042420dae5b99 SHA512 a115a352311a964268a1460710c562a7843b52c14c452745edb8706ac726e97b867931659b1a3286d44cb19b880f42f00af5bffe88aaa7916181a690e8324e1a
68 changes: 68 additions & 0 deletions app-editors/sublime-text/sublime-text-4_p4180.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Copyright 1999-2024 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.'
}

0 comments on commit daf1f55

Please sign in to comment.