mirror of
https://gitdl.cn/https://github.com/chakralinux/gtk.git
synced 2025-02-03 03:07:15 +08:00
atom: update to 1.27.2
This commit is contained in:
parent
0a908cdd24
commit
abb23ca82c
@ -1,6 +1,6 @@
|
||||
pkgname=atom
|
||||
pkgver=1.26.1
|
||||
pkgrel=1
|
||||
pkgver=1.27.2
|
||||
pkgrel=2
|
||||
pkgdesc='A hackable text editor for the 21st Century'
|
||||
arch=('x86_64')
|
||||
url='https://github.com/atom/atom'
|
||||
@ -10,16 +10,35 @@ makedepends=('git' 'npm' 'libgnome-keyring' 'gconf' 'python2' 'libsecret')
|
||||
options=(!emptydirs)
|
||||
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/atom/atom/archive/v${pkgver}.tar.gz"
|
||||
'fix-license-path.patch'
|
||||
'fix-restart.patch')
|
||||
sha256sums=('d5c2fab3f671b4162992d0baffb2393bc58e6b361aa37214dcc5c9be1e03c65f'
|
||||
'fix-restart.patch'
|
||||
'fix-node8.patch')
|
||||
sha256sums=('e99c96326682cd674d3d225c01b706ddd7e5a6b3f4e7cbfcbef1a74d3b977223'
|
||||
'67ecd71b08292218388205ee49e02d176a15bd0c3e74d30cb720b79c6946f4c9'
|
||||
'a6fa960741823a52b2f82684285e26eb84ce54825dc7ed008fdaca974b60957e')
|
||||
'a6fa960741823a52b2f82684285e26eb84ce54825dc7ed008fdaca974b60957e'
|
||||
'eb771d7c009be8d48c1387ed63f3e575dc12f3bd69455b4be4b78ab57cb49b86')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
patch -Np1 -i "${srcdir}"/fix-license-path.patch
|
||||
patch -Np1 -i "${srcdir}"/fix-restart.patch
|
||||
patch -Np1 -i "${srcdir}"/fix-node8.patch
|
||||
|
||||
# Upstream ea1ff8d45448679390058be185ee0d36f823872e
|
||||
sed -e 's/"archive-view": "0.64.3"/"archive-view": "0.64.6"/' -i package.json
|
||||
|
||||
# Workaround for Node 10
|
||||
sed -e 's|"electron-link": "0.2.0"|"electron-link": "../../electron-link"|' \
|
||||
-i script/package.json
|
||||
cd ..
|
||||
git clone https://github.com/atom/electron-link.git
|
||||
cd electron-link
|
||||
git checkout v0.2.0
|
||||
sed -e 's/"leveldown": "^1.6.0"/"leveldown": "^2.0.1"/' -i package.json
|
||||
npm install
|
||||
npx babel src -d lib
|
||||
cd node_modules/levelup
|
||||
sed -e 's/"leveldown": "^1.1.0"/"leveldown": "^2.0.1"/' -i package.json
|
||||
}
|
||||
|
||||
build() {
|
||||
@ -28,7 +47,7 @@ build() {
|
||||
export PYTHON=/usr/bin/python2
|
||||
export ATOM_RESOURCE_PATH="$srcdir/atom-$pkgver"
|
||||
# If unset, ~/.atom/.node-gyp/.atom/.npm is used
|
||||
export NPM_CONFIG_CACHE="$srcdir/.atom/.npm"
|
||||
export NPM_CONFIG_CACHE="${HOME}/.atom/.npm"
|
||||
|
||||
cd script
|
||||
npm install
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/atom.sh
|
||||
+++ b/atom.sh
|
||||
@@ -1,20 +1,5 @@
|
||||
@@ -1,26 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
-if [ "$(uname)" == 'Darwin' ]; then
|
||||
@ -12,17 +12,23 @@
|
||||
- exit 1
|
||||
-fi
|
||||
-
|
||||
-if [ "$(basename $0)" == 'atom-beta' ]; then
|
||||
- BETA_VERSION=true
|
||||
-else
|
||||
- BETA_VERSION=
|
||||
-fi
|
||||
-case $(basename $0) in
|
||||
- atom-beta)
|
||||
- CHANNEL=beta
|
||||
- ;;
|
||||
- atom-dev)
|
||||
- CHANNEL=dev
|
||||
- ;;
|
||||
- *)
|
||||
- CHANNEL=stable
|
||||
- ;;
|
||||
-esac
|
||||
-
|
||||
export ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=true
|
||||
|
||||
while getopts ":wtfvh-:" opt; do
|
||||
@@ -54,79 +39,22 @@
|
||||
export ELECTRON_ENABLE_LOGGING=1
|
||||
@@ -59,85 +38,22 @@
|
||||
exec 2> /dev/null
|
||||
fi
|
||||
|
||||
-if [ $OS == 'Mac' ]; then
|
||||
@ -39,7 +45,7 @@
|
||||
- ATOM_APP_NAME="$(basename "$ATOM_APP")"
|
||||
- fi
|
||||
-
|
||||
- if [ -n "$BETA_VERSION" ]; then
|
||||
- if [ "$CHANNEL" == 'beta' ]; then
|
||||
- ATOM_EXECUTABLE_NAME="Atom Beta"
|
||||
- else
|
||||
- ATOM_EXECUTABLE_NAME="Atom"
|
||||
@ -73,30 +79,36 @@
|
||||
- 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
|
||||
- case $CHANNEL in
|
||||
- beta)
|
||||
- ATOM_PATH="$USR_DIRECTORY/share/atom-beta/atom"
|
||||
- ;;
|
||||
- dev)
|
||||
- ATOM_PATH="$USR_DIRECTORY/share/atom-dev/atom"
|
||||
- ;;
|
||||
- *)
|
||||
- ATOM_PATH="$USR_DIRECTORY/share/atom/atom"
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
- ATOM_HOME="${ATOM_HOME:-$HOME/.atom}"
|
||||
- mkdir -p "$ATOM_HOME"
|
||||
-
|
||||
- : ${TMPDIR:=/tmp}
|
||||
+ATOM_PATH="electron --app=/usr/lib/atom"
|
||||
+ATOM_PATH="/usr/lib/atom/atom"
|
||||
|
||||
- [ -x "$ATOM_PATH" ] || ATOM_PATH="$TMPDIR/atom-build/Atom/atom"
|
||||
- : ${TMPDIR:=/tmp}
|
||||
+ATOM_HOME="${ATOM_HOME:-$HOME/.atom}"
|
||||
+mkdir -p "$ATOM_HOME"
|
||||
|
||||
- [ -x "$ATOM_PATH" ] || ATOM_PATH="$TMPDIR/atom-build/Atom/atom"
|
||||
-
|
||||
- if [ $EXPECT_OUTPUT ]; then
|
||||
- "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@"
|
||||
+if [ $EXPECT_OUTPUT ]; then
|
||||
+ $ATOM_PATH --executed-from="$(pwd)" --pid=$$ "$@"
|
||||
+ "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@"
|
||||
+ exit $?
|
||||
+else
|
||||
+ (
|
||||
+ nohup $ATOM_PATH --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
|
||||
+ nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1
|
||||
+ if [ $? -ne 0 ]; then
|
||||
+ cat "$ATOM_HOME/nohup.out"
|
||||
exit $?
|
||||
|
11
atom/fix-node8.patch
Normal file
11
atom/fix-node8.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/module-cache.coffee
|
||||
+++ b/src/module-cache.coffee
|
||||
@@ -189,7 +189,7 @@ resolveModulePath = (relativePath, parentModule) ->
|
||||
return unless candidates?
|
||||
|
||||
for version, resolvedPath of candidates
|
||||
- if Module._cache.hasOwnProperty(resolvedPath) or isCorePath(resolvedPath)
|
||||
+ if Boolean(Module._cache[resolvedPath]) or isCorePath(resolvedPath)
|
||||
return resolvedPath if satisfies(version, range)
|
||||
|
||||
return
|
Loading…
Reference in New Issue
Block a user