diff options
author | Adel KARA SLIMANE <adel@karaslimane.com> | 2021-05-07 02:43:58 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-05-27 10:26:50 +0300 |
commit | f611be487a31ee398da4275c436a761c5d59511a (patch) | |
tree | a901793d062460695918cef7abf4c1ca50530942 /app-editors | |
parent | licenses: Add Microsoft-vscode license (diff) | |
download | gentoo-f611be487a31ee398da4275c436a761c5d59511a.tar.gz gentoo-f611be487a31ee398da4275c436a761c5d59511a.tar.bz2 gentoo-f611be487a31ee398da4275c436a761c5d59511a.zip |
app-editors/vscode: New package
Visual Studio Code is a lightweight but powerful source code editor which
runs on your desktop and is available for Windows, macOS and Linux. It
comes with built-in support for JavaScript, TypeScript and Node.js and has
a rich ecosystem of extensions for other languages (such as C++, C#, Java,
Python, PHP, Go) and runtimes (such as .NET and Unity).
Closes: https://bugs.gentoo.org/657628
Closes: https://github.com/gentoo/gentoo/pull/20710
Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-editors')
-rw-r--r-- | app-editors/vscode/Manifest | 3 | ||||
-rw-r--r-- | app-editors/vscode/files/vscode-url-handler.desktop | 12 | ||||
-rw-r--r-- | app-editors/vscode/files/vscode.desktop | 18 | ||||
-rw-r--r-- | app-editors/vscode/metadata.xml | 23 | ||||
-rw-r--r-- | app-editors/vscode/vscode-1.56.2.ebuild | 105 |
5 files changed, 161 insertions, 0 deletions
diff --git a/app-editors/vscode/Manifest b/app-editors/vscode/Manifest new file mode 100644 index 000000000000..8d4c4f054ddb --- /dev/null +++ b/app-editors/vscode/Manifest @@ -0,0 +1,3 @@ +DIST vscode-1.56.2-amd64.tar.gz 104824843 BLAKE2B 608cc74daad0534a91d3c6200827b82efa0c2a9634c3cd9f031d4744a35f25c5201a7310011d6dfe57f761845e79574d068678a4500650c47d8404d2bd810f4d SHA512 35ef320b92a66d05a8c2b61a81978d659245f37ef0b2f05002083386a265a232ed163dcc06ddee9bc2bc8f1205fa80e7841268bf66fdddcabe4a8ed35fb50a35 +DIST vscode-1.56.2-arm.tar.gz 95395040 BLAKE2B e948f09a97a39f898276fe4bbc9f7f35fa96b833732a48058e402aaa0246790d79c5422f5e209c842b94c6c46d19b657cdeefa9caa1e255331f81e91e0760c69 SHA512 4486d030d2d611aa0d29a156ba5c2beb2bd0ab1950684c7bdea44460fb05f3a18b62419c346d99a84cd71bb595f7802dab10730b40600879e442ee3181129e6f +DIST vscode-1.56.2-arm64.tar.gz 110174990 BLAKE2B 3b512136911b3ca431fbf71951655490c85f1c7cc707c6ddea3fd4d41b956fbf33dd8264e279d1d6e69564506aefcd9588397665133a3a34997d916605c9aa73 SHA512 bc3fb6b78e33286486411aa78b538693c371b309e86a84ee7361a2fd78d2d8e0dd4e9dd761f9278ced4e3a31a532e2534cdde001635935dfda92dfab85eb9e51 diff --git a/app-editors/vscode/files/vscode-url-handler.desktop b/app-editors/vscode/files/vscode-url-handler.desktop new file mode 100644 index 000000000000..ec5bb1732c38 --- /dev/null +++ b/app-editors/vscode/files/vscode-url-handler.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Visual Studio Code - URL Handler +Comment=Editing evolved +GenericName=Code Editor +Exec=/usr/bin/vscode --open-url %U +Icon=vscode +Type=Application +NoDisplay=true +StartupNotify=true +Categories=Utility;TextEditor;Development;IDE; +MimeType=x-scheme-handler/vscode; +Keywords=vscode; diff --git a/app-editors/vscode/files/vscode.desktop b/app-editors/vscode/files/vscode.desktop new file mode 100644 index 000000000000..317112739991 --- /dev/null +++ b/app-editors/vscode/files/vscode.desktop @@ -0,0 +1,18 @@ +[Desktop Entry] +Name=Visual Studio Code +Comment=Editing evolved +GenericName=Code Editor +Exec=/usr/bin/vscode --unity-launch %F +Icon=vscode +Type=Application +StartupNotify=false +StartupWMClass=Code +Categories=Utility;TextEditor;Development;IDE; +MimeType=text/plain;inode/directory;application/x-code-workspace; +Actions=new-empty-window; +Keywords=vscode; + +[Desktop Action new-empty-window] +Name=New Empty Window +Exec=/usr/bin/vscode --new-window %F +Icon=vscode diff --git a/app-editors/vscode/metadata.xml b/app-editors/vscode/metadata.xml new file mode 100644 index 000000000000..9aea48978a99 --- /dev/null +++ b/app-editors/vscode/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>adel.ks@zegrapher.com</email> + <name>Adel KARA SLIMANE</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <longdescription> + Visual Studio Code is a lightweight but powerful source code editor which + runs on your desktop and is available for Windows, macOS and Linux. It + comes with built-in support for JavaScript, TypeScript and Node.js and has + a rich ecosystem of extensions for other languages (such as C++, C#, Java, + Python, PHP, Go) and runtimes (such as .NET and Unity). + </longdescription> + <upstream> + <remote-id type="github">microsoft/vscode</remote-id> + <bugs-to>https://github.com/microsoft/vscode/issues</bugs-to> + </upstream> +</pkgmetadata> diff --git a/app-editors/vscode/vscode-1.56.2.ebuild b/app-editors/vscode/vscode-1.56.2.ebuild new file mode 100644 index 000000000000..9f849c2af23c --- /dev/null +++ b/app-editors/vscode/vscode-1.56.2.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop pax-utils xdg + +DESCRIPTION="Multiplatform Visual Studio Code from Microsoft" +HOMEPAGE="https://code.visualstudio.com" +SRC_URI=" + amd64? ( https://update.code.visualstudio.com/${PV}/linux-x64/stable -> ${P}-amd64.tar.gz ) + arm? ( https://update.code.visualstudio.com/${PV}/linux-armhf/stable -> ${P}-arm.tar.gz ) + arm64? ( https://update.code.visualstudio.com/${PV}/linux-arm64/stable -> ${P}-arm64.tar.gz ) +" + +RESTRICT="mirror strip bindist" + +LICENSE=" + Apache-2.0 + BSD + BSD-1 + BSD-2 + BSD-4 + CC-BY-4.0 + ISC + LGPL-2.1+ + Microsoft-vscode + MIT + MPL-2.0 + openssl + PYTHON + TextMate-bundle + Unlicense + UoI-NCSA + W3C +" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64" +IUSE="" + +RDEPEND=" + app-accessibility/at-spi2-atk + app-crypt/libsecret[crypt] + dev-libs/nss + media-libs/alsa-lib + media-libs/libpng:0/16 + x11-libs/cairo + x11-libs/gtk+:3 + x11-libs/libnotify + x11-libs/libxkbcommon + x11-libs/libxkbfile + x11-libs/libXScrnSaver + x11-libs/libXtst + x11-libs/pango +" + +QA_PREBUILT=" + /opt/vscode/code + /opt/vscode/libEGL.so + /opt/vscode/libffmpeg.so + /opt/vscode/libGLESv2.so + /opt/vscode/libvulkan.so* + /opt/vscode/chrome-sandbox + /opt/vscode/libvk_swiftshader.so + /opt/vscode/swiftshader/libEGL.so + /opt/vscode/swiftshader/libGLESv2.so + /opt/vscode/resources/app/extensions/* + /opt/vscode/resources/app/node_modules.asar.unpacked/* +" + +pkg_setup() { + if use amd64; then + S="${WORKDIR}/VSCode-linux-x64" + elif use arm; then + S="${WORKDIR}/VSCode-linux-armhf" + elif use arm64; then + S="${WORKDIR}/VSCode-linux-arm64" + else + die "Visual Studio Code only supports amd64, arm and arm64" + fi +} + +src_install() { + # Cleanup + rm -r "${S}/resources/app/LICENSES.chromium.html" "${S}/resources/app/LICENSE.rtf" "${S}/resources/app/licenses" || die + + # Install + pax-mark m code + insinto "/opt/${PN}" + doins -r * + fperms +x /opt/${PN}/{,bin/}code + fperms +x /opt/${PN}/chrome-sandbox + fperms -R +x /opt/${PN}/resources/app/out/vs/base/node + fperms +x /opt/${PN}/resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg + dosym "../../opt/${PN}/bin/code" "usr/bin/vscode" + domenu "${FILESDIR}/vscode.desktop" + domenu "${FILESDIR}/vscode-url-handler.desktop" + newicon "resources/app/resources/linux/code.png" "vscode.png" +} + +pkg_postinst() { + xdg_pkg_postinst + elog "You may want to install some additional utils, check in:" + elog "https://code.visualstudio.com/Docs/setup#_additional-tools" +} |