vscode: built against system electron
[ci skip]
This commit is contained in:
parent
bb5f851c9f
commit
63d992ecad
4 changed files with 40 additions and 13 deletions
|
@ -125,7 +125,6 @@ libGLESv2.so discord-0.0.7_1
|
||||||
libGLESv2.so keybase-desktop-3.1.2_1
|
libGLESv2.so keybase-desktop-3.1.2_1
|
||||||
libGLESv2.so riot-desktop-0.17.9_2
|
libGLESv2.so riot-desktop-0.17.9_2
|
||||||
libGLESv2.so wire-desktop-3.6.2885_1
|
libGLESv2.so wire-desktop-3.6.2885_1
|
||||||
libGLESv2.so vscode-1.36.1_1
|
|
||||||
libGLESv2.so Signal-Desktop-1.23.2_1
|
libGLESv2.so Signal-Desktop-1.23.2_1
|
||||||
libGLESv2.so slack-desktop-3.4.2_1
|
libGLESv2.so slack-desktop-3.4.2_1
|
||||||
libbrcmEGL.so rpi-userland-20180103_2
|
libbrcmEGL.so rpi-userland-20180103_2
|
||||||
|
|
14
srcpkgs/vscode/patches/dont-download-ffmpeg.patch
Normal file
14
srcpkgs/vscode/patches/dont-download-ffmpeg.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
||||||
|
index 3488d7b51c..731282a881 100644
|
||||||
|
--- a/build/gulpfile.vscode.js
|
||||||
|
+++ b/build/gulpfile.vscode.js
|
||||||
|
@@ -267,7 +267,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
|
||||||
|
let result = all
|
||||||
|
.pipe(util.skipDirectories())
|
||||||
|
.pipe(util.fixWin32DirectoryPermissions())
|
||||||
|
- .pipe(electron(_.extend({}, config, { platform, arch, ffmpegChromium: true })))
|
||||||
|
+ .pipe(electron(_.extend({}, config, { platform, arch, ffmpegChromium: false })))
|
||||||
|
.pipe(filter(['**', '!LICENSE', '!LICENSES.chromium.html', '!version'], { dot: true }));
|
||||||
|
|
||||||
|
if (platform === 'linux') {
|
||||||
|
|
|
@ -20,7 +20,7 @@ index b85525fbd042..dc7617051b95 100644
|
||||||
Comment=Code Editing. Redefined.
|
Comment=Code Editing. Redefined.
|
||||||
GenericName=Text Editor
|
GenericName=Text Editor
|
||||||
-Exec=@@EXEC@@ --no-sandbox --open-url %U
|
-Exec=@@EXEC@@ --no-sandbox --open-url %U
|
||||||
+Exec=/usr/lib/@@NAME@@/@@NAME@@ --no-sandbox --open-url %U
|
+Exec=/usr/lib/@@NAME@@/bin/@@NAME@@ --no-sandbox --open-url %U
|
||||||
Icon=@@ICON@@
|
Icon=@@ICON@@
|
||||||
Type=Application
|
Type=Application
|
||||||
NoDisplay=true
|
NoDisplay=true
|
||||||
|
@ -33,7 +33,7 @@ index b975e1094a2c..a094cc36e810 100644
|
||||||
Comment=Code Editing. Redefined.
|
Comment=Code Editing. Redefined.
|
||||||
GenericName=Text Editor
|
GenericName=Text Editor
|
||||||
-Exec=@@EXEC@@ --no-sandbox --unity-launch %F
|
-Exec=@@EXEC@@ --no-sandbox --unity-launch %F
|
||||||
+Exec=/usr/lib/@@NAME@@/@@NAME@@ --no-sandbox --unity-launch %F
|
+Exec=/usr/lib/@@NAME@@/bin/@@NAME@@ --no-sandbox --unity-launch %F
|
||||||
Icon=@@ICON@@
|
Icon=@@ICON@@
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=false
|
StartupNotify=false
|
||||||
|
@ -42,5 +42,5 @@ index b975e1094a2c..a094cc36e810 100644
|
||||||
[Desktop Action new-empty-window]
|
[Desktop Action new-empty-window]
|
||||||
Name=New Empty Window
|
Name=New Empty Window
|
||||||
-Exec=@@EXEC@@ --no-sandbox --new-window %F
|
-Exec=@@EXEC@@ --no-sandbox --new-window %F
|
||||||
+Exec=/usr/lib/@@NAME@@/@@NAME@@ --no-sandbox --new-window %F
|
+Exec=/usr/lib/@@NAME@@/bin/@@NAME@@ --no-sandbox --new-window %F
|
||||||
Icon=@@ICON@@
|
Icon=@@ICON@@
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
# Template file for 'vscode'
|
# Template file for 'vscode'
|
||||||
pkgname=vscode
|
pkgname=vscode
|
||||||
version=1.47.3
|
version=1.47.3
|
||||||
revision=1
|
revision=2
|
||||||
|
_electronver=7.3.2
|
||||||
hostmakedepends="pkg-config python nodejs-lts-10 yarn tar"
|
hostmakedepends="pkg-config python nodejs-lts-10 yarn tar"
|
||||||
makedepends="libxkbfile-devel libsecret-devel"
|
makedepends="libxkbfile-devel libsecret-devel electron7"
|
||||||
depends="libXtst libxkbfile nss dejavu-fonts-ttf xdg-utils"
|
depends="libXtst libxkbfile nss dejavu-fonts-ttf xdg-utils ripgrep electron7"
|
||||||
short_desc="Microsoft Code for Linux"
|
short_desc="Microsoft Code for Linux"
|
||||||
maintainer="shizonic <realtiaz@gmail.com>"
|
maintainer="shizonic <realtiaz@gmail.com>"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
|
@ -13,11 +14,11 @@ distfiles="https://github.com/Microsoft/vscode/archive/${version}.tar.gz"
|
||||||
checksum=463c8d5c3e02035ada5c0b9dcbb8718841fa27f6258838bfa4bab3a916ca16f3
|
checksum=463c8d5c3e02035ada5c0b9dcbb8718841fa27f6258838bfa4bab3a916ca16f3
|
||||||
patch_args="-Np1"
|
patch_args="-Np1"
|
||||||
|
|
||||||
# Due to electron
|
if [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then
|
||||||
archs="x86_64"
|
broken="FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory"
|
||||||
nostrip_files="code-oss"
|
fi
|
||||||
|
|
||||||
pre_build() {
|
do_configure() {
|
||||||
# Use yarn to install dependencies
|
# Use yarn to install dependencies
|
||||||
echo "" > build/npm/preinstall.js
|
echo "" > build/npm/preinstall.js
|
||||||
|
|
||||||
|
@ -26,6 +27,9 @@ pre_build() {
|
||||||
_TELEMETRY_URLS="(dc\.services\.visualstudio\.com)|(vortex\.data\.microsoft\.com)"
|
_TELEMETRY_URLS="(dc\.services\.visualstudio\.com)|(vortex\.data\.microsoft\.com)"
|
||||||
_REPLACEMENT="s/$_TELEMETRY_URLS/0\.0\.0\.0/g"
|
_REPLACEMENT="s/$_TELEMETRY_URLS/0\.0\.0\.0/g"
|
||||||
grep -rl --exclude-dir=.git -E $_TELEMETRY_URLS | xargs sed -i -E $_REPLACEMENT
|
grep -rl --exclude-dir=.git -E $_TELEMETRY_URLS | xargs sed -i -E $_REPLACEMENT
|
||||||
|
|
||||||
|
# set used electron version
|
||||||
|
sed -i "s/^target .*/target \"${_electronver}\"/" .yarnrc
|
||||||
}
|
}
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
|
@ -35,18 +39,28 @@ do_build() {
|
||||||
_mem_limit="--max_old_space_size=4095"
|
_mem_limit="--max_old_space_size=4095"
|
||||||
|
|
||||||
export NODE_OPTIONS="${_mem_limit}"
|
export NODE_OPTIONS="${_mem_limit}"
|
||||||
yarn install --ignore-engines --arch=x64
|
/usr/lib/node_modules/npm/bin/node-gyp-bin/node-gyp install \
|
||||||
|
--target=$_electronver \
|
||||||
|
--tarball=/usr/include/electron7/node_headers.tar.gz
|
||||||
|
yarn install --ignore-engines --frozen-lockfile --arch=x64
|
||||||
|
export CFLAGS="$CFLAGS -I/usr/include/node"
|
||||||
yarn run gulp vscode-linux-x64-min
|
yarn run gulp vscode-linux-x64-min
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
vmkdir usr/lib/code-oss
|
vmkdir usr/lib/code-oss
|
||||||
vcopy ../VSCode-linux-x64/* usr/lib/code-oss
|
vcopy ../VSCode-linux-x64/resources usr/lib/code-oss
|
||||||
|
vcopy ../VSCode-linux-x64/bin usr/lib/code-oss
|
||||||
vmkdir usr/bin
|
vmkdir usr/bin
|
||||||
ln -sf /usr/lib/code-oss/bin/code-oss ${DESTDIR}/usr/bin/
|
ln -sf /usr/lib/code-oss/bin/code-oss ${DESTDIR}/usr/bin/
|
||||||
vmkdir usr/share/applications
|
vmkdir usr/share/applications
|
||||||
ln -sf /usr/lib/code-oss/resources/app/resources/linux/code.desktop ${DESTDIR}/usr/share/applications/code-oss.desktop
|
ln -sf /usr/lib/code-oss/resources/app/resources/linux/code.desktop ${DESTDIR}/usr/share/applications/code-oss.desktop
|
||||||
vmkdir usr/share/pixmaps
|
vmkdir usr/share/pixmaps
|
||||||
ln -sf /usr/lib/code-oss/resources/app/resources/linux/code.png ${DESTDIR}/usr/share/pixmaps/code-oss.png
|
ln -sf /usr/lib/code-oss/resources/app/resources/linux/code.png ${DESTDIR}/usr/share/pixmaps/code-oss.png
|
||||||
|
ln -sf /usr/bin/rg ${DESTDIR}/usr/lib/code-oss/resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg
|
||||||
|
vsed \
|
||||||
|
-e "s|ELECTRON=.*|ELECTRON=/usr/lib/electron${_electronver%%.*}/electron|g" \
|
||||||
|
-e 's|"$CLI"|"$CLI" --app="${VSCODE_PATH}/resources/app"|g' \
|
||||||
|
-i "$DESTDIR"/usr/lib/code-oss/bin/code-oss
|
||||||
vlicense LICENSE.txt
|
vlicense LICENSE.txt
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue