From 8cd93e3c25f21d2e90a823e15b6241ae7e80eaef Mon Sep 17 00:00:00 2001 From: Ronald Farrer Date: Tue, 28 Jan 2020 12:47:23 -0800 Subject: [PATCH] Added new ebuild for Microsoft Visual Studio Code. --- app-editors/vscode-bin/Manifest | 3 + app-editors/vscode-bin/metadata.xml | 20 ++++++ .../vscode-bin/vscode-bin-1.41.1.ebuild | 65 +++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 app-editors/vscode-bin/Manifest create mode 100644 app-editors/vscode-bin/metadata.xml create mode 100644 app-editors/vscode-bin/vscode-bin-1.41.1.ebuild diff --git a/app-editors/vscode-bin/Manifest b/app-editors/vscode-bin/Manifest new file mode 100644 index 0000000..1532337 --- /dev/null +++ b/app-editors/vscode-bin/Manifest @@ -0,0 +1,3 @@ +DIST vscode-1.41.1-amd64.tar.gz 81500694 BLAKE2B 575e6aef99eba240c3d47c1f2e849ef5390ee2e6bc35b38486d5351a63c1654903b93d2f4db74f0f5e0923c89f14d9a47dc69b6b1705ee877bfcbaeeaafd15ec SHA512 c180a2e112dd1bff97adca83c5aeb6d1bd66ba391d2a63dbae83629065c7bd3c0547f3f3cc3e0c1d67dac1ea601f3f620c6fe57906018883d8c943ddcc5a7830 +EBUILD vscode-bin-1.41.1.ebuild 1536 BLAKE2B edd26e668bda5b83ca0ee21c5c021cf1b6f00d01242ea1d15dbcdd8ee5ad82fa296d26aeeceeddf51450f3527ef5cbaf2b822fd75996390917be429411e7dbd8 SHA512 67627330b4ee864b19df22153c789ebcacd246ceb1ea4ddc9fd479ddfebd0679892e6a65cbd7db263513cbc6f3d0404117242174a66ba2eeb8e0c977f41e5f1f +MISC metadata.xml 655 BLAKE2B 80c5d8c3e2d161ceab6e9ee70ebff06a0c71ae599b98731a932039e5fbc65afa7fd676181e46d6f5d1b25c11b704c28ee047398a2f07f47b91e685b8f731a8d9 SHA512 f24a7ac89458b31421fa30ad6c3f6c99c1512f1e78bf8668af3e4baa260a25a3b1a87b86454894d9aa2a8ca7df0953f5338f0cf9427afe44da5f76c67249e2cf diff --git a/app-editors/vscode-bin/metadata.xml b/app-editors/vscode-bin/metadata.xml new file mode 100644 index 0000000..1a35e6a --- /dev/null +++ b/app-editors/vscode-bin/metadata.xml @@ -0,0 +1,20 @@ + + + + + Microsoft/vscode + https://github.com/Microsoft/vscode/issues + + Microsoft + opensource@microsoft.com + + + + canutethegreat@gmail.com + Ronald Farrer + CanuteTheGreat-overlay + + + Triggers a paxmarking of the binary + + diff --git a/app-editors/vscode-bin/vscode-bin-1.41.1.ebuild b/app-editors/vscode-bin/vscode-bin-1.41.1.ebuild new file mode 100644 index 0000000..8e05acc --- /dev/null +++ b/app-editors/vscode-bin/vscode-bin-1.41.1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2019 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop pax-utils + +MY_PN="${PN/-bin}" +MY_P=${MY_PN}-${PV} + +DESCRIPTION="Multiplatform Visual Studio Code from Microsoft (binary version)" +HOMEPAGE="https://code.visualstudio.com" + +SRC_URI=" + amd64? ( https://update.code.visualstudio.com/${PV}/linux-x64/stable -> ${MY_P}-amd64.tar.gz ) + " +RESTRICT="mirror strip bindist" + +LICENSE="MS-vscode-EULA" +SLOT="0" +KEYWORDS="~amd64" +IUSE="pax_kernel" + +DEPEND=" + >=media-libs/libpng-1.2.46 + >=x11-libs/gtk+-2.24.8-r1:2 + x11-libs/cairo + gnome-base/gconf + x11-libs/libXtst + !app-editors/vscode +" + +RDEPEND=" + ${DEPEND} + app-accessibility/at-spi2-atk + >=net-print/cups-2.0.0 + x11-libs/libnotify + x11-libs/libXScrnSaver + dev-libs/nss + app-crypt/libsecret[crypt]" + +DOCS=( resources/app/LICENSE.rtf ) + +QA_PRESTRIPPED="opt/${MY_PN}/code" +QA_PREBUILT="opt/${MY_PN}/code" + +pkg_setup(){ + use amd64 && S="${WORKDIR}/VSCode-linux-x64" +} + +src_install(){ + mkdir -p "${ED}/opt/${MY_PN}" + cp -r . "${ED}/opt/${MY_PN}/" + dosym "/opt/${MY_PN}/bin/code" "/usr/bin/${MY_PN}" + dosym "/opt/${MY_PN}/bin/code" "/usr/bin/code" + make_desktop_entry "${MY_PN}" "Visual Studio Code" "${MY_PN}" "Development;IDE" + newicon "resources/app/resources/linux/code.png" ${MY_PN}.png + einstalldocs + use pax_kernel && pax-mark -m "${ED%/}"/opt/${MY_PN}/code +} + +pkg_postinst(){ + elog "You may install some additional utils, so check them in:" + elog "https://code.visualstudio.com/Docs/setup#_additional-tools" +}