From dae19fae0467398969398eb15faeb36cda02fa37 Mon Sep 17 00:00:00 2001 From: Elvis Pranskevichus Date: Tue, 24 May 2016 17:32:33 -0400 Subject: app-editors/atom: Bump to 1.7.4, fix default apm path Gentoo-Bug: https://bugs.gentoo.org/583040 Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/1531 Signed-off-by: Patrice Clement --- app-editors/atom/Manifest | 5 +- app-editors/atom/atom-1.7.3-r1.ebuild | 368 --------------------------- app-editors/atom/atom-1.7.4.ebuild | 391 +++++++++++++++++++++++++++++ app-editors/atom/files/atom-apm-path.patch | 14 ++ 4 files changed, 408 insertions(+), 370 deletions(-) delete mode 100644 app-editors/atom/atom-1.7.3-r1.ebuild create mode 100644 app-editors/atom/atom-1.7.4.ebuild create mode 100644 app-editors/atom/files/atom-apm-path.patch (limited to 'app-editors/atom') diff --git a/app-editors/atom/Manifest b/app-editors/atom/Manifest index 3f33557f4252..7d26c0a7c4e9 100644 --- a/app-editors/atom/Manifest +++ b/app-editors/atom/Manifest @@ -1,4 +1,5 @@ -DIST atom-1.7.3.rpm 63702044 SHA256 0f21d09318cc526b12fa31eb4a527caa9db59eea4531b72b611658cbe16283a3 SHA512 f7ea3e906e6c3fa7185e49ae5fc0a461e02c079e37f8f96540847106b48c126aa7f3e431d835f98fd8fe831eae86288028623dabd83be095fd2c89e8ff50268f WHIRLPOOL 4238cca8f10b4d3bf72d78da5a019d3a33e31c9e39ad771855c8bf6aa5589e7cf9ec37aa5b62079d4fe56e33d98243dd3233d389ad2c3f05ef092fee5b213772 +DIST asar-0.10.0.tar.gz 975433 SHA256 49e743a952957aa22668b472ba926427f9e051ececeaadb922f8aff2bc8fd1ee SHA512 702fa0e496a1db55a61d7e00d55456f8703f7af00e458f26413771dc71cd03e9418e0334bb1a500aaabe14ab598e19c64612ebf6411c77e30004833c8d5d151e WHIRLPOOL a2e4f8563f779aea19357962f0ac0895005ff93a601d409a7b2c685348cba845106729e1f2a39f95001c186c0c0ba914d73ff1364d488e0853dbbabda0e80bb3 +DIST atom-1.7.4.rpm 64439092 SHA256 601ffa5d683b02cbd95bc65c76e28ecc091b7f12092b69c6e65eb93e941450e6 SHA512 4033c8bc36ba43332a1c7e08cf0fa5deaefb53152b7a56c8ca5f9c68bd88761fb54c57aa031c6702d46ce531cf1e9a8a24d2b7271fe0017a022bc4671d85d68d WHIRLPOOL 4adf85334482c49104bc6b1e96753f5c3d5243b799a6d745bd7770968d57b0ddaebee1fea382542a4219849f360f04d6ffc9d0eede5f6eb0d5e3ead3989fea03 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-keyboard-layout-1.0.0.tar.gz 6430 SHA256 d3f20f0765b7a243c3cfa3e49360851404977c2ed6e84dc84e9aaf28d8547d03 SHA512 a96b77c29eb1f5367f1d60ddc501fdd6e507fc92f980974bb2c1bec923b264e73104650180722819946e075284a928b4aaa01f8594365186bd8530a0179c7ff5 WHIRLPOOL 693f4a1546e0ca772ea2b2f860e6c2cf55f645031eb516021107296a3a05fca9086de62080255abae55c0ea42cc0f5aeeba26e6dd0b7eb274a8b69135bbf79c9 @@ -21,7 +22,7 @@ DIST node-klaw-1.0.0.tar.gz 4054 SHA256 ea1f37abe8bc23ec60375d7e81f23976398bf6ec DIST node-lodash-3.10.1.tgz 173550 SHA256 4578a0a45fae7bfc8f0ea464e9ca3b1330ad6d2c4696d61dc7e7afdcf4e2c925 SHA512 f660c3c2a54899ae8e657efd6650c009997cb019b44c49e47fdf7357788c0381b39084fff618aa3f9998d07a13d6234b0ab29cfd1d4707257ec897d159526bc9 WHIRLPOOL 13c347ac2925fea303d27d89697a9e83ca6228ee1cbf55986cf14bd9a8056ebd8bb7563f1f86b63c40809c80cadd8d263948a36ec9ed3228c4365a5858c4019d DIST node-object-assign-4.0.1.tar.gz 3429 SHA256 d59183984993c1e08ad504c15ddb1e12f6f327bc45770309d5f318fcae98c173 SHA512 973504ea20510db1d0a428b6b02885f863ca94649e737843d49c9f0059b991b8086b80ddf0fbb643300e154d33c583b2bf34fa596c48bb13adc891c530f0dfd8 WHIRLPOOL 36ea749150efc5ed3dcd245425302429fe7bced5024bb660c8130fffa356e42069a8e5e776600d5ea4a786fcd3bb35521c19038a53204b3d4a06db061daa5df9 DIST node-rimraf-2.2.8.tar.gz 4397 SHA256 766aa845c3688d409181856ef14a1a9f4489390bf7735ed159ab6cd9cb2ad5fc SHA512 790283e3b1461cf3946f3d499fa3aca766dccca02ade7f6733768ef461f62bb7c2ffb8093e3c03fba9e00bae59d57491de9285033c2542f73e05b3152fcd7b75 WHIRLPOOL 02feb1b90399834f2d17c377c62a620507751da1add89396bf33a1a9394d8d2e5d7c709dd7be1a3b3d12641cf03032f3ea16ae16ed0f425725bcdc6f4f56f81d -DIST nodegit-0.12.0.tar.gz 12428114 SHA256 b9b1cb8b8058a0e590635657a31193408a6db3b742f95958d70a02218990a9ab SHA512 dd7273dc6f78bd6e074d793fe066feed14b1b4554e03adf4c4053ab05960d132b7ecd44360b51b17a3c10388bd875a04e85532af4069cbc9a28f67352f64007f WHIRLPOOL 09c679861a3fc6510ebc79ea730f01d59da317423bcd3b4699a1f3da8b6b92964347fb0ab1aaa21412f3aa045f7c2a0a7451aa7fa902f0a654aa76bced38727b +DIST nodegit-0.12.2.tar.gz 12429864 SHA256 d8bb337fb541dd8fefa1dd845e1f01996a5594e009bf491cf0b357a38e6ee62c SHA512 94ab080ef02484984ab7347b305869b6157df496d3b13c10b4dc196aaf3866d91dc6f8507c056d5f906a51a241c90388309945cd7b6a27d157142234d86e5ecd WHIRLPOOL 69bc8bd018976647cc4073240acfeea949eedb2c2c3b781913f9fb8c7349ccdea4af2ed3251754a3bcd853e0ba834281924914f34c56b44047c20e6ecd22ec01 DIST nodegit-promise-4.0.0.tgz 9486 SHA256 7b1c4f2a0e2475ffb333a5d360dc2c006e74a14e78e44d0661329a9b6ae0a7e7 SHA512 ebaf81f14d7ac7cc42e43b1a58a2b8c09743108d6ba8c6f577dd582047b8207848505f7a9cef327e2b8af15a790e3f82f0171f80528ad6c49672b6aef3eb986e WHIRLPOOL e6383d55696dabc121471cccfdd32743e9880bc1d2f054217e816e6c8c1be3a4f167bb9cda3ceddb778e7b609291aeefddc1fe2a21b3e8c1080a7ee29c5f3c46 DIST nodegit-promisify-node-0.4.0.tar.gz 6190 SHA256 9bf342475d7c82d2f95d29eb1ce97f6f61387170d37c3690d107aaa0109dd435 SHA512 e9771bbd857084f115df7cee884182fd5c5e9e8f600350bd1a38c72427f34edcf1125280ebbc3154dc93db86fa614b75ab9df7d1b8b22f90ea3e80cc1cb70830 WHIRLPOOL 224c24cc0e5f8b0858eef565cfb40327f2369f8f60869b84e263d967e3c9d780773af9b06f31b9e895a4fd66aa78ca4369bf1d6b6f9f2c607af6722e29fe70ad DIST nodejs-nan-2.0.9.tar.gz 147832 SHA256 4c29221f2beacd79a53f3399f3e6c34a33a0febf5249d92947391e615bfb4899 SHA512 7a680759f2391901c34c2fdd6be20565869c666bde786767a016beade561137b12038afbcf089496f9febdff3a9e6638e310f0ce8f60efb8beca5204ad8e1442 WHIRLPOOL c88038876b294f44da6f6f0a697f91f60d5c2beee018b95115dbd284ce23db80f76593737f507c02a4515265a06f59df4573b657062e6b1252c0ed4d834fe28a diff --git a/app-editors/atom/atom-1.7.3-r1.ebuild b/app-editors/atom/atom-1.7.3-r1.ebuild deleted file mode 100644 index 1b457866e63d..000000000000 --- a/app-editors/atom/atom-1.7.3-r1.ebuild +++ /dev/null @@ -1,368 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) -inherit flag-o-matic python-any-r1 eutils rpm - -DESCRIPTION="A hackable text editor for the 21st Century" -HOMEPAGE="https://atom.io" -MY_PV="${PV//_/-}" - -# All binary packages depend on this -NAN_V=2.0.9 - -# Keep dep versions in sync with atom/package.json -CACHED_RUN_IN_THIS_CONTEXT_V=0.4.1 -GIT_UTILS_V=4.1.2 -NODEGIT_V=0.12.0 -NODE_NSLOG_V=3.0.0 -NODE_ONIGURUMA_V=5.1.2 -NODE_PATHWATCHER_V=6.2.4 -NODE_RUNAS_V=3.1.1 -SCROLLBAR_STYLE_V=3.2.0 -SPELL_CHECK_V=0.67.0 - -# textbuffer dependency -MARKER_INDEX_V=3.1.0 - -# apm dependency -NODE_KEYTAR_V=3.0.2 - -# atom-keymap dependency -KEYBOARD_LAYOUT_V=1.0.0 - -# symbols-view dependency -NODE_CTAGS_V=3.0.0 - -# spell-check dependency -NODE_SPELLCHECKER_V=3.2.3 - -# nodegit dependencies -PROMISIFY_NODE_V=0.4.0 -NODE_FS_EXTRA_V=0.26.2 -NODE_GRACEFUL_FS_V=4.1.2 -NODE_JSONFILE_V=2.1.0 -NODE_KLAW_V=1.0.0 -RIMRAF_V=2.2.8 -NODE_LODASH_V=3.10.1 -COMBYNE_V=0.8.1 -JS_BEAUTIFY_V=1.5.10 -NODEGIT_PROMISE_V=4.0.0 -ASAP_V=2.0.3 -OBJECT_ASSIGN_V=4.0.1 - -# The x86_64 arch below is irrelevant, as we will rebuild all binary packages. -SRC_URI=" - https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/atom.x86_64.rpm -> atom-${MY_PV}.rpm - https://github.com/nodejs/nan/archive/v${NAN_V}.tar.gz -> nodejs-nan-${NAN_V}.tar.gz - https://github.com/atom/cached-run-in-this-context/archive/v${CACHED_RUN_IN_THIS_CONTEXT_V}.tar.gz -> atom-cached-run-in-this-context-${CACHED_RUN_IN_THIS_CONTEXT_V}.tar.gz - https://github.com/atom/node-ctags/archive/v${NODE_CTAGS_V}.tar.gz -> atom-node-ctags-${NODE_CTAGS_V}.tar.gz - https://github.com/atom/git-utils/archive/v${GIT_UTILS_V}.tar.gz -> atom-git-utils-${GIT_UTILS_V}.tar.gz - https://github.com/nodegit/nodegit/archive/v${NODEGIT_V}.tar.gz -> nodegit-${NODEGIT_V}.tar.gz - https://github.com/atom/keyboard-layout/archive/v${KEYBOARD_LAYOUT_V}.tar.gz -> atom-keyboard-layout-${KEYBOARD_LAYOUT_V}.tar.gz - https://github.com/atom/marker-index/archive/v${MARKER_INDEX_V}.tar.gz -> atom-marker-index-${MARKER_INDEX_V}.tar.gz - https://github.com/atom/node-keytar/archive/v${NODE_KEYTAR_V}.tar.gz -> atom-node-keytar-${NODE_KEYTAR_V}.tar.gz - https://github.com/atom/node-nslog/archive/v${NODE_NSLOG_V}.tar.gz -> atom-node-nslog-${NODE_NSLOG_V}.tar.gz - https://github.com/atom/node-oniguruma/archive/v${NODE_ONIGURUMA_V}.tar.gz -> atom-node-oniguruma-${NODE_ONIGURUMA_V}.tar.gz - https://github.com/atom/node-pathwatcher/archive/v${NODE_PATHWATCHER_V}.tar.gz -> atom-node-pathwatcher-${NODE_PATHWATCHER_V}.tar.gz - https://github.com/atom/node-runas/archive/v${NODE_RUNAS_V}.tar.gz -> atom-node-runas-${NODE_RUNAS_V}.tar.gz - https://github.com/atom/scrollbar-style/archive/v${SCROLLBAR_STYLE_V}.tar.gz -> atom-scrollbar-style-${SCROLLBAR_STYLE_V}.tar.gz - https://github.com/atom/node-spellchecker/archive/v${NODE_SPELLCHECKER_V}.tar.gz -> atom-node-spellchecker-${NODE_SPELLCHECKER_V}.tar.gz - - https://github.com/nodegit/promisify-node/archive/${PROMISIFY_NODE_V}.tar.gz -> nodegit-promisify-node-${PROMISIFY_NODE_V}.tar.gz - https://registry.npmjs.org/nodegit-promise/-/nodegit-promise-${NODEGIT_PROMISE_V}.tgz - https://registry.npmjs.org/lodash/-/lodash-${NODE_LODASH_V}.tgz -> node-lodash-${NODE_LODASH_V}.tgz - https://github.com/kriskowal/asap/archive/v${ASAP_V}.tar.gz -> node-asap-${ASAP_V}.tar.gz - https://github.com/sindresorhus/object-assign/archive/v${OBJECT_ASSIGN_V}.tar.gz -> node-object-assign-${OBJECT_ASSIGN_V}.tar.gz - https://github.com/jprichardson/node-fs-extra/archive/${NODE_FS_EXTRA_V}.tar.gz -> node-fs-extra-${NODE_FS_EXTRA_V}.tar.gz - https://github.com/jprichardson/node-jsonfile/archive/${NODE_JSONFILE_V}.tar.gz -> node-jsonfile-${NODE_JSONFILE_V}.tar.gz - https://github.com/jprichardson/node-klaw/archive/${NODE_KLAW_V}.tar.gz -> node-klaw-${NODE_KLAW_V}.tar.gz - https://github.com/isaacs/node-graceful-fs/archive/v${NODE_GRACEFUL_FS_V}.tar.gz -> node-graceful-fs-${NODE_GRACEFUL_FS_V}.tar.gz - https://github.com/isaacs/rimraf/archive/v${RIMRAF_V}.tar.gz -> node-rimraf-${RIMRAF_V}.tar.gz - https://github.com/tbranyen/combyne/archive/${COMBYNE_V}.tar.gz -> node-combyne-${COMBYNE_V}.tar.gz - https://github.com/beautify-web/js-beautify/archive/v${JS_BEAUTIFY_V}.tar.gz -> node-js-beautify-${JS_BEAUTIFY_V}.tar.gz -" - -BINMODS=" - cached-run-in-this-context - node-ctags - git-utils - nodegit - keyboard-layout - node-nslog - node-oniguruma - node-pathwatcher - node-runas - node-keytar - scrollbar-style - node-spellchecker - marker-index -" - -RESTRICT="mirror" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" -IUSE="" - -DEPEND=" - !dev-util/apm - ${PYTHON_DEPS} - >=net-libs/nodejs-5.9.0:=[npm] - >=app-text/hunspell-1.3.3:= - =dev-libs/libgit2-0.23*:=[ssh] - >=gnome-base/libgnome-keyring-3.12:= - >=dev-libs/oniguruma-5.9.5:= - >=dev-util/ctags-5.8 - dev-util/electron:0/36 -" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${PN}-${MY_PV}" - -pkg_setup() { - python-any-r1_pkg_setup -} - -get_install_suffix() { - local c=(${SLOT//\// }) - local slot=${c[0]} - local suffix - - if [[ "${slot}" == "0" ]]; then - suffix="" - else - suffix="-${slot}" - fi - - echo -n "${suffix}" -} - -get_install_dir() { - echo -n "/usr/$(get_libdir)/atom$(get_install_suffix)" -} - -package_dir() { - local binmod="${1}" binmod_v - eval binmod_v=\${$(tr '[:lower:]' '[:upper:]' <<< ${binmod//-/_}_V)} - echo -n ${binmod}-${binmod_v} -} - -_unpack_npm_package() { - local a="${1}" basename suffix - - basename=${a%.*} - suffix=${basename##*.} - if [[ "${suffix}" == "tar" ]]; then - basename=${basename%.*} - fi - - unpack ${a} - mv package "${basename}" || die -} - -_have_patches_for() { - local _patches="${1}-*.patch" _find - _find=$(find "${FILESDIR}" -maxdepth 1 -name "${_patches}" -print -quit) - test -n "$_find" -} - -src_unpack() { - local a - - for a in ${A} ; do - case ${a} in - *.rpm) srcrpm_unpack "${a}" ;; - nodegit-promise*|node-lodash*) _unpack_npm_package "${a}" ;; - *) unpack "${a}" ;; - esac - done - - mkdir "${WORKDIR}/atom-${MY_PV}" || die - mv "${WORKDIR}/usr" "${WORKDIR}/atom-${MY_PV}" || die -} - -src_prepare() { - local install_dir="$(get_install_dir)" - local patch binmod _s nan_s="${WORKDIR}/nan-${NAN_V}" - - cd "${S}/usr/share/atom/resources/app" || die - epatch "${FILESDIR}/${PN}-python.patch" - epatch "${FILESDIR}/${PN}-unbundle-electron.patch" - - sed -i -e "s|{{ATOM_PATH}}|/usr/$(get_libdir)/electron/electron|g" \ - ./atom.sh \ - || die - - sed -i -e "s|{{ATOM_RESOURCE_PATH}}|${install_dir}/app.asar|g" \ - ./atom.sh \ - || die - - local env="export NPM_CONFIG_NODEDIR=/usr/include/electron/node/" - sed -i -e \ - "s|\"\$binDir/\$nodeBin\" --harmony_collections|${env}\nexec /usr/bin/node|g" \ - apm/bin/apm || die - - rm apm/bin/node || die - - sed -i -e "s|/usr/share/atom/atom|/usr/bin/atom|g" \ - "${S}/usr/share/applications/atom.desktop" || die - - cd "${S}" || die - - for binmod in ${BINMODS}; do - _s="${WORKDIR}/$(package_dir ${binmod})" - cd "${_s}" || die - if _have_patches_for "${binmod}"; then - for patch in "${FILESDIR}"/${binmod}-*.patch; do - epatch "${patch}" - done - fi - done - - # Unbundle bundled libs from modules - - _s="${WORKDIR}/$(package_dir git-utils)" - ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ - --inplace --unbundle "git;libgit2;git2" "${_s}/binding.gyp" || die - - _s="${WORKDIR}/$(package_dir node-oniguruma)" - ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ - --inplace --unbundle "onig_scanner;oniguruma;onig" "${_s}/binding.gyp" || die - - _s="${WORKDIR}/$(package_dir node-spellchecker)" - ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ - --inplace --unbundle "spellchecker;hunspell;hunspell" "${_s}/binding.gyp" || die - - for binmod in ${BINMODS}; do - _s="${WORKDIR}/$(package_dir ${binmod})" - mkdir -p "${_s}/node_modules" || die - ln -s "${nan_s}" "${_s}/node_modules/nan" || die - done - - _s="${WORKDIR}/$(package_dir nodegit)" - ln -s "${WORKDIR}/$(package_dir node-fs-extra)" "${_s}/node_modules/fs-extra" || die - ln -s "${WORKDIR}/$(package_dir promisify-node)" "${_s}/node_modules/promisify-node" || die - ln -s "${WORKDIR}/$(package_dir combyne)" "${_s}/node_modules/combyne" || die - ln -s "${WORKDIR}/$(package_dir js-beautify)" "${_s}/node_modules/js-beautify" || die - ln -s "${WORKDIR}/$(package_dir node-lodash)" "${_s}/node_modules/lodash" || die - - _s="${WORKDIR}/$(package_dir promisify-node)" - mkdir "${_s}/node_modules" || die - ln -s "${WORKDIR}/$(package_dir nodegit-promise)" "${_s}/node_modules/nodegit-promise" || die - ln -s "${WORKDIR}/$(package_dir object-assign)" "${_s}/node_modules/object-assign" || die - - _s="${WORKDIR}/$(package_dir nodegit-promise)" - mkdir "${_s}/node_modules" || die - ln -s "${WORKDIR}/$(package_dir asap)" "${_s}/node_modules/asap" || die - - _s="${WORKDIR}/$(package_dir node-fs-extra)" - mkdir "${_s}/node_modules" || die - ln -s "${WORKDIR}/$(package_dir node-graceful-fs)" "${_s}/node_modules/graceful-fs" || die - ln -s "${WORKDIR}/$(package_dir node-jsonfile)" "${_s}/node_modules/jsonfile" || die - ln -s "${WORKDIR}/$(package_dir node-klaw)" "${_s}/node_modules/klaw" || die - ln -s "${WORKDIR}/$(package_dir rimraf)" "${_s}/node_modules/rimraf" || die - - eapply_user -} - -src_configure() { - local binmod _s nodegyp="/usr/$(get_libdir)/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" - - _s="${WORKDIR}/$(package_dir nodegit)" - cd "${_s}" || die - node generate/scripts/generateJson.js || die - node generate/scripts/generateNativeCode.js || die - - ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ - --inplace --unbundle "nodegit;vendor/libgit2.gyp:libgit2;git2;ssh2" "${_s}/binding.gyp" || die - - for binmod in ${BINMODS}; do - einfo "Configuring ${binmod}..." - _s="${WORKDIR}/$(package_dir ${binmod})" - cd "${_s}" || die - "${nodegyp}" --nodedir=/usr/include/electron/node/ configure || die - # Unclobber MAKEFLAGS - sed -i -e '/MAKEFLAGS=-r/d' build/Makefile || die - done -} - -src_compile() { - local binmod _s x nodegyp="/usr/$(get_libdir)/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" - - mkdir -p "${S}/build/modules/" || die - - for binmod in ${BINMODS}; do - einfo "Building ${binmod}..." - _s="${WORKDIR}/$(package_dir ${binmod})" - cd "${_s}" || die - "${nodegyp}" --nodedir=/usr/include/electron/node/ --verbose build || die - x=${binmod##node-} - mkdir -p "${S}/build/modules/${x}" - cp build/Release/*.node "${S}/build/modules/${x}" - done -} - -_fix_binmods() { - local _dir="${2}" _prefix="${1}" path relpath modpath mod depth link f d - local cruft - - find "${_prefix}/${_dir}" -name '*.node' -print | while IFS= read -r path; do - f=$(basename "${path}") - d=$(dirname "${path}") - relpath=${path#${_prefix}} - relpath=${relpath##/} - relpath=${relpath#W${_dir}} - modpath=$(dirname ${relpath}) - modpath=${modpath%build/Release} - mod=$(basename ${modpath}) - - # must copy here as symlinks will cause the module loading to fail - cp "${ED}/${install_dir}/modules/${mod}/${f}" "${path}" || die - cruft=$(find "${d}" -name '*.a' -print) - if [ -n "${cruft}" ]; then - rm ${cruft} || die - fi - done -} - -src_install() { - local install_dir="$(get_install_dir)" - local suffix="$(get_install_suffix)" - local ctags_d="${ED}/${install_dir}/app.asar.unpacked/node_modules/symbols-view/vendor" - - cd "${S}" || die - - insinto "${install_dir}" - doins -r build/modules - - doins usr/share/atom/resources/app.asar - doins -r usr/share/atom/resources/app - doins -r usr/share/atom/resources/app.asar.unpacked - - _fix_binmods "${ED}/${install_dir}" "app" - _fix_binmods "${ED}/${install_dir}" "app.asar.unpacked" - - rm -r "${ED}/${install_dir}/modules" || die - - # Remove vendored ctags binary and replace with a symlink to system ctags - rm "${ctags_d}"/* || die - ln -s "/usr/bin/ctags" "${ctags_d}/ctags-linux" || die - - insinto /usr/share/applications/ - newins usr/share/applications/atom.desktop "atom${suffix}.desktop" - - insinto /usr/share/icons/ - doins -r usr/share/icons/hicolor - - exeinto "${install_dir}" - newexe usr/share/atom/resources/app/atom.sh atom - insinto /usr/share/licenses/"${PN}${suffix}" - doins usr/share/atom/resources/LICENSE.md - dosym "${install_dir}/atom" "/usr/bin/atom${suffix}" - fperms +x "${install_dir}/app/apm/bin/apm" - dosym "${install_dir}/app/apm/bin/apm" "/usr/bin/apm${suffix}" -} diff --git a/app-editors/atom/atom-1.7.4.ebuild b/app-editors/atom/atom-1.7.4.ebuild new file mode 100644 index 000000000000..c408132e3032 --- /dev/null +++ b/app-editors/atom/atom-1.7.4.ebuild @@ -0,0 +1,391 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit flag-o-matic python-any-r1 eutils rpm + +DESCRIPTION="A hackable text editor for the 21st Century" +HOMEPAGE="https://atom.io" +MY_PV="${PV//_/-}" + +# All binary packages depend on this +NAN_V=2.0.9 + +# Keep dep versions in sync with atom/package.json +CACHED_RUN_IN_THIS_CONTEXT_V=0.4.1 +GIT_UTILS_V=4.1.2 +NODEGIT_V=0.12.2 +NODE_NSLOG_V=3.0.0 +NODE_ONIGURUMA_V=5.1.2 +NODE_PATHWATCHER_V=6.2.4 +NODE_RUNAS_V=3.1.1 +SCROLLBAR_STYLE_V=3.2.0 +SPELL_CHECK_V=0.67.0 + +# textbuffer dependency +MARKER_INDEX_V=3.1.0 + +# apm dependency +NODE_KEYTAR_V=3.0.2 + +# atom-keymap dependency +KEYBOARD_LAYOUT_V=1.0.0 + +# symbols-view dependency +NODE_CTAGS_V=3.0.0 + +# spell-check dependency +NODE_SPELLCHECKER_V=3.2.3 + +# nodegit dependencies +PROMISIFY_NODE_V=0.4.0 +NODE_FS_EXTRA_V=0.26.2 +NODE_GRACEFUL_FS_V=4.1.2 +NODE_JSONFILE_V=2.1.0 +NODE_KLAW_V=1.0.0 +RIMRAF_V=2.2.8 +NODE_LODASH_V=3.10.1 +COMBYNE_V=0.8.1 +JS_BEAUTIFY_V=1.5.10 +NODEGIT_PROMISE_V=4.0.0 +ASAP_V=2.0.3 +OBJECT_ASSIGN_V=4.0.1 + +ASAR_V=0.10.0 + +# The x86_64 arch below is irrelevant, as we will rebuild all binary packages. +SRC_URI=" + https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/atom.x86_64.rpm -> atom-${MY_PV}.rpm + https://github.com/elprans/asar/releases/download/v${ASAR_V}-gentoo/asar-build.tar.gz -> asar-${ASAR_V}.tar.gz + https://github.com/nodejs/nan/archive/v${NAN_V}.tar.gz -> nodejs-nan-${NAN_V}.tar.gz + https://github.com/atom/cached-run-in-this-context/archive/v${CACHED_RUN_IN_THIS_CONTEXT_V}.tar.gz -> atom-cached-run-in-this-context-${CACHED_RUN_IN_THIS_CONTEXT_V}.tar.gz + https://github.com/atom/node-ctags/archive/v${NODE_CTAGS_V}.tar.gz -> atom-node-ctags-${NODE_CTAGS_V}.tar.gz + https://github.com/atom/git-utils/archive/v${GIT_UTILS_V}.tar.gz -> atom-git-utils-${GIT_UTILS_V}.tar.gz + https://github.com/nodegit/nodegit/archive/v${NODEGIT_V}.tar.gz -> nodegit-${NODEGIT_V}.tar.gz + https://github.com/atom/keyboard-layout/archive/v${KEYBOARD_LAYOUT_V}.tar.gz -> atom-keyboard-layout-${KEYBOARD_LAYOUT_V}.tar.gz + https://github.com/atom/marker-index/archive/v${MARKER_INDEX_V}.tar.gz -> atom-marker-index-${MARKER_INDEX_V}.tar.gz + https://github.com/atom/node-keytar/archive/v${NODE_KEYTAR_V}.tar.gz -> atom-node-keytar-${NODE_KEYTAR_V}.tar.gz + https://github.com/atom/node-nslog/archive/v${NODE_NSLOG_V}.tar.gz -> atom-node-nslog-${NODE_NSLOG_V}.tar.gz + https://github.com/atom/node-oniguruma/archive/v${NODE_ONIGURUMA_V}.tar.gz -> atom-node-oniguruma-${NODE_ONIGURUMA_V}.tar.gz + https://github.com/atom/node-pathwatcher/archive/v${NODE_PATHWATCHER_V}.tar.gz -> atom-node-pathwatcher-${NODE_PATHWATCHER_V}.tar.gz + https://github.com/atom/node-runas/archive/v${NODE_RUNAS_V}.tar.gz -> atom-node-runas-${NODE_RUNAS_V}.tar.gz + https://github.com/atom/scrollbar-style/archive/v${SCROLLBAR_STYLE_V}.tar.gz -> atom-scrollbar-style-${SCROLLBAR_STYLE_V}.tar.gz + https://github.com/atom/node-spellchecker/archive/v${NODE_SPELLCHECKER_V}.tar.gz -> atom-node-spellchecker-${NODE_SPELLCHECKER_V}.tar.gz + + https://github.com/nodegit/promisify-node/archive/${PROMISIFY_NODE_V}.tar.gz -> nodegit-promisify-node-${PROMISIFY_NODE_V}.tar.gz + https://registry.npmjs.org/nodegit-promise/-/nodegit-promise-${NODEGIT_PROMISE_V}.tgz + https://registry.npmjs.org/lodash/-/lodash-${NODE_LODASH_V}.tgz -> node-lodash-${NODE_LODASH_V}.tgz + https://github.com/kriskowal/asap/archive/v${ASAP_V}.tar.gz -> node-asap-${ASAP_V}.tar.gz + https://github.com/sindresorhus/object-assign/archive/v${OBJECT_ASSIGN_V}.tar.gz -> node-object-assign-${OBJECT_ASSIGN_V}.tar.gz + https://github.com/jprichardson/node-fs-extra/archive/${NODE_FS_EXTRA_V}.tar.gz -> node-fs-extra-${NODE_FS_EXTRA_V}.tar.gz + https://github.com/jprichardson/node-jsonfile/archive/${NODE_JSONFILE_V}.tar.gz -> node-jsonfile-${NODE_JSONFILE_V}.tar.gz + https://github.com/jprichardson/node-klaw/archive/${NODE_KLAW_V}.tar.gz -> node-klaw-${NODE_KLAW_V}.tar.gz + https://github.com/isaacs/node-graceful-fs/archive/v${NODE_GRACEFUL_FS_V}.tar.gz -> node-graceful-fs-${NODE_GRACEFUL_FS_V}.tar.gz + https://github.com/isaacs/rimraf/archive/v${RIMRAF_V}.tar.gz -> node-rimraf-${RIMRAF_V}.tar.gz + https://github.com/tbranyen/combyne/archive/${COMBYNE_V}.tar.gz -> node-combyne-${COMBYNE_V}.tar.gz + https://github.com/beautify-web/js-beautify/archive/v${JS_BEAUTIFY_V}.tar.gz -> node-js-beautify-${JS_BEAUTIFY_V}.tar.gz +" + +BINMODS=" + cached-run-in-this-context + node-ctags + git-utils + nodegit + keyboard-layout + node-nslog + node-oniguruma + node-pathwatcher + node-runas + node-keytar + scrollbar-style + node-spellchecker + marker-index +" + +RESTRICT="mirror" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=" + !dev-util/apm + ${PYTHON_DEPS} + >=net-libs/nodejs-5.9.0:=[npm] + >=app-text/hunspell-1.3.3:= + =dev-libs/libgit2-0.23*:=[ssh] + >=gnome-base/libgnome-keyring-3.12:= + >=dev-libs/oniguruma-5.9.5:= + >=dev-util/ctags-5.8 + dev-util/electron:0/36 +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}-${MY_PV}" + +pkg_setup() { + python-any-r1_pkg_setup +} + +get_install_suffix() { + local c=(${SLOT//\// }) + local slot=${c[0]} + local suffix + + if [[ "${slot}" == "0" ]]; then + suffix="" + else + suffix="-${slot}" + fi + + echo -n "${suffix}" +} + +get_install_dir() { + echo -n "/usr/$(get_libdir)/atom$(get_install_suffix)" +} + +package_dir() { + local binmod="${1}" binmod_v + eval binmod_v=\${$(tr '[:lower:]' '[:upper:]' <<< ${binmod//-/_}_V)} + echo -n ${binmod}-${binmod_v} +} + +_unpack_npm_package() { + local a="${1}" basename suffix + + basename=${a%.*} + suffix=${basename##*.} + if [[ "${suffix}" == "tar" ]]; then + basename=${basename%.*} + fi + + unpack ${a} + mv package "${basename}" || die +} + +_have_patches_for() { + local _patches="${1}-*.patch" _find + _find=$(find "${FILESDIR}" -maxdepth 1 -name "${_patches}" -print -quit) + test -n "$_find" +} + +src_unpack() { + local a + + for a in ${A} ; do + case ${a} in + *.rpm) srcrpm_unpack "${a}" ;; + nodegit-promise*|node-lodash*) _unpack_npm_package "${a}" ;; + *) unpack "${a}" ;; + esac + done + + mkdir "${WORKDIR}/atom-${MY_PV}" || die + mv "${WORKDIR}/usr" "${WORKDIR}/atom-${MY_PV}" || die +} + +src_prepare() { + local install_dir="$(get_install_dir)" + local suffix="$(get_install_suffix)" + local patch binmod _s nan_s="${WORKDIR}/nan-${NAN_V}" + + cd "${S}/usr/share/atom/resources/app" || die + epatch "${FILESDIR}/${PN}-python.patch" + epatch "${FILESDIR}/${PN}-unbundle-electron.patch" + + sed -i -e "s|{{ATOM_PATH}}|/usr/$(get_libdir)/electron/electron|g" \ + ./atom.sh \ + || die + + sed -i -e "s|{{ATOM_RESOURCE_PATH}}|${install_dir}/app.asar|g" \ + ./atom.sh \ + || die + + local env="export NPM_CONFIG_NODEDIR=/usr/include/electron/node/" + sed -i -e \ + "s|\"\$binDir/\$nodeBin\" --harmony_collections|${env}\nexec /usr/bin/node|g" \ + apm/bin/apm || die + + rm apm/bin/node || die + + sed -i -e "s|/usr/share/atom/atom|/usr/bin/atom|g" \ + "${S}/usr/share/applications/atom.desktop" || die + + cd "${S}" || die + + for binmod in ${BINMODS}; do + _s="${WORKDIR}/$(package_dir ${binmod})" + cd "${_s}" || die + if _have_patches_for "${binmod}"; then + for patch in "${FILESDIR}"/${binmod}-*.patch; do + epatch "${patch}" + done + fi + done + + # Unbundle bundled libs from modules + + _s="${WORKDIR}/$(package_dir git-utils)" + ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ + --inplace --unbundle "git;libgit2;git2" "${_s}/binding.gyp" || die + + _s="${WORKDIR}/$(package_dir node-oniguruma)" + ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ + --inplace --unbundle "onig_scanner;oniguruma;onig" "${_s}/binding.gyp" || die + + _s="${WORKDIR}/$(package_dir node-spellchecker)" + ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ + --inplace --unbundle "spellchecker;hunspell;hunspell" "${_s}/binding.gyp" || die + + for binmod in ${BINMODS}; do + _s="${WORKDIR}/$(package_dir ${binmod})" + mkdir -p "${_s}/node_modules" || die + ln -s "${nan_s}" "${_s}/node_modules/nan" || die + done + + _s="${WORKDIR}/$(package_dir nodegit)" + ln -s "${WORKDIR}/$(package_dir node-fs-extra)" "${_s}/node_modules/fs-extra" || die + ln -s "${WORKDIR}/$(package_dir promisify-node)" "${_s}/node_modules/promisify-node" || die + ln -s "${WORKDIR}/$(package_dir combyne)" "${_s}/node_modules/combyne" || die + ln -s "${WORKDIR}/$(package_dir js-beautify)" "${_s}/node_modules/js-beautify" || die + ln -s "${WORKDIR}/$(package_dir node-lodash)" "${_s}/node_modules/lodash" || die + + _s="${WORKDIR}/$(package_dir promisify-node)" + mkdir "${_s}/node_modules" || die + ln -s "${WORKDIR}/$(package_dir nodegit-promise)" "${_s}/node_modules/nodegit-promise" || die + ln -s "${WORKDIR}/$(package_dir object-assign)" "${_s}/node_modules/object-assign" || die + + _s="${WORKDIR}/$(package_dir nodegit-promise)" + mkdir "${_s}/node_modules" || die + ln -s "${WORKDIR}/$(package_dir asap)" "${_s}/node_modules/asap" || die + + _s="${WORKDIR}/$(package_dir node-fs-extra)" + mkdir "${_s}/node_modules" || die + ln -s "${WORKDIR}/$(package_dir node-graceful-fs)" "${_s}/node_modules/graceful-fs" || die + ln -s "${WORKDIR}/$(package_dir node-jsonfile)" "${_s}/node_modules/jsonfile" || die + ln -s "${WORKDIR}/$(package_dir node-klaw)" "${_s}/node_modules/klaw" || die + ln -s "${WORKDIR}/$(package_dir rimraf)" "${_s}/node_modules/rimraf" || die + + # Unpack app.asar + _s="${WORKDIR}/$(package_dir asar)" + "${_s}"/node_modules/asar/bin/asar \ + extract "${S}/usr/share/atom/resources/app.asar" \ + "${S}/build/app.asar" || die + + cd "${S}" || die + + epatch "${FILESDIR}/atom-apm-path.patch" + + sed -i -e "s|{{ATOM_SUFFIX}}|${suffix}|g" \ + "${S}/build/app.asar/src/config-schema.js" || die + + eapply_user +} + +src_configure() { + local binmod _s nodegyp="/usr/$(get_libdir)/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" + + _s="${WORKDIR}/$(package_dir nodegit)" + cd "${_s}" || die + node generate/scripts/generateJson.js || die + node generate/scripts/generateNativeCode.js || die + + ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ + --inplace --unbundle "nodegit;vendor/libgit2.gyp:libgit2;git2;ssh2" "${_s}/binding.gyp" || die + + for binmod in ${BINMODS}; do + einfo "Configuring ${binmod}..." + _s="${WORKDIR}/$(package_dir ${binmod})" + cd "${_s}" || die + "${nodegyp}" --nodedir=/usr/include/electron/node/ configure || die + # Unclobber MAKEFLAGS + sed -i -e '/MAKEFLAGS=-r/d' build/Makefile || die + done +} + +src_compile() { + local binmod _s x nodegyp="/usr/$(get_libdir)/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" + + mkdir -p "${S}/build/modules/" || die + + for binmod in ${BINMODS}; do + einfo "Building ${binmod}..." + _s="${WORKDIR}/$(package_dir ${binmod})" + cd "${_s}" || die + "${nodegyp}" --nodedir=/usr/include/electron/node/ --verbose build || die + x=${binmod##node-} + mkdir -p "${S}/build/modules/${x}" + cp build/Release/*.node "${S}/build/modules/${x}" + done + + # Re-pack app.asar + _s="${WORKDIR}/$(package_dir asar)" + "${_s}"/node_modules/asar/bin/asar \ + pack "${S}/build/app.asar" \ + "${S}/usr/share/atom/resources/app.asar" || die +} + +_fix_binmods() { + local _dir="${2}" _prefix="${1}" path relpath modpath mod depth link f d + local cruft + + find "${_prefix}/${_dir}" -name '*.node' -print | while IFS= read -r path; do + f=$(basename "${path}") + d=$(dirname "${path}") + relpath=${path#${_prefix}} + relpath=${relpath##/} + relpath=${relpath#W${_dir}} + modpath=$(dirname ${relpath}) + modpath=${modpath%build/Release} + mod=$(basename ${modpath}) + + # must copy here as symlinks will cause the module loading to fail + cp "${ED}/${install_dir}/modules/${mod}/${f}" "${path}" || die + cruft=$(find "${d}" -name '*.a' -print) + if [ -n "${cruft}" ]; then + rm ${cruft} || die + fi + done +} + +src_install() { + local install_dir="$(get_install_dir)" + local suffix="$(get_install_suffix)" + local ctags_d="${ED}/${install_dir}/app.asar.unpacked/node_modules/symbols-view/vendor" + + cd "${S}" || die + + insinto "${install_dir}" + doins -r build/modules + + doins usr/share/atom/resources/app.asar + doins -r usr/share/atom/resources/app + doins -r usr/share/atom/resources/app.asar.unpacked + + _fix_binmods "${ED}/${install_dir}" "app" + _fix_binmods "${ED}/${install_dir}" "app.asar.unpacked" + + rm -r "${ED}/${install_dir}/modules" || die + + # Remove vendored ctags binary and replace with a symlink to system ctags + rm "${ctags_d}"/* || die + ln -s "/usr/bin/ctags" "${ctags_d}/ctags-linux" || die + + insinto /usr/share/applications/ + newins usr/share/applications/atom.desktop "atom${suffix}.desktop" + + insinto /usr/share/icons/ + doins -r usr/share/icons/hicolor + + exeinto "${install_dir}" + newexe usr/share/atom/resources/app/atom.sh atom + insinto /usr/share/licenses/"${PN}${suffix}" + doins usr/share/atom/resources/LICENSE.md + dosym "${install_dir}/atom" "/usr/bin/atom${suffix}" + fperms +x "${install_dir}/app/apm/bin/apm" + dosym "${install_dir}/app/apm/bin/apm" "/usr/bin/apm${suffix}" +} 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..8746b95e24fa --- /dev/null +++ b/app-editors/atom/files/atom-apm-path.patch @@ -0,0 +1,14 @@ +--- build/app.asar/src/config-schema.js.orig 2016-05-24 16:59:41.284449076 -0400 ++++ build/app.asar/src/config-schema.js 2016-05-24 17:01:05.685447769 -0400 +@@ -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"], -- cgit v1.2.3-65-gdbad