summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMichael Hansen2016-10-31 11:43:00 -0700
committerMichael Hansen2016-10-31 11:45:44 -0700
commitcc14c24cc4ad3db1903623429710d576758499d7 (patch)
treeb03cdac0f1ad8a3812cc9bf863f6f66eac3d09ad /PKGBUILD
parente213c58156f2a3c19e94e8d21c24c3d68650dc78 (diff)
downloadaur-cc14c24cc4ad3db1903623429710d576758499d7.tar.gz
Fix monaco.d.ts build issue, and add option to remove non-free patches
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 27 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a034c6ad445c..aadb2f2b7d1b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,14 @@
# Maintainer: Michael Hansen <zrax0111 gmail com>
+# Set this to 0 if you want to include only the open-source Visual Studio Code
+# components. This will cause the extension manager to work in a local-only
+# mode (you'll have to download and install extensions manually).
+[[ -z "$VSCODE_NONFREE" ]] && VSCODE_NONFREE=1
+
pkgname=visual-studio-code-oss
pkgdesc='Visual Studio Code for Linux, Open Source version'
pkgver=1.6.1
-pkgrel=2
+pkgrel=3
_commit=9e4e44c19e393803e2b05fe2323cf4ed7e36880e
arch=('i686' 'x86_64')
url='https://code.visualstudio.com/'
@@ -15,12 +20,17 @@ provides=('vscode-oss')
source=("${pkgver}-${pkgrel}.tar.gz::https://github.com/Microsoft/vscode/archive/${_commit}.tar.gz"
"${pkgname}.desktop"
- 'product_json.patch'
- 'old-gulp-sourcemaps.patch')
+ 'rebuild-monaco.patch.gz')
sha1sums=('d2b827fbc7aa8b54343f6cda452fb74142e1993a'
'9c4176c4d99103736df6746ca174b5026bd57e6b'
- 'ba8febe936932080610d899fdb57294fc2f9f614'
- 'e614e05c4b591bbc2514c944bf43330d69102542')
+ '0f4f62ec0a9ee4123198180bb9494ea87170eb1b')
+
+if (( VSCODE_NONFREE )); then
+ source+=('product_json.patch')
+ sha1sums+=('ba8febe936932080610d899fdb57294fc2f9f614')
+ install='visual-studio-code-oss.nonfree.install'
+ license+=('proprietary')
+fi
case "$CARCH" in
i686)
@@ -38,19 +48,24 @@ esac
prepare() {
cd "${srcdir}/vscode-${_commit}"
- patch -p1 -i "${srcdir}/product_json.patch"
- _datestamp=$(date -u -Is | sed 's/\+00:00/Z/')
- sed -e "s/@COMMIT@/$_commit/" -e "s/@DATE@/$_datestamp/" \
- -i product.json
+ if (( VSCODE_NONFREE )); then
+ patch -p1 -i "${srcdir}/product_json.patch"
+ _datestamp=$(date -u -Is | sed 's/\+00:00/Z/')
+ sed -e "s/@COMMIT@/$_commit/" -e "s/@DATE@/$_datestamp/" \
+ -i product.json
+ fi
- # 1.8.0 is pulled in by default, which is currently broken upstream
- patch -p1 -i "${srcdir}/old-gulp-sourcemaps.patch"
+ # gulp now generates monaco.d.ts without preceeding whitespace, which the
+ # build detects as being an uncommitted change :(. This patch doesn't
+ # actually change any of the code, it just makes the whitespace match so
+ # the build system doesn't complain about it.
+ patch -p1 -i "${srcdir}/rebuild-monaco.patch"
}
build() {
cd "${srcdir}/vscode-${_commit}"
- ./scripts/npm.sh install
+ ./scripts/npm.sh install --arch=${_vscode_arch}
# The default memory limit is too low for current versions of node to
# successfully build vscode. This will set it to 2GB -- change it if