With the move to bsdtar, the file type inferrence for compressed archives differs, which breaks the build process. Adding tar to the hostdependencies fixes this problem.
52 lines
1.7 KiB
Bash
52 lines
1.7 KiB
Bash
# Template file for 'vscode'
|
|
pkgname=vscode
|
|
version=1.41.1
|
|
revision=2
|
|
hostmakedepends="pkg-config python nodejs-lts yarn tar"
|
|
makedepends="libxkbfile-devel libsecret-devel"
|
|
depends="libXtst libxkbfile nss dejavu-fonts-ttf"
|
|
short_desc="Microsoft Code for Linux"
|
|
maintainer="shizonic <realtiaz@gmail.com>"
|
|
license="MIT"
|
|
homepage="https://code.visualstudio.com/"
|
|
distfiles="https://github.com/Microsoft/vscode/archive/${version}.tar.gz"
|
|
checksum=72e2ac445cc89feac606f73c263c35d97c3980e6a13059139cc82a383a2fceae
|
|
patch_args="-Np1"
|
|
|
|
# Due to electron
|
|
archs="i686 x86_64"
|
|
nostrip_files="code-oss"
|
|
|
|
# The default memory limit may be too low for current versions of node
|
|
# to successfully build vscode. This sets it to 4GB, but
|
|
# change this number if it still doesn't work for your system.
|
|
_mem_limit="--max_old_space_size=4095"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686) broken="https://build.voidlinux.org/builders/i686_builder/builds/10486/steps/shell_3/logs/stdio"
|
|
_ARCH="ia32";;
|
|
x86_64) _ARCH="x64";;
|
|
esac
|
|
|
|
pre_build() {
|
|
# Use yarn to install dependencies
|
|
echo "" > build/npm/preinstall.js
|
|
}
|
|
|
|
do_build() {
|
|
export NODE_OPTIONS="${_mem_limit}"
|
|
yarn install --ignore-engines --arch=${_ARCH}
|
|
yarn run gulp vscode-linux-${_ARCH}-min
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir usr/lib/code-oss
|
|
vcopy ../VSCode-linux-${_ARCH}/* usr/lib/code-oss
|
|
vmkdir usr/bin
|
|
ln -sf /usr/lib/code-oss/bin/code-oss ${DESTDIR}/usr/bin/
|
|
vmkdir usr/share/applications
|
|
ln -sf /usr/lib/code-oss/resources/app/resources/linux/code.desktop ${DESTDIR}/usr/share/applications/code-oss.desktop
|
|
vmkdir usr/share/pixmaps
|
|
ln -sf /usr/lib/code-oss/resources/app/resources/linux/code.png ${DESTDIR}/usr/share/pixmaps/code-oss.png
|
|
vlicense LICENSE.txt
|
|
}
|