summaryrefslogtreecommitdiff
path: root/app-editors/atom/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-editors/atom/files
reinit the tree, so we can have metadata
Diffstat (limited to 'app-editors/atom/files')
-rw-r--r--app-editors/atom/files/apm-python.patch16
-rw-r--r--app-editors/atom/files/atom-1.13-apm-path.patch16
-rw-r--r--app-editors/atom/files/atom-apm-path-r1.patch16
-rw-r--r--app-editors/atom/files/atom-apm-path-r2.patch16
-rw-r--r--app-editors/atom/files/atom-apm-path.patch14
-rw-r--r--app-editors/atom/files/atom-fix-app-restart-r1.patch12
-rw-r--r--app-editors/atom/files/atom-fix-app-restart.patch12
-rw-r--r--app-editors/atom/files/atom-license-path-r1.patch11
-rw-r--r--app-editors/atom/files/atom-license-path.patch11
-rw-r--r--app-editors/atom/files/atom-marker-layer-r1.patch11
-rw-r--r--app-editors/atom/files/atom-marker-layer.patch11
-rw-r--r--app-editors/atom/files/atom-python.patch10
-rw-r--r--app-editors/atom/files/atom-unbundle-electron-r1.patch45
-rw-r--r--app-editors/atom/files/atom-unbundle-electron.patch45
-rw-r--r--app-editors/atom/files/gyp-unbundle.py141
-rw-r--r--app-editors/atom/files/transpile-coffee-script.js23
16 files changed, 410 insertions, 0 deletions
diff --git a/app-editors/atom/files/apm-python.patch b/app-editors/atom/files/apm-python.patch
new file mode 100644
index 000000000000..0467beaf10ee
--- /dev/null
+++ b/app-editors/atom/files/apm-python.patch
@@ -0,0 +1,16 @@
+diff --git a/apm/bin/python-interceptor.sh b/apm/bin/python-interceptor.sh
+index 7ce1965..12cc72f 100755
+--- a/apm/bin/python-interceptor.sh
++++ b/apm/bin/python-interceptor.sh
+@@ -34,9 +34,9 @@ case $1 in
+ ARGS+=("--format=safemake.py")
+ fi
+
+- exec python "${ARGS[@]}"
++ exec python2 "${ARGS[@]}"
+ ;;
+ *)
+- exec python "$@"
++ exec python2 "$@"
+ ;;
+ esac
diff --git a/app-editors/atom/files/atom-1.13-apm-path.patch b/app-editors/atom/files/atom-1.13-apm-path.patch
new file mode 100644
index 000000000000..0dcb7914c669
--- /dev/null
+++ b/app-editors/atom/files/atom-1.13-apm-path.patch
@@ -0,0 +1,16 @@
+diff --git a/build/app/src/config-schema.js b/build/app/src/config-schema.js
+index 1307db6..d6a1ba4 100644
+--- a/build/app/src/config-schema.js
++++ b/build/app/src/config-schema.js
+@@ -21,6 +21,11 @@ var configSchema = {
+ core: {
+ type: 'object',
+ properties: {
++ apmPath: {
++ type: 'string',
++ 'default': '/usr/bin/apm{{ATOM_SUFFIX}}',
++ description: 'Path to apm executable.'
++ },
+ ignoredNames: {
+ type: 'array',
+ 'default': ['.git', '.hg', '.svn', '.DS_Store', '._*', 'Thumbs.db'],
diff --git a/app-editors/atom/files/atom-apm-path-r1.patch b/app-editors/atom/files/atom-apm-path-r1.patch
new file mode 100644
index 000000000000..c30987d8a300
--- /dev/null
+++ b/app-editors/atom/files/atom-apm-path-r1.patch
@@ -0,0 +1,16 @@
+diff --git a/src/config-schema.js b/src/config-schema.js
+index 39f0585..24ee2de 100644
+--- a/src/config-schema.js
++++ b/src/config-schema.js
+@@ -5,6 +5,11 @@ const configSchema = {
+ core: {
+ type: 'object',
+ properties: {
++ apmPath: {
++ type: 'string',
++ "default": '/usr/bin/apm{{ATOM_SUFFIX}}',
++ description: 'Path to apm executable.'
++ },
+ ignoredNames: {
+ type: 'array',
+ default: ['.git', '.hg', '.svn', '.DS_Store', '._*', 'Thumbs.db', 'desktop.ini'],
diff --git a/app-editors/atom/files/atom-apm-path-r2.patch b/app-editors/atom/files/atom-apm-path-r2.patch
new file mode 100644
index 000000000000..12234b6bab13
--- /dev/null
+++ b/app-editors/atom/files/atom-apm-path-r2.patch
@@ -0,0 +1,16 @@
+diff --git a/src/config-schema.js b/src/config-schema.js
+index 39f0585..24ee2de 100644
+--- a/src/config-schema.js
++++ b/src/config-schema.js
+@@ -5,6 +5,11 @@ const configSchema = {
+ core: {
+ type: 'object',
+ properties: {
++ apmPath: {
++ type: 'string',
++ "default": '{{ATOM_PREFIX}}/usr/bin/apm{{ATOM_SUFFIX}}',
++ description: 'Path to apm executable.'
++ },
+ ignoredNames: {
+ type: 'array',
+ default: ['.git', '.hg', '.svn', '.DS_Store', '._*', 'Thumbs.db', 'desktop.ini'],
diff --git a/app-editors/atom/files/atom-apm-path.patch b/app-editors/atom/files/atom-apm-path.patch
new file mode 100644
index 000000000000..7ee7cdb4a107
--- /dev/null
+++ b/app-editors/atom/files/atom-apm-path.patch
@@ -0,0 +1,14 @@
+--- a/build/app/src/config-schema.js
++++ b/build/app/src/config-schema.js
+@@ -9,6 +9,11 @@
+ core: {
+ type: 'object',
+ properties: {
++ apmPath: {
++ type: 'string',
++ "default": '/usr/bin/apm{{ATOM_SUFFIX}}',
++ description: 'Path to apm executable.'
++ },
+ ignoredNames: {
+ type: 'array',
+ "default": [".git", ".hg", ".svn", ".DS_Store", "._*", "Thumbs.db"],
diff --git a/app-editors/atom/files/atom-fix-app-restart-r1.patch b/app-editors/atom/files/atom-fix-app-restart-r1.patch
new file mode 100644
index 000000000000..f984d7841be9
--- /dev/null
+++ b/app-editors/atom/files/atom-fix-app-restart-r1.patch
@@ -0,0 +1,12 @@
+diff --git a/atom-application.js.orig b/atom-application.js
+index 92d985f..9a120e6 100644
+--- a/src/main-process/atom-application.js
++++ b/src/main-process/atom-application.js
+@@ -1178,6 +1178,7 @@
+ AtomApplication.prototype.restart = function() {
+ var args;
+ args = [];
++ args.push("--app=" + this.resourcePath);
+ if (this.safeMode) {
+ args.push("--safe");
+ }
diff --git a/app-editors/atom/files/atom-fix-app-restart.patch b/app-editors/atom/files/atom-fix-app-restart.patch
new file mode 100644
index 000000000000..1bfa1ed429a0
--- /dev/null
+++ b/app-editors/atom/files/atom-fix-app-restart.patch
@@ -0,0 +1,12 @@
+diff --git a/atom-application.js.orig b/atom-application.js
+index 92d985f..9a120e6 100644
+--- a/build/app/src/main-process/atom-application.js
++++ b/build/app/src/main-process/atom-application.js
+@@ -1178,6 +1178,7 @@
+ AtomApplication.prototype.restart = function() {
+ var args;
+ args = [];
++ args.push("--app=" + this.resourcePath);
+ if (this.safeMode) {
+ args.push("--safe");
+ }
diff --git a/app-editors/atom/files/atom-license-path-r1.patch b/app-editors/atom/files/atom-license-path-r1.patch
new file mode 100644
index 000000000000..c8d6ab9784f0
--- /dev/null
+++ b/app-editors/atom/files/atom-license-path-r1.patch
@@ -0,0 +1,11 @@
+--- a/src/main-process/atom-application.js
++++ b/src/main-process/atom-application.js
+@@ -406,7 +406,7 @@
+ this.openPathOnEvent('application:open-your-keymap', 'atom://.atom/keymap');
+ this.openPathOnEvent('application:open-your-snippets', 'atom://.atom/snippets');
+ this.openPathOnEvent('application:open-your-stylesheet', 'atom://.atom/stylesheet');
+- this.openPathOnEvent('application:open-license', path.join(process.resourcesPath, 'LICENSE.md'));
++ this.openPathOnEvent('application:open-license', '/usr/share/licenses/atom/LICENSE.md');
+ this.disposable.add(ipcHelpers.on(app, 'before-quit', (function(_this) {
+ return function(event) {
+ if (!_this.quitting) {
diff --git a/app-editors/atom/files/atom-license-path.patch b/app-editors/atom/files/atom-license-path.patch
new file mode 100644
index 000000000000..0ddf993448a5
--- /dev/null
+++ b/app-editors/atom/files/atom-license-path.patch
@@ -0,0 +1,11 @@
+--- a/build/app/src/main-process/atom-application.js
++++ b/build/app/src/main-process/atom-application.js
+@@ -406,7 +406,7 @@
+ this.openPathOnEvent('application:open-your-keymap', 'atom://.atom/keymap');
+ this.openPathOnEvent('application:open-your-snippets', 'atom://.atom/snippets');
+ this.openPathOnEvent('application:open-your-stylesheet', 'atom://.atom/stylesheet');
+- this.openPathOnEvent('application:open-license', path.join(process.resourcesPath, 'LICENSE.md'));
++ this.openPathOnEvent('application:open-license', '/usr/share/licenses/atom/LICENSE.md');
+ this.disposable.add(ipcHelpers.on(app, 'before-quit', (function(_this) {
+ return function(event) {
+ if (!_this.quitting) {
diff --git a/app-editors/atom/files/atom-marker-layer-r1.patch b/app-editors/atom/files/atom-marker-layer-r1.patch
new file mode 100644
index 000000000000..1dcdecbd4eba
--- /dev/null
+++ b/app-editors/atom/files/atom-marker-layer-r1.patch
@@ -0,0 +1,11 @@
+--- a/node_modules/text-buffer/lib/marker-layer.js
+--- b/node_modules/text-buffer/lib/marker-layer.js
+@@ -192,7 +192,7 @@
+ return function(markerId) {
+ var marker;
+ marker = _this.markersById[markerId];
+- if (!marker.matchesParams(params)) {
++ if (marker == null || !marker.matchesParams(params)) {
+ return;
+ }
+ return result.push(marker);
diff --git a/app-editors/atom/files/atom-marker-layer.patch b/app-editors/atom/files/atom-marker-layer.patch
new file mode 100644
index 000000000000..2d797aa293da
--- /dev/null
+++ b/app-editors/atom/files/atom-marker-layer.patch
@@ -0,0 +1,11 @@
+--- a/build/app/node_modules/text-buffer/lib/marker-layer.js
+--- b/build/app/node_modules/text-buffer/lib/marker-layer.js
+@@ -192,7 +192,7 @@
+ return function(markerId) {
+ var marker;
+ marker = _this.markersById[markerId];
+- if (!marker.matchesParams(params)) {
++ if (marker == null || !marker.matchesParams(params)) {
+ return;
+ }
+ return result.push(marker);
diff --git a/app-editors/atom/files/atom-python.patch b/app-editors/atom/files/atom-python.patch
new file mode 100644
index 000000000000..57a475ecce02
--- /dev/null
+++ b/app-editors/atom/files/atom-python.patch
@@ -0,0 +1,10 @@
+--- a/atom.sh
++++ b/atom.sh
+@@ -92,6 +92,7 @@
+ fi
+
+ ATOM_HOME="${ATOM_HOME:-$HOME/.atom}"
++ export PYTHON=python2
+ mkdir -p "$ATOM_HOME"
+
+ : ${TMPDIR:=/tmp}
diff --git a/app-editors/atom/files/atom-unbundle-electron-r1.patch b/app-editors/atom/files/atom-unbundle-electron-r1.patch
new file mode 100644
index 000000000000..85c0c64ab794
--- /dev/null
+++ b/app-editors/atom/files/atom-unbundle-electron-r1.patch
@@ -0,0 +1,45 @@
+From ea6d1be3558d7610ccc82b3a44dd30657a686639 Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Thu, 27 Jul 2017 13:18:54 -0400
+Subject: [PATCH] Unbundle electron
+
+---
+ atom.sh | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/atom.sh b/atom.sh
+index 6b0e94430..ea8e0dc2e 100755
+--- a/atom.sh
++++ b/atom.sh
+@@ -102,11 +102,10 @@ elif [ $OS == 'Linux' ]; then
+ SCRIPT=$(readlink -f "$0")
+ USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)
+
+- if [ -n "$BETA_VERSION" ]; then
+- ATOM_PATH="$USR_DIRECTORY/share/atom-beta/atom"
+- else
+- ATOM_PATH="$USR_DIRECTORY/share/atom/atom"
+- fi
++ export NPM_CONFIG_NODEDIR="{{NPM_CONFIG_NODEDIR}}"
++ export ATOM_RESOURCE_PATH="{{ATOM_RESOURCE_PATH}}"
++ export LOCAL_GIT_DIRECTORY="{{ATOM_PREFIX}}/usr"
++ ATOM_PATH="{{ATOM_PATH}}"
+
+ ATOM_HOME="${ATOM_HOME:-$HOME/.atom}"
+ mkdir -p "$ATOM_HOME"
+@@ -116,11 +115,11 @@ elif [ $OS == 'Linux' ]; then
+ [ -x "$ATOM_PATH" ] || ATOM_PATH="$TMPDIR/atom-build/Atom/atom"
+
+ if [ $EXPECT_OUTPUT ]; then
+- "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@"
++ "$ATOM_PATH" --app="$ATOM_RESOURCE_PATH" --executed-from="$(pwd)" --pid=$$ "$@"
+ exit $?
+ else
+ (
+- nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
++ nohup "$ATOM_PATH" --app="$ATOM_RESOURCE_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
+ if [ $? -ne 0 ]; then
+ cat "$ATOM_HOME/nohup.out"
+ exit $?
+--
+2.13.3
diff --git a/app-editors/atom/files/atom-unbundle-electron.patch b/app-editors/atom/files/atom-unbundle-electron.patch
new file mode 100644
index 000000000000..296b17b0c157
--- /dev/null
+++ b/app-editors/atom/files/atom-unbundle-electron.patch
@@ -0,0 +1,45 @@
+From ea6d1be3558d7610ccc82b3a44dd30657a686639 Mon Sep 17 00:00:00 2001
+From: Elvis Pranskevichus <elvis@magic.io>
+Date: Thu, 27 Jul 2017 13:18:54 -0400
+Subject: [PATCH] Unbundle electron
+
+---
+ atom.sh | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/atom.sh b/atom.sh
+index 6b0e94430..ea8e0dc2e 100755
+--- a/atom.sh
++++ b/atom.sh
+@@ -102,11 +102,10 @@ elif [ $OS == 'Linux' ]; then
+ SCRIPT=$(readlink -f "$0")
+ USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..)
+
+- if [ -n "$BETA_VERSION" ]; then
+- ATOM_PATH="$USR_DIRECTORY/share/atom-beta/atom"
+- else
+- ATOM_PATH="$USR_DIRECTORY/share/atom/atom"
+- fi
++ export NPM_CONFIG_NODEDIR="{{NPM_CONFIG_NODEDIR}}"
++ export ATOM_RESOURCE_PATH="{{ATOM_RESOURCE_PATH}}"
++ export LOCAL_GIT_DIRECTORY="/usr"
++ ATOM_PATH="{{ATOM_PATH}}"
+
+ ATOM_HOME="${ATOM_HOME:-$HOME/.atom}"
+ mkdir -p "$ATOM_HOME"
+@@ -116,11 +115,11 @@ elif [ $OS == 'Linux' ]; then
+ [ -x "$ATOM_PATH" ] || ATOM_PATH="$TMPDIR/atom-build/Atom/atom"
+
+ if [ $EXPECT_OUTPUT ]; then
+- "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@"
++ "$ATOM_PATH" --app="$ATOM_RESOURCE_PATH" --executed-from="$(pwd)" --pid=$$ "$@"
+ exit $?
+ else
+ (
+- nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
++ nohup "$ATOM_PATH" --app="$ATOM_RESOURCE_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
+ if [ $? -ne 0 ]; then
+ cat "$ATOM_HOME/nohup.out"
+ exit $?
+--
+2.13.3
diff --git a/app-editors/atom/files/gyp-unbundle.py b/app-editors/atom/files/gyp-unbundle.py
new file mode 100644
index 000000000000..370221380b64
--- /dev/null
+++ b/app-editors/atom/files/gyp-unbundle.py
@@ -0,0 +1,141 @@
+#!/usr/bin/env python2
+
+from __future__ import print_function
+
+
+import argparse
+import pprint
+import sys
+
+
+def die(msg):
+ print(msg, file=sys.stderr)
+ sys.exit(1)
+
+
+def do_unbundle(gypdata, targets):
+ gyptargets = {t['target_name']: t for t in gypdata['targets']}
+ dropped_deps = set()
+
+ def _unbundle_in_block(gypblock):
+ gypdeps = gypblock.get('dependencies') or {}
+
+ for dep, (libs, defines) in unbundlings.items():
+ if dep not in gypdeps:
+ continue
+
+ gypdeps.remove(dep)
+
+ try:
+ ls = gyptarget['link_settings']
+ except KeyError:
+ ls = gyptarget['link_settings'] = {}
+
+ try:
+ gyplibs = ls['libraries']
+ except KeyError:
+ gyplibs = ls['libraries'] = []
+
+ gyplibs.extend('-l{}'.format(lib) for lib in libs)
+
+ if defines:
+ try:
+ dd = gyptarget['defines']
+ except KeyError:
+ dd = gyptarget['defines'] = []
+
+ dd.extend(defines)
+
+ dropped_deps.add(dep)
+
+ gypconds = gypblock.get('conditions') or []
+ for cond in gypconds:
+ condblocks = cond[1:]
+ for condblock in condblocks:
+ _unbundle_in_block(condblock)
+
+ for target, unbundlings in targets.items():
+ if target not in gyptargets:
+ die('There is no {} target in gyp file'.format(target))
+
+ gyptarget = gyptargets[target]
+
+ _unbundle_in_block(gyptarget)
+
+ for gyptarget in gypdata['targets']:
+ if gyptarget['target_name'] in dropped_deps:
+ if gyptarget.get('dependencies'):
+ dropped_deps.update(gyptarget.get('dependencies'))
+
+ new_targets = []
+ for gyptarget in gypdata['targets']:
+ if gyptarget['target_name'] not in dropped_deps:
+ new_targets.append(gyptarget)
+
+ gypdata['targets'] = new_targets
+
+ gypconds = gypdata.get('conditions')
+ if gypconds:
+ for cond in gypconds:
+ condblocks = cond[1:]
+ for condblock in condblocks:
+ new_targets = []
+ blocktargets = condblock.get('targets')
+ if blocktargets:
+ for blocktarget in blocktargets:
+ if blocktarget['target_name'] not in dropped_deps:
+ new_targets.append(blocktarget)
+ condblock['targets'] = new_targets
+
+
+def main():
+ parser = argparse.ArgumentParser(description='Unbundle libs in gyp files')
+ parser.add_argument('gypfile', type=str, help='input gyp file')
+ parser.add_argument(
+ '--unbundle', type=str, action='append',
+ help='unbundle rule in the format '
+ '<target>;<dep>;<lib>[;lib][;-DMACRO]')
+ parser.add_argument(
+ '-i', '--inplace', action='store_true',
+ help='modify gyp file in-place')
+
+ args = parser.parse_args()
+
+ targets = {}
+
+ for unbundle in args.unbundle:
+ rule = list(filter(None, (i.strip() for i in unbundle.split(';'))))
+ if len(rule) < 3:
+ die('Invalid unbundle rule: {!r}'.format(unbundle))
+ target, dep = rule[:2]
+
+ defines = []
+ libs = []
+
+ for item in rule[2:]:
+ if item.startswith('-D'):
+ defines.append(item[2:])
+ else:
+ libs.append(item)
+
+ try:
+ target_unbundlings = targets[target]
+ except KeyError:
+ target_unbundlings = targets[target] = {}
+
+ target_unbundlings[dep] = libs, defines
+
+ with open(args.gypfile, 'rt') as f:
+ gypdata = eval(f.read())
+
+ do_unbundle(gypdata, targets)
+
+ if args.inplace:
+ with open(args.gypfile, 'wt') as f:
+ pprint.pprint(gypdata, stream=f)
+ else:
+ pprint.pprint(gypdata)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/app-editors/atom/files/transpile-coffee-script.js b/app-editors/atom/files/transpile-coffee-script.js
new file mode 100644
index 000000000000..c32e09cad92d
--- /dev/null
+++ b/app-editors/atom/files/transpile-coffee-script.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const CompileCache = require(process.env.ATOM_SRC_ROOT + '/src/compile-cache')
+const fs = require('fs')
+const glob = require('glob')
+const path = require('path')
+
+module.exports = function () {
+ let paths = new Set()
+
+ for (let pattern of process.argv.slice(2)) {
+ for (let path of glob.sync(pattern, {nodir: true})) {
+ paths.add(path)
+ }
+ }
+
+ for (let path of paths) {
+ let jsPath = coffeePath.replace(/coffee$/g, 'js')
+ fs.writeFileSync(
+ jsPath, CompileCache.addPathToCache(coffeePath, process.env.ATOM_HOME))
+ fs.unlinkSync(coffeePath)
+ }
+}