1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

editors/vscode: update to 1.94.0

Upstream has migrated from long obsolete yarn v1 to npm as node
package manager. So make necessary changes to Makefile to follow the
migration.

While here, remove REH (remote extension host) option which is no-op
in package building. Users who want to build remote extension host can
now use dedicated make target "build-remote-extension-host".

Changelog: https://code.visualstudio.com/updates/v1_94

Reported by:	GitHub (watch releases)
This commit is contained in:
Hiroki Tagato 2024-10-06 06:17:36 +09:00
parent 1e6aee300a
commit 25eaa50554
20 changed files with 1158 additions and 240 deletions

View File

@ -1,10 +1,9 @@
PORTNAME= vscode
DISTVERSION= 1.93.1
PORTREVISION= 1
DISTVERSION= 1.94.0
CATEGORIES= editors
MASTER_SITES= https://github.com/tagattie/FreeBSD-VSCode/releases/download/${DISTVERSION}/:yarn_cache
DISTFILES= yarn-offline-cache-${DISTVERSION}${EXTRACT_SUFX}:yarn_cache \
vscode-marketplace-exts-${DISTVERSION}${EXTRACT_SUFX}:yarn_cache
MASTER_SITES= https://github.com/tagattie/FreeBSD-VSCode/releases/download/${DISTVERSION}/:node_modules
DISTFILES= vscode-node-modules-${DISTVERSION}${EXTRACT_SUFX}:node_modules \
vscode-marketplace-exts-${DISTVERSION}${EXTRACT_SUFX}:node_modules
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= tagattie@FreeBSD.org
@ -16,11 +15,13 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt
ONLY_FOR_ARCHS= amd64
EXTRACT_DEPENDS=jq:textproc/jq \
node${NODEJS_VERSION}>0:www/node${NODEJS_VERSION}
BUILD_DEPENDS= zip:archivers/zip \
electron${ELECTRON_VER_MAJOR}:devel/electron${ELECTRON_VER_MAJOR} \
jq:textproc/jq \
rg:textproc/ripgrep \
npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX} \
yarn${NODEJS_SUFFIX}>0:www/yarn${NODEJS_SUFFIX}
npm${NODEJS_SUFFIX}>0:www/npm${NODEJS_SUFFIX}
LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-core \
libatspi.so:accessibility/at-spi2-core \
libFLAC.so:audio/flac \
@ -68,7 +69,7 @@ USES= desktop-file-utils gl gmake gnome iconv:wchar_t jpeg \
USE_GITHUB= yes
GH_ACCOUNT= microsoft
SOURCE_COMMIT_HASH= 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
SOURCE_COMMIT_HASH= d78a74bcdfad14d5d3b1b782f87255d802b57511
BINARY_ALIAS= python=${PYTHON_CMD}
@ -79,7 +80,7 @@ USE_GNOME= atk cairo pango gdkpixbuf2 gtk30 libxml2 libxslt
USE_LDCONFIG= ${DATADIR}
SHEBANG_REGEX= ./(extensions|resources|scripts|src)/.*\.sh$$
SHEBANG_REGEX= ./(extensions|node_modules|resources|scripts|src)/.*\.sh$$
PATHFIX_FILES= src/vs/workbench/contrib/debug/node/terminals.ts
DATADIR= ${PREFIX}/share/code-oss
@ -95,10 +96,6 @@ MAKE_ENV+= PLAYWRIGHT_BROWSERS_PATH=${WRKDIR}/pw-browsers \
# This is a workaround to avoid filesystem violations during poudriere build
MAKE_ENV+= PYTHONDONTWRITEBYTECODE=1
OPTIONS_DEFINE= REH
OPTIONS_DEFAULT=# none
REH_DESC= Build remote extension host
NODEJS_DIR= ${.CURDIR:H:H}/www/node20
.include "${NODEJS_DIR}/Makefile.version"
ELECTRON_DIR= ${.CURDIR:H:H}/devel/electron30
@ -106,6 +103,7 @@ ELECTRON_DIR= ${.CURDIR:H:H}/devel/electron30
ELECTRON_DOWNLOAD_URL= https://github.com/electron/electron/releases/download/v${ELECTRON_VER}
ELECTRON_DOWNLOAD_URL_HASH!= /sbin/sha256 -q -s ${ELECTRON_DOWNLOAD_URL}
ELECTRON_ARCH= ${ARCH:S/aarch64/arm64/:S/amd64/x64/:S/i386/ia32/}
pre-everything::
@${ECHO_MSG} ""
@ -117,33 +115,29 @@ pre-everything::
@${ECHO_MSG} ""
post-extract:
${CP} ${WRKSRC}/build/.moduleignore.linux \
@${CP} ${WRKSRC}/build/.moduleignore.linux \
${WRKSRC}/build/.moduleignore.freebsd
@${ECHO_MSG} "===> Installing node modules in ${WRKSRC}"
@${TAR} -xzf ${WRKDIR}/vscode-.-node-modules${EXTRACT_SUFX} -C ${WRKSRC}
@for dir in `node -p "JSON.stringify(require('${WRKSRC}/build/npm/dirs').dirs)" | jq -r '.[]'`; do \
if [ -f ${WRKDIR}/vscode-`echo $${dir} | tr _ __ | tr / _`-node-modules${EXTRACT_SUFX} ]; then \
${ECHO_MSG} "===> Installing node modules in ${WRKSRC}/$${dir}"; \
${TAR} -xzf ${WRKDIR}/vscode-`echo $${dir} | tr _ __ | tr / _`-node-modules${EXTRACT_SUFX} -C ${WRKSRC}/$${dir}; \
fi; \
done
post-patch:
# force use of electron version matching port one
${REINPLACE_CMD} -E 's|^(target ").*(")$$|\1${ELECTRON_VER}\2|' \
${WRKSRC}/.yarnrc
# force use of node version matching port one
${REINPLACE_CMD} -E 's|^(target ").*(")$$|\1${NODEJS_PORTVERSION}\2|' \
${WRKSRC}/remote/.yarnrc
# setup yarnrc for using local node headers
${ECHO_CMD} 'nodedir "${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers"' >> \
${WRKSRC}/.yarnrc
${ECHO_CMD} 'nodedir "${LOCALBASE}"' >> \
${WRKSRC}/remote/.yarnrc
# setup yarnrc for offline node_modules installation
${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' >> \
${WRKSRC}/.yarnrc
${ECHO_CMD} 'yarn-offline-mirror "../../yarn-offline-cache"' >> \
${WRKSRC}/remote/.yarnrc
(cd ${WRKSRC} && \
@${REINPLACE_CMD} -E 's|^(target=").*(")$$|\1${ELECTRON_VER}\2|' \
${WRKSRC}/.npmrc
@${REINPLACE_CMD} -E 's|^(target=").*(")$$|\1${NODEJS_PORTVERSION}\2|' \
${WRKSRC}/remote/.npmrc
@(cd ${WRKSRC} && \
${FIND} -E . -type f -iregex '${SHEBANG_REGEX}' \
-exec ${SED} -i '' -e "s|/usr/bin/pgrep|/bin/pgrep|g" {} ';')
(cd ${WRKSRC} && \
@(cd ${WRKSRC} && \
${FIND} ${PATHFIX_FILES} -type f \
-exec ${SED} -i '' -e "s|/usr/bin/pgrep|/bin/pgrep|g" {} ';')
${REINPLACE_CMD} -e 's/@@NAME_LONG@@/Code - OSS/; \
@${REINPLACE_CMD} -e 's/@@NAME_LONG@@/Code - OSS/; \
s/@@NAME_SHORT@@/Code - OSS/; \
s/@@PRODNAME@@/Code - OSS/; \
s/@@NAME@@/code-oss/g; \
@ -159,151 +153,169 @@ post-patch:
${WRKSRC}/resources/linux/code.appdata.xml \
${WRKSRC}/resources/linux/code.desktop \
${WRKSRC}/resources/linux/code-url-handler.desktop
(cd ${WRKDIR}/builtInExtensions && \
@(cd ${WRKDIR}/builtInExtensions && \
${FIND} . -type f -name '*.sh' \
-exec ${SED} -i '' -e "s|/usr/bin/pgrep|/bin/pgrep|g" \
-e 's|#!/bin/bash|#!${LOCALBASE}/bin/bash|' {} ';')
pre-build: install-node-modules patch-node-modules rebuild-node-modules copy-rg-binary
install-node-modules:
# install node_modules without executing post-installation scripts
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
yarn --frozen-lockfile --ignore-scripts --offline
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
yarn postinstall --frozen-lockfile --ignore-scripts --offline
patch-node-modules:
# patch install node modules before building native node modules
for p in ${PATCHDIR}/node_modules/patch-*; do \
${PATCH} -p0 -s -d ${WRKSRC} < $${p}; \
done
rebuild-node-modules:
# rebuild native node modules for electron
for subdir in `${FIND} ${WRKSRC}/node_modules -type f -name binding.gyp -exec ${DIRNAME} {} ';'`; do \
pre-build:
# rebuild native node modules in top directory
@for subdir in `${FIND} ${WRKSRC}/node_modules -type f -name binding.gyp -exec ${DIRNAME} {} ';'`; do \
${ECHO_MSG} "===> Rebuilding native modules in $${subdir}"; \
cd $${subdir} && \
${SETENV} ${MAKE_ENV} \
npm_config_runtime=electron \
npm_config_target=${ELECTRON_VER} \
npm_config_nodedir=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers \
node ${LOCALBASE}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js rebuild; \
node-gyp --userconfig=${WRKSRC}/.npmrc rebuild; \
done
cd ${WRKSRC}/extensions && \
${SETENV} ${MAKE_ENV} \
# rebuild native node modules in subdirectories
@for dir in `node -p "JSON.stringify(require('${WRKSRC}/build/npm/dirs').dirs)" | jq -r '.[]'`; do \
for subdir in `${FIND} ${WRKSRC}/$${dir}/node_modules -type f -name binding.gyp -exec ${DIRNAME} {} ';' 2> /dev/null`; do \
${ECHO_MSG} "===> Rebuilding native modules in $${subdir}"; \
if [ "`${ECHO_CMD} $${subdir} | ${GREP} /build/`" ]; then \
cd $${subdir} && \
${SETENV} ${MAKE_ENV} \
npm_config_runtime=node \
npm_config_target=${NODEJS_PORTVERSION} \
npm_config_nodedir=${LOCALBASE} \
node-gyp --userconfig=${WRKSRC}/build/.npmrc rebuild; \
elif [ "`${ECHO_CMD} $${subdir} | ${GREP} /remote/`" ]; then \
cd $${subdir} && \
${SETENV} ${MAKE_ENV} \
npm_config_runtime=node \
npm_config_target=${NODEJS_PORTVERSION} \
npm_config_nodedir=${LOCALBASE} \
node-gyp --userconfig=${WRKSRC}/remote/.npmrc rebuild; \
else \
cd $${subdir} && \
${SETENV} ${MAKE_ENV} \
npm_config_runtime=electron \
npm_config_target=${ELECTRON_VER} \
npm_config_nodedir=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers \
node-gyp --userconfig=${WRKSRC}/.npmrc rebuild; \
fi; \
done; \
done
# copy rg binary file to @vscode/ripgrep node module directory
@${MKDIR} ${WRKSRC}/node_modules/@vscode/ripgrep/bin
@${CP} ${LOCALBASE}/bin/rg ${WRKSRC}/node_modules/@vscode/ripgrep/bin
@${MKDIR} ${WRKSRC}/remote/node_modules/@vscode/ripgrep/bin
@${CP} ${LOCALBASE}/bin/rg ${WRKSRC}/remote/node_modules/@vscode/ripgrep/bin
do-build:
# setup download cache for gulp-atom-electron
@${MKDIR} ${WRKDIR}/.cache/electron/${ELECTRON_DOWNLOAD_URL_HASH}
@cd ${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR} && \
zip -q -r ${WRKDIR}/.cache/electron/${ELECTRON_DOWNLOAD_URL_HASH}/electron-v${ELECTRON_VER}-linux-${ELECTRON_ARCH}.zip .
@cd ${WRKDIR}/.cache/electron/${ELECTRON_DOWNLOAD_URL_HASH} && \
${SHA256} -r *-v${ELECTRON_VER}-linux-*.zip | \
${SED} -e 's/ / */' > SHASUMS256.txt
# add newline character at the end of the file if not already
@${AWK} '1' ${WRKSRC}/build/checksums/electron.txt > \
${WRKSRC}/build/checksums/electron.txt.new
@${MV} -f ${WRKSRC}/build/checksums/electron.txt.new \
${WRKSRC}/build/checksums/electron.txt
@cd ${WRKDIR}/.cache/electron/${ELECTRON_DOWNLOAD_URL_HASH} && \
${SHA256} -r *-v${ELECTRON_VER}-linux-*.zip | \
${SED} -e 's/ / */' >> ${WRKSRC}/build/checksums/electron.txt
# build and package vscode
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} npx tsc -p build/tsconfig.build.json
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
npm_config_runtime=electron \
npm_config_target=${ELECTRON_VER} \
npm_config_nodedir=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers \
npm rebuild --verbose
# rebuild native node modules for node
.for dir in build remote
cd ${WRKSRC}/${dir} && \
${SETENV} ${MAKE_ENV} \
npm_config_nodedir=${LOCALBASE} \
npm rebuild --verbose
.endfor
copy-rg-binary:
# copy rg binary files to vscode-ripgrep module directory
${MKDIR} ${WRKSRC}/node_modules/@vscode/ripgrep/bin
${CP} ${LOCALBASE}/bin/rg ${WRKSRC}/node_modules/@vscode/ripgrep/bin
${MKDIR} ${WRKSRC}/remote/node_modules/@vscode/ripgrep/bin
${CP} ${LOCALBASE}/bin/rg ${WRKSRC}/remote/node_modules/@vscode/ripgrep/bin
do-build:
# setup download cache for gulp-atom-electron
${MKDIR} ${WRKDIR}/.cache/electron/${ELECTRON_DOWNLOAD_URL_HASH}
cd ${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR} && \
zip -q -r ${WRKDIR}/.cache/electron/${ELECTRON_DOWNLOAD_URL_HASH}/electron-v${ELECTRON_VER}-linux-x64.zip .
cd ${WRKDIR}/.cache/electron/${ELECTRON_DOWNLOAD_URL_HASH} && \
${SHA256} -r *-v${ELECTRON_VER}-linux-*.zip | \
${SED} -e 's/ / */' > SHASUMS256.txt
# add newline character at the end of the file if not already
${AWK} '1' ${WRKSRC}/build/checksums/electron.txt > \
${WRKSRC}/build/checksums/electron.txt.new
${MV} -f ${WRKSRC}/build/checksums/electron.txt.new \
${WRKSRC}/build/checksums/electron.txt
cd ${WRKDIR}/.cache/electron/${ELECTRON_DOWNLOAD_URL_HASH} && \
${SHA256} -r *-v${ELECTRON_VER}-linux-*.zip | \
${SED} -e 's/ / */' >> ${WRKSRC}/build/checksums/electron.txt
# build and package vscode
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn run tsc -p build/tsconfig.build.json
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn gulp vscode-linux-x64-min
# copy marketplace extensions
${MV} ${WRKDIR}/builtInExtensions/* ${WRKDIR}/VSCode-linux-x64/resources/app/extensions
do-build-REH-on:
# setup download cache for node
${MKDIR} ${WRKSRC}/.build/node/v${NODEJS_PORTVERSION}/linux-x64
${CP} ${LOCALBASE}/bin/node ${WRKSRC}/.build/node/v${NODEJS_PORTVERSION}/linux-x64
# build vscode remote extension host
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn gulp vscode-reh-linux-x64-min
${MKDIR} ${WRKDIR}/vscode-reh/bin/${SOURCE_COMMIT_HASH}
cd ${WRKDIR}/vscode-reh-linux-x64 && ${TAR} -cf - . | \
${TAR} -xf - -C ${WRKDIR}/vscode-reh/bin/${SOURCE_COMMIT_HASH}
cd ${WRKDIR}/vscode-reh && \
${TAR} -czf ../vscode-reh-${DISTVERSION}-${OPSYS:tl}${OSREL:R}-${ARCH}.tar.gz .
# cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} yarn gulp vscode-reh-web-linux-x64-min
npm --userconfig=${WRKSRC}/.npmrc run gulp vscode-linux-${ELECTRON_ARCH}-min
# move marketplace extensions
@${MV} ${WRKDIR}/builtInExtensions/* ${WRKDIR}/VSCode-linux-${ELECTRON_ARCH}/resources/app/extensions
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d
${INSTALL_DATA} ${WRKSRC}/resources/completions/bash/code \
${STAGEDIR}${PREFIX}/etc/bash_completion.d/code-oss
${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
@${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions
${INSTALL_DATA} ${WRKSRC}/resources/completions/zsh/_code \
${STAGEDIR}${PREFIX}/share/zsh/site-functions/_code-oss
${MKDIR} ${STAGEDIR}${PREFIX}/share/appdata
@${MKDIR} ${STAGEDIR}${PREFIX}/share/appdata
${INSTALL_DATA} ${WRKSRC}/resources/linux/code.appdata.xml \
${STAGEDIR}${PREFIX}/share/appdata/code-oss.appdata.xml
${MKDIR} ${STAGEDIR}${PREFIX}/share/applications
@${MKDIR} ${STAGEDIR}${PREFIX}/share/applications
.for f in code.desktop code-url-handler.desktop
${INSTALL_DATA} ${WRKSRC}/resources/linux/${f} \
${STAGEDIR}${PREFIX}/share/applications/${f:S/code/code-oss/}
.endfor
${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
@${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
${INSTALL_DATA} ${WRKSRC}/resources/linux/code.png \
${STAGEDIR}${PREFIX}/share/pixmaps/com.visualstudio.code.oss.png
${MKDIR} ${STAGEDIR}${DATADIR}
cd ${WRKDIR}/VSCode-linux-x64 && \
@${MKDIR} ${STAGEDIR}${DATADIR}
cd ${WRKDIR}/VSCode-linux-${ELECTRON_ARCH} && \
${TAR} -cf - . | ${TAR} -xf - -C ${STAGEDIR}${DATADIR}
cd ${STAGEDIR}${DATADIR}/resources/app/node_modules.asar.unpacked && \
${FIND} . -type f -exec ${FILE} {} ';' | \
${GREP} 'ELF.*FreeBSD' | ${AWK} -F ':' '{print $$1}' | ${XARGS} ${STRIP_CMD}
@${FIND} ${STAGEDIR}${DATADIR}/resources/app -type f -exec ${FILE} {} ';' | \
${GREP} 'ELF.*FreeBSD' | ${AWK} -F ': ' '{print $$1}' | ${XARGS} ${STRIP_CMD}
.for f in chromedriver mksnapshot v8_context_snapshot_generator
${RM} ${STAGEDIR}${DATADIR}/${f}
@${RM} ${STAGEDIR}${DATADIR}/${f}
.endfor
${RM} -r ${STAGEDIR}${DATADIR}/gen
${RM} -r ${STAGEDIR}${DATADIR}/node_headers
${RM} -r ${STAGEDIR}${DATADIR}/resources/completions
@${RM} -r ${STAGEDIR}${DATADIR}/gen
@${RM} -r ${STAGEDIR}${DATADIR}/node_headers
@${RM} -r ${STAGEDIR}${DATADIR}/resources/completions
${RLN} ${STAGEDIR}${DATADIR}/bin/code-oss ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${FILESDIR}/wrapper.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
pre-test:
# setup electron dependency for unit tests
${MKDIR} ${WRKSRC}/.build/electron
cd ${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR} && \
# setup electron dependency for unit tests
@${MKDIR} ${WRKSRC}/.build/electron
@cd ${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR} && \
${TAR} -cf - . | ${TAR} -xf - -C ${WRKSRC}/.build/electron
cd ${WRKSRC}/.build/electron && ${MV} -f electron code-oss
@cd ${WRKSRC}/.build/electron && ${MV} -f electron code-oss
do-test:
# Note: Xvfb or something similar is necessary for headless testing
# unit tests
# Note: Xvfb or something similar is necessary for headless testing
# unit tests
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ./scripts/test.sh || ${TRUE}
# UI smoke tests
# UI smoke tests
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} yarn smoketest
### targets for port maintainer(s)
make-yarn-cache:
# do "make configure" before executing this target
${RM} -r ${WRKDIR}/yarn-offline-cache
build-remote-extension-host: configure pre-build
# setup download cache for node
@${MKDIR} ${WRKSRC}/.build/node/v${NODEJS_PORTVERSION}/linux-${ELECTRON_ARCH}
@${CP} ${LOCALBASE}/bin/node ${WRKSRC}/.build/node/v${NODEJS_PORTVERSION}/linux-${ELECTRON_ARCH}
# build vscode remote extension host
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
yarn --frozen-lockfile --ignore-scripts
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
yarn postinstall --frozen-lockfile --ignore-scripts
cd ${WRKDIR} && ${TAR} -czf \
yarn-offline-cache-${DISTVERSION}${EXTRACT_SUFX} yarn-offline-cache
npm_config_runtime=node \
npm_config_target=${NODEJS_PORTVERSION} \
npm_config_nodedir=${LOCALBASE} \
npm --userconfig=${WRKSRC}/remote/.npmrc run gulp vscode-reh-linux-${ELECTRON_ARCH}-min
@${MKDIR} ${WRKDIR}/vscode-reh/bin/${SOURCE_COMMIT_HASH}
cd ${WRKDIR}/vscode-reh-linux-${ELECTRON_ARCH} && ${TAR} -cf - . | \
${TAR} -xf - -C ${WRKDIR}/vscode-reh/bin/${SOURCE_COMMIT_HASH}
@${FIND} ${WRKDIR}/vscode-reh -type f -exec ${FILE} {} ';' | \
${GREP} 'ELF.*FreeBSD' | ${AWK} -F ': ' '{print $$1}' | ${XARGS} ${STRIP_CMD}
cd ${WRKDIR}/vscode-reh && \
${TAR} -czf ../vscode-reh-${DISTVERSION}-${OPSYS:tl}${OSREL:R}-${ARCH}.tar.gz .
# cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} npm run gulp vscode-reh-web-linux-${ELECTRON_ARCH}-min
make-marketplace-exts:
${RM} -r ${WRKSRC}/.build/builtInExtensions
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
yarn download-builtin-extensions && \
cd ${WRKSRC}/.build && ${TAR} -czf \
${WRKDIR}/vscode-marketplace-exts-${DISTVERSION}${EXTRACT_SUFX} builtInExtensions
### targets for port maintainer(s)
make-node-modules-archive: extract
@${ECHO_MSG} "===> Fetching and installing node modules in ${WRKSRC}"
@cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} npm install --ignore-scripts --no-progress --no-audit --no-fund && \
${TAR} -czf ${WRKDIR}/vscode-.-node-modules${EXTRACT_SUFX} node_modules
@for dir in `node -p "JSON.stringify(require('${WRKSRC}/build/npm/dirs').dirs)" | jq -r '.[]'`; do \
cd ${WRKSRC}/$${dir} && \
${ECHO_MSG} "===> Fetching and installing node modules in ${WRKSRC}/$${dir}" && \
${SETENV} ${MAKE_ENV} npm install --ignore-scripts --no-progress --no-audit --no-fund && \
if [ -d node_modules ]; then \
${TAR} -czf ${WRKDIR}/vscode-`echo $${dir} | tr _ __ | tr / _`-node-modules${EXTRACT_SUFX} node_modules; \
fi; \
done
@cd ${WRKDIR} && \
${TAR} -czf vscode-node-modules-${DISTVERSION}${EXTRACT_SUFX} vscode-*-node-modules.tar.gz
make-marketplace-exts-archive: extract
@${RM} -r ${WRKSRC}/.build/builtInExtensions
@cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} npm run download-builtin-extensions
@cd ${WRKSRC}/.build && \
${TAR} -czf ${WRKDIR}/vscode-marketplace-exts-${DISTVERSION}${EXTRACT_SUFX} builtInExtensions
.include <bsd.port.mk>

View File

@ -1,7 +1,7 @@
TIMESTAMP = 1726289530
SHA256 (vscode/yarn-offline-cache-1.93.1.tar.gz) = 4809a9c5e451a2da9d81fafc34db7f35e32108a4093b9527edf7ce75e9fb2c73
SIZE (vscode/yarn-offline-cache-1.93.1.tar.gz) = 362854803
SHA256 (vscode/vscode-marketplace-exts-1.93.1.tar.gz) = dd64a2675ce64846369fc3a50872c5c7f682671f3e09b283807f1018b7cfe708
SIZE (vscode/vscode-marketplace-exts-1.93.1.tar.gz) = 1845529
SHA256 (vscode/microsoft-vscode-1.93.1_GH0.tar.gz) = e9260639ebd160a6a6435cf53178bb2bc182f6abc5480db16ebb05f1f52980f9
SIZE (vscode/microsoft-vscode-1.93.1_GH0.tar.gz) = 20116564
TIMESTAMP = 1728043002
SHA256 (vscode/vscode-node-modules-1.94.0.tar.gz) = 78ae4a2ec10412a00ae61a05ba6883352ae40715f898e6f880545f9338a23e80
SIZE (vscode/vscode-node-modules-1.94.0.tar.gz) = 407086566
SHA256 (vscode/vscode-marketplace-exts-1.94.0.tar.gz) = cc4fe2fa7e04681b691df3a82b9483b435e10d6706e67e585a1b28cd09ebb685
SIZE (vscode/vscode-marketplace-exts-1.94.0.tar.gz) = 1615778
SHA256 (vscode/microsoft-vscode-1.94.0_GH0.tar.gz) = 6653796e0c8a8e551c9e47439732ee42c966299f147c2ba8a23a8135756457af
SIZE (vscode/microsoft-vscode-1.94.0_GH0.tar.gz) = 20295112

View File

@ -1,6 +1,6 @@
--- build/gulpfile.extensions.js.orig 2024-07-31 20:26:36 UTC
--- build/gulpfile.extensions.js.orig 2024-09-27 21:08:28 UTC
+++ build/gulpfile.extensions.js
@@ -236,7 +236,7 @@ const compileExtensionsBuildTask = task.define('compil
@@ -232,7 +232,7 @@ const compileExtensionsBuildTask = task.define('compil
const cleanExtensionsBuildTask = task.define('clean-extensions-build', util.rimraf('.build/extensions'));
const compileExtensionsBuildTask = task.define('compile-extensions-build', task.series(
cleanExtensionsBuildTask,

View File

@ -1,6 +1,6 @@
--- build/lib/layersChecker.ts.orig 2024-09-04 12:53:09 UTC
--- build/lib/layersChecker.ts.orig 2024-09-27 21:08:28 UTC
+++ build/lib/layersChecker.ts
@@ -363,7 +363,7 @@ function createProgram(tsconfigPath: string): ts.Progr
@@ -382,7 +382,7 @@ function createProgram(tsconfigPath: string): ts.Progr
function createProgram(tsconfigPath: string): ts.Program {
const tsConfig = ts.readConfigFile(tsconfigPath, ts.sys.readFile);

View File

@ -1,19 +1,19 @@
--- build/lib/preLaunch.ts.orig 2022-07-05 18:15:23 UTC
--- build/lib/preLaunch.ts.orig 2024-09-27 21:08:28 UTC
+++ build/lib/preLaunch.ts
@@ -35,9 +35,9 @@ async function ensureNodeModules() {
}
}
-async function getElectron() {
- await runProcess(yarn, ['electron']);
- await runProcess(npm, ['run', 'electron']);
-}
+// async function getElectron() {
+// await runProcess(yarn, ['electron']);
+// await runProcess(npm, ['run', 'electron']);
+// }
async function ensureCompiled() {
if (!(await exists('out'))) {
@@ -47,7 +47,7 @@ async function ensureCompiled() {
@@ -47,7 +47,7 @@ async function main() {
async function main() {
await ensureNodeModules();

View File

@ -1,27 +0,0 @@
--- build/npm/postinstall.js.orig 2024-09-04 12:53:09 UTC
+++ build/npm/postinstall.js
@@ -42,8 +42,14 @@ function yarnInstall(dir, opts) {
const raw = process.env['npm_config_argv'] || '{}';
const argv = JSON.parse(raw);
const original = argv.original || [];
- const args = original.filter(arg => arg === '--ignore-optional' || arg === '--frozen-lockfile' || arg === '--check-files');
-
+ const passargs = ['--ignore-optional', '--frozen-lockfile', '--check-files',
+ '--ignore-scripts', '--offline', '--no-progress', '--verbose'];
+ const args = original.filter(arg => passargs.includes(arg));
+ if (opts.cwd === 'remote') {
+ args.push('--use-yarnrc=' + process.env.PWD + '/' + opts.cwd + '/.yarnrc');
+ } else {
+ args.push('--use-yarnrc=' + process.env.PWD + '/.yarnrc');
+ }
if (opts.ignoreEngines) {
args.push('--ignore-engines');
delete opts.ignoreEngines;
@@ -123,5 +129,5 @@ for (let dir of dirs) {
yarnInstall(dir, opts);
}
-cp.execSync('git config pull.rebase merges');
-cp.execSync('git config blame.ignoreRevsFile .git-blame-ignore-revs');
+// cp.execSync('git config pull.rebase merges');
+// cp.execSync('git config blame.ignoreRevsFile .git-blame-ignore-revs');

View File

@ -1,11 +1,11 @@
--- scripts/test.sh.orig 2022-02-05 06:42:53 UTC
--- scripts/test.sh.orig 2024-09-27 21:08:28 UTC
+++ scripts/test.sh
@@ -27,7 +27,7 @@ VSCODECRASHDIR=$ROOT/.build/crashes
test -d node_modules || yarn
@@ -27,7 +27,7 @@ test -d node_modules || npm i
test -d node_modules || npm i
# Get electron
-yarn electron
+# yarn electron
-npm run electron
+# npm run electron
# Unit Tests
if [[ "$OSTYPE" == "darwin"* ]]; then

View File

@ -1,6 +1,6 @@
--- src/bootstrap-node.js.orig 2024-09-04 12:53:09 UTC
--- src/bootstrap-node.js.orig 2024-09-27 21:08:28 UTC
+++ src/bootstrap-node.js
@@ -168,7 +168,7 @@ module.exports.configurePortable = function (product)
@@ -169,7 +169,7 @@ module.exports.configurePortable = function (product)
return process.env['VSCODE_PORTABLE'];
}

View File

@ -1,6 +1,6 @@
--- src/vs/code/electron-main/app.ts.orig 2024-09-04 12:53:09 UTC
--- src/vs/code/electron-main/app.ts.orig 2024-09-27 21:08:28 UTC
+++ src/vs/code/electron-main/app.ts
@@ -987,7 +987,7 @@ export class CodeApplication extends Disposable {
@@ -985,7 +985,7 @@ export class CodeApplication extends Disposable {
services.set(IUpdateService, new SyncDescriptor(Win32UpdateService));
break;

View File

@ -1,6 +1,6 @@
--- src/vs/platform/environment/node/userDataPath.js.orig 2024-09-04 12:53:09 UTC
--- src/vs/platform/environment/node/userDataPath.js.orig 2024-09-27 21:08:28 UTC
+++ src/vs/platform/environment/node/userDataPath.js
@@ -102,7 +102,7 @@
@@ -108,7 +108,7 @@ const module = { exports: {} };
case 'darwin':
appDataPath = path.join(os.homedir(), 'Library', 'Application Support');
break;

File diff suppressed because it is too large Load Diff