# Maintainer: Curve # Contributor: Filipe Laíns (FFY00) # Contributor: Michael Hansen # Contributor: Francisco Magalhães # Contributor: Curve pkgname=vscode-transparent-insiders _pkgname=code pkgdesc='The Open Source build of Visual Studio Code (vscode) editor - with transparency enabled - based on insiders commit' # Important: Remember to check https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites for target node version # NodeJS versioning cheatsheet: # - carbon: 8 # - dubnium: 10 # - ?: 11 (not in repos) # - erbium: 12 # Important: Remember to check https://github.com/microsoft/vscode/blob/master/.yarnrc (choose correct tag) for target electron version _electron=electron9 _commit=52838cf6799cc448e738677ec37e86cf62a5bd89 pkgver=1.54.0 pkgrel=1 arch=('x86_64') url='https://github.com/microsoft/vscode' license=('MIT') depends=($_electron 'libsecret' 'libx11' 'libxkbfile' 'ripgrep') optdepends=('bash-completion: Bash completions' 'zsh-completions: ZSH completitons' 'x11-ssh-askpass: SSH authentication') makedepends=('git' 'gulp' 'npm' 'python2' 'yarn' 'nodejs-lts-erbium') conflicts=('code') provides=('code') install='code-transparent.install' source=("$_pkgname::git+$url.git" 'code.js' 'code.sh' 'product_json.diff' 'transparent.diff' 'fix-first-window-not-transparent.diff') sha512sums=('SKIP' '814c9554427183cd893a33cd2cbe91f6e0ea71921ef0717c86217b1d3058d265f9ff7a9ace3e7b76f122e60b7686475cf4d999e581a1845face3033afb9f745f' '0e75ee88274cbaf48c59ef6f363f6b8ac2ea83f8b17a61155008db773b709a1f0233754fa63a136ec0417313ba90a7eb17db000ec22a38ca8840d8ba6c47cab1' '108f97f6a1cc5f12e23525ee288c375f961c4aaf1ef598d20618349386e9b6b5514143066876de1eff279235faecaaf5a8f8a54cfe46ea98d5e4e667b584193c' 'ae7fc5d2d1851bf9353c3f531a4de05cc5b41496468e908776b7a17cf85e889c601b94499bd6165efb902578af1ebf37443a03881f98d8c6120cb4f8667d8fe7' 'e662f0bf3f55a82ce9bce98f22c6be80ee83c1e2241d2eca596326478887ec6b73c7d0041903e17f35a424578ccc22674354931166dc7c7d7e76bb97135e009e') # Even though we don't officially support other archs, let's # allow the user to use this PKGBUILD to compile the package # for his architecture case "$CARCH" in i686) _vscode_arch=ia32 ;; x86_64) _vscode_arch=x64 ;; armv7h) _vscode_arch=arm ;; *) # Needed for mksrcinfo _vscode_arch=DUMMY ;; esac prepare() { cd $_pkgname git checkout $_commit # Change electron binary name to the target electron sed -i "s|exec electron |exec $_electron |" ../code.sh # This patch no longer contains proprietary modifications. # See https://github.com/Microsoft/vscode/issues/31168 for details. patch -p0 < ../product_json.diff # enable window transparency patch -p1 <../transparent.diff # fixes sometimes the first code window is not transparent # https://aur.archlinux.org/packages/code-transparent/#comment-775691 # https://github.com/electron/electron/issues/16809 patch -p1 <../fix-first-window-not-transparent.diff # Set the commit and build date local _commit=$(git rev-parse HEAD) local _datestamp=$(date -u -Is | sed 's/\+00:00/Z/') sed -e "s/@COMMIT@/$_commit/" -e "s/@DATE@/$_datestamp/" -i product.json # Build native modules for system electron local _target=$(