Mercurial > hg > portage
changeset 521:96aa41aff28e
adopt the sublime-text ebuild as upstream seems to be dead
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Fri, 12 Jun 2020 02:44:58 +0200 |
parents | d864ea0ef332 |
children | db6a2c47df08 |
files | app-editors/sublime-text/Manifest app-editors/sublime-text/sublime-text-3211-r1.ebuild |
diffstat | 2 files changed, 93 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-editors/sublime-text/Manifest Fri Jun 12 02:44:58 2020 +0200 @@ -0,0 +1,3 @@ +DIST sublime_text_3_build_3211_x32.tar.bz2 13806489 BLAKE2B 1e07df2fc9fb9fb60a6fbfe27a3d657ff80ef46ae91967fa384cfc84bfdc2b5952aea8dbfd9ff015f669b148c1a302cbe01521a72b584abccd51efdab51ac0d8 SHA512 4d19947459046407316382d187ea6fa4cff9b7d3e7ae3c46667d691b6ca425a1f1dfc8599a26cf61b970290a58924a3b605e111ff2802ed124683872c1802803 +DIST sublime_text_3_build_3211_x64.tar.bz2 13677324 BLAKE2B e2ac54c1e8ab90c0fcefb4baf225b02d13a3405e846f08163773ed52c6278f8e89a7b13c15e6c2d6241139d58be9c2c5a1201abb04a3cd68efdffc723075c5af SHA512 a6a068119eff95c5360e9ccbe1d845e7a93e4ad13b3659073752a7bd0e87f4691555820185514875649e677a4e8702e2338f74f5584fc80f69c16b323685d6f1 +EBUILD sublime-text-3211-r1.ebuild 2071 BLAKE2B 84d9294a813b9e5a6c957ac4b356668e29a1090882ee55a68a32686e4c19a6363a83e48126ffe0fb00022c61912f449ea52604ea14abcea845d464d77670f29d SHA512 0c22df2586cb81a4ea5f689ec16ea2c93e7b36ae34f5de8ffba9bdd7264c811bdcc2f55d6d056be4dacc04f3aaa0ceb1881b4d9ac4c5d72fa088389161708e3d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app-editors/sublime-text/sublime-text-3211-r1.ebuild Fri Jun 12 02:44:58 2020 +0200 @@ -0,0 +1,90 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils gnome2-utils + +# get the major version from PV +MV="${PV:0:1}" + +MY_PN="sublime_text_${MV}" +MY_P="Sublime%20Text" +S="${WORKDIR}/${MY_PN}" + +DESCRIPTION="Sophisticated text editor for code, markup and prose" +HOMEPAGE="http://www.sublimetext.com" + +BASE_URI="https://download.sublimetext.com" +SRC_URI="amd64? ( ${BASE_URI}/${MY_PN}_build_${PV}_x64.tar.bz2 ) + x86? ( ${BASE_URI}/${MY_PN}_build_${PV}_x32.tar.bz2 )" +LICENSE="Sublime" +SLOT="${MV}" +KEYWORDS="~amd64 ~x86" +IUSE="multislot dbus" +RESTRICT="bindist mirror strip" + +DEPEND=">=media-libs/libpng-1.2.46:* + x11-libs/gtk+:3 + multislot? ( app-eselect/eselect-sublime ) + dbus? ( sys-apps/dbus )" +RDEPEND="${DEPEND}" + +QA_PREBUILT="*" + +pkg_nofetch() { + eerror "Sublime Text official site seems to be unresponsive." +} + +src_install() { + local targetdir="/opt/${MY_PN}" + + insinto "$targetdir" + into "$targetdir" + exeinto "$targetdir" + doins -r "Icon" + doins -r "Packages" + doins "python3.3.zip" + doins "sublime.py" + doins "sublime_plugin.py" + doexe "sublime_text" + doexe "plugin_host" + dosym "$targetdir/sublime_text" /usr/bin/subl${MV} + + local size + for size in 16 32 48 128 256 ; do + insinto /usr/share/icons/hicolor/${size}x${size}/apps + newins "Icon/${size}x${size}/sublime-text.png" sublime_text.png + done + + make_desktop_entry "subl${MV} %F" "Sublime Text ${MV}" sublime_text "Development;TextEditor" "StartupNotify=true" +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update + if use multislot; then + eselect_sublime_update + else + local bindir="/usr/bin" + einfo "using major version ${MV} as default" + dosym $bindir/subl${MV} /usr/bin/subl + fi +} + +pkg_postrm() { + gnome2_icon_cache_update +} + +eselect_sublime_update() { + einfo + elog "Updating Sublime Text to the latest installed version" + elog "you can select the version you want to use just using" + elog + elog "eselect sublime set sublime_text_2" + einfo + eselect sublime set sublime_text_${MV} --use-old +} +