From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D94CD13829C for ; Fri, 10 Jun 2016 16:50:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 087B521C038; Fri, 10 Jun 2016 16:50:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 879CC21C038 for ; Fri, 10 Jun 2016 16:50:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E915D340B19 for ; Fri, 10 Jun 2016 16:50:55 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C0ED2CFE for ; Fri, 10 Jun 2016 16:50:51 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1465575763.16c842dc06be668d6b9491eba9bf5c234fc2c00a.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/atom/, app-editors/atom/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-editors/atom/atom-1.7.4-r1.ebuild app-editors/atom/atom-1.7.4-r2.ebuild app-editors/atom/files/atom-apm-path.patch X-VCS-Directories: app-editors/atom/ app-editors/atom/files/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 16c842dc06be668d6b9491eba9bf5c234fc2c00a X-VCS-Branch: master Date: Fri, 10 Jun 2016 16:50:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fcf108c0-ba15-4b2d-8ff9-95e3b2429cf0 X-Archives-Hash: 1522a60c89d366e9abf98f93ea5cd4cc commit: 16c842dc06be668d6b9491eba9bf5c234fc2c00a Author: Elvis Pranskevichus magic io> AuthorDate: Fri Jun 10 14:35:46 2016 +0000 Commit: Patrice Clement gentoo org> CommitDate: Fri Jun 10 16:22:43 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16c842dc app-editors/atom: Fix app.asar repacking. Fixes bug 585490. Gentoo-Bug: https://bugs.gentoo.org/585490 Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/1640 Signed-off-by: Patrice Clement gentoo.org> .../{atom-1.7.4-r1.ebuild => atom-1.7.4-r2.ebuild} | 57 +++++++++++++--------- app-editors/atom/files/atom-apm-path.patch | 4 +- 2 files changed, 37 insertions(+), 24 deletions(-) diff --git a/app-editors/atom/atom-1.7.4-r1.ebuild b/app-editors/atom/atom-1.7.4-r2.ebuild similarity index 89% rename from app-editors/atom/atom-1.7.4-r1.ebuild rename to app-editors/atom/atom-1.7.4-r2.ebuild index c45728c..68fb871 100644 --- a/app-editors/atom/atom-1.7.4-r1.ebuild +++ b/app-editors/atom/atom-1.7.4-r2.ebuild @@ -5,7 +5,7 @@ EAPI=6 PYTHON_COMPAT=( python2_7 ) -inherit flag-o-matic python-any-r1 eutils rpm +inherit flag-o-matic python-any-r1 eutils multiprocessing rpm DESCRIPTION="A hackable text editor for the 21st Century" HOMEPAGE="https://atom.io" @@ -274,7 +274,7 @@ src_prepare() { _s="${WORKDIR}/$(package_dir asar)" "${_s}"/node_modules/asar/bin/asar \ extract "${S}/usr/share/atom/resources/app.asar" \ - "${S}/build/app.asar" || die + "${S}/build/app" || die cd "${S}" || die @@ -282,7 +282,7 @@ src_prepare() { epatch "${FILESDIR}/asar-require.patch" sed -i -e "s|{{ATOM_SUFFIX}}|${suffix}|g" \ - "${S}/build/app.asar/src/config-schema.js" || die + "${S}/build/app/src/config-schema.js" || die eapply_user } @@ -310,6 +310,14 @@ src_configure() { src_compile() { local binmod _s x nodegyp="/usr/$(get_libdir)/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" + local ctags_d="node_modules/symbols-view/vendor" + local jobs=$(makeopts_jobs) gypopts + + gypopts="--nodedir=/usr/include/electron/node/ --verbose" + + if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then + gypopts+=" --jobs ${jobs}" + fi mkdir -p "${S}/build/modules/" || die @@ -317,17 +325,33 @@ src_compile() { einfo "Building ${binmod}..." _s="${WORKDIR}/$(package_dir ${binmod})" cd "${_s}" || die - "${nodegyp}" --nodedir=/usr/include/electron/node/ --verbose build || die + "${nodegyp}" ${gypopts} build || die x=${binmod##node-} mkdir -p "${S}/build/modules/${x}" cp build/Release/*.node "${S}/build/modules/${x}" done + # Put compiled binary modules in place + _fix_binmods "${S}/build" "app" + _fix_binmods "${S}/usr/share/atom/resources" "app" + + # Remove non-Linux vendored ctags binaries + rm "${S}/build/app/${ctags_d}/ctags-darwin" \ + "${S}/build/app/${ctags_d}/ctags-win32.exe" || die + # 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 + # Keep unpack rules in sync with build/tasks/generate-asar-task.coffee + x="--unpack={*.node,ctags-config,ctags-linux,**/node_modules/spellchecker/**,**/resources/atom.png}" + _s="${WORKDIR}/$(package_dir asar)/node_modules/asar/bin" + cd "${S}/build" || die + echo "asar" pack "${x}" "app" "app.asar" + "${_s}/asar" pack "${x}" "app" "app.asar" || die + cd "${S}" || die + + # Replace vendored ctags with a symlink to system ctags + rm "${S}/build/app.asar.unpacked/${ctags_d}/ctags-linux" || die + ln -s "/usr/bin/ctags" \ + "${S}/build/app.asar.unpacked/${ctags_d}/ctags-linux" || die } _fix_binmods() { @@ -345,7 +369,7 @@ _fix_binmods() { mod=$(basename ${modpath}) # must copy here as symlinks will cause the module loading to fail - cp "${ED}/${install_dir}/modules/${mod}/${f}" "${path}" || die + cp -f "${S}/build/modules/${mod}/${f}" "${path}" || die cruft=$(find "${d}" -name '*.a' -print) if [ -n "${cruft}" ]; then rm ${cruft} || die @@ -356,25 +380,14 @@ _fix_binmods() { 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 build/app.asar + doins -r build/app.asar.unpacked 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" diff --git a/app-editors/atom/files/atom-apm-path.patch b/app-editors/atom/files/atom-apm-path.patch index 8746b95..957fed4 100644 --- a/app-editors/atom/files/atom-apm-path.patch +++ b/app-editors/atom/files/atom-apm-path.patch @@ -1,5 +1,5 @@ ---- 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 +--- build/app/src/config-schema.js.orig 2016-05-24 16:59:41.284449076 -0400 ++++ build/app/src/config-schema.js 2016-05-24 17:01:05.685447769 -0400 @@ -9,6 +9,11 @@ core: { type: 'object',