diff options
author | Michael Hansen | 2016-10-31 11:43:00 -0700 |
---|---|---|
committer | Michael Hansen | 2016-10-31 11:45:44 -0700 |
commit | cc14c24cc4ad3db1903623429710d576758499d7 (patch) | |
tree | b03cdac0f1ad8a3812cc9bf863f6f66eac3d09ad | |
parent | e213c58156f2a3c19e94e8d21c24c3d68650dc78 (diff) | |
download | aur-cc14c24cc4ad3db1903623429710d576758499d7.tar.gz |
Fix monaco.d.ts build issue, and add option to remove non-free patches
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | old-gulp-sourcemaps.patch | 12 | ||||
-rw-r--r-- | rebuild-monaco.patch.gz | bin | 0 -> 52361 bytes | |||
-rw-r--r-- | visual-studio-code-oss.nonfree.install | 15 |
5 files changed, 49 insertions, 29 deletions
@@ -1,13 +1,15 @@ # Generated by mksrcinfo v8 -# Tue Oct 18 21:15:15 UTC 2016 +# Mon Oct 31 18:45:29 UTC 2016 pkgbase = visual-studio-code-oss pkgdesc = Visual Studio Code for Linux, Open Source version pkgver = 1.6.1 - pkgrel = 2 + pkgrel = 3 url = https://code.visualstudio.com/ + install = visual-studio-code-oss.nonfree.install arch = i686 arch = x86_64 license = MIT + license = proprietary makedepends = npm makedepends = nodejs>=6.8.0 makedepends = gulp @@ -21,14 +23,14 @@ pkgbase = visual-studio-code-oss depends = alsa-lib provides = vscode-oss conflicts = vscode-oss - source = 1.6.1-2.tar.gz::https://github.com/Microsoft/vscode/archive/9e4e44c19e393803e2b05fe2323cf4ed7e36880e.tar.gz + source = 1.6.1-3.tar.gz::https://github.com/Microsoft/vscode/archive/9e4e44c19e393803e2b05fe2323cf4ed7e36880e.tar.gz source = visual-studio-code-oss.desktop + source = rebuild-monaco.patch.gz source = product_json.patch - source = old-gulp-sourcemaps.patch sha1sums = d2b827fbc7aa8b54343f6cda452fb74142e1993a sha1sums = 9c4176c4d99103736df6746ca174b5026bd57e6b + sha1sums = 0f4f62ec0a9ee4123198180bb9494ea87170eb1b sha1sums = ba8febe936932080610d899fdb57294fc2f9f614 - sha1sums = e614e05c4b591bbc2514c944bf43330d69102542 pkgname = visual-studio-code-oss @@ -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 diff --git a/old-gulp-sourcemaps.patch b/old-gulp-sourcemaps.patch deleted file mode 100644 index 72b0a6ee242f..000000000000 --- a/old-gulp-sourcemaps.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN a/package.json b/package.json ---- a/package.json 2016-10-13 15:00:01.376937983 -0700 -+++ b/package.json 2016-10-13 15:01:48.217986937 -0700 -@@ -64,7 +64,7 @@ - "gulp-rename": "^1.2.0", - "gulp-replace": "^0.5.4", - "gulp-shell": "^0.5.2", -- "gulp-sourcemaps": "^1.6.0", -+ "gulp-sourcemaps": "1.7.3", - "gulp-tsb": "^2.0.1", - "gulp-tslint": "^4.3.0", - "gulp-uglify": "^2.0.0", diff --git a/rebuild-monaco.patch.gz b/rebuild-monaco.patch.gz Binary files differnew file mode 100644 index 000000000000..b85e7338f9cb --- /dev/null +++ b/rebuild-monaco.patch.gz diff --git a/visual-studio-code-oss.nonfree.install b/visual-studio-code-oss.nonfree.install new file mode 100644 index 000000000000..3f51ea6e3373 --- /dev/null +++ b/visual-studio-code-oss.nonfree.install @@ -0,0 +1,15 @@ +_notice() { + echo + echo "NOTICE: This package includes proprietary configuration files which make" + echo "the package non-free and non-redistributable. If you wish to disable" + echo "the extra functionality and use the pure open-source package, read the" + echo "notice at the top of the PKGBUILD and set VSCODE_NONFREE=0" +} + +post_install() { + _notice +} + +post_upgrade() { + _notice +} |