app-editors/vscodium: new package

Closes: https://github.com/gentoo/gentoo/pull/21045
Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
Adel KARA SLIMANE
2021-05-19 14:54:48 +02:00
committed by Joonas Niilola
parent 45e010688d
commit 086fd56332
5 changed files with 147 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DIST vscodium-1.56.2-amd64.tar.gz 108032091 BLAKE2B e6d66885f79a8f29e9316cf759d6b562029a3da9c3fc6d14742adda0ae20e4be05b6c08f8c1698f3340cd0ca97836c49d3ef82bca9a27318d5f6d5e36555455d SHA512 831444221a3055fde829920ad6c0b8c007aa539b614918b20af0e676ecd31f341497f9c7fb8d8fe95f757bc360446cac93e00ee1a828183e0feb1eefad1e0c11
DIST vscodium-1.56.2-arm.tar.gz 96683293 BLAKE2B bdc6b89ebfa9e1be765aef63f8a2bcdbf2074b64d70833447b3a3caf148c7887c672077827b7467a681219eef0101bdf82581f589586a263397d2cc9951a8c0c SHA512 023c59d4ae6590437c9425fa02f70cd957c125ea69cfa1c4fe8812f2b7521b747421efe89fd3e4bd95b54f0bdea177941f72467af5d8036d51426b8139a48fc2
DIST vscodium-1.56.2-arm64.tar.gz 113358341 BLAKE2B f7f8c8589985edd11ba80b4fff9ab1174d436a2516eabc02cd6b3f5d03559295f3fe6772a16e6825d6a23953107b5b7537ab28cedc040a8b35a4b25182ee8d29 SHA512 f0aec2074e93bc26cfc615029bbc9ab360993f00a70272002982c058c7746824f6d97fffb34a5d6c16597b4ad8453730f28b04c11e4d0fd8ccea873490b260d5

View File

@@ -0,0 +1,12 @@
[Desktop Entry]
Name=VSCodium - URL Handler
Comment=Editing evolved
GenericName=Code Editor
Exec=/usr/bin/vscodium --open-url %U
Icon=vscodium
Type=Application
NoDisplay=true
StartupNotify=true
Categories=Utility;TextEditor;Development;IDE;
MimeType=x-scheme-handler/vscodium;
Keywords=vscode;

View File

@@ -0,0 +1,18 @@
[Desktop Entry]
Name=VSCodium
Comment=Editing evolved
GenericName=Code Editor
Exec=/usr/bin/vscodium --unity-launch %F
Icon=vscodium
Type=Application
StartupNotify=false
StartupWMClass=VSCodium
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/vscodium --new-window %F
Icon=vscodium

View File

@@ -0,0 +1,19 @@
<?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>
Microsofts vscode source code is open source (MIT-licensed), but the product available for download (Visual Studio Code) is licensed under the Microsoft-vscode license (a copy can be found in the licenses folder of your gentoo repository) and contains telemetry/tracking. The VSCodium project exists so that you dont have to download+build from source. This project includes special build scripts that clone Microsofts vscode repo, run the build commands, and upload the resulting binaries for you to GitHub releases. These binaries are licensed under the MIT license. Telemetry is disabled.
</longdescription>
<upstream>
<remote-id type="github">VSCodium/vscodium</remote-id>
<bugs-to>https://github.com/VSCodium/vscodium/issues</bugs-to>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,95 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit desktop pax-utils xdg
DESCRIPTION="A community-driven, freely-licensed binary distribution of Microsoft's VSCode"
HOMEPAGE="https://vscodium.com/"
SRC_URI="
amd64? ( https://github.com/VSCodium/${PN}/releases/download/${PV}/VSCodium-linux-x64-${PV}.tar.gz -> ${P}-amd64.tar.gz )
arm? ( https://github.com/VSCodium/${PN}/releases/download/${PV}/VSCodium-linux-armhf-${PV}.tar.gz -> ${P}-arm.tar.gz )
arm64? ( https://github.com/VSCodium/${PN}/releases/download/${PV}/VSCodium-linux-arm64-${PV}.tar.gz -> ${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+
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
net-print/cups
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/vscodium/codium
/opt/vscodium/libEGL.so
/opt/vscodium/libffmpeg.so
/opt/vscodium/libGLESv2.so
/opt/vscodium/libvulkan.so*
/opt/vscodium/chrome-sandbox
/opt/vscodium/libvk_swiftshader.so
/opt/vscodium/swiftshader/libEGL.so
/opt/vscodium/swiftshader/libGLESv2.so
/opt/vscodium/resources/app/extensions/*
/opt/vscodium/resources/app/node_modules.asar.unpacked/*
"
S="${WORKDIR}"
src_install() {
# Cleanup
rm "${S}/resources/app/LICENSE.txt" || die
# Install
pax-mark m codium
insinto "/opt/${PN}"
doins -r *
fperms +x /opt/${PN}/{,bin/}codium
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/codium" "usr/bin/vscodium"
domenu "${FILESDIR}/vscodium.desktop"
domenu "${FILESDIR}/vscodium-url-handler.desktop"
newicon "resources/app/resources/linux/code.png" "vscodium.png"
}
pkg_postinst() {
xdg_pkg_postinst
elog "When compared to the regular VSCode, VSCodium has a few quirks"
elog "More information at: https://github.com/VSCodium/vscodium/blob/master/DOCS.md"
}