summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/vscode')
-rw-r--r--app-editors/vscode/Manifest6
-rw-r--r--app-editors/vscode/files/code-url-handler.desktop12
-rw-r--r--app-editors/vscode/files/code.desktop18
-rw-r--r--app-editors/vscode/metadata.xml31
-rw-r--r--app-editors/vscode/vscode-1.89.0.ebuild132
-rw-r--r--app-editors/vscode/vscode-1.89.1.ebuild132
6 files changed, 331 insertions, 0 deletions
diff --git a/app-editors/vscode/Manifest b/app-editors/vscode/Manifest
new file mode 100644
index 000000000000..c16079c48783
--- /dev/null
+++ b/app-editors/vscode/Manifest
@@ -0,0 +1,6 @@
+DIST vscode-1.89.0-amd64.tar.gz 143134909 BLAKE2B 93fffeb6d1d13d5f1b553bb16816a6b9b6ff1979a5ae4c3e3f294ce911875f5b1ebdf0888c4fcba5a47cad3229ff5b88bb938c0d180f84a22f060fd53c878d8b SHA512 7509c6c073fd8e23eb1c989e67085b4f9f9686d26c33d6dd915b1836fd8501b59b261b142590cf00cecf62cbccc30f2c620ebfef6af2173b0f41fa59160e4428
+DIST vscode-1.89.0-arm.tar.gz 128531766 BLAKE2B 12920281d644fcd2582ffe32b15328888a3acd5341578f6548f48c976c41c330fb33ea30d0933742f1978423afae42d187d5a6feea2bb96837da4fb0067352e2 SHA512 25ac38362cfbdbbb51fe278ba641323ecefe3281b731d22d6ca3b57e125eb12bd6c9cccb68d69cd1c50dc4a399606e5c7ae19dafef8ae6b113658d975ed56560
+DIST vscode-1.89.0-arm64.tar.gz 139462657 BLAKE2B b0873b26f8d49d5c1be9cc0d71e7f88c1154faf3e8660ecd1ea8f79932b9399ec70d468035bdc7a067970e6c315ae3b92658239e2278b0cd5cdd16bebd637007 SHA512 156cf694f9c7a0acff313108e49e0d0a300bf6e5a4aef410056c4f874b6c054d5718542213da6edae42d3ba738a0b8fbd537f7c725d7352a2fd5e8129fc6d22c
+DIST vscode-1.89.1-amd64.tar.gz 143147679 BLAKE2B 1b6e33d02e6b65ac91710276d0ffcffb636f645c9a21bad2057c20855dd621702d5cebaabfcf7be02632d41d1bbaa89fe5270326be4237d7d69de04a343bc655 SHA512 09ff935fbb56a8c63d6a18a2cae482dc45e1f34f524260591f4e5859f6a6297a789291b856e3c644af9255a64a92815b0217f8dda237fc00e445f822e1adf531
+DIST vscode-1.89.1-arm.tar.gz 128552384 BLAKE2B 3f26d82a44d7a68588205c2ee2b7523ffd992860deaa7863322e8dbfbc886062ee3fa4530a647d655c4eaf8b1b22c5b981436fd658c9005e9fcfd7aacc159b6b SHA512 fe63cf0315e382b80367bfd8bdc8fc75f11f734b38f8413fa3ad2da25e9402fd52fb1f48cf2faa13d702bb6d8ea8e82e5ca5dbb4aaf8819d35d6a442c8e01d0f
+DIST vscode-1.89.1-arm64.tar.gz 139443388 BLAKE2B 4a88f080b631688a969160b002d47b1846d2bd6d80360f6f3bbbf3d6c2620abd29aa431ba15e4414beb009445f9342f2d6f57c39678490b362b68c53a793f8fc SHA512 ebd1176aea7cb5ecf260324c40353b4af274c19c4b09f665fe7eec7e83bf163609503d986f75f50681ecb2ef2996c41988a794b2c526a1f865ef87c1313bab30
diff --git a/app-editors/vscode/files/code-url-handler.desktop b/app-editors/vscode/files/code-url-handler.desktop
new file mode 100644
index 000000000000..fe65d7527069
--- /dev/null
+++ b/app-editors/vscode/files/code-url-handler.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=VSCode - URL Handler
+Comment=Editing evolved
+GenericName=Code Editor
+Exec=/usr/bin/vscode @exec_extra_flags@ --open-url %U
+Icon=vscode
+Type=Application
+NoDisplay=true
+StartupNotify=true
+Categories=Utility;TextEditor;Development;IDE;
+MimeType=x-scheme-handler/vscode;
+Keywords=vscode;code;
diff --git a/app-editors/vscode/files/code.desktop b/app-editors/vscode/files/code.desktop
new file mode 100644
index 000000000000..ec697eca68b6
--- /dev/null
+++ b/app-editors/vscode/files/code.desktop
@@ -0,0 +1,18 @@
+[Desktop Entry]
+Name=VSCode
+Comment=Editing evolved
+GenericName=Code Editor
+Exec=/usr/bin/vscode @exec_extra_flags@ --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;code;
+
+[Desktop Action new-empty-window]
+Name=New Empty Window
+Exec=/usr/bin/vscode @exec_extra_flags@ --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..52921d6c9411
--- /dev/null
+++ b/app-editors/vscode/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://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="person">
+ <email>arthurzam@gentoo.org</email>
+ <name>Arthur Zamarin</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="egl">Use EGL platform, enables smooth rending in high refresh rate monitors on X11/Xwayland</flag>
+ <flag name="wayland">Run in wayland mode under wayland sessions, xwayland otherwise. This flag doesn't affect x11 sessions.</flag>
+ </use>
+ <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.89.0.ebuild b/app-editors/vscode/vscode-1.89.0.ebuild
new file mode 100644
index 000000000000..f803279f6a02
--- /dev/null
+++ b/app-editors/vscode/vscode-1.89.0.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop pax-utils xdg optfeature
+
+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 )
+"
+S="${WORKDIR}"
+
+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="egl kerberos wayland"
+RESTRICT="mirror strip bindist"
+
+RDEPEND="
+ >=app-accessibility/at-spi2-core-2.46.0:2
+ app-crypt/libsecret[crypt]
+ app-misc/ca-certificates
+ dev-libs/expat
+ dev-libs/glib:2
+ dev-libs/nspr
+ dev-libs/nss
+ media-libs/alsa-lib
+ media-libs/libcanberra[gtk3]
+ media-libs/libglvnd
+ media-libs/mesa
+ net-misc/curl
+ sys-apps/dbus
+ sys-libs/zlib
+ sys-process/lsof
+ x11-libs/cairo
+ x11-libs/gtk+:3
+ x11-libs/libdrm
+ x11-libs/libX11
+ x11-libs/libxcb
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libxkbcommon
+ x11-libs/libxkbfile
+ x11-libs/libXrandr
+ x11-libs/libXScrnSaver
+ x11-libs/pango
+ x11-misc/xdg-utils
+ kerberos? ( app-crypt/mit-krb5 )
+"
+
+QA_PREBUILT="*"
+
+src_install() {
+ if use amd64; then
+ cd "${WORKDIR}/VSCode-linux-x64" || die
+ elif use arm; then
+ cd "${WORKDIR}/VSCode-linux-armhf" || die
+ elif use arm64; then
+ cd "${WORKDIR}/VSCode-linux-arm64" || die
+ else
+ die "Visual Studio Code only supports amd64, arm and arm64"
+ fi
+
+ # Cleanup
+ rm -r ./resources/app/ThirdPartyNotices.txt || die
+
+ # Disable update server
+ sed -e "/updateUrl/d" -i ./resources/app/product.json || die
+
+ if ! use kerberos; then
+ rm -r ./resources/app/node_modules.asar.unpacked/kerberos || die
+ fi
+
+ # Install
+ pax-mark m code
+ mkdir -p "${ED}/opt/${PN}" || die
+ cp -r . "${ED}/opt/${PN}" || die
+ fperms 4711 /opt/${PN}/chrome-sandbox
+
+ dosym -r "/opt/${PN}/bin/code" "usr/bin/vscode"
+ dosym -r "/opt/${PN}/bin/code" "usr/bin/code"
+
+ local EXEC_EXTRA_FLAGS=()
+ if use wayland; then
+ EXEC_EXTRA_FLAGS+=( "--ozone-platform-hint=auto" "--enable-wayland-ime" )
+ fi
+ if use egl; then
+ EXEC_EXTRA_FLAGS+=( "--use-gl=egl" )
+ fi
+
+ sed "s|@exec_extra_flags@|${EXEC_EXTRA_FLAGS[*]}|g" \
+ "${FILESDIR}/code-url-handler.desktop" \
+ > "${T}/code-url-handler.desktop" || die
+
+ sed "s|@exec_extra_flags@|${EXEC_EXTRA_FLAGS[*]}|g" \
+ "${FILESDIR}/code.desktop" \
+ > "${T}/code.desktop" || die
+
+ domenu "${T}/code.desktop"
+ domenu "${T}/code-url-handler.desktop"
+ newicon "resources/app/resources/linux/code.png" "vscode.png"
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ optfeature "desktop notifications" x11-libs/libnotify
+ optfeature "keyring support inside vscode" "virtual/secret-service"
+}
diff --git a/app-editors/vscode/vscode-1.89.1.ebuild b/app-editors/vscode/vscode-1.89.1.ebuild
new file mode 100644
index 000000000000..f803279f6a02
--- /dev/null
+++ b/app-editors/vscode/vscode-1.89.1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop pax-utils xdg optfeature
+
+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 )
+"
+S="${WORKDIR}"
+
+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="egl kerberos wayland"
+RESTRICT="mirror strip bindist"
+
+RDEPEND="
+ >=app-accessibility/at-spi2-core-2.46.0:2
+ app-crypt/libsecret[crypt]
+ app-misc/ca-certificates
+ dev-libs/expat
+ dev-libs/glib:2
+ dev-libs/nspr
+ dev-libs/nss
+ media-libs/alsa-lib
+ media-libs/libcanberra[gtk3]
+ media-libs/libglvnd
+ media-libs/mesa
+ net-misc/curl
+ sys-apps/dbus
+ sys-libs/zlib
+ sys-process/lsof
+ x11-libs/cairo
+ x11-libs/gtk+:3
+ x11-libs/libdrm
+ x11-libs/libX11
+ x11-libs/libxcb
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libxkbcommon
+ x11-libs/libxkbfile
+ x11-libs/libXrandr
+ x11-libs/libXScrnSaver
+ x11-libs/pango
+ x11-misc/xdg-utils
+ kerberos? ( app-crypt/mit-krb5 )
+"
+
+QA_PREBUILT="*"
+
+src_install() {
+ if use amd64; then
+ cd "${WORKDIR}/VSCode-linux-x64" || die
+ elif use arm; then
+ cd "${WORKDIR}/VSCode-linux-armhf" || die
+ elif use arm64; then
+ cd "${WORKDIR}/VSCode-linux-arm64" || die
+ else
+ die "Visual Studio Code only supports amd64, arm and arm64"
+ fi
+
+ # Cleanup
+ rm -r ./resources/app/ThirdPartyNotices.txt || die
+
+ # Disable update server
+ sed -e "/updateUrl/d" -i ./resources/app/product.json || die
+
+ if ! use kerberos; then
+ rm -r ./resources/app/node_modules.asar.unpacked/kerberos || die
+ fi
+
+ # Install
+ pax-mark m code
+ mkdir -p "${ED}/opt/${PN}" || die
+ cp -r . "${ED}/opt/${PN}" || die
+ fperms 4711 /opt/${PN}/chrome-sandbox
+
+ dosym -r "/opt/${PN}/bin/code" "usr/bin/vscode"
+ dosym -r "/opt/${PN}/bin/code" "usr/bin/code"
+
+ local EXEC_EXTRA_FLAGS=()
+ if use wayland; then
+ EXEC_EXTRA_FLAGS+=( "--ozone-platform-hint=auto" "--enable-wayland-ime" )
+ fi
+ if use egl; then
+ EXEC_EXTRA_FLAGS+=( "--use-gl=egl" )
+ fi
+
+ sed "s|@exec_extra_flags@|${EXEC_EXTRA_FLAGS[*]}|g" \
+ "${FILESDIR}/code-url-handler.desktop" \
+ > "${T}/code-url-handler.desktop" || die
+
+ sed "s|@exec_extra_flags@|${EXEC_EXTRA_FLAGS[*]}|g" \
+ "${FILESDIR}/code.desktop" \
+ > "${T}/code.desktop" || die
+
+ domenu "${T}/code.desktop"
+ domenu "${T}/code-url-handler.desktop"
+ newicon "resources/app/resources/linux/code.png" "vscode.png"
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ optfeature "desktop notifications" x11-libs/libnotify
+ optfeature "keyring support inside vscode" "virtual/secret-service"
+}