summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Pranskevichus <elvis@magic.io>2017-12-12 15:25:50 -0500
committerPatrice Clement <monsieurp@gentoo.org>2017-12-12 21:31:56 +0100
commit21be756991fa09fada446e0d3873d70fd8888f12 (patch)
treef40297b31c216efc027f77d0ac1a581214613e80 /app-editors/atom
parentapp-admin/filebeat: drop old. (diff)
downloadgentoo-21be756991fa09fada446e0d3873d70fd8888f12.tar.gz
gentoo-21be756991fa09fada446e0d3873d70fd8888f12.tar.bz2
gentoo-21be756991fa09fada446e0d3873d70fd8888f12.zip
app-editors/atom: version bump to 1.22.
Package-Manager: Portage-2.3.13, Repoman-2.3.3 Closes: https://github.com/gentoo/gentoo/pull/6532
Diffstat (limited to 'app-editors/atom')
-rw-r--r--app-editors/atom/Manifest9
-rw-r--r--app-editors/atom/atom-1.22.1.ebuild535
-rw-r--r--app-editors/atom/atom-1.23.0_beta1.ebuild535
3 files changed, 1079 insertions, 0 deletions
diff --git a/app-editors/atom/Manifest b/app-editors/atom/Manifest
index 756e030f5298..9064ef1fb4aa 100644
--- a/app-editors/atom/Manifest
+++ b/app-editors/atom/Manifest
@@ -5,8 +5,12 @@ DIST atom-1.16.0.rpm 90249819 BLAKE2B a01866affda5bf206b1bec7966e35ca8889a4804f4
DIST atom-1.18.0.rpm 128551353 BLAKE2B 535016084340a347453e83120bde96b2100d5819f28c267caeb9dbe8f54f8caf455ccdeb3a20b7e5c8392170a8facf106e642efe5037e4c0d16c6a713cf73fd0 SHA512 c30df4b3c10e2e886c349a8c255ea6e9e308b38811f02b2517ba464959a873d159b5fa4fe89d68ed50500038b92219cb061d9dee0917b0b807e086cceec2803b
DIST atom-1.20.1.tar.gz 9358859 BLAKE2B 5b20b29656ec70b4f885bf0cb2209903c3e344913acfb0802d25b3f6d0415c87849dd42a4d6515467c4a1e511e24e19487395f6f984161760077c8f4c34c7623 SHA512 a7f9edcfc84b81d768a92af5967a6889f85155c46a623b33e51999706e22f411ce570f42777fb3015174611ef19a956d8ed336ab1172612b27d75de8ef9c96fa
DIST atom-1.21.0.tar.gz 9378180 BLAKE2B 3b2706d8b3691ffc2e55347ba415d5ff1a9cc085a6af92cd581f04d5288b4597fa1b83a0bf94b0e0c6cecca61d9be646065a5b3b27465890d63cbe173f47d81d SHA512 98afc286afc5ad46a28c3db7bfb7857c15a87711dae6b07046cd1aae5c7c2a30be847aec9eb779fdceaeb7e4f86f54ffd1262d6f0ba2d5a6c1b7d4ce5b8d2104
+DIST atom-1.22.1.tar.gz 9541647 BLAKE2B 8801172da7b59dcf0974dc916e83633d52de8419b28db46578851d528dfce55b8dff1103e8e485a54203a7732e9288254d4d1b6ce1328d5e7340412e45fa14be SHA512 fb1a27c59ee6db8c659eb91fb397def3c05bd094b8a0614eb81a0ffabddcd61d480783f37af303773a9a9d15712630966ac162f3978e00ea2d8f8ef1ac78191a
+DIST atom-1.23.0-beta1.tar.gz 9553918 BLAKE2B ed44c6fca17bad667da145e1bcea17ae85330f4bb0dadf886c7b9ab929e3f580cb074532b0cc60f96d75d4d2bb68fedd7c25c4569983d008a024575a6d9b21e2 SHA512 3bcbe9ab9090eeb26cc6f121349c2c6bc4a3bdd58c36b7a2452320dde851bb0e2e60ed8040f406ed560cfd1a3cc217f220d98755ae50b8b81f123fca8e33bd44
DIST atom-bin-1.20.1.rpm 134506625 BLAKE2B ec25844e31f6d146a973698872d5141abab531e625312252bb2b5d2365a0daaf28e25e2cdc54c899582cb503b6e9b2705ca4d36ad7160ebc16d779d7ce7c6a61 SHA512 7bf8c4b092e0b45d56c5414d088633ae016b5564a7a97e1d706ad46743b6aad43a7268b7ade881680fa5f005eed0f46ba1523909a09cf3ec0aa51ce2335b8d92
DIST atom-bin-1.21.0.rpm 131039632 BLAKE2B e155afd174896c7fee40f8ab6b3c25b49d1b1e023f63aaf3da4e0ea2baa68ff2dac65e9d6f9349f9ea1895675709544916ec04a947411de6b2a514f1507ec400 SHA512 8425b8d8741632e9fcc28127c8f2cbe5901c8a4a3b2a8a1cb5d4b1410374a841241e90939952db749334c829ac541925b3785a787c60adf32cfdfa5abc2e3b8a
+DIST atom-bin-1.22.1.rpm 129683452 BLAKE2B 7f408fced77dd1a965521ca7d905b568c2e5c9db19f5948a7c4c711372d53dfcc9b0988d5ec7c1ee748b1a1a3edc7c8e1e7cb919a223069263004e8683694404 SHA512 bd8305a36a8f6755907de576fe02bba64fcff08f804cf22f784323f58440d7c5b251d8da34c74a679c2d7f66b5afdf11c897337a314e829e2b5f06573ef0bddc
+DIST atom-bin-1.23.0-beta1.rpm 129888621 BLAKE2B f32ee16773fcf4cc956fd21adb6c3a03e2ba07f2c7ce4518e2f2721b1cf6051bcee01934d657ade38050b8d4c2049d693bf53ccb834301e71078a81d6f2e87d7 SHA512 44c19db7452cbbf704950e2ce3347fa52525f44563744860061fd07880a7f7eaa958de8c954b634df7055c26953a99321c1aeb332cbd290d86369d0e3a31ccf9
DIST atom-cached-run-in-this-context-0.4.1.tar.gz 3855 BLAKE2B 38a52632b94bc803a0ba2a6cd05a58443e2ecc5e780be5b51f500e4b6c06f03ec3dbb01bf2beb02a63f55ec6db21c61642a821259f090677137502c73b866fe4 SHA512 dca2a6c77bb94e704aa99b405ae017bf0c56ce536a7246a8feaf133722556d444fb684cd6b9b475abcd0b946a42073a9fc0d61f5141b564320ac023ab2fbf79d
DIST atom-git-utils-4.1.2.tar.gz 36492 BLAKE2B b8cd425395a77e3f82f6d0505d32737f4e4630dc8f2f5ed6f025500ba377bfb0b90f2280d5b753263e98be2e978865e5bf470933535988255f6cd6ab5e569b36 SHA512 d1f0a5bbd6b059131ccf4ab92174d80caddbb254ea6d0676a5ce71d7dba55d60c86ed1c412862b9d104a5f6deb2671facad84841f9644afb9b37416b743e917a
DIST atom-git-utils-5.0.0.tar.gz 36545 BLAKE2B 537dc044d1f471af5ad5d9befcc7a6c5e4e2a68c84f97eb1fd76a3d608ccc2b856cae6b939964d2c67c367b25e076f3ccf1712f8dc073b5196409fda11e99287 SHA512 42fd7589ca56049b1ad5cf7f2df7e295fc8575f4eee8a562fa103541157bd487c1748e3d6c536237b260dcbb4b530619dfcc121ba84b6d2fbf6d684dc959f819
@@ -26,12 +30,15 @@ DIST atom-nsfw-1.0.15.tar.gz 45222 BLAKE2B ac8fcebf840afa1f3357a34d53a7289dc37ec
DIST atom-scrollbar-style-3.2.0.tar.gz 4609 BLAKE2B ae931b9a95b5bfac619e5737336671e41c782279e2db6c7c5f3cd4df6d227a28b0fcb04e4b5e1372f84176da7be183aff7c4b655e2903935dfad889c0133e682 SHA512 fc3ddfe7582517df45d7258a5857ca05fbadb92417d68b0c77d1e89e54b3bdaef3a1624e29177ebe64a2a994e62e1d1f5cb438911e881124aeec359426fab1bc
DIST atom-superstring-1.1.0.tar.gz 259961 BLAKE2B 7474bea436e8567ca4412a7e6e8dc7a37d35931103cce2fc301c7f7beb6c606011c936cef7db5532a26fc919a97a794af6e1599abd0fb407d6d4a99a1d606efd SHA512 880c97d696036065aeb4320dc71c88b49b22b04e6582c75310131e61d8067fdf3d26c901d7b22a2bfd2a2a2056f350ba9485b7e55410cdee9ef29f5a75a8af59
DIST atom-superstring-1.2.1.tar.gz 264386 BLAKE2B ad2b19ab97bbf52244f08aca74a3b429829a40492db0761a4cc21969c060c042d018aebb4013e46f399a4474fb8a8c1170b16323a0f589dc612d2d2a9d4c4d12 SHA512 8641f44defb9248c4fd91c4c7d5117322f83613386693ab51c3e77c9ad95ae383f69e662b6a870196504d7d99cd23527a822e989babdd95f42b6ddf517df7afc
+DIST atomdep-atom--nsfw-1.0.18.tar.gz 20870 BLAKE2B 2e90e2cc337b2d40805db44c48a6f9da2b4e749bd5d036bdeec78790286a0d0c7e4536a8d461480b91c45552ce1f6db06e6f70f975e52b2ec90146714c4a0fb9 SHA512 61c78a57d6b75fada687843bf0dca2f1a4d16a8546769789047a202fc831535ee206112962fc4680c7d37b4da3d611f6b5a153e1b6ab919e51759906288b09ff
DIST atomdep-cached-run-in-this-context-0.4.1.tar.gz 2388 BLAKE2B 9cf59f69c3433a9982c1dedf58c03eef5e1ccf1275f92ed192a2de601f38caceea5926e9b3a8571e2124b83e49c99a14f262db39a44732e1ff6550d6cd46d500 SHA512 942db40139b0beda616a25628772e515ce92ceca3e9a5288b10920e68c35149c52677a975e6e30f278ec64f06ae341fa1fa00702b339b2fb8f7af1cf9685efe5
DIST atomdep-ctags-3.0.0.tar.gz 12864 BLAKE2B 561a64734f67cd7943f2d6f972e4d1ec55913934357e7a0d3077c2910f938071b090f55880788ebeab5d7fcaa3009c8984a9045dc83089c46d276152653eb156 SHA512 af1d3764cc3a6bb781a9a2357eeb8503886fc14481c3dbe4a899d3c672fea9325524aed3a4c1c87965bc4cce2fbae20b56b32690849afc1fcb751cd5462adbcc
DIST atomdep-fs-admin-0.1.6.tar.gz 5539 BLAKE2B 9ee1857152cca343673a270c1044ad33a3ddbfb5b8389f2e0449e99348d0bdd4aaaa7e4c07bfb8871ae840f1a69cd90074a769f80fa3cc7f914050bc6f45b29c SHA512 2474523d5441ad882000633a929bcdbc5771b859a80f16a69c15504ff240a59b558e2edb1ca6e12ce91ad58da935243f3950a16e664529c59da70b9912903ae7
DIST atomdep-git-utils-5.0.0.tar.gz 4147470 BLAKE2B bb35abe46aa96791f9b79316edd64a31fd8d0bf7c34bdc20e4a5b3bdaa2e4f2a9e833d28a17368c3f23935e7321339248968669ad9b1599a99c0efbeb558099f SHA512 ffb2ecf8eb89f7e4cbf51e5953d4e547c4ccf21985a6177cffd5f958433ac7c98d36070ffea82dae65b02bed53c49ba94fc12fb4823e1ef985a350726fe46424
+DIST atomdep-git-utils-5.1.0.tar.gz 4141959 BLAKE2B 7504a4ba57b093da659ed0ba7319863636d7f9f1e9a6a4bbd4b6c6fcf9922c9ca32398b44550e4a94d519471ca5cf249976426583f998186398c147c6cce5636 SHA512 1f9c38646b25a526c0399d538e58864c552d65802402df82f8303a936374121db40f61195ea3254e56e31dd9d25b847b325264911f62d6beddfc24931a9367bf
DIST atomdep-keyboard-layout-2.0.13.tar.gz 17881 BLAKE2B e86a399be545a43768a53d5d9279dae1bc4d87fd99af87a10861f2e3367d6786e3631f8dc77671b08b06e30290f2c97833402e3732a010ae31c7c1c02d9d6afd SHA512 5b155cddb0484edb47a334b21183eccabe6b376290b97b4469732541f4231337b526b90bc37d321ff6dc367d481b1e3c6feb5d39dc9ba67abef8914b53615a66
DIST atomdep-keytar-4.0.4.tar.gz 6550 BLAKE2B 3195b13f0a611acef28447fcdc46647110f12acfb1a6a47076cf5562724886d2b48307116ef6965bc68b71e58c561771b51bc6f3900488347ef69a07aa1038aa SHA512 78544e3646ce0f772a9adae055e137034d4b0e83bb8b95647a4efe239bf4bdf863f05317f4b37b0d2ac89e6a6e0107abd0022ccd7abb4310a39fa1c07982b4d4
+DIST atomdep-keytar-4.0.5.tar.gz 15594 BLAKE2B 3ced4a3eca1036ce21435473d013bc98537959d8488425581089c230b3e6ce276264754c607c29adf9d9d6272bde10066b23c7de502030c35ff2a5d907b17a4b SHA512 bd4dcd75517c057bacfed57490b9c1614f52169cc786a167eb1b391bf83845b23cdc53e20c72e7902140a5da7f865ad8bdc2d456063ebc1b86f6cb9fa1178929
DIST atomdep-nsfw-1.0.16.tar.gz 43214 BLAKE2B 261539bebfe494aad0b372f1837a87c7c2a410bb591df523ea25bd5acd008f7eb0e8460a218fd4ee70d98bc26dd166472e9ea0aea265971cf2e904da913dda88 SHA512 0060d7fb5016454aaaf7df438d973b9a389a6e5f7a166c5d402cf8ef8bcda724501c3bfbd44e37e9e6c38d5f1decaeb48c571aad9145dec38ba0c94073b9702a
DIST atomdep-nslog-3.0.0.tar.gz 2270 BLAKE2B 3258b7e7d7f94a89b0e5a21bfedfbe71bbfe3d776871aaeb3443ce6a7759860abfef2b8af823dab009183b5378c1ed06c7b2729df9acc09d3c5ea6a5f47ff160 SHA512 6a0ce8970ae12fdefd0935916e5501bb89e366fb66b05fffade884f3adf4add4b135eb4f0f208684e28424fdb9858ee8193eb1f3db1f7eac3cb49bdb5d1a4bb1
DIST atomdep-oniguruma-6.2.1.tar.gz 586350 BLAKE2B 65574ef004c98cced7a9f5917845015ccd84b2383a85d889365da5c73313114454458b441bf6588eaee2a17150d674b7754ccc0bbb2d68ae3d98f7d5ca63530e SHA512 faa46dc4c1b8d7e75ab54512de9a823c5b958a7ccb43333375b33e16de47a464ea2a9ba9996596a8359d423a3e8c9d63cc92a5162b3f9d44b4485304073b41f1
@@ -40,6 +47,8 @@ DIST atomdep-runas-3.1.1.tar.gz 6197 BLAKE2B 4625b085aa280a120ab66d295c8ca90c591
DIST atomdep-scrollbar-style-3.2.0.tar.gz 3498 BLAKE2B 2d1a88f2764b5a51da92e41f5dd5424a4ffbc13ec9b2e826236097ff7ebb0babd22b4e4cd00873e786aa52d901eedce49bd102ad6398eda614734bdd78b8b4e3 SHA512 9f5fcc2bcb13cb81e95a52aa6db0c99ffd67c9cd48a9faf0223587359f4082c3e867cb384497dc6be3e8230b4cd035e910a7048d431e81a28dfded0bc572da18
DIST atomdep-spellchecker-3.4.2.tar.gz 476093 BLAKE2B 17ea32be639ed3ea03593e8c29e0970068f36a0545edd9c962443b4d6d4f6d8954c09d93c54ea348a396d10b7bef743c7f25a5cbab7a449c9bb57b9a38886528 SHA512 8ed6fa4251cd79de6e77004ea91a438080df7109ebbe2c92934366c34433388bc30c8b1ebc97a47aa2a9f3eb28ac5ba2ccf3a0de9d6f59b2d3125ff7ff2c06a4
DIST atomdep-spellchecker-3.4.3.tar.gz 480739 BLAKE2B 5549ca23c50efc4573cb990d8cd79bc564dd4890e8509915e89173c8cb49ed0f9d17ff22c73f61e00487f9a09de3e6b0de542a755fa3eeeb2cc8bd766016ec62 SHA512 cef2aa6adf95772f0d38760adb9a805ad540bfb422647486ccd63db7afcca508eb821b6099d9913912dd1b0881f3b5ccc62d203f2ce6bc47859f36a76c781376
+DIST atomdep-spellchecker-3.4.4.tar.gz 481892 BLAKE2B 3bae26ffffbaffdbac6f082c6f33ea4f5127583663e1df3ed8d98cebed2ce11ea0d9965615e369383695df6ad55aa996e8968e6616415d359ffae640a679f47b SHA512 974b3ce9866ce7e3f30137856ea0f4b1348c105edb833a94620c6b53cfa7052c37575f6dcd160a322fa10c61babfc32c916786d9d44ad10efdb2ab3578620ac1
+DIST atomdep-superstring-2.2.13.tar.gz 793833 BLAKE2B b5e8003c25ec38da1eae92022e972467b33ab45ea9db918a0acae6af10abb8a48609d76318558d327d013f65ea01888450ceb991dbfed39530ddd7076f1cf995 SHA512 9e2ce1ec9dffc0ccd700ed4b2f069dfc6cf258ae842dfe7a5242db99c0899ad77a692d2697695c3ca6d42cf4b9c590e9f29f469399d519029052b7ed806b39f8
DIST atomdep-superstring-2.2.3.tar.gz 785373 BLAKE2B 01ecaf112b76dfe4957a8ded5af23d1dcdecf5ed92bda20ee034c1b1a0516d7f9157d7c8ad21bc005e14a00115b81c8dca18296cc01dc3146d58adf7c96e9ec3 SHA512 edb71f4cc54436f563b6491f71e8c6c78aa711d1da821619031062e5e85fd60d66f0bcb6a70184b1fd55f31724d63ed9ba9c872d6d80387710262e404541a355
DIST nodejs-nan-2.4.0.tar.gz 157071 BLAKE2B 081881da40f1afa8dfe7edb9db7cad0aa96a8057f2b13a21c7a9eabc514e10da5837d4f7ea5144b78f958f1f14f38a944a475b23d994f94def72236a89fec80b SHA512 e6f3ab3f67c72b3cc9e6e6b9b5de0f73134ef504dedae5e68376198858a6796f00c35869438e0480f28006dd8f6be13dca3bcc436a1a6b28b1dea5cbc72f9e45
DIST nodejs-nan-2.6.2.tar.gz 161949 BLAKE2B f74e8d56e67ae03e60e0be7752ed9527bd8499c01f7df8899f3eb6735b1286633753e8bf595781b6d3d1446df20483fc0377bd745be10c6bae0ad66426751b79 SHA512 d1b5ed12e90accfa117cb73b9432897631ed2dd6045f93fa8b53237a13cec0ec467b14c035e9e4d4a5c6588949c1c80b0eef48a46d5c9c0a1f81ef400da031c3
diff --git a/app-editors/atom/atom-1.22.1.ebuild b/app-editors/atom/atom-1.22.1.ebuild
new file mode 100644
index 000000000000..fbafbe5c1639
--- /dev/null
+++ b/app-editors/atom/atom-1.22.1.ebuild
@@ -0,0 +1,535 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# NOTE: this ebuild has been generated by atom-ebuild-gen.py from the
+# atom overlay. If you would like to make changes, please consider
+# modifying the ebuild template and submitting a PR to
+# https://github.com/elprans/atom-overlay.
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit python-single-r1 multiprocessing rpm virtualx xdg-utils
+
+DESCRIPTION="A hackable text editor for the 21st Century"
+HOMEPAGE="https://atom.io"
+MY_PV="${PV//_/-}"
+
+ELECTRON_V=1.6.15
+ELECTRON_SLOT=1.6
+
+ASAR_V=0.13.0
+# All binary packages depend on this
+NAN_V=2.6.2
+
+ATOM__NSFW_V=1.0.18
+CACHED_RUN_IN_THIS_CONTEXT_V=0.4.1
+CTAGS_V=3.0.0
+FS_ADMIN_V=0.1.6
+GIT_UTILS_V=5.1.0
+KEYBOARD_LAYOUT_V=2.0.13
+KEYTAR_V=4.0.5
+NSFW_V=1.0.16
+NSLOG_V=3.0.0
+ONIGURUMA_V=6.2.1
+PATHWATCHER_V=8.0.1
+SCROLLBAR_STYLE_V=3.2.0
+SPELLCHECKER_V=3.4.3
+SUPERSTRING_V=2.2.13
+
+# 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-bin-${MY_PV}.rpm
+ https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> atom-${MY_PV}.tar.gz
+ 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://registry.npmjs.org/@atom/nsfw/-/nsfw-1.0.18.tgz -> atomdep-atom--nsfw-1.0.18.tar.gz
+ https://registry.npmjs.org/cached-run-in-this-context/-/cached-run-in-this-context-0.4.1.tgz -> atomdep-cached-run-in-this-context-0.4.1.tar.gz
+ https://registry.npmjs.org/ctags/-/ctags-3.0.0.tgz -> atomdep-ctags-3.0.0.tar.gz
+ https://registry.npmjs.org/fs-admin/-/fs-admin-0.1.6.tgz -> atomdep-fs-admin-0.1.6.tar.gz
+ https://registry.npmjs.org/git-utils/-/git-utils-5.1.0.tgz -> atomdep-git-utils-5.1.0.tar.gz
+ https://registry.npmjs.org/keyboard-layout/-/keyboard-layout-2.0.13.tgz -> atomdep-keyboard-layout-2.0.13.tar.gz
+ https://registry.npmjs.org/keytar/-/keytar-4.0.5.tgz -> atomdep-keytar-4.0.5.tar.gz
+ https://registry.npmjs.org/nsfw/-/nsfw-1.0.16.tgz -> atomdep-nsfw-1.0.16.tar.gz
+ https://registry.npmjs.org/nslog/-/nslog-3.0.0.tgz -> atomdep-nslog-3.0.0.tar.gz
+ https://registry.npmjs.org/oniguruma/-/oniguruma-6.2.1.tgz -> atomdep-oniguruma-6.2.1.tar.gz
+ https://registry.npmjs.org/pathwatcher/-/pathwatcher-8.0.1.tgz -> atomdep-pathwatcher-8.0.1.tar.gz
+ https://registry.npmjs.org/scrollbar-style/-/scrollbar-style-3.2.0.tgz -> atomdep-scrollbar-style-3.2.0.tar.gz
+ https://registry.npmjs.org/spellchecker/-/spellchecker-3.4.3.tgz -> atomdep-spellchecker-3.4.3.tar.gz
+ https://registry.npmjs.org/superstring/-/superstring-2.2.13.tgz -> atomdep-superstring-2.2.13.tar.gz
+"
+
+BINMODS=(
+ atom--nsfw
+ cached-run-in-this-context
+ ctags
+ fs-admin
+ git-utils
+ keyboard-layout
+ keytar
+ nsfw
+ nslog
+ oniguruma
+ pathwatcher
+ scrollbar-style
+ spellchecker
+ superstring
+)
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ >=app-text/hunspell-1.3.3:=
+ >=dev-libs/libgit2-0.23:=[ssh]
+ >=dev-libs/libpcre2-10.22:=[jit,pcre16]
+ >=gnome-base/libgnome-keyring-3.12:=
+ >=dev-libs/oniguruma-6.6.0:=
+ >=dev-util/ctags-5.8
+ >=dev-util/electron-${ELECTRON_V}:${ELECTRON_SLOT}
+ x11-libs/libxkbfile"
+RDEPEND="
+ ${DEPEND}
+ !sys-apps/apmd
+"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+BIN_S="${WORKDIR}/${PN}-bin-${MY_PV}"
+BUILD_DIR="${S}/out"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ local a
+
+ for a in ${A} ; do
+ case ${a} in
+ *.rpm) srcrpm_unpack "${a}" ;;
+ *) _unpack "${a}" ;;
+ esac
+ done
+
+ mkdir "${BIN_S}" || die
+ mv "${WORKDIR}/usr" "${BIN_S}" || die
+}
+
+src_prepare() {
+ local install_dir="$(get_install_dir)"
+ local suffix="$(get_install_suffix)"
+ local nan_s="${WORKDIR}/nodejs-nan-${NAN_V}"
+ local patch
+ local binmod
+ local _s
+
+ mkdir "${BUILD_DIR}" || die
+ cp -a "${BIN_S}/$(get_atom_rpmdir)/resources/app" \
+ "${BUILD_DIR}/app" || die
+
+ # Add source files omitted from the upstream binary distribution,
+ # and which we want to include in ours.
+ cp -a -t "${BUILD_DIR}/app" "${S}/spec" || die
+
+ # Unpack app.asar
+ if [ -e "${BIN_S}/$(get_atom_rpmdir)/resources/app.asar" ]; then
+ easar extract "${BIN_S}/$(get_atom_rpmdir)/resources/app.asar" \
+ "${BUILD_DIR}/app"
+ fi
+
+ cd "${BUILD_DIR}/app" || die
+
+ eapply "${FILESDIR}/atom-python.patch"
+ eapply "${FILESDIR}/apm-python.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"
+
+ sed -i -e "s|{{NPM_CONFIG_NODEDIR}}|$(get_electron_nodedir)|g" \
+ ./atom.sh \
+ || die
+
+ sed -i -e "s|{{ATOM_PATH}}|$(get_electron_dir)/electron|g" \
+ ./atom.sh \
+ || die
+
+ 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
+
+ local env="export NPM_CONFIG_NODEDIR=$(get_electron_nodedir)\n\
+ export ELECTRON_NO_ASAR=1"
+ sed -i -e \
+ "s|\"\$binDir/\$nodeBin\"|${env}\nexec $(get_electron_dir)/node|g" \
+ apm/bin/apm || die
+
+ sed -i -e \
+ "s|^\([[:space:]]*\)node[[:space:]]\+|\1\"$(get_electron_dir)/node\" |g" \
+ apm/node_modules/npm/bin/node-gyp-bin/node-gyp || die
+
+ sed -i -e \
+ "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|${EROOT%/}/usr/bin/atom${suffix}|g" \
+ "${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" || 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
+ eapply "${patch}"
+ done
+ fi
+ done
+
+ cd "${BUILD_DIR}/app" || die
+
+ # 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 oniguruma)"
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \
+ --inplace --unbundle "onig_scanner;oniguruma;onig" \
+ "${_s}/binding.gyp" || die
+
+ _s="${WORKDIR}/$(package_dir spellchecker)"
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \
+ --inplace --unbundle "spellchecker;hunspell;hunspell" \
+ "${_s}/binding.gyp" || die
+
+ _s="${WORKDIR}/$(package_dir superstring)"
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \
+ --inplace --unbundle \
+ "superstring_core;./vendor/pcre/pcre.gyp:pcre;pcre2-16; \
+ -DPCRE2_CODE_UNIT_WIDTH=16" \
+ "${_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
+
+ 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
+
+ eapply_user
+}
+
+src_configure() {
+ local binmod
+
+ for binmod in ${BINMODS[@]}; do
+ einfo "Configuring ${binmod}..."
+ cd "${WORKDIR}/$(package_dir ${binmod})" || die
+ enodegyp_atom configure
+ done
+}
+
+src_compile() {
+ local binmod
+ local x
+ local ctags_d="node_modules/symbols-view/vendor"
+ local jobs=$(makeopts_jobs)
+ local gypopts
+
+ # Transpile any yet untranspiled files.
+ ecoffeescript "${BUILD_DIR}/app/spec/*.coffee"
+
+ gypopts="--verbose"
+
+ if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
+ gypopts+=" --jobs ${jobs}"
+ fi
+
+ mkdir -p "${BUILD_DIR}/modules/" || die
+
+ for binmod in ${BINMODS[@]}; do
+ einfo "Building ${binmod}..."
+ cd "${WORKDIR}/$(package_dir ${binmod})" || die
+ enodegyp_atom ${gypopts} build
+ x=${binmod##node-}
+ mkdir -p "${BUILD_DIR}/modules/${x}" || die
+ cp build/Release/*.node "${BUILD_DIR}/modules/${x}" || die
+ done
+
+ # Put compiled binary modules in place
+ _fix_binmods "${BUILD_DIR}/app" "apm"
+ _fix_binmods "${BUILD_DIR}/app" "node_modules"
+
+ # Remove non-Linux vendored ctags binaries
+ rm "${BUILD_DIR}/app/${ctags_d}/ctags-darwin" \
+ "${BUILD_DIR}/app/${ctags_d}/ctags-win32.exe" || die
+
+ # Re-pack app.asar
+ # Keep unpack rules in sync with build/tasks/generate-asar-task.coffee
+ cd "${BUILD_DIR}" || die
+ x="--unpack={*.node,ctags-config,ctags-linux,**/spec/fixtures/**,**/node_modules/spellchecker/**,**/resources/atom.png}"
+ xd="--unpack-dir=apm"
+ easar pack "${x}" "${xd}" "app" "app.asar"
+
+ rm -r "${BUILD_DIR}/app.asar.unpacked/apm" || die
+
+ # Replace vendored ctags with a symlink to system ctags
+ rm "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die
+ ln -s "${EROOT%/}/usr/bin/ctags" \
+ "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die
+}
+
+src_test() {
+ local electron="$(get_electron_dir)/electron"
+ local app="${BUILD_DIR}/app.asar"
+
+ virtx "${electron}" --app="${app}" --test "${app}/spec"
+}
+
+src_install() {
+ local install_dir="$(get_install_dir)"
+ local suffix="$(get_install_suffix)"
+
+ insinto "${install_dir}"
+
+ doins "${BUILD_DIR}/app.asar"
+ doins -r "${BUILD_DIR}/app.asar.unpacked"
+
+ insinto "${install_dir}/app"
+ doins -r "${BUILD_DIR}/app/apm"
+
+ insinto "/usr/share/applications/"
+ newins "${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" \
+ "atom${suffix}.desktop"
+
+ insinto "/usr/share/icons/"
+ doins -r "${BIN_S}/usr/share/icons/hicolor"
+
+ exeinto "${install_dir}"
+ newexe "${BUILD_DIR}/app/atom.sh" atom
+ insinto "/usr/share/licenses/${PN}${suffix}"
+ doins "${BIN_S}/$(get_atom_rpmdir)/resources/LICENSE.md"
+ dosym "${install_dir}/atom" "/usr/bin/atom${suffix}"
+ dosym "${install_dir}/app/apm/bin/apm" "/usr/bin/apm${suffix}"
+
+ _fix_executables "${install_dir}/app/apm/bin"
+ _fix_executables "${install_dir}/app/apm/node_modules/.bin"
+ _fix_executables "${install_dir}/app/apm/node_modules/npm/bin"
+ _fix_executables "${install_dir}/app/apm/node_modules/npm/bin/node-gyp-bin"
+ _fix_executables "${install_dir}/app/apm/node_modules/node-gyp/bin"
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}
+
+# Helpers
+# -------
+
+# Return the installation suffix appropriate for the slot.
+get_install_suffix() {
+ local c=(${SLOT//\// })
+ local slot=${c[0]}
+ local suffix
+
+ if [[ "${slot}" == "0" ]]; then
+ suffix=""
+ else
+ suffix="-${slot}"
+ fi
+
+ echo -n "${suffix}"
+}
+
+# Return the upstream app name appropriate for $PV.
+get_atom_appname() {
+ if [[ "${PV}" == *beta* ]]; then
+ echo -n "atom-beta"
+ else
+ echo -n "atom"
+ fi
+}
+
+# Return the app installation path inside the upstream archive.
+get_atom_rpmdir() {
+ echo -n "usr/share/$(get_atom_appname)"
+}
+
+# Return the installation target directory.
+get_install_dir() {
+ echo -n "/usr/$(get_libdir)/atom$(get_install_suffix)"
+}
+
+# Return the Electron installation directory.
+get_electron_dir() {
+ 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 "${EROOT%/}/usr/include/electron-${ELECTRON_SLOT}/node/"
+}
+
+# Run JavaScript using Electron's version of Node.
+enode_electron() {
+ "$(get_electron_dir)"/node $@
+}
+
+# Run node-gyp using Electron's version of Node.
+enodegyp_atom() {
+ local apmpath="$(get_atom_rpmdir)/resources/app/apm"
+ local nodegyp="${BIN_S}/${apmpath}/node_modules/node-gyp/bin/node-gyp.js"
+
+ PATH="$(get_electron_dir):${PATH}" \
+ enode_electron "${nodegyp}" \
+ --nodedir="$(get_electron_nodedir)" $@ || die
+}
+
+# Coffee Script wrapper.
+ecoffeescript() {
+ local cscript="${FILESDIR}/transpile-coffee-script.js"
+
+ # Disable shell glob expansion, as we want the coffee script
+ # transpiler to do that instead.
+ set -f
+ echo "ecoffeescript" $@
+ ATOM_HOME="${T}/.atom" ATOM_SRC_ROOT="${BUILD_DIR}/app" \
+ NODE_PATH="${BUILD_DIR}/app/node_modules" \
+ enode_electron "${cscript}" $@ || die
+ set +f
+}
+
+# asar wrapper.
+easar() {
+ local asar="${WORKDIR}/$(package_dir asar)/node_modules/asar/bin/asar"
+ echo "asar" $@
+ enode_electron "${asar}" $@ || die
+}
+
+# Return a $WORKDIR directory for a given package name.
+package_dir() {
+ local binmod="${1//-/_}"
+ local binmod_v="${binmod^^}_V"
+ echo -n ${1}-${!binmod_v}
+}
+
+# Check if there are patches for a given package.
+_have_patches_for() {
+ local _patches="${1}-*.patch" _find
+ _find=$(find "${FILESDIR}" -maxdepth 1 -name "${_patches}" -print -quit)
+ test -n "$_find"
+}
+
+# Tarballs on registry.npmjs.org are wildly inconsistent,
+# and violate the convention of having ${P} as the top directory name.
+# This helper detects and fixes that.
+_unpack() {
+ local a="${1}"
+ local b="${a%.tar.gz}"
+ local p="${b#atomdep-}"
+ local dir="$(tar -tzf "${DISTDIR}/${a}" | head -1 | cut -f1 -d'/')"
+
+ unpack "${a}"
+
+ if [[ "${dir}" != "${p}" ]]; then
+ # Set the correct name for the unpacked directory.
+ mv "${WORKDIR}/${dir}" "${WORKDIR}/${p}" || die
+ fi
+}
+
+# Check if the binary node module is actually a valid dependency.
+# Sometimes the upstream removes a dependency from package.json but
+# forgets to remove the module from node_modules.
+_is_valid_binmod() {
+ local mod
+
+ for mod in "${BINMODS[@]}"; do
+ if [[ "${mod}" == "${1}" ]]; then
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+# Replace binary node modules with the newly compiled versions thereof.
+_fix_binmods() {
+ local _dir="${2}"
+ local _prefix="${1}"
+ local path
+ local relpath
+ local modpath
+ local mod
+ local f
+ local d
+ local cruft
+
+ (find "${_prefix}/${_dir}" -name '*.node' -print || die) \
+ | 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})
+
+ _is_valid_binmod "${mod}" || continue
+
+ # must copy here as symlinks will cause the module loading to fail
+ cp -f "${BUILD_DIR}/modules/${mod}/${f}" "${path}" || die
+ cruft=$(find "${d}" -name '*.a' -print)
+ if [[ -n "${cruft}" ]]; then
+ rm ${cruft} || die
+ fi
+ done
+}
+
+# Fix script permissions and shebangs to point to the correct version
+# of Node.
+_fix_executables() {
+ local _dir="${1}"
+ local _node_sb="#!$(get_electron_dir)"/node
+
+ (find -L "${ED}/${_dir}" -maxdepth 1 -mindepth 1 -type f -print || die) \
+ | while IFS= read -r f; do
+ IFS= read -r shebang < "${f}"
+
+ if [[ ${shebang} == '#!'* ]]; then
+ fperms +x "${f#${ED}}"
+ if [[ "${shebang}" == "#!/usr/bin/env node" || "${shebang}" == "#!/usr/bin/node" ]]; then
+ einfo "Fixing node shebang in ${f#${ED}}"
+ sed --follow-symlinks -i \
+ -e "1s:${shebang}$:${_node_sb}:" "${f}" || die
+ fi
+ fi
+ done || die
+}
diff --git a/app-editors/atom/atom-1.23.0_beta1.ebuild b/app-editors/atom/atom-1.23.0_beta1.ebuild
new file mode 100644
index 000000000000..1a6a57a15de5
--- /dev/null
+++ b/app-editors/atom/atom-1.23.0_beta1.ebuild
@@ -0,0 +1,535 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# NOTE: this ebuild has been generated by atom-ebuild-gen.py from the
+# atom overlay. If you would like to make changes, please consider
+# modifying the ebuild template and submitting a PR to
+# https://github.com/elprans/atom-overlay.
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit python-single-r1 multiprocessing rpm virtualx xdg-utils
+
+DESCRIPTION="A hackable text editor for the 21st Century"
+HOMEPAGE="https://atom.io"
+MY_PV="${PV//_/-}"
+
+ELECTRON_V=1.6.15
+ELECTRON_SLOT=1.6
+
+ASAR_V=0.13.0
+# All binary packages depend on this
+NAN_V=2.6.2
+
+ATOM__NSFW_V=1.0.18
+CACHED_RUN_IN_THIS_CONTEXT_V=0.4.1
+CTAGS_V=3.0.0
+FS_ADMIN_V=0.1.6
+GIT_UTILS_V=5.1.0
+KEYBOARD_LAYOUT_V=2.0.13
+KEYTAR_V=4.0.5
+NSFW_V=1.0.16
+NSLOG_V=3.0.0
+ONIGURUMA_V=6.2.1
+PATHWATCHER_V=8.0.1
+SCROLLBAR_STYLE_V=3.2.0
+SPELLCHECKER_V=3.4.4
+SUPERSTRING_V=2.2.13
+
+# 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-bin-${MY_PV}.rpm
+ https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> atom-${MY_PV}.tar.gz
+ 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://registry.npmjs.org/@atom/nsfw/-/nsfw-1.0.18.tgz -> atomdep-atom--nsfw-1.0.18.tar.gz
+ https://registry.npmjs.org/cached-run-in-this-context/-/cached-run-in-this-context-0.4.1.tgz -> atomdep-cached-run-in-this-context-0.4.1.tar.gz
+ https://registry.npmjs.org/ctags/-/ctags-3.0.0.tgz -> atomdep-ctags-3.0.0.tar.gz
+ https://registry.npmjs.org/fs-admin/-/fs-admin-0.1.6.tgz -> atomdep-fs-admin-0.1.6.tar.gz
+ https://registry.npmjs.org/git-utils/-/git-utils-5.1.0.tgz -> atomdep-git-utils-5.1.0.tar.gz
+ https://registry.npmjs.org/keyboard-layout/-/keyboard-layout-2.0.13.tgz -> atomdep-keyboard-layout-2.0.13.tar.gz
+ https://registry.npmjs.org/keytar/-/keytar-4.0.5.tgz -> atomdep-keytar-4.0.5.tar.gz
+ https://registry.npmjs.org/nsfw/-/nsfw-1.0.16.tgz -> atomdep-nsfw-1.0.16.tar.gz
+ https://registry.npmjs.org/nslog/-/nslog-3.0.0.tgz -> atomdep-nslog-3.0.0.tar.gz
+ https://registry.npmjs.org/oniguruma/-/oniguruma-6.2.1.tgz -> atomdep-oniguruma-6.2.1.tar.gz
+ https://registry.npmjs.org/pathwatcher/-/pathwatcher-8.0.1.tgz -> atomdep-pathwatcher-8.0.1.tar.gz
+ https://registry.npmjs.org/scrollbar-style/-/scrollbar-style-3.2.0.tgz -> atomdep-scrollbar-style-3.2.0.tar.gz
+ https://registry.npmjs.org/spellchecker/-/spellchecker-3.4.4.tgz -> atomdep-spellchecker-3.4.4.tar.gz
+ https://registry.npmjs.org/superstring/-/superstring-2.2.13.tgz -> atomdep-superstring-2.2.13.tar.gz
+"
+
+BINMODS=(
+ atom--nsfw
+ cached-run-in-this-context
+ ctags
+ fs-admin
+ git-utils
+ keyboard-layout
+ keytar
+ nsfw
+ nslog
+ oniguruma
+ pathwatcher
+ scrollbar-style
+ spellchecker
+ superstring
+)
+
+LICENSE="MIT"
+SLOT="beta"
+KEYWORDS="~amd64"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ >=app-text/hunspell-1.3.3:=
+ >=dev-libs/libgit2-0.23:=[ssh]
+ >=dev-libs/libpcre2-10.22:=[jit,pcre16]
+ >=gnome-base/libgnome-keyring-3.12:=
+ >=dev-libs/oniguruma-6.6.0:=
+ >=dev-util/ctags-5.8
+ >=dev-util/electron-${ELECTRON_V}:${ELECTRON_SLOT}
+ x11-libs/libxkbfile"
+RDEPEND="
+ ${DEPEND}
+ !sys-apps/apmd
+"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+BIN_S="${WORKDIR}/${PN}-bin-${MY_PV}"
+BUILD_DIR="${S}/out"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ local a
+
+ for a in ${A} ; do
+ case ${a} in
+ *.rpm) srcrpm_unpack "${a}" ;;
+ *) _unpack "${a}" ;;
+ esac
+ done
+
+ mkdir "${BIN_S}" || die
+ mv "${WORKDIR}/usr" "${BIN_S}" || die
+}
+
+src_prepare() {
+ local install_dir="$(get_install_dir)"
+ local suffix="$(get_install_suffix)"
+ local nan_s="${WORKDIR}/nodejs-nan-${NAN_V}"
+ local patch
+ local binmod
+ local _s
+
+ mkdir "${BUILD_DIR}" || die
+ cp -a "${BIN_S}/$(get_atom_rpmdir)/resources/app" \
+ "${BUILD_DIR}/app" || die
+
+ # Add source files omitted from the upstream binary distribution,
+ # and which we want to include in ours.
+ cp -a -t "${BUILD_DIR}/app" "${S}/spec" || die
+
+ # Unpack app.asar
+ if [ -e "${BIN_S}/$(get_atom_rpmdir)/resources/app.asar" ]; then
+ easar extract "${BIN_S}/$(get_atom_rpmdir)/resources/app.asar" \
+ "${BUILD_DIR}/app"
+ fi
+
+ cd "${BUILD_DIR}/app" || die
+
+ eapply "${FILESDIR}/atom-python.patch"
+ eapply "${FILESDIR}/apm-python.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"
+
+ sed -i -e "s|{{NPM_CONFIG_NODEDIR}}|$(get_electron_nodedir)|g" \
+ ./atom.sh \
+ || die
+
+ sed -i -e "s|{{ATOM_PATH}}|$(get_electron_dir)/electron|g" \
+ ./atom.sh \
+ || die
+
+ 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
+
+ local env="export NPM_CONFIG_NODEDIR=$(get_electron_nodedir)\n\
+ export ELECTRON_NO_ASAR=1"
+ sed -i -e \
+ "s|\"\$binDir/\$nodeBin\"|${env}\nexec $(get_electron_dir)/node|g" \
+ apm/bin/apm || die
+
+ sed -i -e \
+ "s|^\([[:space:]]*\)node[[:space:]]\+|\1\"$(get_electron_dir)/node\" |g" \
+ apm/node_modules/npm/bin/node-gyp-bin/node-gyp || die
+
+ sed -i -e \
+ "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|${EROOT%/}/usr/bin/atom${suffix}|g" \
+ "${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" || 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
+ eapply "${patch}"
+ done
+ fi
+ done
+
+ cd "${BUILD_DIR}/app" || die
+
+ # 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 oniguruma)"
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \
+ --inplace --unbundle "onig_scanner;oniguruma;onig" \
+ "${_s}/binding.gyp" || die
+
+ _s="${WORKDIR}/$(package_dir spellchecker)"
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \
+ --inplace --unbundle "spellchecker;hunspell;hunspell" \
+ "${_s}/binding.gyp" || die
+
+ _s="${WORKDIR}/$(package_dir superstring)"
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \
+ --inplace --unbundle \
+ "superstring_core;./vendor/pcre/pcre.gyp:pcre;pcre2-16; \
+ -DPCRE2_CODE_UNIT_WIDTH=16" \
+ "${_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
+
+ 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
+
+ eapply_user
+}
+
+src_configure() {
+ local binmod
+
+ for binmod in ${BINMODS[@]}; do
+ einfo "Configuring ${binmod}..."
+ cd "${WORKDIR}/$(package_dir ${binmod})" || die
+ enodegyp_atom configure
+ done
+}
+
+src_compile() {
+ local binmod
+ local x
+ local ctags_d="node_modules/symbols-view/vendor"
+ local jobs=$(makeopts_jobs)
+ local gypopts
+
+ # Transpile any yet untranspiled files.
+ ecoffeescript "${BUILD_DIR}/app/spec/*.coffee"
+
+ gypopts="--verbose"
+
+ if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
+ gypopts+=" --jobs ${jobs}"
+ fi
+
+ mkdir -p "${BUILD_DIR}/modules/" || die
+
+ for binmod in ${BINMODS[@]}; do
+ einfo "Building ${binmod}..."
+ cd "${WORKDIR}/$(package_dir ${binmod})" || die
+ enodegyp_atom ${gypopts} build
+ x=${binmod##node-}
+ mkdir -p "${BUILD_DIR}/modules/${x}" || die
+ cp build/Release/*.node "${BUILD_DIR}/modules/${x}" || die
+ done
+
+ # Put compiled binary modules in place
+ _fix_binmods "${BUILD_DIR}/app" "apm"
+ _fix_binmods "${BUILD_DIR}/app" "node_modules"
+
+ # Remove non-Linux vendored ctags binaries
+ rm "${BUILD_DIR}/app/${ctags_d}/ctags-darwin" \
+ "${BUILD_DIR}/app/${ctags_d}/ctags-win32.exe" || die
+
+ # Re-pack app.asar
+ # Keep unpack rules in sync with build/tasks/generate-asar-task.coffee
+ cd "${BUILD_DIR}" || die
+ x="--unpack={*.node,ctags-config,ctags-linux,**/spec/fixtures/**,**/node_modules/spellchecker/**,**/resources/atom.png}"
+ xd="--unpack-dir=apm"
+ easar pack "${x}" "${xd}" "app" "app.asar"
+
+ rm -r "${BUILD_DIR}/app.asar.unpacked/apm" || die
+
+ # Replace vendored ctags with a symlink to system ctags
+ rm "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die
+ ln -s "${EROOT%/}/usr/bin/ctags" \
+ "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die
+}
+
+src_test() {
+ local electron="$(get_electron_dir)/electron"
+ local app="${BUILD_DIR}/app.asar"
+
+ virtx "${electron}" --app="${app}" --test "${app}/spec"
+}
+
+src_install() {
+ local install_dir="$(get_install_dir)"
+ local suffix="$(get_install_suffix)"
+
+ insinto "${install_dir}"
+
+ doins "${BUILD_DIR}/app.asar"
+ doins -r "${BUILD_DIR}/app.asar.unpacked"
+
+ insinto "${install_dir}/app"
+ doins -r "${BUILD_DIR}/app/apm"
+
+ insinto "/usr/share/applications/"
+ newins "${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" \
+ "atom${suffix}.desktop"
+
+ insinto "/usr/share/icons/"
+ doins -r "${BIN_S}/usr/share/icons/hicolor"
+
+ exeinto "${install_dir}"
+ newexe "${BUILD_DIR}/app/atom.sh" atom
+ insinto "/usr/share/licenses/${PN}${suffix}"
+ doins "${BIN_S}/$(get_atom_rpmdir)/resources/LICENSE.md"
+ dosym "${install_dir}/atom" "/usr/bin/atom${suffix}"
+ dosym "${install_dir}/app/apm/bin/apm" "/usr/bin/apm${suffix}"
+
+ _fix_executables "${install_dir}/app/apm/bin"
+ _fix_executables "${install_dir}/app/apm/node_modules/.bin"
+ _fix_executables "${install_dir}/app/apm/node_modules/npm/bin"
+ _fix_executables "${install_dir}/app/apm/node_modules/npm/bin/node-gyp-bin"
+ _fix_executables "${install_dir}/app/apm/node_modules/node-gyp/bin"
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}
+
+# Helpers
+# -------
+
+# Return the installation suffix appropriate for the slot.
+get_install_suffix() {
+ local c=(${SLOT//\// })
+ local slot=${c[0]}
+ local suffix
+
+ if [[ "${slot}" == "0" ]]; then
+ suffix=""
+ else
+ suffix="-${slot}"
+ fi
+
+ echo -n "${suffix}"
+}
+
+# Return the upstream app name appropriate for $PV.
+get_atom_appname() {
+ if [[ "${PV}" == *beta* ]]; then
+ echo -n "atom-beta"
+ else
+ echo -n "atom"
+ fi
+}
+
+# Return the app installation path inside the upstream archive.
+get_atom_rpmdir() {
+ echo -n "usr/share/$(get_atom_appname)"
+}
+
+# Return the installation target directory.
+get_install_dir() {
+ echo -n "/usr/$(get_libdir)/atom$(get_install_suffix)"
+}
+
+# Return the Electron installation directory.
+get_electron_dir() {
+ 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 "${EROOT%/}/usr/include/electron-${ELECTRON_SLOT}/node/"
+}
+
+# Run JavaScript using Electron's version of Node.
+enode_electron() {
+ "$(get_electron_dir)"/node $@
+}
+
+# Run node-gyp using Electron's version of Node.
+enodegyp_atom() {
+ local apmpath="$(get_atom_rpmdir)/resources/app/apm"
+ local nodegyp="${BIN_S}/${apmpath}/node_modules/node-gyp/bin/node-gyp.js"
+
+ PATH="$(get_electron_dir):${PATH}" \
+ enode_electron "${nodegyp}" \
+ --nodedir="$(get_electron_nodedir)" $@ || die
+}
+
+# Coffee Script wrapper.
+ecoffeescript() {
+ local cscript="${FILESDIR}/transpile-coffee-script.js"
+
+ # Disable shell glob expansion, as we want the coffee script
+ # transpiler to do that instead.
+ set -f
+ echo "ecoffeescript" $@
+ ATOM_HOME="${T}/.atom" ATOM_SRC_ROOT="${BUILD_DIR}/app" \
+ NODE_PATH="${BUILD_DIR}/app/node_modules" \
+ enode_electron "${cscript}" $@ || die
+ set +f
+}
+
+# asar wrapper.
+easar() {
+ local asar="${WORKDIR}/$(package_dir asar)/node_modules/asar/bin/asar"
+ echo "asar" $@
+ enode_electron "${asar}" $@ || die
+}
+
+# Return a $WORKDIR directory for a given package name.
+package_dir() {
+ local binmod="${1//-/_}"
+ local binmod_v="${binmod^^}_V"
+ echo -n ${1}-${!binmod_v}
+}
+
+# Check if there are patches for a given package.
+_have_patches_for() {
+ local _patches="${1}-*.patch" _find
+ _find=$(find "${FILESDIR}" -maxdepth 1 -name "${_patches}" -print -quit)
+ test -n "$_find"
+}
+
+# Tarballs on registry.npmjs.org are wildly inconsistent,
+# and violate the convention of having ${P} as the top directory name.
+# This helper detects and fixes that.
+_unpack() {
+ local a="${1}"
+ local b="${a%.tar.gz}"
+ local p="${b#atomdep-}"
+ local dir="$(tar -tzf "${DISTDIR}/${a}" | head -1 | cut -f1 -d'/')"
+
+ unpack "${a}"
+
+ if [[ "${dir}" != "${p}" ]]; then
+ # Set the correct name for the unpacked directory.
+ mv "${WORKDIR}/${dir}" "${WORKDIR}/${p}" || die
+ fi
+}
+
+# Check if the binary node module is actually a valid dependency.
+# Sometimes the upstream removes a dependency from package.json but
+# forgets to remove the module from node_modules.
+_is_valid_binmod() {
+ local mod
+
+ for mod in "${BINMODS[@]}"; do
+ if [[ "${mod}" == "${1}" ]]; then
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+# Replace binary node modules with the newly compiled versions thereof.
+_fix_binmods() {
+ local _dir="${2}"
+ local _prefix="${1}"
+ local path
+ local relpath
+ local modpath
+ local mod
+ local f
+ local d
+ local cruft
+
+ (find "${_prefix}/${_dir}" -name '*.node' -print || die) \
+ | 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})
+
+ _is_valid_binmod "${mod}" || continue
+
+ # must copy here as symlinks will cause the module loading to fail
+ cp -f "${BUILD_DIR}/modules/${mod}/${f}" "${path}" || die
+ cruft=$(find "${d}" -name '*.a' -print)
+ if [[ -n "${cruft}" ]]; then
+ rm ${cruft} || die
+ fi
+ done
+}
+
+# Fix script permissions and shebangs to point to the correct version
+# of Node.
+_fix_executables() {
+ local _dir="${1}"
+ local _node_sb="#!$(get_electron_dir)"/node
+
+ (find -L "${ED}/${_dir}" -maxdepth 1 -mindepth 1 -type f -print || die) \
+ | while IFS= read -r f; do
+ IFS= read -r shebang < "${f}"
+
+ if [[ ${shebang} == '#!'* ]]; then
+ fperms +x "${f#${ED}}"
+ if [[ "${shebang}" == "#!/usr/bin/env node" || "${shebang}" == "#!/usr/bin/node" ]]; then
+ einfo "Fixing node shebang in ${f#${ED}}"
+ sed --follow-symlinks -i \
+ -e "1s:${shebang}$:${_node_sb}:" "${f}" || die
+ fi
+ fi
+ done || die
+}