summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Stukalov <astukalov@gmail.com>2017-10-06 13:45:41 +0200
committerPatrice Clement <monsieurp@gentoo.org>2017-10-07 19:19:47 +0200
commit6a56ccb9a8e277f374728821ec1904eea88a24c6 (patch)
treedacef2c83b5cb520be849d82c3311e3b34809558 /app-editors
parentnet-im/skypeforlinux: Update descriptions to reflect changes away from P2P ar... (diff)
downloadgentoo-6a56ccb9a8e277f374728821ec1904eea88a24c6.tar.gz
gentoo-6a56ccb9a8e277f374728821ec1904eea88a24c6.tar.bz2
gentoo-6a56ccb9a8e277f374728821ec1904eea88a24c6.zip
app-editors/atom: add Gentoo Prefix support.
This PR fixes a few issues with relative paths. Closes: https://github.com/gentoo/gentoo/pull/5872
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/atom/Manifest4
-rw-r--r--app-editors/atom/atom-1.21.0.ebuild (renamed from app-editors/atom/atom-1.21.0_beta2.ebuild)29
-rw-r--r--app-editors/atom/files/atom-apm-path-r2.patch16
-rw-r--r--app-editors/atom/files/atom-unbundle-electron-r1.patch45
4 files changed, 83 insertions, 11 deletions
diff --git a/app-editors/atom/Manifest b/app-editors/atom/Manifest
index 748a6857975a..6cb03cc516d8 100644
--- a/app-editors/atom/Manifest
+++ b/app-editors/atom/Manifest
@@ -4,9 +4,9 @@ DIST atom-1.15.0.rpm 86561729 SHA256 935b444d9122f46d3ab490611476498c963de1232f9
DIST atom-1.16.0.rpm 90249819 SHA256 6305f149f7b85e498e56d92fe0927ca81fd4cce62153f266fcd8f39958a59e69 SHA512 e3e9096caf6d5ca802ad47e434a6e8a51c0ab25b967747621e2ea4eb440d5401df3b7cd3d101d6d5a1f2f12fa77525e7e54e252438ff24ec9b651601bb7f4d97 WHIRLPOOL b294fa728388a2b10000a85c02d7548e077e34c5db83ddea1d2b5d6bdebd4c72db906ccc856fd766e3f2f3900ad5f02de3c4bd22e273683c92e4f0dd027fa6f3
DIST atom-1.18.0.rpm 128551353 SHA256 08609b26776ee12effd47ff87a2eb44f7ba9000a0e28b8022ca0bace0216e8d8 SHA512 c30df4b3c10e2e886c349a8c255ea6e9e308b38811f02b2517ba464959a873d159b5fa4fe89d68ed50500038b92219cb061d9dee0917b0b807e086cceec2803b WHIRLPOOL 3a1607be3155ac614b403df94f8974a675a646e777e4cc7ce351b975e17a9e6708676f8c6772d35f90f9240757a0fbeb1e1fa1a304c3f08728041440e59b7192
DIST atom-1.20.1.tar.gz 9358859 SHA256 0577ff9df069f8c290fb73b387ea88f8af1fae8b4a40c5ad7cf97af824584b11 SHA512 a7f9edcfc84b81d768a92af5967a6889f85155c46a623b33e51999706e22f411ce570f42777fb3015174611ef19a956d8ed336ab1172612b27d75de8ef9c96fa WHIRLPOOL 467169cd0e26d9738f25e974ac188b00e80d1bc5c525d17b1b0c221bf5826c2258267fd1723ff26fb827f6f9f268a34b6d25f6278adbd2bd628dd5dad03296a1
-DIST atom-1.21.0-beta2.tar.gz 9378306 SHA256 9ff06ad890b85b68d85ae9b699d2b05ac3defc3130ff590fe0441efa9e3ac55f SHA512 9e5e75bca7dbbded19e7dac3444b4c3d86d24874d0d3b83692eaf66906e6c78ecf212c63718fcb92aa9c6ef28477042564e3dec1eb0e23398fb04272b79c0b5f WHIRLPOOL 6dc0411e46832ed21b7c42b9eda0e73c6424805b0bc2966716d7f42d218b549ab8ec5b6198747f0058c892bbb661512ee3cdd4f6fe185e27288b3f4a6531dd62
+DIST atom-1.21.0.tar.gz 9378180 SHA256 8600efc85e1c38c5d8c5571428eac37689fc8c1900192930cbae05d0056abcac SHA512 98afc286afc5ad46a28c3db7bfb7857c15a87711dae6b07046cd1aae5c7c2a30be847aec9eb779fdceaeb7e4f86f54ffd1262d6f0ba2d5a6c1b7d4ce5b8d2104 WHIRLPOOL 8876d974b1a22ccb20d8b660a451f7293f801d060c5835fe9d8bf74f96c1cbd4716d8ac054a8c858c3530fc547c0275cd9f17f085c0d52e76d5f7475a1eaf4b2
DIST atom-bin-1.20.1.rpm 134506625 SHA256 20a0a1e398a1eace09f298231b7169bdb73c345c6ccb784a2929bc9df5996b17 SHA512 7bf8c4b092e0b45d56c5414d088633ae016b5564a7a97e1d706ad46743b6aad43a7268b7ade881680fa5f005eed0f46ba1523909a09cf3ec0aa51ce2335b8d92 WHIRLPOOL 263c888e9ba4c103a0fb859c210d1c49cc8a956dc50ae6dd6da0322c8e908b6741f6ff931f68f60800fce90fb5133494d7ffdb7455b74ea6cae6e32af022f0e9
-DIST atom-bin-1.21.0-beta2.rpm 131042161 SHA256 a70ef4e0198e424358029c265f776928b098e6a9005078cab8def44ddf5f0697 SHA512 af648caaada35475e57f151b9c658eaaeb14d9705d732f5b4a58357e21d6e1cd5efff5b34207403d46f257b693ded5894115d1e4948b9b2aad0cf2f4430ce3a4 WHIRLPOOL 6b6b9597f5da79c3249577ce4baea748a4c7c2b63bb0917d61329a5d94143918452fd8c0b2f3ba90363cabf69d7d9098a113e07662255bc73af8cb1e36c42242
+DIST atom-bin-1.21.0.rpm 131039632 SHA256 ba7cf7c68944a3b756e24dbd4cbf79f8b992612033ac63335dac5a529f9e9808 SHA512 8425b8d8741632e9fcc28127c8f2cbe5901c8a4a3b2a8a1cb5d4b1410374a841241e90939952db749334c829ac541925b3785a787c60adf32cfdfa5abc2e3b8a WHIRLPOOL b5be7c89db6fc8a814a9d209190433a9a93bddc6be8f5a6af895bea630ba52ce75bb892b49ffab1c1aa77513eb8a3e26921b1edec7207ece9f5fb1535f472c07
DIST atom-cached-run-in-this-context-0.4.1.tar.gz 3855 SHA256 5487e7641d5031e652deeef8bebe2d3af4e4d2b89989dd8700bf14e33843ce89 SHA512 dca2a6c77bb94e704aa99b405ae017bf0c56ce536a7246a8feaf133722556d444fb684cd6b9b475abcd0b946a42073a9fc0d61f5141b564320ac023ab2fbf79d WHIRLPOOL 573d0f703989f31109854f0eb324d6b1364e93cd057c4cfe20409415dee3101964cacabc246d4df43124dad881d8fec8575c6bbb23ba98698e6c73cf3c5614d4
DIST atom-git-utils-4.1.2.tar.gz 36492 SHA256 fd627647742359946d3b8f88bc91dd4d68a047dcba5bfafbd690e1a20afeb908 SHA512 d1f0a5bbd6b059131ccf4ab92174d80caddbb254ea6d0676a5ce71d7dba55d60c86ed1c412862b9d104a5f6deb2671facad84841f9644afb9b37416b743e917a WHIRLPOOL 4ee4620b0208a30f848167fffce05c5999d38bf5a3e50567e6bcf295fdafc7861e870346cfeb28a61392e7a737e100f90ae1dbd25066469926e3148006e02937
DIST atom-git-utils-5.0.0.tar.gz 36545 SHA256 a79e4951de6ac0a81f2ea359f82c575f826a4409f91b90a11f75a85c7886bec9 SHA512 42fd7589ca56049b1ad5cf7f2df7e295fc8575f4eee8a562fa103541157bd487c1748e3d6c536237b260dcbb4b530619dfcc121ba84b6d2fbf6d684dc959f819 WHIRLPOOL 03ae2290fc1ef0863c643a1fd4f9d4c98bc9b2939fddf6fd366eea9122b9d5612f53ad7ea6eb57c020eb376fa623253082da4c26f67d8de1bb59189b64f9d60b
diff --git a/app-editors/atom/atom-1.21.0_beta2.ebuild b/app-editors/atom/atom-1.21.0.ebuild
index 09fa0e8edcb9..bb5d91505c94 100644
--- a/app-editors/atom/atom-1.21.0_beta2.ebuild
+++ b/app-editors/atom/atom-1.21.0.ebuild
@@ -72,7 +72,7 @@ BINMODS=(
)
LICENSE="MIT"
-SLOT="beta"
+SLOT="0"
KEYWORDS="~amd64"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -140,8 +140,8 @@ src_prepare() {
eapply "${FILESDIR}/atom-python.patch"
eapply "${FILESDIR}/apm-python.patch"
- eapply "${FILESDIR}/atom-unbundle-electron.patch"
- eapply "${FILESDIR}/atom-apm-path-r1.patch"
+ eapply "${FILESDIR}/atom-unbundle-electron-r1.patch"
+ eapply "${FILESDIR}/atom-apm-path-r2.patch"
eapply "${FILESDIR}/atom-license-path-r1.patch"
eapply "${FILESDIR}/atom-fix-app-restart-r1.patch"
eapply "${FILESDIR}/atom-marker-layer-r1.patch"
@@ -154,7 +154,15 @@ src_prepare() {
./atom.sh \
|| die
- sed -i -e "s|{{ATOM_RESOURCE_PATH}}|${install_dir}/app.asar|g" \
+ sed -i -e "s|{{ATOM_RESOURCE_PATH}}|${EROOT%/}${install_dir}/app.asar|g" \
+ ./atom.sh \
+ || die
+
+ sed -i -e "s|{{ATOM_PREFIX}}|${EROOT%/}|g" \
+ ./atom.sh \
+ || die
+
+ sed -i -e "s|^#!/bin/bash|#!${EROOT%/}/bin/bash|g" \
./atom.sh \
|| die
@@ -169,12 +177,12 @@ src_prepare() {
apm/node_modules/npm/bin/node-gyp-bin/node-gyp || die
sed -i -e \
- "s|atomCommand = 'atom';|atomCommand = '/usr/bin/atom${suffix}'|g" \
+ "s|atomCommand = 'atom';|atomCommand = '${EROOT%/}/usr/bin/atom${suffix}'|g" \
apm/lib/test.js || die
rm apm/bin/node || die
- sed -i -e "s|/$(get_atom_rpmdir)/atom|/usr/bin/atom${suffix}|g" \
+ sed -i -e "s|/$(get_atom_rpmdir)/atom|${EROOT%/}/usr/bin/atom${suffix}|g" \
"${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" || die
for binmod in ${BINMODS[@]}; do
@@ -219,6 +227,9 @@ src_prepare() {
ln -s "${nan_s}" "${_s}/node_modules/nan" || die
done
+ sed -i -e "s|{{ATOM_PREFIX}}|${EROOT%/}|g" \
+ "${BUILD_DIR}/app/src/config-schema.js" || die
+
sed -i -e "s|{{ATOM_SUFFIX}}|${suffix}|g" \
"${BUILD_DIR}/app/src/config-schema.js" || die
@@ -281,7 +292,7 @@ src_compile() {
# Replace vendored ctags with a symlink to system ctags
rm "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die
- ln -s "/usr/bin/ctags" \
+ ln -s "${EROOT%/}/usr/bin/ctags" \
"${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die
}
@@ -364,13 +375,13 @@ get_install_dir() {
# Return the Electron installation directory.
get_electron_dir() {
- echo -n "/usr/$(get_libdir)/electron-${ELECTRON_SLOT}"
+ echo -n "${EROOT%/}/usr/$(get_libdir)/electron-${ELECTRON_SLOT}"
}
# Return the directory containing appropriate Node headers
# for the required version of Electron.
get_electron_nodedir() {
- echo -n "/usr/include/electron-${ELECTRON_SLOT}/node/"
+ echo -n "${EROOT%/}/usr/include/electron-${ELECTRON_SLOT}/node/"
}
# Run JavaScript using Electron's version of Node.
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-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