commit: c9b686ac6825352c6b626ba8c9c9d91400114d94 Author: Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com> AuthorDate: Sun Jan 3 15:28:56 2021 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> CommitDate: Sun Jan 3 15:31:57 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=c9b686ac
app-editors/visual-studio-code-bin: New Package Closes: https://bugs.gentoo.org/675742 Closes: https://github.com/gentoo/gentoo/pull/11674 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Gino McCarty <onigino <AT> protonmail.com> Signed-off-by: Ross Charles Campbell <rossbridger.cc <AT> gmail.com> app-editors/visual-studio-code-bin/Manifest | 3 + .../files/code-url-handler.desktop | 12 ++++ .../visual-studio-code-bin/files/code.desktop | 18 ++++++ app-editors/visual-studio-code-bin/metadata.xml | 23 +++++++ .../visual-studio-code-bin-1.52.1.ebuild | 73 ++++++++++++++++++++++ licenses/Microsoft-VSCode | 41 ++++++++++++ 6 files changed, 170 insertions(+) diff --git a/app-editors/visual-studio-code-bin/Manifest b/app-editors/visual-studio-code-bin/Manifest new file mode 100644 index 00000000..ee3e4c12 --- /dev/null +++ b/app-editors/visual-studio-code-bin/Manifest @@ -0,0 +1,3 @@ +DIST visual-studio-code-bin-1.52.1-amd64.tar.gz 92016385 BLAKE2B 10f7b737e11b4a30991d25bf475267a220814fb3438a5da51a764b3b4890933d1fe151b54632968e9b4ac47fb9f2989d0d20f22b04ef6f55f82a5964f0f8adcc SHA512 02082e698c4f550e0c84986767f0f8465d008cd3fca9675c4dc79a71346d898e6859b1a9dd38269f351efe7dcd6a76e4974a29ad25e019a2714140e6656b1778 +DIST visual-studio-code-bin-1.52.1-arm.tar.gz 83556664 BLAKE2B 9031839e0d265a9625fb5c759d8ca4f108ebe8f626c83438764de5de7f831ed7e64456367b9313c7ec1d8c4597e1efefbe4cd34c72d2e9d549aa7f2434e1b8b4 SHA512 1da9fedc6124c5460b4ed321a6f8fd1ea45d5562d313975c641fc7752d6b51dd9b43992626eab175dff68631d8c28b759146560ac2f7785e15ff3ea27b90fd10 +DIST visual-studio-code-bin-1.52.1-arm64.tar.gz 95054018 BLAKE2B 5428efc0f49c404c807bf1f09fcafeb5cec90506dd730ec809b9313ca304b16e493f2b6c4289bb0ad8647f8ea1de4499d48da95b6ceb2aa4285d4397ea1d7e60 SHA512 328444cb3c3e209073c512f9da35f74cd443c7dcec86058c517ffe5a60183c03ad7a0e4b24eed190f55ddb96788966dbc1fe1bf1d6b5f3b30580ade6267e986f diff --git a/app-editors/visual-studio-code-bin/files/code-url-handler.desktop b/app-editors/visual-studio-code-bin/files/code-url-handler.desktop new file mode 100644 index 00000000..30ecb71d --- /dev/null +++ b/app-editors/visual-studio-code-bin/files/code-url-handler.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Visual Studio Code - URL Handler +Comment=Code Editing. Redefined. +GenericName=Text Editor +Exec=/usr/bin/code --no-sandbox --open-url %U +Icon=visual-studio-code +Type=Application +NoDisplay=true +StartupNotify=true +Categories=Utility;TextEditor;Development;IDE; +MimeType=x-scheme-handler/vscode; +Keywords=vscode; diff --git a/app-editors/visual-studio-code-bin/files/code.desktop b/app-editors/visual-studio-code-bin/files/code.desktop new file mode 100755 index 00000000..8d428b91 --- /dev/null +++ b/app-editors/visual-studio-code-bin/files/code.desktop @@ -0,0 +1,18 @@ +[Desktop Entry] +Name=Visual Studio Code +Comment=Code Editing. Redefined. +GenericName=Text Editor +Exec=/usr/bin/code --no-sandbox --unity-launch %F +Icon=visual-studio-code +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/share/code/code --no-sandbox --new-window %F +Icon=com.visualstudio.code diff --git a/app-editors/visual-studio-code-bin/metadata.xml b/app-editors/visual-studio-code-bin/metadata.xml new file mode 100644 index 00000000..05125576 --- /dev/null +++ b/app-editors/visual-studio-code-bin/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"> + <email>onig...@protonmail.com</email> + <name>Gino McCarty</name> + </maintainer> + <maintainer type="person"> + <email>rossbridger...@gmail.com</email> + <name>Ross Charles Campbell</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/visual-studio-code-bin/visual-studio-code-bin-1.52.1.ebuild b/app-editors/visual-studio-code-bin/visual-studio-code-bin-1.52.1.ebuild new file mode 100644 index 00000000..1453f6bf --- /dev/null +++ b/app-editors/visual-studio-code-bin/visual-studio-code-bin-1.52.1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop eutils pax-utils + +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="MIT Microsoft-VSCode" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~arm64" +IUSE="" + +RDEPEND=" + app-accessibility/at-spi2-atk + app-crypt/libsecret[crypt] + dev-libs/nss + media-libs/libpng:0/16 + x11-libs/cairo + x11-libs/gtk+:3 + x11-libs/libnotify + x11-libs/libXScrnSaver + x11-libs/libXtst + x11-libs/pango" + +QA_PRESTRIPPED="*" + +QA_PREBUILT=" + opt/${MY_PN}/code + opt/${MY_PN}/libEGL.so + opt/${MY_PN}/libffmpeg.so + opt/${MY_PN}/libGLESv2.so + opt/${MY_PN}/libvk_swiftshader.so + opt/${MY_PN}/libvulkan.so + opt/${MY_PN}/swiftshader/libEGL.so + opt/${MY_PN}/swiftshader/libGLESv2.so" + +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() { + pax-mark m code + insinto "/opt/${PN}" + doins -r * + fperms +x /opt/${PN}/{,bin/}code + dosym "../../opt/${PN}/bin/code" "usr/bin/${PN}" + domenu "${FILESDIR}/code.desktop" + domenu "${FILESDIR}/code-url-handler.desktop" + dodoc "resources/app/LICENSE.rtf" + newicon "resources/app/resources/linux/code.png" "visual-studio-code.png" +} + +pkg_postinst() { + elog "You may want to install some additional utils, check in:" + elog "https://code.visualstudio.com/Docs/setup#_additional-tools" +} diff --git a/licenses/Microsoft-VSCode b/licenses/Microsoft-VSCode new file mode 100644 index 00000000..11037132 --- /dev/null +++ b/licenses/Microsoft-VSCode @@ -0,0 +1,41 @@ +This license applies to the Visual Studio Code product. Source Code for Visual Studio Code is available at https://github.com/Microsoft/vscode under the MIT license agreement at https://github.com/Microsoft/vscode/blob/master/LICENSE.txt. Additional license information can be found in our FAQ at https://code.visualstudio.com/docs/supporting/faq. + +MICROSOFT SOFTWARE LICENSE TERMS +MICROSOFT VISUAL STUDIO CODE +These license terms are an agreement between you and Microsoft Corporation (or based on where you live, one of its affiliates). They apply to the software named above. The terms also apply to any Microsoft services or updates for the software, except to the extent those have different terms. + +IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. + +INSTALLATION AND USE RIGHTS. +General. You may use any number of copies of the software to develop and test your applications, including deployment within your internal corporate network. +Demo use. The uses permitted above include use of the software in demonstrating your applications. +Third Party Components. The software may include third party components with separate legal notices or governed by other agreements, as may be described in the ThirdPartyNotices file accompanying the software. +Extensions. The software gives you the option to download other Microsoft and third party software packages from our extension marketplace or package managers. Those packages are under their own licenses, and not this agreement. Microsoft does not distribute, license or provide any warranties for any of the third party packages. By accessing or using our extension marketplace, you agree to the extension marketplace terms located at https://aka.ms/vsmarketplace-ToU. +DATA. +Data Collection. The software may collect information about you and your use of the software, and send that to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may opt-out of many of these scenarios, but not all, as described in the product documentation located at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting. There may also be some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with Microsofts privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices. +Processing of Personal Data. To the extent Microsoft is a processor or subprocessor of personal data in connection with the software, Microsoft makes the commitments in the European Union General Data Protection Regulation Terms of the Online Services Terms to all customers effective May 25, 2018, at https://go.microsoft.com/?linkid=9840733. +UPDATES. The software may periodically check for updates and download and install them for you. You may obtain updates only from Microsoft or authorized sources. Microsoft may need to update your system to provide you with updates. You agree to receive these automatic updates without any additional notice. Updates may not include or support all existing software features, services, or peripheral devices. If you do not want automatic updates, you may turn them off by following the instructions in the documentation at https://go.microsoft.com/fwlink/?LinkID=616397. +FEEDBACK. If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for any purpose. You will not give feedback that is subject to a license that requires Microsoft to license its software or documentation to third parties because we include your feedback in them. These rights survive this agreement. +SCOPE OF LICENSE. This license applies to the Visual Studio Code product. Source code for Visual Studio Code is available at https://github.com/Microsoft/vscode under the MIT license agreement. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not +reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software except and solely to the extent required by third party licensing terms governing use of certain open source components that may be included in the software; +remove, minimize, block or modify any notices of Microsoft or its suppliers in the software; +use the software in any way that is against the law; +share, publish, rent or lease the software, or provide the software as a stand-alone offering for others to use. +SUPPORT SERVICES. Because this software is as is, we may not provide support services for it. +ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services. +EXPORT RESTRICTIONS. You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end-users, and end use. For further information on export restrictions, see https://www.microsoft.com/exporting. +APPLICABLE LAW. If you acquired the software in the United States, Washington law applies to interpretation of and claims for breach of this agreement, and the laws of the state where you live apply to all other claims. If you acquired the software in any other country, its laws apply. +CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you: +Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights. +Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software. +Germany and Austria. +Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software. +Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law. +Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence. + +DISCLAIMER OF WARRANTY. The software is licensed as-is. You bear the risk of using it. Microsoft gives no express warranties, guarantees or conditions. To the extent permitted under your local laws, Microsoft excludes the implied warranties of merchantability, fitness for a particular purpose and non-infringement. +LIMITATION ON AND EXCLUSION OF DAMAGES. You can recover from Microsoft and its suppliers only direct damages up to U.S. $5.00. You cannot recover any other damages, including consequential, lost profits, special, indirect or incidental damages. + +This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law. + +It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state or country may not allow the exclusion or limitation of incidental, consequential or other damages.