Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code-server: bump to 4.95.3 #1348

Merged
merged 4 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions tur/code-server/0001-vscode-fix-pathes.patch.beforehostbuild
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
--- a/lib/vscode/src/vs/platform/environment/node/userDataPath.js
+++ a/lib/vscode/src/vs/platform/environment/node/userDataPath.js
@@ -94,6 +94,9 @@
case 'linux':
appDataPath = process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config');
break;
+ case 'android':
+ appDataPath = process.env['XDG_CONFIG_HOME'] || "@TERMUX_HOME@/.config";
+ break;
default:
throw new Error('Platform not supported');
}
--- a/lib/vscode/src/vs/platform/environment/node/userDataPath.ts
+++ a/lib/vscode/src/vs/platform/environment/node/userDataPath.ts
@@ -79,6 +79,9 @@
case 'linux':
appDataPath = process.env['XDG_CONFIG_HOME'] || path.join(os.homedir(), '.config');
break;
+ case 'android':
+ appDataPath = process.env['XDG_CONFIG_HOME'] || "@TERMUX_HOME@/.config";
+ break;
default:
throw new Error('Platform not supported');
}
21 changes: 9 additions & 12 deletions tur/code-server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://github.com/coder/code-server
TERMUX_PKG_DESCRIPTION="Run VS Code on any machine anywhere and access it in the browser"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux-user-repository"
TERMUX_PKG_VERSION="4.90.2"
TERMUX_PKG_VERSION="4.95.3"
TERMUX_PKG_SRCURL=git+https://github.com/coder/code-server
TERMUX_PKG_DEPENDS="libandroid-spawn, libsecret, krb5, nodejs-20, ripgrep"
TERMUX_PKG_ANTI_DEPENDS="nodejs-20"
Expand Down Expand Up @@ -30,15 +30,15 @@ termux_step_post_get_source() {
}

_setup_nodejs_20() {
local NODEJS_VERSION=20.17.0
local NODEJS_VERSION=20.18.0
local NODEJS_FOLDER=${TERMUX_PKG_CACHEDIR}/build-tools/nodejs-${NODEJS_VERSION}

if [ ! -x "$NODEJS_FOLDER/bin/node" ]; then
mkdir -p "$NODEJS_FOLDER"
local NODEJS_TAR_FILE=$TERMUX_PKG_TMPDIR/nodejs-$NODEJS_VERSION.tar.xz
termux_download https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-linux-x64.tar.xz \
"$NODEJS_TAR_FILE" \
a24db3dcd151a52e75965dba04cf1b3cd579ff30d6e0af9da1aede4d0f17486b
4543670b589593f8fa5f106111fd5139081da42bb165a9239f05195e405f240a
tar -xf "$NODEJS_TAR_FILE" -C "$NODEJS_FOLDER" --strip-components=1
fi
export PATH="$NODEJS_FOLDER/bin:$PATH"
Expand All @@ -51,20 +51,17 @@ termux_step_host_build() {
env -i PATH="$PATH" sudo apt update
env -i PATH="$PATH" sudo apt install -yq libxkbfile-dev libsecret-1-dev libkrb5-dev
_setup_nodejs_20
npm install yarn
export PATH="$TERMUX_PKG_HOSTBUILD_DIR/node_modules/.bin:$PATH"
cd $TERMUX_PKG_SRCDIR
yarn --frozen-lockfile
yarn add ternary-stream
yarn build
yarn build:vscode
yarn release
npm ci
npm install ternary-stream
npm run build
npm run build:vscode
npm run release
mv $TERMUX_PREFIX/bin.bp $TERMUX_PREFIX/bin
}

termux_step_configure() {
_setup_nodejs_20
export PATH="$TERMUX_PKG_HOSTBUILD_DIR/node_modules/.bin:$PATH"
}

termux_step_make() {
Expand All @@ -89,7 +86,7 @@ termux_step_make() {
rm -f $TERMUX_PREFIX/lib/librt.{so,a}
echo "INPUT(-landroid-spawn)" >> $TERMUX_PREFIX/lib/librt.so

yarn release:standalone
npm run release:standalone
mv $TERMUX_PREFIX/bin.bp $TERMUX_PREFIX/bin
}

Expand Down