From 234aaed505a49a8576aec5b55ec91ea74b398185 Mon Sep 17 00:00:00 2001 From: omemoji Date: Sat, 1 Aug 2026 03:20:02 +0900 Subject: [PATCH] New Package: visual-studio-code-1.131.0 --- srcpkgs/visual-studio-code/template | 69 +++++++++++++++++++++++++++++ srcpkgs/visual-studio-code/update | 2 + 2 files changed, 71 insertions(+) create mode 100644 srcpkgs/visual-studio-code/template create mode 100644 srcpkgs/visual-studio-code/update diff --git a/srcpkgs/visual-studio-code/template b/srcpkgs/visual-studio-code/template new file mode 100644 index 00000000000000..d64cd2d0c67eb0 --- /dev/null +++ b/srcpkgs/visual-studio-code/template @@ -0,0 +1,69 @@ +# Template file for 'visual-studio-code' +pkgname=visual-studio-code +version=1.131.0 +revision=1 +archs="x86_64 aarch64 armv7l" +# The bundled Electron binary is excluded from the automatic shlib scan (see +# skiprdeps below), so its runtime dependencies have to be listed by hand. +depends="alsa-lib at-spi2-atk at-spi2-core atk cairo dbus-libs eudev-libudev + expat glib gtk+3 libX11 libXcomposite libXdamage libXext libXfixes libXrandr + libcups libgbm libsecret libxcb libxkbcommon nspr nss pango xdg-utils" +short_desc="Microsoft-branded build of Visual Studio Code" +maintainer="omemoji " +license="custom:Microsoft-Software-License" +homepage="https://code.visualstudio.com/" +_baseurl="https://update.code.visualstudio.com/${version}" +repository=nonfree +restricted=yes +nostrip=yes +noshlibprovides=yes +create_wrksrc=yes +# Upstream's deb/rpm install to /usr/share/code, and bin/code falls back to that +# path when it cannot resolve its own location; keep the layout as shipped. +ignore_elf_dirs="/usr/share/code" +# The bundled Electron and the MSAL broker link against libraries that ship +# inside this package; they are not resolvable through the shlib map. +skiprdeps="/usr/share/code/code + /usr/share/code/resources/app/extensions/microsoft-authentication/dist/libmsalruntime.so + /usr/share/code/resources/app/extensions/microsoft-authentication/dist/msal-node-runtime.node" + +case "$XBPS_TARGET_MACHINE" in + x86_64) + _debarch=amd64 + distfiles="${_baseurl}/linux-deb-x64/stable>code-${version}-${_debarch}.deb" + checksum=fe2ed2d94ccc694f49d9084846c0be78ba56c42810355fa3999160079bb53c9a + ;; + aarch64) + _debarch=arm64 + distfiles="${_baseurl}/linux-deb-arm64/stable>code-${version}-${_debarch}.deb" + checksum=b57f73e4a8a4524bf2a796757f64bd7b594515dd8dabae9b8cd07b1beb204d9c + ;; + armv7l) + _debarch=armhf + distfiles="${_baseurl}/linux-deb-armhf/stable>code-${version}-${_debarch}.deb" + checksum=d52ffec8d83eabd500c795007ef3ac286277ff9a1ee014a2797dd215ad3cd4af + ;; +esac + +do_install() { + vcopy usr / + + # The SUID helper is only used when unprivileged user namespaces are + # unavailable; Electron falls back to the namespace sandbox otherwise. + chmod 4755 "${DESTDIR}/usr/share/code/chrome-sandbox" + + # Same symlink upstream's postinst creates. + vmkdir usr/bin + ln -s /usr/share/code/bin/code "${DESTDIR}/usr/bin/code" + + # /usr/share/appdata is deprecated in favour of /usr/share/metainfo, and + # Void looks for zsh completions in site-functions. + vmkdir usr/share/metainfo + mv "${DESTDIR}"/usr/share/appdata/code.appdata.xml \ + "${DESTDIR}"/usr/share/metainfo/ + vcompletion usr/share/zsh/vendor-completions/_code zsh code + rm -rf "${DESTDIR}"/usr/share/appdata \ + "${DESTDIR}"/usr/share/zsh/vendor-completions + + vlicense usr/share/code/resources/app/LICENSE.rtf LICENSE.rtf +} diff --git a/srcpkgs/visual-studio-code/update b/srcpkgs/visual-studio-code/update new file mode 100644 index 00000000000000..4e3e1da445a203 --- /dev/null +++ b/srcpkgs/visual-studio-code/update @@ -0,0 +1,2 @@ +site="https://update.code.visualstudio.com/api/update/linux-deb-x64/stable/latest" +pattern='"productVersion":"\K[\d.]+'