[arch-commits] Commit in code/repos/community-x86_64 (10 files)

Filipe Laíns ffy00 at archlinux.org
Tue Sep 11 18:41:14 UTC 2018


    Date: Tuesday, September 11, 2018 @ 18:41:13
  Author: ffy00
Revision: 379765

archrelease: copy trunk to community-x86_64

Added:
  code/repos/community-x86_64/PKGBUILD
    (from rev 379764, code/trunk/PKGBUILD)
  code/repos/community-x86_64/code-liveshare.patch
    (from rev 379764, code/trunk/code-liveshare.patch)
  code/repos/community-x86_64/code.js
    (from rev 379764, code/trunk/code.js)
  code/repos/community-x86_64/code.sh
    (from rev 379764, code/trunk/code.sh)
  code/repos/community-x86_64/product_json.patch
    (from rev 379764, code/trunk/product_json.patch)
Deleted:
  code/repos/community-x86_64/PKGBUILD
  code/repos/community-x86_64/code-liveshare.patch
  code/repos/community-x86_64/code.js
  code/repos/community-x86_64/code.sh
  code/repos/community-x86_64/product_json.patch

----------------------+
 PKGBUILD             |  220 ++++++++++++++++++++++++-------------------------
 code-liveshare.patch |   22 ++--
 code.js              |   44 +++++++--
 code.sh              |    6 -
 product_json.patch   |   42 ++++-----
 5 files changed, 177 insertions(+), 157 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-11 18:41:06 UTC (rev 379764)
+++ PKGBUILD	2018-09-11 18:41:13 UTC (rev 379765)
@@ -1,111 +0,0 @@
-# $Id$
-# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
-# Contributor: Michael Hansen <zrax0111 gmail com>
-# Contributor: Francisco Magalhães <franmagneto gmail com>
-
-pkgname=code
-pkgdesc='The Open Source build of Visual Studio Code (vscode) editor'
-pkgver=1.27.1
-pkgrel=5
-arch=('x86_64')
-url='https://github.com/Microsoft/vscode'
-license=('MIT')
-depends=('electron' 'libsecret' 'libxkbfile')
-makedepends=('git' 'gulp' 'npm' 'python2' 'yarn')
-source=("$pkgname::git+https://github.com/Microsoft/vscode#tag=$_pkgver"
-        'code.sh'
-        'code.js'
-        'product_json.patch'
-        'code-liveshare.patch')
-sha512sums=('SKIP'
-            '75c1052700eeee80ed28d556b801c5f9d096cc7b0638d331cb8ca4814d9dcb436c2b1aa8772bf6d137503c2f13c3796ce7fe4b9ae83034831cb61bc36474e6ec'
-            '3d58a4e26767d2a29ff36f6cb41f9ca3c5a3f2608450917bc45db8901fc2b18f38b01e9725c7c381617d284eaaaeb969f531b96bcc48f839bda61bbc36cf6e68'
-            'dcf52fa373a787cd94ce7ad216a269de3ca90b3f02cea1d635016d980e765a9cc040776ce4b4ef83721ab6f0d74efb7a3a9ca02fbdf3daa06653c766d36cde08'
-            '6080b9d30b2c852a831d4fa98be94e42eb7d94dfd5813bbe28410d031191c20563e4288d6b0062c74b635a962c3eba3533fcebeff1f67b4a8005a167c2f7fbf2')
-
-# Even though we don't officially support other archs, let's
-# allow the user to use this PKGBUILD to compile the package
-# for his architecture
-case "$CARCH" in
-  i686)
-    _vscode_arch=ia32
-    ;;
-  x86_64)
-    _vscode_arch=x64
-    ;;
-  armv7h)
-    _vscode_arch=arm
-    ;;
-  *)
-    # Needed for mksrcinfo
-    _vscode_arch=DUMMY
-    ;;
-esac
-
-prepare() {
-  cd $pkgname
-
-  # This patch no longer contains proprietary modifications.
-  # See https://github.com/Microsoft/vscode/issues/31168 for details.
-  patch -p1 < ../product_json.patch
-
-  # Set the commit and build date
-  local _commit=$(git rev-parse HEAD)
-  local _datestamp=$(date -u -Is | sed 's/\+00:00/Z/')
-  sed -e "s/@COMMIT@/$_commit/" -e "s/@DATE@/$_datestamp/" -i product.json
-
-  # See https://github.com/MicrosoftDocs/live-share/issues/262 for details
-  patch -p1 < ../code-liveshare.patch
-
-  # Build native modules for system electron
-  local _target=$(</usr/lib/electron/version)
-  sed -i "s/^target .*/target \"${_target//v/}\"/" .yarnrc
-}
-
-build() {
-  cd $pkgname
-
-  yarn install --arch=$_vscode_arch
-
-  # The default memory limit may be too low for current versions of node
-  # to successfully build vscode. Change it if this number still doesn't
-  # work for your system.
-  mem_limit="--max_old_space_size=4096"
-
-  if ! /usr/bin/node $mem_limit /usr/bin/gulp vscode-linux-$_vscode_arch-min
-  then
-      echo
-      echo "*** NOTE: If the build failed due to running out of file handles (EMFILE),"
-      echo "*** you will need to raise your max open file limit."
-      echo "*** You can check this for more information on how to increase this limit:"
-      echo "***    https://ro-che.info/articles/2017-03-26-increase-open-files-limit"
-      exit 1
-  fi
-}
-
-package() {
-  # Install resource files
-  install -dm 755 "$pkgdir"/usr/lib/$pkgname
-  cp -r --no-preserve=ownership --preserve=mode VSCode-linux-$_vscode_arch/resources/* "$pkgdir"/usr/lib/$pkgname/
-
-  # Install binary
-  install -Dm 755 code.js "$pkgdir"/usr/lib/$pkgname/app/code.js
-  install -Dm 755 code.sh "$pkgdir"/usr/bin/code
-
-  # Install appdata and desktop file
-  sed -i 's|/usr/share/@@NAME@@/@@NAME@@|@@NAME@@|g
-          s|@@NAME_SHORT@@|Code - OSS|g
-          s|@@NAME_LONG@@|Code|g
-          s|@@NAME@@|code|g
-          s|@@ICON@@|code|g
-          s|@@LICENSE@@|MIT|g' code/resources/linux/code.{appdata.xml,desktop}
-
-  install -Dm 644 code/resources/linux/code.appdata.xml "$pkgdir"/usr/share/metainfo/code.appdata.xml
-  install -Dm 644 code/resources/linux/code.desktop "$pkgdir"/usr/share/applications/code.desktop
-  install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/resources/linux/code.png "$pkgdir"/usr/share/pixmaps/code.png
-
-  # Install license files
-  install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-  install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/ThirdPartyNotices.txt "$pkgdir"/usr/share/licenses/$pkgname/ThirdPartyNotices.txt
-}
-

Copied: code/repos/community-x86_64/PKGBUILD (from rev 379764, code/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-09-11 18:41:13 UTC (rev 379765)
@@ -0,0 +1,109 @@
+# $Id$
+# Maintainer: Filipe Laíns (FFY00) <lains at archlinux.org>
+# Contributor: Michael Hansen <zrax0111 gmail com>
+# Contributor: Francisco Magalhães <franmagneto gmail com>
+
+pkgname=code
+pkgdesc='The Open Source build of Visual Studio Code (vscode) editor'
+pkgver=1.27.1
+pkgrel=6
+arch=('x86_64')
+url='https://github.com/Microsoft/vscode'
+license=('MIT')
+depends=('electron' 'libsecret' 'libxkbfile')
+makedepends=('git' 'gulp' 'npm' 'python2' 'yarn')
+source=("$pkgname::git+https://github.com/Microsoft/vscode#tag=$_pkgver"
+        'code.js'
+        'product_json.patch'
+        'code-liveshare.patch')
+sha512sums=('SKIP'
+            '8ce619714da6b243ce831a0932266841142c8d88c41b383237e7081a0098a4bee3d9fc80c97bb72bea68edfd9120cca8bacd4aea38694f392aa937e3b79c8c0a'
+            'dcf52fa373a787cd94ce7ad216a269de3ca90b3f02cea1d635016d980e765a9cc040776ce4b4ef83721ab6f0d74efb7a3a9ca02fbdf3daa06653c766d36cde08'
+            '6080b9d30b2c852a831d4fa98be94e42eb7d94dfd5813bbe28410d031191c20563e4288d6b0062c74b635a962c3eba3533fcebeff1f67b4a8005a167c2f7fbf2')
+
+# Even though we don't officially support other archs, let's
+# allow the user to use this PKGBUILD to compile the package
+# for his architecture
+case "$CARCH" in
+  i686)
+    _vscode_arch=ia32
+    ;;
+  x86_64)
+    _vscode_arch=x64
+    ;;
+  armv7h)
+    _vscode_arch=arm
+    ;;
+  *)
+    # Needed for mksrcinfo
+    _vscode_arch=DUMMY
+    ;;
+esac
+
+prepare() {
+  cd $pkgname
+
+  # This patch no longer contains proprietary modifications.
+  # See https://github.com/Microsoft/vscode/issues/31168 for details.
+  patch -p1 < ../product_json.patch
+
+  # Set the commit and build date
+  local _commit=$(git rev-parse HEAD)
+  local _datestamp=$(date -u -Is | sed 's/\+00:00/Z/')
+  sed -e "s/@COMMIT@/$_commit/" -e "s/@DATE@/$_datestamp/" -i product.json
+
+  # See https://github.com/MicrosoftDocs/live-share/issues/262 for details
+  patch -p1 < ../code-liveshare.patch
+
+  # Build native modules for system electron
+  local _target=$(</usr/lib/electron/version)
+  sed -i "s/^target .*/target \"${_target//v/}\"/" .yarnrc
+}
+
+build() {
+  cd $pkgname
+
+  yarn install --arch=$_vscode_arch
+
+  # The default memory limit may be too low for current versions of node
+  # to successfully build vscode. Change it if this number still doesn't
+  # work for your system.
+  mem_limit="--max_old_space_size=4096"
+
+  if ! /usr/bin/node $mem_limit /usr/bin/gulp vscode-linux-$_vscode_arch-min
+  then
+      echo
+      echo "*** NOTE: If the build failed due to running out of file handles (EMFILE),"
+      echo "*** you will need to raise your max open file limit."
+      echo "*** You can check this for more information on how to increase this limit:"
+      echo "***    https://ro-che.info/articles/2017-03-26-increase-open-files-limit"
+      exit 1
+  fi
+}
+
+package() {
+  # Install resource files
+  install -dm 755 "$pkgdir"/usr/lib/$pkgname
+  cp -r --no-preserve=ownership --preserve=mode VSCode-linux-$_vscode_arch/resources/app/* "$pkgdir"/usr/lib/$pkgname/
+
+  # Install binary
+  install -Dm 755 code.js "$pkgdir"/usr/bin/code
+
+  # Install appdata and desktop file
+  sed -i 's|/usr/share/@@NAME@@/@@NAME@@|@@NAME@@|g
+          s|@@NAME_SHORT@@|Code - OSS|g
+          s|@@NAME_LONG@@|Code|g
+          s|@@NAME@@|code|g
+          s|@@ICON@@|code|g
+          s|@@LICENSE@@|MIT|g
+          /MimeType/d' code/resources/linux/code.{appdata.xml,desktop}
+
+  install -Dm 644 code/resources/linux/code.appdata.xml "$pkgdir"/usr/share/metainfo/code.appdata.xml
+  install -Dm 644 code/resources/linux/code.desktop "$pkgdir"/usr/share/applications/code.desktop
+  install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/resources/linux/code.png "$pkgdir"/usr/share/pixmaps/code.png
+
+  # Install license files
+  install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  install -Dm 644 VSCode-linux-$_vscode_arch/resources/app/ThirdPartyNotices.txt "$pkgdir"/usr/share/licenses/$pkgname/ThirdPartyNotices.txt
+}
+

Deleted: code-liveshare.patch
===================================================================
--- code-liveshare.patch	2018-09-11 18:41:06 UTC (rev 379764)
+++ code-liveshare.patch	2018-09-11 18:41:13 UTC (rev 379765)
@@ -1,11 +0,0 @@
-diff -rupN a/product.json b/product.json
---- a/product.json	2018-05-08 09:26:25.618099994 -0700
-+++ b/product.json	2018-05-08 09:26:47.388338276 -0700
-@@ -17,6 +17,7 @@
- 	"reportIssueUrl": "https://github.com/Microsoft/vscode/issues/new",
- 	"urlProtocol": "code-oss",
- 	"extensionAllowedProposedApi": [
-+		"ms-vsliveshare.vsliveshare",
- 		"ms-vscode.node-debug",
- 		"ms-vscode.node-debug2"
- 	],

Copied: code/repos/community-x86_64/code-liveshare.patch (from rev 379764, code/trunk/code-liveshare.patch)
===================================================================
--- code-liveshare.patch	                        (rev 0)
+++ code-liveshare.patch	2018-09-11 18:41:13 UTC (rev 379765)
@@ -0,0 +1,11 @@
+diff -rupN a/product.json b/product.json
+--- a/product.json	2018-05-08 09:26:25.618099994 -0700
++++ b/product.json	2018-05-08 09:26:47.388338276 -0700
+@@ -17,6 +17,7 @@
+ 	"reportIssueUrl": "https://github.com/Microsoft/vscode/issues/new",
+ 	"urlProtocol": "code-oss",
+ 	"extensionAllowedProposedApi": [
++		"ms-vsliveshare.vsliveshare",
+ 		"ms-vscode.node-debug",
+ 		"ms-vscode.node-debug2"
+ 	],

Deleted: code.js
===================================================================
--- code.js	2018-09-11 18:41:06 UTC (rev 379764)
+++ code.js	2018-09-11 18:41:13 UTC (rev 379765)
@@ -1,11 +0,0 @@
-#!/usr/bin/electron
-
-const {app} = require('electron');
-const path = require('path');
-
-// Remove first command line argument (/usr/bin/electron).
-process.argv.splice(0, 1);
-
-// Run the application.
-require('module')._load(__dirname, module, true);
-

Copied: code/repos/community-x86_64/code.js (from rev 379764, code/trunk/code.js)
===================================================================
--- code.js	                        (rev 0)
+++ code.js	2018-09-11 18:41:13 UTC (rev 379765)
@@ -0,0 +1,33 @@
+#!/usr/bin/electron
+
+const name = 'code'
+
+const app = require('electron').app;
+const path = require('path');
+const fs = require("fs");
+const Module = require("module");
+const {join} = require("path");
+const vm = require("vm");
+
+// Change command name.
+const fd = fs.openSync('/proc/self/comm', fs.constants.O_WRONLY);
+fs.writeSync(fd, name);
+fs.closeSync(fd);
+
+// Remove first command line argument (/usr/bin/electron).
+process.argv.splice(0, 1);
+
+// Set application paths.
+const appPath = path.join(path.dirname(__dirname), 'lib', name);
+const packageJson = require(path.join(appPath, 'package.json'));
+const productName = 'code-oss'
+app.setAppPath(appPath);
+app.setDesktopName(name + '.desktop');
+app.setName(productName);
+app.setPath('userCache', path.join(app.getPath('cache'), productName));
+app.setPath('userData', path.join(app.getPath('appData'), productName));
+app.setVersion(packageJson.version);
+
+// Run the application.
+require('module')._load(appPath, module, true);
+

Deleted: code.sh
===================================================================
--- code.sh	2018-09-11 18:41:06 UTC (rev 379764)
+++ code.sh	2018-09-11 18:41:13 UTC (rev 379765)
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-electron /usr/lib/code/app/code.js "$@"

Copied: code/repos/community-x86_64/code.sh (from rev 379764, code/trunk/code.sh)
===================================================================
--- code.sh	                        (rev 0)
+++ code.sh	2018-09-11 18:41:13 UTC (rev 379765)
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+electron /usr/lib/code/app/code.js "$@"

Deleted: product_json.patch
===================================================================
--- product_json.patch	2018-09-11 18:41:06 UTC (rev 379764)
+++ product_json.patch	2018-09-11 18:41:13 UTC (rev 379765)
@@ -1,21 +0,0 @@
-diff --git a/product.json b/product.json
-index ed3ced1c1b..df707206d5 100644
---- a/product.json
-+++ b/product.json
-@@ -21,5 +21,15 @@
- 	"extensionAllowedProposedApi": [
- 		"ms-vscode.node-debug",
- 		"ms-vscode.node-debug2"
--	]
-+	],
-+	"quality": "stable",
-+	"extensionsGallery": {
-+		"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
-+		"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
-+		"itemUrl": "https://marketplace.visualstudio.com/items"
-+	},
-+	"documentationUrl": "https://github.com/microsoft/vscode-docs",
-+	"requestFeatureUrl": "https://github.com/Microsoft/vscode/issues",
-+	"commit": "@COMMIT@",
-+	"date": "@DATE@"
- }

Copied: code/repos/community-x86_64/product_json.patch (from rev 379764, code/trunk/product_json.patch)
===================================================================
--- product_json.patch	                        (rev 0)
+++ product_json.patch	2018-09-11 18:41:13 UTC (rev 379765)
@@ -0,0 +1,21 @@
+diff --git a/product.json b/product.json
+index ed3ced1c1b..df707206d5 100644
+--- a/product.json
++++ b/product.json
+@@ -21,5 +21,15 @@
+ 	"extensionAllowedProposedApi": [
+ 		"ms-vscode.node-debug",
+ 		"ms-vscode.node-debug2"
+-	]
++	],
++	"quality": "stable",
++	"extensionsGallery": {
++		"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
++		"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
++		"itemUrl": "https://marketplace.visualstudio.com/items"
++	},
++	"documentationUrl": "https://github.com/microsoft/vscode-docs",
++	"requestFeatureUrl": "https://github.com/Microsoft/vscode/issues",
++	"commit": "@COMMIT@",
++	"date": "@DATE@"
+ }



More information about the arch-commits mailing list