From 2fe196b8f1296ff3e9300b99e0b483b832184ac4 Mon Sep 17 00:00:00 2001 From: Martin Sekera Date: Sat, 22 May 2021 15:01:16 +0200 Subject: [PATCH] add app-editors/sublime-text 4 --- .../sublime-text/sublime-text-4107.ebuild | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 app-editors/sublime-text/sublime-text-4107.ebuild diff --git a/app-editors/sublime-text/sublime-text-4107.ebuild b/app-editors/sublime-text/sublime-text-4107.ebuild new file mode 100644 index 0000000..85ee0fc --- /dev/null +++ b/app-editors/sublime-text/sublime-text-4107.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop xdg-utils + +DESCRIPTION="Sophisticated text editor for code, markup and prose" +HOMEPAGE="https://www.sublimetext.com" +SRC_URI="https://download.sublimetext.com/sublime_text_build_${PV}_x64.tar.bz2" + +LICENSE="Sublime" +SLOT="0" +KEYWORDS="~amd64" +IUSE="dbus" +RESTRICT="bindist mirror strip" + +RDEPEND=" + dev-libs/glib:2 + x11-libs/gtk+:3 + x11-libs/libX11 + dbus? ( sys-apps/dbus )" + +QA_PREBUILT="*" +S="${WORKDIR}/sublime_text_${MV}" + +# 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/${PN} + doins -r Packages Icon Lib + doins changelog.txt + + exeinto /opt/${PN} + doexe crash_reporter plugin_host-{3.3,3.8} sublime_text libcrypto.so.1.1 libssl.so.1.1 + dosym ../../opt/${PN}/sublime_text /usr/bin/subl + + local size + for size in 16 32 48 128 256; do + dosym ../../../../../../opt/${PN}/Icon/${size}x${size}/sublime-text.png \ + /usr/share/icons/hicolor/${size}x${size}/apps/subl.png + done + + make_desktop_entry "subl %F" "Sublime Text" subl \ + "TextEditor;IDE;Development" "StartupNotify=true" + + # needed to get WM_CLASS lookup right + mv "${ED}"/usr/share/applications/subl{-sublime-text,}.desktop || die +} + +pkg_postrm() { + xdg_icon_cache_update +} + +pkg_postinst() { + xdg_icon_cache_update +}