1 |
commit: 563cdd96855d2333f9628222431fe88d1bbbc1b1 |
2 |
Author: Elvis Pranskevichus <elvis <AT> magic <DOT> io> |
3 |
AuthorDate: Mon Oct 2 17:16:17 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 2 21:57:27 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=563cdd96 |
7 |
|
8 |
app-editors/atom: version bump to 1.20.1. |
9 |
|
10 |
Also, add 1.21.0-beta2 (masked) |
11 |
|
12 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
13 |
Closes: https://github.com/gentoo/gentoo/pull/5838 |
14 |
|
15 |
app-editors/atom/Manifest | 21 + |
16 |
app-editors/atom/atom-1.20.1.ebuild | 514 +++++++++++++++++++++ |
17 |
app-editors/atom/atom-1.21.0_beta2.ebuild | 511 ++++++++++++++++++++ |
18 |
app-editors/atom/files/apm-python.patch | 16 + |
19 |
app-editors/atom/files/atom-apm-path-r1.patch | 16 + |
20 |
.../atom/files/atom-fix-app-restart-r1.patch | 12 + |
21 |
app-editors/atom/files/atom-license-path-r1.patch | 11 + |
22 |
app-editors/atom/files/atom-marker-layer-r1.patch | 11 + |
23 |
.../atom/files/atom-unbundle-electron.patch | 18 +- |
24 |
app-editors/atom/files/gyp-unbundle.py | 32 +- |
25 |
app-editors/atom/files/transpile-coffee-script.js | 23 + |
26 |
profiles/package.mask | 4 + |
27 |
12 files changed, 1173 insertions(+), 16 deletions(-) |
28 |
|
29 |
diff --git a/app-editors/atom/Manifest b/app-editors/atom/Manifest |
30 |
index 2c97f608c5f..748a6857975 100644 |
31 |
--- a/app-editors/atom/Manifest |
32 |
+++ b/app-editors/atom/Manifest |
33 |
@@ -1,7 +1,12 @@ |
34 |
DIST asar-0.12.1.tar.gz 1016626 SHA256 731714f0036318fe0878b517391a01977954bb088d4dbc7dd98682ff1e03c0e7 SHA512 fc64be9b11215426d405f7acd7adf6c0eead3135b0012baf6d168a13c77675058a4e2c60682928ac014e4bef4538d452ad745d1e87dd315387997a19e04718a7 WHIRLPOOL d73b8bb459724bb3b011de312171519c1f1954a94ce1bb0a20eb9877c168baa82a15786d3ab420d5b3d32ce8a11333e85f844b43c21cbd56c3b019e73774388e |
35 |
+DIST asar-0.13.0.tar.gz 1622264 SHA256 f22b508d724c420e6aac3fa863cb03a6f668e841fd36486e6098fcce566415de SHA512 619b59e9576a185905b455b780630188ce32aed72b424c69967a7bf15236d1edf2f5d92f7dde972599679c88fe0a80f05295a3d82b2ae0944be08d332a659aee WHIRLPOOL 9d8fdb1f9c92eeb7d185583d2dcf9b2bf1b52a4feb158b4a676a16836c2402f80a80d133a24306ae4bf87216a345672e6a71a272bb30c0635fc46bf2bae1a7ad |
36 |
DIST atom-1.15.0.rpm 86561729 SHA256 935b444d9122f46d3ab490611476498c963de1232f9c732d9ad33f0e380a37be SHA512 e8f5ceaae020f9fbf8cb1ffbef0f64b7b5d23a0be20d063591e3ba3b9fd33c771a028aca9aa0ecad254e250342d40106dac85bf6bdeff4de64da0b57fe6de3ea WHIRLPOOL 4d4311654b8afaa4aa2d07611960d24775aeb825e97ea65e6f69d72790d4c160e8a371432346f1873a71b2e1bf4158f3eb5d35fc1fd882906765f3ea4328e526 |
37 |
DIST atom-1.16.0.rpm 90249819 SHA256 6305f149f7b85e498e56d92fe0927ca81fd4cce62153f266fcd8f39958a59e69 SHA512 e3e9096caf6d5ca802ad47e434a6e8a51c0ab25b967747621e2ea4eb440d5401df3b7cd3d101d6d5a1f2f12fa77525e7e54e252438ff24ec9b651601bb7f4d97 WHIRLPOOL b294fa728388a2b10000a85c02d7548e077e34c5db83ddea1d2b5d6bdebd4c72db906ccc856fd766e3f2f3900ad5f02de3c4bd22e273683c92e4f0dd027fa6f3 |
38 |
DIST atom-1.18.0.rpm 128551353 SHA256 08609b26776ee12effd47ff87a2eb44f7ba9000a0e28b8022ca0bace0216e8d8 SHA512 c30df4b3c10e2e886c349a8c255ea6e9e308b38811f02b2517ba464959a873d159b5fa4fe89d68ed50500038b92219cb061d9dee0917b0b807e086cceec2803b WHIRLPOOL 3a1607be3155ac614b403df94f8974a675a646e777e4cc7ce351b975e17a9e6708676f8c6772d35f90f9240757a0fbeb1e1fa1a304c3f08728041440e59b7192 |
39 |
+DIST atom-1.20.1.tar.gz 9358859 SHA256 0577ff9df069f8c290fb73b387ea88f8af1fae8b4a40c5ad7cf97af824584b11 SHA512 a7f9edcfc84b81d768a92af5967a6889f85155c46a623b33e51999706e22f411ce570f42777fb3015174611ef19a956d8ed336ab1172612b27d75de8ef9c96fa WHIRLPOOL 467169cd0e26d9738f25e974ac188b00e80d1bc5c525d17b1b0c221bf5826c2258267fd1723ff26fb827f6f9f268a34b6d25f6278adbd2bd628dd5dad03296a1 |
40 |
+DIST atom-1.21.0-beta2.tar.gz 9378306 SHA256 9ff06ad890b85b68d85ae9b699d2b05ac3defc3130ff590fe0441efa9e3ac55f SHA512 9e5e75bca7dbbded19e7dac3444b4c3d86d24874d0d3b83692eaf66906e6c78ecf212c63718fcb92aa9c6ef28477042564e3dec1eb0e23398fb04272b79c0b5f WHIRLPOOL 6dc0411e46832ed21b7c42b9eda0e73c6424805b0bc2966716d7f42d218b549ab8ec5b6198747f0058c892bbb661512ee3cdd4f6fe185e27288b3f4a6531dd62 |
41 |
+DIST atom-bin-1.20.1.rpm 134506625 SHA256 20a0a1e398a1eace09f298231b7169bdb73c345c6ccb784a2929bc9df5996b17 SHA512 7bf8c4b092e0b45d56c5414d088633ae016b5564a7a97e1d706ad46743b6aad43a7268b7ade881680fa5f005eed0f46ba1523909a09cf3ec0aa51ce2335b8d92 WHIRLPOOL 263c888e9ba4c103a0fb859c210d1c49cc8a956dc50ae6dd6da0322c8e908b6741f6ff931f68f60800fce90fb5133494d7ffdb7455b74ea6cae6e32af022f0e9 |
42 |
+DIST atom-bin-1.21.0-beta2.rpm 131042161 SHA256 a70ef4e0198e424358029c265f776928b098e6a9005078cab8def44ddf5f0697 SHA512 af648caaada35475e57f151b9c658eaaeb14d9705d732f5b4a58357e21d6e1cd5efff5b34207403d46f257b693ded5894115d1e4948b9b2aad0cf2f4430ce3a4 WHIRLPOOL 6b6b9597f5da79c3249577ce4baea748a4c7c2b63bb0917d61329a5d94143918452fd8c0b2f3ba90363cabf69d7d9098a113e07662255bc73af8cb1e36c42242 |
43 |
DIST atom-cached-run-in-this-context-0.4.1.tar.gz 3855 SHA256 5487e7641d5031e652deeef8bebe2d3af4e4d2b89989dd8700bf14e33843ce89 SHA512 dca2a6c77bb94e704aa99b405ae017bf0c56ce536a7246a8feaf133722556d444fb684cd6b9b475abcd0b946a42073a9fc0d61f5141b564320ac023ab2fbf79d WHIRLPOOL 573d0f703989f31109854f0eb324d6b1364e93cd057c4cfe20409415dee3101964cacabc246d4df43124dad881d8fec8575c6bbb23ba98698e6c73cf3c5614d4 |
44 |
DIST atom-git-utils-4.1.2.tar.gz 36492 SHA256 fd627647742359946d3b8f88bc91dd4d68a047dcba5bfafbd690e1a20afeb908 SHA512 d1f0a5bbd6b059131ccf4ab92174d80caddbb254ea6d0676a5ce71d7dba55d60c86ed1c412862b9d104a5f6deb2671facad84841f9644afb9b37416b743e917a WHIRLPOOL 4ee4620b0208a30f848167fffce05c5999d38bf5a3e50567e6bcf295fdafc7861e870346cfeb28a61392e7a737e100f90ae1dbd25066469926e3148006e02937 |
45 |
DIST atom-git-utils-5.0.0.tar.gz 36545 SHA256 a79e4951de6ac0a81f2ea359f82c575f826a4409f91b90a11f75a85c7886bec9 SHA512 42fd7589ca56049b1ad5cf7f2df7e295fc8575f4eee8a562fa103541157bd487c1748e3d6c536237b260dcbb4b530619dfcc121ba84b6d2fbf6d684dc959f819 WHIRLPOOL 03ae2290fc1ef0863c643a1fd4f9d4c98bc9b2939fddf6fd366eea9122b9d5612f53ad7ea6eb57c020eb376fa623253082da4c26f67d8de1bb59189b64f9d60b |
46 |
@@ -21,4 +26,20 @@ DIST atom-nsfw-1.0.15.tar.gz 45222 SHA256 6dc20bcf6eafcd0d1c2293841d2f2da7216c45 |
47 |
DIST atom-scrollbar-style-3.2.0.tar.gz 4609 SHA256 ea0f8f00cac609537af0d10d228054371c58b5a74785bd52fbbd276af02911ef SHA512 fc3ddfe7582517df45d7258a5857ca05fbadb92417d68b0c77d1e89e54b3bdaef3a1624e29177ebe64a2a994e62e1d1f5cb438911e881124aeec359426fab1bc WHIRLPOOL f6e75aafa8946ccc16949bdffa33b2bf050f06434a3fedcf8e1abac8b6b2d31dd37fcc137a43274d4c55d5926349486fda157d3fb6948d97063aac33b99e6578 |
48 |
DIST atom-superstring-1.1.0.tar.gz 259961 SHA256 fcfc7f94bc3631fda8b08b2b91778f8a62e863b346a2f90b66f9af9f4f3f8cbb SHA512 880c97d696036065aeb4320dc71c88b49b22b04e6582c75310131e61d8067fdf3d26c901d7b22a2bfd2a2a2056f350ba9485b7e55410cdee9ef29f5a75a8af59 WHIRLPOOL 6f857ea91c8df678c592232816ec3c251355cb7af4f1f6dbf0f16c44aa1a978c66c0ce8225d176e7b253addb1e38795a3902a8dd302dd72db1f35e4c18cd3236 |
49 |
DIST atom-superstring-1.2.1.tar.gz 264386 SHA256 9d899c2dd497f25f9d629d4d8c4df9e1f7af21e8958a0e1458fc505b1c6ea8ca SHA512 8641f44defb9248c4fd91c4c7d5117322f83613386693ab51c3e77c9ad95ae383f69e662b6a870196504d7d99cd23527a822e989babdd95f42b6ddf517df7afc WHIRLPOOL 6a363569c737c2960140182cf7d5b77d551a2b463d096de4d32c64ee217dab733b30cb111521035bbb68bc510afa9532bc91af6037e4c9f11ae67672ed424deb |
50 |
+DIST atomdep-cached-run-in-this-context-0.4.1.tar.gz 2388 SHA256 2bff3d01e95c3458ab0d1f2b22a61c0f8c675a0ef05f4936f51545dbd9095345 SHA512 942db40139b0beda616a25628772e515ce92ceca3e9a5288b10920e68c35149c52677a975e6e30f278ec64f06ae341fa1fa00702b339b2fb8f7af1cf9685efe5 WHIRLPOOL e7f7c4fe6cb642afcee2c71926cd813304071b0feff71c06e227bfb143f18438a49062a39068b7551938d8ebd8977bcf93ef98d187ea12cbe4afcde503aa9b14 |
51 |
+DIST atomdep-ctags-3.0.0.tar.gz 12864 SHA256 873139ccaf0b58567e1e6a8d99e934f637cb7ac6287fcc873678bb170bfdaf0b SHA512 af1d3764cc3a6bb781a9a2357eeb8503886fc14481c3dbe4a899d3c672fea9325524aed3a4c1c87965bc4cce2fbae20b56b32690849afc1fcb751cd5462adbcc WHIRLPOOL f00065a1ae36a73ea92f3175780e672ebfba2d69d17b00605ea0140fb16d7c451dddc2df757504231a0fd3d59f2524a8f06a3f121d2a29190e11b01dd4c9cd28 |
52 |
+DIST atomdep-fs-admin-0.1.6.tar.gz 5539 SHA256 976e7ea028d2a1166596119d434302c046869a722edd6e9808421ad11a6b4916 SHA512 2474523d5441ad882000633a929bcdbc5771b859a80f16a69c15504ff240a59b558e2edb1ca6e12ce91ad58da935243f3950a16e664529c59da70b9912903ae7 WHIRLPOOL 429a5b8bd5b8ae36ab4431e21c165b097931e6fad2ef3c13192bde67725b38e28f017e847b6e1f1931a8a101c76c6e2885bd9f07d19e9145a3b0c1cfe5eab280 |
53 |
+DIST atomdep-git-utils-5.0.0.tar.gz 4147470 SHA256 66934cbc288859028a1ab19bbb88cdba01c74c8bfb4d06bfb14b967762db091a SHA512 ffb2ecf8eb89f7e4cbf51e5953d4e547c4ccf21985a6177cffd5f958433ac7c98d36070ffea82dae65b02bed53c49ba94fc12fb4823e1ef985a350726fe46424 WHIRLPOOL 3b5a4767288a39e20ed419639da555fcd429585cf6a987c9709c8859b158cba5d629ad0bd3839003a13f4c7b9f561c2b6d08926de35f5aa8c7a3767a46854267 |
54 |
+DIST atomdep-keyboard-layout-2.0.13.tar.gz 17881 SHA256 9ef323cb2c333861e7ce834448ed00519eecf06035c03b66208e85727fdffa92 SHA512 5b155cddb0484edb47a334b21183eccabe6b376290b97b4469732541f4231337b526b90bc37d321ff6dc367d481b1e3c6feb5d39dc9ba67abef8914b53615a66 WHIRLPOOL cb5db27b2bac5250a07b73039dd4ace956d53709c206b8a9510def9779b87aa131cc4f414d3eb8279fbcc97850e6da393e4e8618541c608f7f57b3e71ccd6c84 |
55 |
+DIST atomdep-keytar-4.0.4.tar.gz 6550 SHA256 65221a8a44c542befd718374e7fd3fce61dab5cfe13fc57cac0c770ce6ebefc1 SHA512 78544e3646ce0f772a9adae055e137034d4b0e83bb8b95647a4efe239bf4bdf863f05317f4b37b0d2ac89e6a6e0107abd0022ccd7abb4310a39fa1c07982b4d4 WHIRLPOOL 249020aef10bc5be6630efa440449350207ca9893102a37173e82c98ab6110d61063abaa92c046a3dfdf2c57cd2d389cfd473092fae036e21bb16426abdbe5a2 |
56 |
+DIST atomdep-nsfw-1.0.16.tar.gz 43214 SHA256 ec205c8796dfac3d884ee50f6c0a0d1c9f8a365fe08e2abc5e73191e4d938eed SHA512 0060d7fb5016454aaaf7df438d973b9a389a6e5f7a166c5d402cf8ef8bcda724501c3bfbd44e37e9e6c38d5f1decaeb48c571aad9145dec38ba0c94073b9702a WHIRLPOOL ff797a7371c79a6cf67b90d9cd0d91bfa0540058354d305d6f3a8c9d1aeb9cbbcaad36892ab63bc77d5b835e1da608f7652da8169f69382dd8490022006eb2ca |
57 |
+DIST atomdep-nslog-3.0.0.tar.gz 2270 SHA256 a972eaacf92c14e31ae7bfd24c9be5be9c71e693425305e0aa20121cd00d4e73 SHA512 6a0ce8970ae12fdefd0935916e5501bb89e366fb66b05fffade884f3adf4add4b135eb4f0f208684e28424fdb9858ee8193eb1f3db1f7eac3cb49bdb5d1a4bb1 WHIRLPOOL 0b3d1d40c0cfe892fd4b99f39fc8e308c92ef36eee16db8988782ff2b56b839c90910ada28997cadf5b9797305b408abed46b852eb4ddc6a26a1d38b15a0ff80 |
58 |
+DIST atomdep-oniguruma-6.2.1.tar.gz 586350 SHA256 ace3257ba94772982c8326156f2bda9e0def43185e150274b5b209e5e89f78ac SHA512 faa46dc4c1b8d7e75ab54512de9a823c5b958a7ccb43333375b33e16de47a464ea2a9ba9996596a8359d423a3e8c9d63cc92a5162b3f9d44b4485304073b41f1 WHIRLPOOL e0fdd3e1a9de2565b3bb5c8907e5c804907d0fcf7cdde67f13164178baaacf9e7a375eb8afe3c4113b91eecae3b88bab14f9ee68265acac9463a65678006c175 |
59 |
+DIST atomdep-pathwatcher-8.0.1.tar.gz 18357 SHA256 7da47cef336345ec37c9d22a8cf3cd516938e5bf512b95b25304e9c6edd184ac SHA512 34df8fecf456753f1977517018e5ff78b143f2d36e1417435bfcac2f9b9f8bd045a8080e7d0ad5d2930c63fa110c539911447863c46e757a4bb8f8c4f5bda999 WHIRLPOOL 4fe65035e0d594f3d0d2fae3cc7440a32382450ef09b294cbc5ed0421b1dfedef8101a2df0401553074457d24859404e6893fa5b160eb28051bb87229ce36db6 |
60 |
+DIST atomdep-runas-3.1.1.tar.gz 6197 SHA256 4322d505a2542c04b66da17d8342b08ae6d49173b5c221c8267ce8bb4b4453d2 SHA512 29b01d8a1bd05f7f0ad7cf4472f13d12ff27524d44fc0c2ffcf87c187633ccdd5a2d9ae6af2a771eb8e2432b6a957451ea6a6c68d15aa861c4a29affac711d79 WHIRLPOOL 01b83dd5f769d84e4ecacc0eb62acb9831f9b8fc396ad1e59a650faea1725a439e15c3c7bc73896097a9b0723654aa124bf99a121c50c6b5b2d5a012daa06636 |
61 |
+DIST atomdep-scrollbar-style-3.2.0.tar.gz 3498 SHA256 480ed4ff284fb3a1773d58975a18ac13ef4aa5c71a918acbae6542d078da0e90 SHA512 9f5fcc2bcb13cb81e95a52aa6db0c99ffd67c9cd48a9faf0223587359f4082c3e867cb384497dc6be3e8230b4cd035e910a7048d431e81a28dfded0bc572da18 WHIRLPOOL b39d66672bd5e038638c89ffbd8ee85cd663ebcdd2fc9ca55176ed7289fb7895e5adb384a435e716c5a9f54d5328b62532b14b0455adebff7f3f24f858d991bd |
62 |
+DIST atomdep-spellchecker-3.4.2.tar.gz 476093 SHA256 e35619e9e8efcaa63ed126e43467e0c127e65b24a822f3d4e1c4ff17f25d0eff SHA512 8ed6fa4251cd79de6e77004ea91a438080df7109ebbe2c92934366c34433388bc30c8b1ebc97a47aa2a9f3eb28ac5ba2ccf3a0de9d6f59b2d3125ff7ff2c06a4 WHIRLPOOL 967b1f542e76d73b72e01656cc71c90c76f32542642de7f3bb5c5e3f06422b32e17fc6aaa4b6c3b3d88abe722937d75e8a48c1503125770aa6bae6478c86ec05 |
63 |
+DIST atomdep-spellchecker-3.4.3.tar.gz 480739 SHA256 ad74c118c1cd5f209946801554e5ede1ffa5332c020e7e50eb4ab5245a403b4f SHA512 cef2aa6adf95772f0d38760adb9a805ad540bfb422647486ccd63db7afcca508eb821b6099d9913912dd1b0881f3b5ccc62d203f2ce6bc47859f36a76c781376 WHIRLPOOL 0f3441f6ef01900d14fd949a2b33f91ef19f0731dd08cbab1969c1adfc24594840698b0606e555a27dcf72fa3565a30aa65342f312c09d532be19bd4665476f4 |
64 |
+DIST atomdep-superstring-2.2.3.tar.gz 785373 SHA256 a2a78064a0272094b312fa74dc04521b2badf776eb7b114f691b05c484fc70f6 SHA512 edb71f4cc54436f563b6491f71e8c6c78aa711d1da821619031062e5e85fd60d66f0bcb6a70184b1fd55f31724d63ed9ba9c872d6d80387710262e404541a355 WHIRLPOOL 86b4cbcf1b4e169f7ee3c3999912ef34224ce52ae909a291ea86e73891b04904dcb7bdf5aa0e3889b3abb30bd40dfcf215ae8f86c05e09eb500aff6de56d9c5e |
65 |
DIST nodejs-nan-2.4.0.tar.gz 157071 SHA256 290b4cd678bb0770fcc0dfa8415f908db09173acfdde31135a4e31716c311883 SHA512 e6f3ab3f67c72b3cc9e6e6b9b5de0f73134ef504dedae5e68376198858a6796f00c35869438e0480f28006dd8f6be13dca3bcc436a1a6b28b1dea5cbc72f9e45 WHIRLPOOL 8628452c69c1774e02b8069ee8db12b7b97bc45166dd4dbec3e8d3f532c97f15a24920f2f59ecb3b8d4addcbada33eb04c1f71222531a7377bcbfaf7d4f3d86b |
66 |
+DIST nodejs-nan-2.6.2.tar.gz 161949 SHA256 c6b046499f6b2e2c09d6650849e429e226ad884c74dbb5ca8eacb1518d453e7f SHA512 d1b5ed12e90accfa117cb73b9432897631ed2dd6045f93fa8b53237a13cec0ec467b14c035e9e4d4a5c6588949c1c80b0eef48a46d5c9c0a1f81ef400da031c3 WHIRLPOOL 77d0dcf7b2f50007f76024235f2670d9154e8dc02be0dc71e99fb6da86b3e4d56b30271d3e3eb81b1a6715a1eb09d73ef8c2dedb4ac9adb51b8672de4c9cb5e2 |
67 |
|
68 |
diff --git a/app-editors/atom/atom-1.20.1.ebuild b/app-editors/atom/atom-1.20.1.ebuild |
69 |
new file mode 100644 |
70 |
index 00000000000..e3b34cfffb4 |
71 |
--- /dev/null |
72 |
+++ b/app-editors/atom/atom-1.20.1.ebuild |
73 |
@@ -0,0 +1,514 @@ |
74 |
+# Copyright 1999-2017 Gentoo Foundation |
75 |
+# Distributed under the terms of the GNU General Public License v2 |
76 |
+ |
77 |
+# NOTE: this ebuild has been generated by atom-ebuild-gen.py from the |
78 |
+# atom overlay. |
79 |
+ |
80 |
+EAPI=6 |
81 |
+ |
82 |
+PYTHON_COMPAT=( python2_7 ) |
83 |
+inherit python-single-r1 multiprocessing rpm virtualx |
84 |
+ |
85 |
+DESCRIPTION="A hackable text editor for the 21st Century" |
86 |
+HOMEPAGE="https://atom.io" |
87 |
+MY_PV="${PV//_/-}" |
88 |
+ |
89 |
+ELECTRON_V=1.6.9 |
90 |
+ELECTRON_SLOT=1.6 |
91 |
+ |
92 |
+ASAR_V=0.13.0 |
93 |
+# All binary packages depend on this |
94 |
+NAN_V=2.6.2 |
95 |
+ |
96 |
+CACHED_RUN_IN_THIS_CONTEXT_V=0.4.1 |
97 |
+CTAGS_V=3.0.0 |
98 |
+FS_ADMIN_V=0.1.6 |
99 |
+GIT_UTILS_V=5.0.0 |
100 |
+KEYBOARD_LAYOUT_V=2.0.13 |
101 |
+KEYTAR_V=4.0.4 |
102 |
+NSFW_V=1.0.16 |
103 |
+NSLOG_V=3.0.0 |
104 |
+ONIGURUMA_V=6.2.1 |
105 |
+PATHWATCHER_V=8.0.1 |
106 |
+RUNAS_V=3.1.1 |
107 |
+SCROLLBAR_STYLE_V=3.2.0 |
108 |
+SPELLCHECKER_V=3.4.2 |
109 |
+SUPERSTRING_V=2.2.3 |
110 |
+ |
111 |
+# The x86_64 arch below is irrelevant, as we will rebuild all binary packages. |
112 |
+SRC_URI=" |
113 |
+ https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/atom.x86_64.rpm -> atom-bin-${MY_PV}.rpm |
114 |
+ https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> atom-${MY_PV}.tar.gz |
115 |
+ https://github.com/elprans/asar/releases/download/v${ASAR_V}-gentoo/asar-build.tar.gz -> asar-${ASAR_V}.tar.gz |
116 |
+ https://github.com/nodejs/nan/archive/v${NAN_V}.tar.gz -> nodejs-nan-${NAN_V}.tar.gz |
117 |
+ 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 |
118 |
+ https://registry.npmjs.org/ctags/-/ctags-3.0.0.tgz -> atomdep-ctags-3.0.0.tar.gz |
119 |
+ https://registry.npmjs.org/fs-admin/-/fs-admin-0.1.6.tgz -> atomdep-fs-admin-0.1.6.tar.gz |
120 |
+ https://registry.npmjs.org/git-utils/-/git-utils-5.0.0.tgz -> atomdep-git-utils-5.0.0.tar.gz |
121 |
+ https://registry.npmjs.org/keyboard-layout/-/keyboard-layout-2.0.13.tgz -> atomdep-keyboard-layout-2.0.13.tar.gz |
122 |
+ https://registry.npmjs.org/keytar/-/keytar-4.0.4.tgz -> atomdep-keytar-4.0.4.tar.gz |
123 |
+ https://registry.npmjs.org/nsfw/-/nsfw-1.0.16.tgz -> atomdep-nsfw-1.0.16.tar.gz |
124 |
+ https://registry.npmjs.org/nslog/-/nslog-3.0.0.tgz -> atomdep-nslog-3.0.0.tar.gz |
125 |
+ https://registry.npmjs.org/oniguruma/-/oniguruma-6.2.1.tgz -> atomdep-oniguruma-6.2.1.tar.gz |
126 |
+ https://registry.npmjs.org/pathwatcher/-/pathwatcher-8.0.1.tgz -> atomdep-pathwatcher-8.0.1.tar.gz |
127 |
+ https://registry.npmjs.org/runas/-/runas-3.1.1.tgz -> atomdep-runas-3.1.1.tar.gz |
128 |
+ https://registry.npmjs.org/scrollbar-style/-/scrollbar-style-3.2.0.tgz -> atomdep-scrollbar-style-3.2.0.tar.gz |
129 |
+ https://registry.npmjs.org/spellchecker/-/spellchecker-3.4.2.tgz -> atomdep-spellchecker-3.4.2.tar.gz |
130 |
+ https://registry.npmjs.org/superstring/-/superstring-2.2.3.tgz -> atomdep-superstring-2.2.3.tar.gz |
131 |
+" |
132 |
+ |
133 |
+BINMODS=( |
134 |
+ cached-run-in-this-context |
135 |
+ ctags |
136 |
+ fs-admin |
137 |
+ git-utils |
138 |
+ keyboard-layout |
139 |
+ keytar |
140 |
+ nsfw |
141 |
+ nslog |
142 |
+ oniguruma |
143 |
+ pathwatcher |
144 |
+ runas |
145 |
+ scrollbar-style |
146 |
+ spellchecker |
147 |
+ superstring |
148 |
+) |
149 |
+ |
150 |
+LICENSE="MIT" |
151 |
+SLOT="0" |
152 |
+KEYWORDS="~amd64" |
153 |
+IUSE="" |
154 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
155 |
+ |
156 |
+DEPEND=" |
157 |
+ ${PYTHON_DEPS} |
158 |
+ >=app-text/hunspell-1.3.3:= |
159 |
+ >=dev-libs/libgit2-0.23:=[ssh] |
160 |
+ >=dev-libs/libpcre2-10.22:=[jit,pcre16] |
161 |
+ >=gnome-base/libgnome-keyring-3.12:= |
162 |
+ >=dev-libs/oniguruma-5.9.5:= |
163 |
+ >=dev-util/ctags-5.8 |
164 |
+ >=dev-util/electron-${ELECTRON_V}:${ELECTRON_SLOT} |
165 |
+ x11-libs/libxkbfile" |
166 |
+RDEPEND=" |
167 |
+ ${DEPEND} |
168 |
+ !sys-apps/apmd |
169 |
+" |
170 |
+ |
171 |
+S="${WORKDIR}/${PN}-${MY_PV}" |
172 |
+BIN_S="${WORKDIR}/${PN}-bin-${MY_PV}" |
173 |
+BUILD_DIR="${S}/out" |
174 |
+ |
175 |
+pkg_setup() { |
176 |
+ python-single-r1_pkg_setup |
177 |
+} |
178 |
+ |
179 |
+src_unpack() { |
180 |
+ local a |
181 |
+ |
182 |
+ for a in ${A} ; do |
183 |
+ case ${a} in |
184 |
+ *.rpm) srcrpm_unpack "${a}" ;; |
185 |
+ *) _unpack "${a}" ;; |
186 |
+ esac |
187 |
+ done |
188 |
+ |
189 |
+ mkdir "${BIN_S}" || die |
190 |
+ mv "${WORKDIR}/usr" "${BIN_S}" || die |
191 |
+} |
192 |
+ |
193 |
+src_prepare() { |
194 |
+ local install_dir="$(get_install_dir)" |
195 |
+ local suffix="$(get_install_suffix)" |
196 |
+ local nan_s="${WORKDIR}/nodejs-nan-${NAN_V}" |
197 |
+ local patch |
198 |
+ local binmod |
199 |
+ local _s |
200 |
+ |
201 |
+ mkdir "${BUILD_DIR}" || die |
202 |
+ cp -a "${BIN_S}/$(get_atom_rpmdir)/resources/app" \ |
203 |
+ "${BUILD_DIR}/app" || die |
204 |
+ |
205 |
+ # Add source files omitted from the upstream binary distribution, |
206 |
+ # and which we want to include in ours. |
207 |
+ cp -a -t "${BUILD_DIR}/app" "${S}/spec" || die |
208 |
+ |
209 |
+ # Unpack app.asar |
210 |
+ if [ -e "${BIN_S}/$(get_atom_rpmdir)/resources/app.asar" ]; then |
211 |
+ easar extract "${BIN_S}/$(get_atom_rpmdir)/resources/app.asar" \ |
212 |
+ "${BUILD_DIR}/app" |
213 |
+ fi |
214 |
+ |
215 |
+ cd "${BUILD_DIR}/app" || die |
216 |
+ |
217 |
+ eapply "${FILESDIR}/atom-python.patch" |
218 |
+ eapply "${FILESDIR}/apm-python.patch" |
219 |
+ eapply "${FILESDIR}/atom-unbundle-electron.patch" |
220 |
+ eapply "${FILESDIR}/atom-apm-path-r1.patch" |
221 |
+ eapply "${FILESDIR}/atom-license-path-r1.patch" |
222 |
+ eapply "${FILESDIR}/atom-fix-app-restart-r1.patch" |
223 |
+ eapply "${FILESDIR}/atom-marker-layer-r1.patch" |
224 |
+ |
225 |
+ sed -i -e "s|{{NPM_CONFIG_NODEDIR}}|$(get_electron_nodedir)|g" \ |
226 |
+ ./atom.sh \ |
227 |
+ || die |
228 |
+ |
229 |
+ sed -i -e "s|{{ATOM_PATH}}|$(get_electron_dir)/electron|g" \ |
230 |
+ ./atom.sh \ |
231 |
+ || die |
232 |
+ |
233 |
+ sed -i -e "s|{{ATOM_RESOURCE_PATH}}|${install_dir}/app.asar|g" \ |
234 |
+ ./atom.sh \ |
235 |
+ || die |
236 |
+ |
237 |
+ local env="export NPM_CONFIG_NODEDIR=$(get_electron_nodedir)\n\ |
238 |
+ export ELECTRON_NO_ASAR=1" |
239 |
+ sed -i -e \ |
240 |
+ "s|\"\$binDir/\$nodeBin\"|${env}\nexec $(get_electron_dir)/node|g" \ |
241 |
+ apm/bin/apm || die |
242 |
+ |
243 |
+ sed -i -e \ |
244 |
+ "s|^\([[:space:]]*\)node[[:space:]]\+|\1\"$(get_electron_dir)/node\" |g" \ |
245 |
+ apm/node_modules/npm/bin/node-gyp-bin/node-gyp || die |
246 |
+ |
247 |
+ sed -i -e \ |
248 |
+ "s|atomCommand = 'atom';|atomCommand = '/usr/bin/atom${suffix}'|g" \ |
249 |
+ apm/lib/test.js || die |
250 |
+ |
251 |
+ rm apm/bin/node || die |
252 |
+ |
253 |
+ sed -i -e "s|/$(get_atom_rpmdir)/atom|/usr/bin/atom${suffix}|g" \ |
254 |
+ "${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" || die |
255 |
+ |
256 |
+ for binmod in ${BINMODS[@]}; do |
257 |
+ _s="${WORKDIR}/$(package_dir ${binmod})" |
258 |
+ cd "${_s}" || die |
259 |
+ if _have_patches_for "${binmod}"; then |
260 |
+ for patch in "${FILESDIR}"/${binmod}-*.patch; do |
261 |
+ eapply "${patch}" |
262 |
+ done |
263 |
+ fi |
264 |
+ done |
265 |
+ |
266 |
+ cd "${BUILD_DIR}/app" || die |
267 |
+ |
268 |
+ # Unbundle bundled libs from modules |
269 |
+ |
270 |
+ _s="${WORKDIR}/$(package_dir git-utils)" |
271 |
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
272 |
+ --inplace --unbundle "git;libgit2;git2" \ |
273 |
+ "${_s}/binding.gyp" || die |
274 |
+ |
275 |
+ _s="${WORKDIR}/$(package_dir oniguruma)" |
276 |
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
277 |
+ --inplace --unbundle "onig_scanner;oniguruma;onig" \ |
278 |
+ "${_s}/binding.gyp" || die |
279 |
+ |
280 |
+ _s="${WORKDIR}/$(package_dir spellchecker)" |
281 |
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
282 |
+ --inplace --unbundle "spellchecker;hunspell;hunspell" \ |
283 |
+ "${_s}/binding.gyp" || die |
284 |
+ |
285 |
+ _s="${WORKDIR}/$(package_dir superstring)" |
286 |
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
287 |
+ --inplace --unbundle \ |
288 |
+ "superstring_core;./vendor/pcre/pcre.gyp:pcre;pcre2-16; \ |
289 |
+ -DPCRE2_CODE_UNIT_WIDTH=16" \ |
290 |
+ "${_s}/binding.gyp" || die |
291 |
+ |
292 |
+ for binmod in ${BINMODS[@]}; do |
293 |
+ _s="${WORKDIR}/$(package_dir ${binmod})" |
294 |
+ mkdir -p "${_s}/node_modules" || die |
295 |
+ ln -s "${nan_s}" "${_s}/node_modules/nan" || die |
296 |
+ done |
297 |
+ |
298 |
+ sed -i -e "s|{{ATOM_SUFFIX}}|${suffix}|g" \ |
299 |
+ "${BUILD_DIR}/app/src/config-schema.js" || die |
300 |
+ |
301 |
+ eapply_user |
302 |
+} |
303 |
+ |
304 |
+src_configure() { |
305 |
+ local binmod |
306 |
+ |
307 |
+ for binmod in ${BINMODS[@]}; do |
308 |
+ einfo "Configuring ${binmod}..." |
309 |
+ cd "${WORKDIR}/$(package_dir ${binmod})" || die |
310 |
+ enodegyp_atom configure |
311 |
+ done |
312 |
+} |
313 |
+ |
314 |
+src_compile() { |
315 |
+ local binmod |
316 |
+ local x |
317 |
+ local ctags_d="node_modules/symbols-view/vendor" |
318 |
+ local jobs=$(makeopts_jobs) |
319 |
+ local gypopts |
320 |
+ |
321 |
+ # Transpile any yet untranspiled files. |
322 |
+ ecoffeescript "${BUILD_DIR}/app/spec/*.coffee" |
323 |
+ |
324 |
+ gypopts="--verbose" |
325 |
+ |
326 |
+ if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then |
327 |
+ gypopts+=" --jobs ${jobs}" |
328 |
+ fi |
329 |
+ |
330 |
+ mkdir -p "${BUILD_DIR}/modules/" || die |
331 |
+ |
332 |
+ for binmod in ${BINMODS[@]}; do |
333 |
+ einfo "Building ${binmod}..." |
334 |
+ cd "${WORKDIR}/$(package_dir ${binmod})" || die |
335 |
+ enodegyp_atom ${gypopts} build |
336 |
+ x=${binmod##node-} |
337 |
+ mkdir -p "${BUILD_DIR}/modules/${x}" || die |
338 |
+ cp build/Release/*.node "${BUILD_DIR}/modules/${x}" || die |
339 |
+ done |
340 |
+ |
341 |
+ # Put compiled binary modules in place |
342 |
+ _fix_binmods "${BUILD_DIR}/app" "apm" |
343 |
+ _fix_binmods "${BUILD_DIR}/app" "node_modules" |
344 |
+ |
345 |
+ # Remove non-Linux vendored ctags binaries |
346 |
+ rm "${BUILD_DIR}/app/${ctags_d}/ctags-darwin" \ |
347 |
+ "${BUILD_DIR}/app/${ctags_d}/ctags-win32.exe" || die |
348 |
+ |
349 |
+ # Re-pack app.asar |
350 |
+ # Keep unpack rules in sync with build/tasks/generate-asar-task.coffee |
351 |
+ cd "${BUILD_DIR}" || die |
352 |
+ x="--unpack={*.node,ctags-config,ctags-linux,**/spec/fixtures/**,**/node_modules/spellchecker/**,**/resources/atom.png}" |
353 |
+ xd="--unpack-dir=apm" |
354 |
+ easar pack "${x}" "${xd}" "app" "app.asar" |
355 |
+ |
356 |
+ rm -r "${BUILD_DIR}/app.asar.unpacked/apm" || die |
357 |
+ |
358 |
+ # Replace vendored ctags with a symlink to system ctags |
359 |
+ rm "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die |
360 |
+ ln -s "/usr/bin/ctags" \ |
361 |
+ "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die |
362 |
+} |
363 |
+ |
364 |
+src_test() { |
365 |
+ local electron="$(get_electron_dir)/electron" |
366 |
+ local app="${BUILD_DIR}/app.asar" |
367 |
+ |
368 |
+ virtx "${electron}" --app="${app}" --test "${app}/spec" |
369 |
+} |
370 |
+ |
371 |
+src_install() { |
372 |
+ local install_dir="$(get_install_dir)" |
373 |
+ local suffix="$(get_install_suffix)" |
374 |
+ |
375 |
+ insinto "${install_dir}" |
376 |
+ |
377 |
+ doins "${BUILD_DIR}/app.asar" |
378 |
+ doins -r "${BUILD_DIR}/app.asar.unpacked" |
379 |
+ |
380 |
+ insinto "${install_dir}/app" |
381 |
+ doins -r "${BUILD_DIR}/app/apm" |
382 |
+ |
383 |
+ insinto "/usr/share/applications/" |
384 |
+ newins "${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" \ |
385 |
+ "atom${suffix}.desktop" |
386 |
+ |
387 |
+ insinto "/usr/share/icons/" |
388 |
+ doins -r "${BIN_S}/usr/share/icons/hicolor" |
389 |
+ |
390 |
+ exeinto "${install_dir}" |
391 |
+ newexe "${BUILD_DIR}/app/atom.sh" atom |
392 |
+ insinto "/usr/share/licenses/${PN}${suffix}" |
393 |
+ doins "${BIN_S}/$(get_atom_rpmdir)/resources/LICENSE.md" |
394 |
+ dosym "${install_dir}/atom" "/usr/bin/atom${suffix}" |
395 |
+ dosym "${install_dir}/app/apm/bin/apm" "/usr/bin/apm${suffix}" |
396 |
+ |
397 |
+ _fix_executables "${install_dir}/app/apm/bin" |
398 |
+ _fix_executables "${install_dir}/app/apm/node_modules/.bin" |
399 |
+ _fix_executables "${install_dir}/app/apm/node_modules/npm/bin" |
400 |
+ _fix_executables "${install_dir}/app/apm/node_modules/npm/bin/node-gyp-bin" |
401 |
+ _fix_executables "${install_dir}/app/apm/node_modules/node-gyp/bin" |
402 |
+} |
403 |
+ |
404 |
+# Helpers |
405 |
+# ------- |
406 |
+ |
407 |
+# Return the installation suffix appropriate for the slot. |
408 |
+get_install_suffix() { |
409 |
+ local c=(${SLOT//\// }) |
410 |
+ local slot=${c[0]} |
411 |
+ local suffix |
412 |
+ |
413 |
+ if [[ "${slot}" == "0" ]]; then |
414 |
+ suffix="" |
415 |
+ else |
416 |
+ suffix="-${slot}" |
417 |
+ fi |
418 |
+ |
419 |
+ echo -n "${suffix}" |
420 |
+} |
421 |
+ |
422 |
+# Return the upstream app name appropriate for $PV. |
423 |
+get_atom_appname() { |
424 |
+ if [[ "${PV}" == *beta* ]]; then |
425 |
+ echo -n "atom-beta" |
426 |
+ else |
427 |
+ echo -n "atom" |
428 |
+ fi |
429 |
+} |
430 |
+ |
431 |
+# Return the app installation path inside the upstream archive. |
432 |
+get_atom_rpmdir() { |
433 |
+ echo -n "usr/share/$(get_atom_appname)" |
434 |
+} |
435 |
+ |
436 |
+# Return the installation target directory. |
437 |
+get_install_dir() { |
438 |
+ echo -n "/usr/$(get_libdir)/atom$(get_install_suffix)" |
439 |
+} |
440 |
+ |
441 |
+# Return the Electron installation directory. |
442 |
+get_electron_dir() { |
443 |
+ echo -n "/usr/$(get_libdir)/electron-${ELECTRON_SLOT}" |
444 |
+} |
445 |
+ |
446 |
+# Return the directory containing appropriate Node headers |
447 |
+# for the required version of Electron. |
448 |
+get_electron_nodedir() { |
449 |
+ echo -n "/usr/include/electron-${ELECTRON_SLOT}/node/" |
450 |
+} |
451 |
+ |
452 |
+# Run JavaScript using Electron's version of Node. |
453 |
+enode_electron() { |
454 |
+ "$(get_electron_dir)"/node $@ |
455 |
+} |
456 |
+ |
457 |
+# Run node-gyp using Electron's version of Node. |
458 |
+enodegyp_atom() { |
459 |
+ local apmpath="$(get_atom_rpmdir)/resources/app/apm" |
460 |
+ local nodegyp="${BIN_S}/${apmpath}/node_modules/node-gyp/bin/node-gyp.js" |
461 |
+ |
462 |
+ PATH="$(get_electron_dir):${PATH}" \ |
463 |
+ enode_electron "${nodegyp}" \ |
464 |
+ --nodedir="$(get_electron_nodedir)" $@ || die |
465 |
+} |
466 |
+ |
467 |
+# Coffee Script wrapper. |
468 |
+ecoffeescript() { |
469 |
+ local cscript="${FILESDIR}/transpile-coffee-script.js" |
470 |
+ |
471 |
+ # Disable shell glob expansion, as we want the coffee script |
472 |
+ # transpiler to do that instead. |
473 |
+ set -f |
474 |
+ echo "ecoffeescript" $@ |
475 |
+ ATOM_HOME="${T}/.atom" ATOM_SRC_ROOT="${BUILD_DIR}/app" \ |
476 |
+ NODE_PATH="${BUILD_DIR}/app/node_modules" \ |
477 |
+ enode_electron "${cscript}" $@ || die |
478 |
+ set +f |
479 |
+} |
480 |
+ |
481 |
+# asar wrapper. |
482 |
+easar() { |
483 |
+ local asar="${WORKDIR}/$(package_dir asar)/node_modules/asar/bin/asar" |
484 |
+ echo "asar" $@ |
485 |
+ enode_electron "${asar}" $@ || die |
486 |
+} |
487 |
+ |
488 |
+# Return a $WORKDIR directory for a given package name. |
489 |
+package_dir() { |
490 |
+ local binmod="${1//-/_}" |
491 |
+ local binmod_v="${binmod^^}_V" |
492 |
+ echo -n ${1}-${!binmod_v} |
493 |
+} |
494 |
+ |
495 |
+# Check if there are patches for a given package. |
496 |
+_have_patches_for() { |
497 |
+ local _patches="${1}-*.patch" _find |
498 |
+ _find=$(find "${FILESDIR}" -maxdepth 1 -name "${_patches}" -print -quit) |
499 |
+ test -n "$_find" |
500 |
+} |
501 |
+ |
502 |
+# Tarballs on registry.npmjs.org are wildly inconsistent, |
503 |
+# and violate the convention of having ${P} as the top directory name. |
504 |
+# This helper detects and fixes that. |
505 |
+_unpack() { |
506 |
+ local a="${1}" |
507 |
+ local b="${a%.tar.gz}" |
508 |
+ local p="${b#atomdep-}" |
509 |
+ local dir="$(tar -tzf "${DISTDIR}/${a}" | head -1 | cut -f1 -d'/')" |
510 |
+ |
511 |
+ unpack "${a}" |
512 |
+ |
513 |
+ if [[ "${dir}" != "${p}" ]]; then |
514 |
+ # Set the correct name for the unpacked directory. |
515 |
+ mv "${WORKDIR}/${dir}" "${WORKDIR}/${p}" || die |
516 |
+ fi |
517 |
+} |
518 |
+ |
519 |
+# Check if the binary node module is actually a valid dependency. |
520 |
+# Sometimes the upstream removes a dependency from package.json but |
521 |
+# forgets to remove the module from node_modules. |
522 |
+_is_valid_binmod() { |
523 |
+ local mod |
524 |
+ |
525 |
+ for mod in "${BINMODS[@]}"; do |
526 |
+ if [[ "${mod}" == "${1}" ]]; then |
527 |
+ return 0 |
528 |
+ fi |
529 |
+ done |
530 |
+ |
531 |
+ return 1 |
532 |
+} |
533 |
+ |
534 |
+# Replace binary node modules with the newly compiled versions thereof. |
535 |
+_fix_binmods() { |
536 |
+ local _dir="${2}" |
537 |
+ local _prefix="${1}" |
538 |
+ local path |
539 |
+ local relpath |
540 |
+ local modpath |
541 |
+ local mod |
542 |
+ local f |
543 |
+ local d |
544 |
+ local cruft |
545 |
+ |
546 |
+ (find "${_prefix}/${_dir}" -name '*.node' -print || die) \ |
547 |
+ | while IFS= read -r path; do |
548 |
+ f=$(basename "${path}") |
549 |
+ d=$(dirname "${path}") |
550 |
+ relpath=${path#${_prefix}} |
551 |
+ relpath=${relpath##/} |
552 |
+ relpath=${relpath#W${_dir}} |
553 |
+ modpath=$(dirname ${relpath}) |
554 |
+ modpath=${modpath%build/Release} |
555 |
+ mod=$(basename ${modpath}) |
556 |
+ |
557 |
+ _is_valid_binmod "${mod}" || continue |
558 |
+ |
559 |
+ # must copy here as symlinks will cause the module loading to fail |
560 |
+ cp -f "${BUILD_DIR}/modules/${mod}/${f}" "${path}" || die |
561 |
+ cruft=$(find "${d}" -name '*.a' -print) |
562 |
+ if [[ -n "${cruft}" ]]; then |
563 |
+ rm ${cruft} || die |
564 |
+ fi |
565 |
+ done |
566 |
+} |
567 |
+ |
568 |
+# Fix script permissions and shebangs to point to the correct version |
569 |
+# of Node. |
570 |
+_fix_executables() { |
571 |
+ local _dir="${1}" |
572 |
+ local _node_sb="#!$(get_electron_dir)"/node |
573 |
+ |
574 |
+ (find -L "${ED}/${_dir}" -maxdepth 1 -mindepth 1 -type f -print || die) \ |
575 |
+ | while IFS= read -r f; do |
576 |
+ IFS= read -r shebang < "${f}" |
577 |
+ |
578 |
+ if [[ ${shebang} == '#!'* ]]; then |
579 |
+ fperms +x "${f#${ED}}" |
580 |
+ if [[ "${shebang}" == "#!/usr/bin/env node" || "${shebang}" == "#!/usr/bin/node" ]]; then |
581 |
+ einfo "Fixing node shebang in ${f#${ED}}" |
582 |
+ sed --follow-symlinks -i \ |
583 |
+ -e "1s:${shebang}$:${_node_sb}:" "${f}" || die |
584 |
+ fi |
585 |
+ fi |
586 |
+ done || die |
587 |
+} |
588 |
|
589 |
diff --git a/app-editors/atom/atom-1.21.0_beta2.ebuild b/app-editors/atom/atom-1.21.0_beta2.ebuild |
590 |
new file mode 100644 |
591 |
index 00000000000..09fa0e8edcb |
592 |
--- /dev/null |
593 |
+++ b/app-editors/atom/atom-1.21.0_beta2.ebuild |
594 |
@@ -0,0 +1,511 @@ |
595 |
+# Copyright 1999-2017 Gentoo Foundation |
596 |
+# Distributed under the terms of the GNU General Public License v2 |
597 |
+ |
598 |
+# NOTE: this ebuild has been generated by atom-ebuild-gen.py from the |
599 |
+# atom overlay. |
600 |
+ |
601 |
+EAPI=6 |
602 |
+ |
603 |
+PYTHON_COMPAT=( python2_7 ) |
604 |
+inherit python-single-r1 multiprocessing rpm virtualx |
605 |
+ |
606 |
+DESCRIPTION="A hackable text editor for the 21st Century" |
607 |
+HOMEPAGE="https://atom.io" |
608 |
+MY_PV="${PV//_/-}" |
609 |
+ |
610 |
+ELECTRON_V=1.6.9 |
611 |
+ELECTRON_SLOT=1.6 |
612 |
+ |
613 |
+ASAR_V=0.13.0 |
614 |
+# All binary packages depend on this |
615 |
+NAN_V=2.6.2 |
616 |
+ |
617 |
+CACHED_RUN_IN_THIS_CONTEXT_V=0.4.1 |
618 |
+CTAGS_V=3.0.0 |
619 |
+FS_ADMIN_V=0.1.6 |
620 |
+GIT_UTILS_V=5.0.0 |
621 |
+KEYBOARD_LAYOUT_V=2.0.13 |
622 |
+KEYTAR_V=4.0.4 |
623 |
+NSFW_V=1.0.16 |
624 |
+NSLOG_V=3.0.0 |
625 |
+ONIGURUMA_V=6.2.1 |
626 |
+PATHWATCHER_V=8.0.1 |
627 |
+SCROLLBAR_STYLE_V=3.2.0 |
628 |
+SPELLCHECKER_V=3.4.3 |
629 |
+SUPERSTRING_V=2.2.3 |
630 |
+ |
631 |
+# The x86_64 arch below is irrelevant, as we will rebuild all binary packages. |
632 |
+SRC_URI=" |
633 |
+ https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/atom.x86_64.rpm -> atom-bin-${MY_PV}.rpm |
634 |
+ https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> atom-${MY_PV}.tar.gz |
635 |
+ https://github.com/elprans/asar/releases/download/v${ASAR_V}-gentoo/asar-build.tar.gz -> asar-${ASAR_V}.tar.gz |
636 |
+ https://github.com/nodejs/nan/archive/v${NAN_V}.tar.gz -> nodejs-nan-${NAN_V}.tar.gz |
637 |
+ 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 |
638 |
+ https://registry.npmjs.org/ctags/-/ctags-3.0.0.tgz -> atomdep-ctags-3.0.0.tar.gz |
639 |
+ https://registry.npmjs.org/fs-admin/-/fs-admin-0.1.6.tgz -> atomdep-fs-admin-0.1.6.tar.gz |
640 |
+ https://registry.npmjs.org/git-utils/-/git-utils-5.0.0.tgz -> atomdep-git-utils-5.0.0.tar.gz |
641 |
+ https://registry.npmjs.org/keyboard-layout/-/keyboard-layout-2.0.13.tgz -> atomdep-keyboard-layout-2.0.13.tar.gz |
642 |
+ https://registry.npmjs.org/keytar/-/keytar-4.0.4.tgz -> atomdep-keytar-4.0.4.tar.gz |
643 |
+ https://registry.npmjs.org/nsfw/-/nsfw-1.0.16.tgz -> atomdep-nsfw-1.0.16.tar.gz |
644 |
+ https://registry.npmjs.org/nslog/-/nslog-3.0.0.tgz -> atomdep-nslog-3.0.0.tar.gz |
645 |
+ https://registry.npmjs.org/oniguruma/-/oniguruma-6.2.1.tgz -> atomdep-oniguruma-6.2.1.tar.gz |
646 |
+ https://registry.npmjs.org/pathwatcher/-/pathwatcher-8.0.1.tgz -> atomdep-pathwatcher-8.0.1.tar.gz |
647 |
+ https://registry.npmjs.org/scrollbar-style/-/scrollbar-style-3.2.0.tgz -> atomdep-scrollbar-style-3.2.0.tar.gz |
648 |
+ https://registry.npmjs.org/spellchecker/-/spellchecker-3.4.3.tgz -> atomdep-spellchecker-3.4.3.tar.gz |
649 |
+ https://registry.npmjs.org/superstring/-/superstring-2.2.3.tgz -> atomdep-superstring-2.2.3.tar.gz |
650 |
+" |
651 |
+ |
652 |
+BINMODS=( |
653 |
+ cached-run-in-this-context |
654 |
+ ctags |
655 |
+ fs-admin |
656 |
+ git-utils |
657 |
+ keyboard-layout |
658 |
+ keytar |
659 |
+ nsfw |
660 |
+ nslog |
661 |
+ oniguruma |
662 |
+ pathwatcher |
663 |
+ scrollbar-style |
664 |
+ spellchecker |
665 |
+ superstring |
666 |
+) |
667 |
+ |
668 |
+LICENSE="MIT" |
669 |
+SLOT="beta" |
670 |
+KEYWORDS="~amd64" |
671 |
+IUSE="" |
672 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
673 |
+ |
674 |
+DEPEND=" |
675 |
+ ${PYTHON_DEPS} |
676 |
+ >=app-text/hunspell-1.3.3:= |
677 |
+ >=dev-libs/libgit2-0.23:=[ssh] |
678 |
+ >=dev-libs/libpcre2-10.22:=[jit,pcre16] |
679 |
+ >=gnome-base/libgnome-keyring-3.12:= |
680 |
+ >=dev-libs/oniguruma-5.9.5:= |
681 |
+ >=dev-util/ctags-5.8 |
682 |
+ >=dev-util/electron-${ELECTRON_V}:${ELECTRON_SLOT} |
683 |
+ x11-libs/libxkbfile" |
684 |
+RDEPEND=" |
685 |
+ ${DEPEND} |
686 |
+ !sys-apps/apmd |
687 |
+" |
688 |
+ |
689 |
+S="${WORKDIR}/${PN}-${MY_PV}" |
690 |
+BIN_S="${WORKDIR}/${PN}-bin-${MY_PV}" |
691 |
+BUILD_DIR="${S}/out" |
692 |
+ |
693 |
+pkg_setup() { |
694 |
+ python-single-r1_pkg_setup |
695 |
+} |
696 |
+ |
697 |
+src_unpack() { |
698 |
+ local a |
699 |
+ |
700 |
+ for a in ${A} ; do |
701 |
+ case ${a} in |
702 |
+ *.rpm) srcrpm_unpack "${a}" ;; |
703 |
+ *) _unpack "${a}" ;; |
704 |
+ esac |
705 |
+ done |
706 |
+ |
707 |
+ mkdir "${BIN_S}" || die |
708 |
+ mv "${WORKDIR}/usr" "${BIN_S}" || die |
709 |
+} |
710 |
+ |
711 |
+src_prepare() { |
712 |
+ local install_dir="$(get_install_dir)" |
713 |
+ local suffix="$(get_install_suffix)" |
714 |
+ local nan_s="${WORKDIR}/nodejs-nan-${NAN_V}" |
715 |
+ local patch |
716 |
+ local binmod |
717 |
+ local _s |
718 |
+ |
719 |
+ mkdir "${BUILD_DIR}" || die |
720 |
+ cp -a "${BIN_S}/$(get_atom_rpmdir)/resources/app" \ |
721 |
+ "${BUILD_DIR}/app" || die |
722 |
+ |
723 |
+ # Add source files omitted from the upstream binary distribution, |
724 |
+ # and which we want to include in ours. |
725 |
+ cp -a -t "${BUILD_DIR}/app" "${S}/spec" || die |
726 |
+ |
727 |
+ # Unpack app.asar |
728 |
+ if [ -e "${BIN_S}/$(get_atom_rpmdir)/resources/app.asar" ]; then |
729 |
+ easar extract "${BIN_S}/$(get_atom_rpmdir)/resources/app.asar" \ |
730 |
+ "${BUILD_DIR}/app" |
731 |
+ fi |
732 |
+ |
733 |
+ cd "${BUILD_DIR}/app" || die |
734 |
+ |
735 |
+ eapply "${FILESDIR}/atom-python.patch" |
736 |
+ eapply "${FILESDIR}/apm-python.patch" |
737 |
+ eapply "${FILESDIR}/atom-unbundle-electron.patch" |
738 |
+ eapply "${FILESDIR}/atom-apm-path-r1.patch" |
739 |
+ eapply "${FILESDIR}/atom-license-path-r1.patch" |
740 |
+ eapply "${FILESDIR}/atom-fix-app-restart-r1.patch" |
741 |
+ eapply "${FILESDIR}/atom-marker-layer-r1.patch" |
742 |
+ |
743 |
+ sed -i -e "s|{{NPM_CONFIG_NODEDIR}}|$(get_electron_nodedir)|g" \ |
744 |
+ ./atom.sh \ |
745 |
+ || die |
746 |
+ |
747 |
+ sed -i -e "s|{{ATOM_PATH}}|$(get_electron_dir)/electron|g" \ |
748 |
+ ./atom.sh \ |
749 |
+ || die |
750 |
+ |
751 |
+ sed -i -e "s|{{ATOM_RESOURCE_PATH}}|${install_dir}/app.asar|g" \ |
752 |
+ ./atom.sh \ |
753 |
+ || die |
754 |
+ |
755 |
+ local env="export NPM_CONFIG_NODEDIR=$(get_electron_nodedir)\n\ |
756 |
+ export ELECTRON_NO_ASAR=1" |
757 |
+ sed -i -e \ |
758 |
+ "s|\"\$binDir/\$nodeBin\"|${env}\nexec $(get_electron_dir)/node|g" \ |
759 |
+ apm/bin/apm || die |
760 |
+ |
761 |
+ sed -i -e \ |
762 |
+ "s|^\([[:space:]]*\)node[[:space:]]\+|\1\"$(get_electron_dir)/node\" |g" \ |
763 |
+ apm/node_modules/npm/bin/node-gyp-bin/node-gyp || die |
764 |
+ |
765 |
+ sed -i -e \ |
766 |
+ "s|atomCommand = 'atom';|atomCommand = '/usr/bin/atom${suffix}'|g" \ |
767 |
+ apm/lib/test.js || die |
768 |
+ |
769 |
+ rm apm/bin/node || die |
770 |
+ |
771 |
+ sed -i -e "s|/$(get_atom_rpmdir)/atom|/usr/bin/atom${suffix}|g" \ |
772 |
+ "${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" || die |
773 |
+ |
774 |
+ for binmod in ${BINMODS[@]}; do |
775 |
+ _s="${WORKDIR}/$(package_dir ${binmod})" |
776 |
+ cd "${_s}" || die |
777 |
+ if _have_patches_for "${binmod}"; then |
778 |
+ for patch in "${FILESDIR}"/${binmod}-*.patch; do |
779 |
+ eapply "${patch}" |
780 |
+ done |
781 |
+ fi |
782 |
+ done |
783 |
+ |
784 |
+ cd "${BUILD_DIR}/app" || die |
785 |
+ |
786 |
+ # Unbundle bundled libs from modules |
787 |
+ |
788 |
+ _s="${WORKDIR}/$(package_dir git-utils)" |
789 |
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
790 |
+ --inplace --unbundle "git;libgit2;git2" \ |
791 |
+ "${_s}/binding.gyp" || die |
792 |
+ |
793 |
+ _s="${WORKDIR}/$(package_dir oniguruma)" |
794 |
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
795 |
+ --inplace --unbundle "onig_scanner;oniguruma;onig" \ |
796 |
+ "${_s}/binding.gyp" || die |
797 |
+ |
798 |
+ _s="${WORKDIR}/$(package_dir spellchecker)" |
799 |
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
800 |
+ --inplace --unbundle "spellchecker;hunspell;hunspell" \ |
801 |
+ "${_s}/binding.gyp" || die |
802 |
+ |
803 |
+ _s="${WORKDIR}/$(package_dir superstring)" |
804 |
+ ${EPYTHON} "${FILESDIR}/gyp-unbundle.py" \ |
805 |
+ --inplace --unbundle \ |
806 |
+ "superstring_core;./vendor/pcre/pcre.gyp:pcre;pcre2-16; \ |
807 |
+ -DPCRE2_CODE_UNIT_WIDTH=16" \ |
808 |
+ "${_s}/binding.gyp" || die |
809 |
+ |
810 |
+ for binmod in ${BINMODS[@]}; do |
811 |
+ _s="${WORKDIR}/$(package_dir ${binmod})" |
812 |
+ mkdir -p "${_s}/node_modules" || die |
813 |
+ ln -s "${nan_s}" "${_s}/node_modules/nan" || die |
814 |
+ done |
815 |
+ |
816 |
+ sed -i -e "s|{{ATOM_SUFFIX}}|${suffix}|g" \ |
817 |
+ "${BUILD_DIR}/app/src/config-schema.js" || die |
818 |
+ |
819 |
+ eapply_user |
820 |
+} |
821 |
+ |
822 |
+src_configure() { |
823 |
+ local binmod |
824 |
+ |
825 |
+ for binmod in ${BINMODS[@]}; do |
826 |
+ einfo "Configuring ${binmod}..." |
827 |
+ cd "${WORKDIR}/$(package_dir ${binmod})" || die |
828 |
+ enodegyp_atom configure |
829 |
+ done |
830 |
+} |
831 |
+ |
832 |
+src_compile() { |
833 |
+ local binmod |
834 |
+ local x |
835 |
+ local ctags_d="node_modules/symbols-view/vendor" |
836 |
+ local jobs=$(makeopts_jobs) |
837 |
+ local gypopts |
838 |
+ |
839 |
+ # Transpile any yet untranspiled files. |
840 |
+ ecoffeescript "${BUILD_DIR}/app/spec/*.coffee" |
841 |
+ |
842 |
+ gypopts="--verbose" |
843 |
+ |
844 |
+ if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then |
845 |
+ gypopts+=" --jobs ${jobs}" |
846 |
+ fi |
847 |
+ |
848 |
+ mkdir -p "${BUILD_DIR}/modules/" || die |
849 |
+ |
850 |
+ for binmod in ${BINMODS[@]}; do |
851 |
+ einfo "Building ${binmod}..." |
852 |
+ cd "${WORKDIR}/$(package_dir ${binmod})" || die |
853 |
+ enodegyp_atom ${gypopts} build |
854 |
+ x=${binmod##node-} |
855 |
+ mkdir -p "${BUILD_DIR}/modules/${x}" || die |
856 |
+ cp build/Release/*.node "${BUILD_DIR}/modules/${x}" || die |
857 |
+ done |
858 |
+ |
859 |
+ # Put compiled binary modules in place |
860 |
+ _fix_binmods "${BUILD_DIR}/app" "apm" |
861 |
+ _fix_binmods "${BUILD_DIR}/app" "node_modules" |
862 |
+ |
863 |
+ # Remove non-Linux vendored ctags binaries |
864 |
+ rm "${BUILD_DIR}/app/${ctags_d}/ctags-darwin" \ |
865 |
+ "${BUILD_DIR}/app/${ctags_d}/ctags-win32.exe" || die |
866 |
+ |
867 |
+ # Re-pack app.asar |
868 |
+ # Keep unpack rules in sync with build/tasks/generate-asar-task.coffee |
869 |
+ cd "${BUILD_DIR}" || die |
870 |
+ x="--unpack={*.node,ctags-config,ctags-linux,**/spec/fixtures/**,**/node_modules/spellchecker/**,**/resources/atom.png}" |
871 |
+ xd="--unpack-dir=apm" |
872 |
+ easar pack "${x}" "${xd}" "app" "app.asar" |
873 |
+ |
874 |
+ rm -r "${BUILD_DIR}/app.asar.unpacked/apm" || die |
875 |
+ |
876 |
+ # Replace vendored ctags with a symlink to system ctags |
877 |
+ rm "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die |
878 |
+ ln -s "/usr/bin/ctags" \ |
879 |
+ "${BUILD_DIR}/app.asar.unpacked/${ctags_d}/ctags-linux" || die |
880 |
+} |
881 |
+ |
882 |
+src_test() { |
883 |
+ local electron="$(get_electron_dir)/electron" |
884 |
+ local app="${BUILD_DIR}/app.asar" |
885 |
+ |
886 |
+ virtx "${electron}" --app="${app}" --test "${app}/spec" |
887 |
+} |
888 |
+ |
889 |
+src_install() { |
890 |
+ local install_dir="$(get_install_dir)" |
891 |
+ local suffix="$(get_install_suffix)" |
892 |
+ |
893 |
+ insinto "${install_dir}" |
894 |
+ |
895 |
+ doins "${BUILD_DIR}/app.asar" |
896 |
+ doins -r "${BUILD_DIR}/app.asar.unpacked" |
897 |
+ |
898 |
+ insinto "${install_dir}/app" |
899 |
+ doins -r "${BUILD_DIR}/app/apm" |
900 |
+ |
901 |
+ insinto "/usr/share/applications/" |
902 |
+ newins "${BIN_S}/usr/share/applications/$(get_atom_appname).desktop" \ |
903 |
+ "atom${suffix}.desktop" |
904 |
+ |
905 |
+ insinto "/usr/share/icons/" |
906 |
+ doins -r "${BIN_S}/usr/share/icons/hicolor" |
907 |
+ |
908 |
+ exeinto "${install_dir}" |
909 |
+ newexe "${BUILD_DIR}/app/atom.sh" atom |
910 |
+ insinto "/usr/share/licenses/${PN}${suffix}" |
911 |
+ doins "${BIN_S}/$(get_atom_rpmdir)/resources/LICENSE.md" |
912 |
+ dosym "${install_dir}/atom" "/usr/bin/atom${suffix}" |
913 |
+ dosym "${install_dir}/app/apm/bin/apm" "/usr/bin/apm${suffix}" |
914 |
+ |
915 |
+ _fix_executables "${install_dir}/app/apm/bin" |
916 |
+ _fix_executables "${install_dir}/app/apm/node_modules/.bin" |
917 |
+ _fix_executables "${install_dir}/app/apm/node_modules/npm/bin" |
918 |
+ _fix_executables "${install_dir}/app/apm/node_modules/npm/bin/node-gyp-bin" |
919 |
+ _fix_executables "${install_dir}/app/apm/node_modules/node-gyp/bin" |
920 |
+} |
921 |
+ |
922 |
+# Helpers |
923 |
+# ------- |
924 |
+ |
925 |
+# Return the installation suffix appropriate for the slot. |
926 |
+get_install_suffix() { |
927 |
+ local c=(${SLOT//\// }) |
928 |
+ local slot=${c[0]} |
929 |
+ local suffix |
930 |
+ |
931 |
+ if [[ "${slot}" == "0" ]]; then |
932 |
+ suffix="" |
933 |
+ else |
934 |
+ suffix="-${slot}" |
935 |
+ fi |
936 |
+ |
937 |
+ echo -n "${suffix}" |
938 |
+} |
939 |
+ |
940 |
+# Return the upstream app name appropriate for $PV. |
941 |
+get_atom_appname() { |
942 |
+ if [[ "${PV}" == *beta* ]]; then |
943 |
+ echo -n "atom-beta" |
944 |
+ else |
945 |
+ echo -n "atom" |
946 |
+ fi |
947 |
+} |
948 |
+ |
949 |
+# Return the app installation path inside the upstream archive. |
950 |
+get_atom_rpmdir() { |
951 |
+ echo -n "usr/share/$(get_atom_appname)" |
952 |
+} |
953 |
+ |
954 |
+# Return the installation target directory. |
955 |
+get_install_dir() { |
956 |
+ echo -n "/usr/$(get_libdir)/atom$(get_install_suffix)" |
957 |
+} |
958 |
+ |
959 |
+# Return the Electron installation directory. |
960 |
+get_electron_dir() { |
961 |
+ echo -n "/usr/$(get_libdir)/electron-${ELECTRON_SLOT}" |
962 |
+} |
963 |
+ |
964 |
+# Return the directory containing appropriate Node headers |
965 |
+# for the required version of Electron. |
966 |
+get_electron_nodedir() { |
967 |
+ echo -n "/usr/include/electron-${ELECTRON_SLOT}/node/" |
968 |
+} |
969 |
+ |
970 |
+# Run JavaScript using Electron's version of Node. |
971 |
+enode_electron() { |
972 |
+ "$(get_electron_dir)"/node $@ |
973 |
+} |
974 |
+ |
975 |
+# Run node-gyp using Electron's version of Node. |
976 |
+enodegyp_atom() { |
977 |
+ local apmpath="$(get_atom_rpmdir)/resources/app/apm" |
978 |
+ local nodegyp="${BIN_S}/${apmpath}/node_modules/node-gyp/bin/node-gyp.js" |
979 |
+ |
980 |
+ PATH="$(get_electron_dir):${PATH}" \ |
981 |
+ enode_electron "${nodegyp}" \ |
982 |
+ --nodedir="$(get_electron_nodedir)" $@ || die |
983 |
+} |
984 |
+ |
985 |
+# Coffee Script wrapper. |
986 |
+ecoffeescript() { |
987 |
+ local cscript="${FILESDIR}/transpile-coffee-script.js" |
988 |
+ |
989 |
+ # Disable shell glob expansion, as we want the coffee script |
990 |
+ # transpiler to do that instead. |
991 |
+ set -f |
992 |
+ echo "ecoffeescript" $@ |
993 |
+ ATOM_HOME="${T}/.atom" ATOM_SRC_ROOT="${BUILD_DIR}/app" \ |
994 |
+ NODE_PATH="${BUILD_DIR}/app/node_modules" \ |
995 |
+ enode_electron "${cscript}" $@ || die |
996 |
+ set +f |
997 |
+} |
998 |
+ |
999 |
+# asar wrapper. |
1000 |
+easar() { |
1001 |
+ local asar="${WORKDIR}/$(package_dir asar)/node_modules/asar/bin/asar" |
1002 |
+ echo "asar" $@ |
1003 |
+ enode_electron "${asar}" $@ || die |
1004 |
+} |
1005 |
+ |
1006 |
+# Return a $WORKDIR directory for a given package name. |
1007 |
+package_dir() { |
1008 |
+ local binmod="${1//-/_}" |
1009 |
+ local binmod_v="${binmod^^}_V" |
1010 |
+ echo -n ${1}-${!binmod_v} |
1011 |
+} |
1012 |
+ |
1013 |
+# Check if there are patches for a given package. |
1014 |
+_have_patches_for() { |
1015 |
+ local _patches="${1}-*.patch" _find |
1016 |
+ _find=$(find "${FILESDIR}" -maxdepth 1 -name "${_patches}" -print -quit) |
1017 |
+ test -n "$_find" |
1018 |
+} |
1019 |
+ |
1020 |
+# Tarballs on registry.npmjs.org are wildly inconsistent, |
1021 |
+# and violate the convention of having ${P} as the top directory name. |
1022 |
+# This helper detects and fixes that. |
1023 |
+_unpack() { |
1024 |
+ local a="${1}" |
1025 |
+ local b="${a%.tar.gz}" |
1026 |
+ local p="${b#atomdep-}" |
1027 |
+ local dir="$(tar -tzf "${DISTDIR}/${a}" | head -1 | cut -f1 -d'/')" |
1028 |
+ |
1029 |
+ unpack "${a}" |
1030 |
+ |
1031 |
+ if [[ "${dir}" != "${p}" ]]; then |
1032 |
+ # Set the correct name for the unpacked directory. |
1033 |
+ mv "${WORKDIR}/${dir}" "${WORKDIR}/${p}" || die |
1034 |
+ fi |
1035 |
+} |
1036 |
+ |
1037 |
+# Check if the binary node module is actually a valid dependency. |
1038 |
+# Sometimes the upstream removes a dependency from package.json but |
1039 |
+# forgets to remove the module from node_modules. |
1040 |
+_is_valid_binmod() { |
1041 |
+ local mod |
1042 |
+ |
1043 |
+ for mod in "${BINMODS[@]}"; do |
1044 |
+ if [[ "${mod}" == "${1}" ]]; then |
1045 |
+ return 0 |
1046 |
+ fi |
1047 |
+ done |
1048 |
+ |
1049 |
+ return 1 |
1050 |
+} |
1051 |
+ |
1052 |
+# Replace binary node modules with the newly compiled versions thereof. |
1053 |
+_fix_binmods() { |
1054 |
+ local _dir="${2}" |
1055 |
+ local _prefix="${1}" |
1056 |
+ local path |
1057 |
+ local relpath |
1058 |
+ local modpath |
1059 |
+ local mod |
1060 |
+ local f |
1061 |
+ local d |
1062 |
+ local cruft |
1063 |
+ |
1064 |
+ (find "${_prefix}/${_dir}" -name '*.node' -print || die) \ |
1065 |
+ | while IFS= read -r path; do |
1066 |
+ f=$(basename "${path}") |
1067 |
+ d=$(dirname "${path}") |
1068 |
+ relpath=${path#${_prefix}} |
1069 |
+ relpath=${relpath##/} |
1070 |
+ relpath=${relpath#W${_dir}} |
1071 |
+ modpath=$(dirname ${relpath}) |
1072 |
+ modpath=${modpath%build/Release} |
1073 |
+ mod=$(basename ${modpath}) |
1074 |
+ |
1075 |
+ _is_valid_binmod "${mod}" || continue |
1076 |
+ |
1077 |
+ # must copy here as symlinks will cause the module loading to fail |
1078 |
+ cp -f "${BUILD_DIR}/modules/${mod}/${f}" "${path}" || die |
1079 |
+ cruft=$(find "${d}" -name '*.a' -print) |
1080 |
+ if [[ -n "${cruft}" ]]; then |
1081 |
+ rm ${cruft} || die |
1082 |
+ fi |
1083 |
+ done |
1084 |
+} |
1085 |
+ |
1086 |
+# Fix script permissions and shebangs to point to the correct version |
1087 |
+# of Node. |
1088 |
+_fix_executables() { |
1089 |
+ local _dir="${1}" |
1090 |
+ local _node_sb="#!$(get_electron_dir)"/node |
1091 |
+ |
1092 |
+ (find -L "${ED}/${_dir}" -maxdepth 1 -mindepth 1 -type f -print || die) \ |
1093 |
+ | while IFS= read -r f; do |
1094 |
+ IFS= read -r shebang < "${f}" |
1095 |
+ |
1096 |
+ if [[ ${shebang} == '#!'* ]]; then |
1097 |
+ fperms +x "${f#${ED}}" |
1098 |
+ if [[ "${shebang}" == "#!/usr/bin/env node" || "${shebang}" == "#!/usr/bin/node" ]]; then |
1099 |
+ einfo "Fixing node shebang in ${f#${ED}}" |
1100 |
+ sed --follow-symlinks -i \ |
1101 |
+ -e "1s:${shebang}$:${_node_sb}:" "${f}" || die |
1102 |
+ fi |
1103 |
+ fi |
1104 |
+ done || die |
1105 |
+} |
1106 |
|
1107 |
diff --git a/app-editors/atom/files/apm-python.patch b/app-editors/atom/files/apm-python.patch |
1108 |
new file mode 100644 |
1109 |
index 00000000000..0467beaf10e |
1110 |
--- /dev/null |
1111 |
+++ b/app-editors/atom/files/apm-python.patch |
1112 |
@@ -0,0 +1,16 @@ |
1113 |
+diff --git a/apm/bin/python-interceptor.sh b/apm/bin/python-interceptor.sh |
1114 |
+index 7ce1965..12cc72f 100755 |
1115 |
+--- a/apm/bin/python-interceptor.sh |
1116 |
++++ b/apm/bin/python-interceptor.sh |
1117 |
+@@ -34,9 +34,9 @@ case $1 in |
1118 |
+ ARGS+=("--format=safemake.py") |
1119 |
+ fi |
1120 |
+ |
1121 |
+- exec python "${ARGS[@]}" |
1122 |
++ exec python2 "${ARGS[@]}" |
1123 |
+ ;; |
1124 |
+ *) |
1125 |
+- exec python "$@" |
1126 |
++ exec python2 "$@" |
1127 |
+ ;; |
1128 |
+ esac |
1129 |
|
1130 |
diff --git a/app-editors/atom/files/atom-apm-path-r1.patch b/app-editors/atom/files/atom-apm-path-r1.patch |
1131 |
new file mode 100644 |
1132 |
index 00000000000..c30987d8a30 |
1133 |
--- /dev/null |
1134 |
+++ b/app-editors/atom/files/atom-apm-path-r1.patch |
1135 |
@@ -0,0 +1,16 @@ |
1136 |
+diff --git a/src/config-schema.js b/src/config-schema.js |
1137 |
+index 39f0585..24ee2de 100644 |
1138 |
+--- a/src/config-schema.js |
1139 |
++++ b/src/config-schema.js |
1140 |
+@@ -5,6 +5,11 @@ const configSchema = { |
1141 |
+ core: { |
1142 |
+ type: 'object', |
1143 |
+ properties: { |
1144 |
++ apmPath: { |
1145 |
++ type: 'string', |
1146 |
++ "default": '/usr/bin/apm{{ATOM_SUFFIX}}', |
1147 |
++ description: 'Path to apm executable.' |
1148 |
++ }, |
1149 |
+ ignoredNames: { |
1150 |
+ type: 'array', |
1151 |
+ default: ['.git', '.hg', '.svn', '.DS_Store', '._*', 'Thumbs.db', 'desktop.ini'], |
1152 |
|
1153 |
diff --git a/app-editors/atom/files/atom-fix-app-restart-r1.patch b/app-editors/atom/files/atom-fix-app-restart-r1.patch |
1154 |
new file mode 100644 |
1155 |
index 00000000000..f984d7841be |
1156 |
--- /dev/null |
1157 |
+++ b/app-editors/atom/files/atom-fix-app-restart-r1.patch |
1158 |
@@ -0,0 +1,12 @@ |
1159 |
+diff --git a/atom-application.js.orig b/atom-application.js |
1160 |
+index 92d985f..9a120e6 100644 |
1161 |
+--- a/src/main-process/atom-application.js |
1162 |
++++ b/src/main-process/atom-application.js |
1163 |
+@@ -1178,6 +1178,7 @@ |
1164 |
+ AtomApplication.prototype.restart = function() { |
1165 |
+ var args; |
1166 |
+ args = []; |
1167 |
++ args.push("--app=" + this.resourcePath); |
1168 |
+ if (this.safeMode) { |
1169 |
+ args.push("--safe"); |
1170 |
+ } |
1171 |
|
1172 |
diff --git a/app-editors/atom/files/atom-license-path-r1.patch b/app-editors/atom/files/atom-license-path-r1.patch |
1173 |
new file mode 100644 |
1174 |
index 00000000000..c8d6ab9784f |
1175 |
--- /dev/null |
1176 |
+++ b/app-editors/atom/files/atom-license-path-r1.patch |
1177 |
@@ -0,0 +1,11 @@ |
1178 |
+--- a/src/main-process/atom-application.js |
1179 |
++++ b/src/main-process/atom-application.js |
1180 |
+@@ -406,7 +406,7 @@ |
1181 |
+ this.openPathOnEvent('application:open-your-keymap', 'atom://.atom/keymap'); |
1182 |
+ this.openPathOnEvent('application:open-your-snippets', 'atom://.atom/snippets'); |
1183 |
+ this.openPathOnEvent('application:open-your-stylesheet', 'atom://.atom/stylesheet'); |
1184 |
+- this.openPathOnEvent('application:open-license', path.join(process.resourcesPath, 'LICENSE.md')); |
1185 |
++ this.openPathOnEvent('application:open-license', '/usr/share/licenses/atom/LICENSE.md'); |
1186 |
+ this.disposable.add(ipcHelpers.on(app, 'before-quit', (function(_this) { |
1187 |
+ return function(event) { |
1188 |
+ if (!_this.quitting) { |
1189 |
|
1190 |
diff --git a/app-editors/atom/files/atom-marker-layer-r1.patch b/app-editors/atom/files/atom-marker-layer-r1.patch |
1191 |
new file mode 100644 |
1192 |
index 00000000000..1dcdecbd4eb |
1193 |
--- /dev/null |
1194 |
+++ b/app-editors/atom/files/atom-marker-layer-r1.patch |
1195 |
@@ -0,0 +1,11 @@ |
1196 |
+--- a/node_modules/text-buffer/lib/marker-layer.js |
1197 |
+--- b/node_modules/text-buffer/lib/marker-layer.js |
1198 |
+@@ -192,7 +192,7 @@ |
1199 |
+ return function(markerId) { |
1200 |
+ var marker; |
1201 |
+ marker = _this.markersById[markerId]; |
1202 |
+- if (!marker.matchesParams(params)) { |
1203 |
++ if (marker == null || !marker.matchesParams(params)) { |
1204 |
+ return; |
1205 |
+ } |
1206 |
+ return result.push(marker); |
1207 |
|
1208 |
diff --git a/app-editors/atom/files/atom-unbundle-electron.patch b/app-editors/atom/files/atom-unbundle-electron.patch |
1209 |
index f9c7351a6e4..296b17b0c15 100644 |
1210 |
--- a/app-editors/atom/files/atom-unbundle-electron.patch |
1211 |
+++ b/app-editors/atom/files/atom-unbundle-electron.patch |
1212 |
@@ -1,17 +1,17 @@ |
1213 |
-From 19f9a5c6f8be7b4df069f728d9ea037a36bc03d2 Mon Sep 17 00:00:00 2001 |
1214 |
+From ea6d1be3558d7610ccc82b3a44dd30657a686639 Mon Sep 17 00:00:00 2001 |
1215 |
From: Elvis Pranskevichus <elvis@×××××.io> |
1216 |
-Date: Thu, 5 May 2016 17:23:35 -0400 |
1217 |
+Date: Thu, 27 Jul 2017 13:18:54 -0400 |
1218 |
Subject: [PATCH] Unbundle electron |
1219 |
|
1220 |
--- |
1221 |
- atom.sh | 12 +++++------- |
1222 |
- 1 file changed, 5 insertions(+), 7 deletions(-) |
1223 |
+ atom.sh | 13 ++++++------- |
1224 |
+ 1 file changed, 6 insertions(+), 7 deletions(-) |
1225 |
|
1226 |
diff --git a/atom.sh b/atom.sh |
1227 |
-index b68716b..e119cbd 100755 |
1228 |
+index 6b0e94430..ea8e0dc2e 100755 |
1229 |
--- a/atom.sh |
1230 |
+++ b/atom.sh |
1231 |
-@@ -87,11 +87,9 @@ elif [ $OS == 'Linux' ]; then |
1232 |
+@@ -102,11 +102,10 @@ elif [ $OS == 'Linux' ]; then |
1233 |
SCRIPT=$(readlink -f "$0") |
1234 |
USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..) |
1235 |
|
1236 |
@@ -22,11 +22,12 @@ index b68716b..e119cbd 100755 |
1237 |
- fi |
1238 |
+ export NPM_CONFIG_NODEDIR="{{NPM_CONFIG_NODEDIR}}" |
1239 |
+ export ATOM_RESOURCE_PATH="{{ATOM_RESOURCE_PATH}}" |
1240 |
++ export LOCAL_GIT_DIRECTORY="/usr" |
1241 |
+ ATOM_PATH="{{ATOM_PATH}}" |
1242 |
|
1243 |
ATOM_HOME="${ATOM_HOME:-$HOME/.atom}" |
1244 |
mkdir -p "$ATOM_HOME" |
1245 |
-@@ -101,11 +99,11 @@ elif [ $OS == 'Linux' ]; then |
1246 |
+@@ -116,11 +115,11 @@ elif [ $OS == 'Linux' ]; then |
1247 |
[ -x "$ATOM_PATH" ] || ATOM_PATH="$TMPDIR/atom-build/Atom/atom" |
1248 |
|
1249 |
if [ $EXPECT_OUTPUT ]; then |
1250 |
@@ -41,5 +42,4 @@ index b68716b..e119cbd 100755 |
1251 |
cat "$ATOM_HOME/nohup.out" |
1252 |
exit $? |
1253 |
-- |
1254 |
-2.7.3 |
1255 |
- |
1256 |
+2.13.3 |
1257 |
|
1258 |
diff --git a/app-editors/atom/files/gyp-unbundle.py b/app-editors/atom/files/gyp-unbundle.py |
1259 |
index 9ab7bf77ea0..370221380b6 100644 |
1260 |
--- a/app-editors/atom/files/gyp-unbundle.py |
1261 |
+++ b/app-editors/atom/files/gyp-unbundle.py |
1262 |
@@ -4,6 +4,7 @@ from __future__ import print_function |
1263 |
|
1264 |
|
1265 |
import argparse |
1266 |
+import pprint |
1267 |
import sys |
1268 |
|
1269 |
|
1270 |
@@ -19,7 +20,7 @@ def do_unbundle(gypdata, targets): |
1271 |
def _unbundle_in_block(gypblock): |
1272 |
gypdeps = gypblock.get('dependencies') or {} |
1273 |
|
1274 |
- for dep, libs in unbundlings.items(): |
1275 |
+ for dep, (libs, defines) in unbundlings.items(): |
1276 |
if dep not in gypdeps: |
1277 |
continue |
1278 |
|
1279 |
@@ -37,6 +38,14 @@ def do_unbundle(gypdata, targets): |
1280 |
|
1281 |
gyplibs.extend('-l{}'.format(lib) for lib in libs) |
1282 |
|
1283 |
+ if defines: |
1284 |
+ try: |
1285 |
+ dd = gyptarget['defines'] |
1286 |
+ except KeyError: |
1287 |
+ dd = gyptarget['defines'] = [] |
1288 |
+ |
1289 |
+ dd.extend(defines) |
1290 |
+ |
1291 |
dropped_deps.add(dep) |
1292 |
|
1293 |
gypconds = gypblock.get('conditions') or [] |
1294 |
@@ -84,7 +93,8 @@ def main(): |
1295 |
parser.add_argument('gypfile', type=str, help='input gyp file') |
1296 |
parser.add_argument( |
1297 |
'--unbundle', type=str, action='append', |
1298 |
- help='unbundle rule in the format <target>;<dep>;<lib>[;lib]') |
1299 |
+ help='unbundle rule in the format ' |
1300 |
+ '<target>;<dep>;<lib>[;lib][;-DMACRO]') |
1301 |
parser.add_argument( |
1302 |
'-i', '--inplace', action='store_true', |
1303 |
help='modify gyp file in-place') |
1304 |
@@ -94,18 +104,26 @@ def main(): |
1305 |
targets = {} |
1306 |
|
1307 |
for unbundle in args.unbundle: |
1308 |
- rule = unbundle.split(';') |
1309 |
+ rule = list(filter(None, (i.strip() for i in unbundle.split(';')))) |
1310 |
if len(rule) < 3: |
1311 |
die('Invalid unbundle rule: {!r}'.format(unbundle)) |
1312 |
target, dep = rule[:2] |
1313 |
- libs = rule[2:] |
1314 |
+ |
1315 |
+ defines = [] |
1316 |
+ libs = [] |
1317 |
+ |
1318 |
+ for item in rule[2:]: |
1319 |
+ if item.startswith('-D'): |
1320 |
+ defines.append(item[2:]) |
1321 |
+ else: |
1322 |
+ libs.append(item) |
1323 |
|
1324 |
try: |
1325 |
target_unbundlings = targets[target] |
1326 |
except KeyError: |
1327 |
target_unbundlings = targets[target] = {} |
1328 |
|
1329 |
- target_unbundlings[dep] = libs |
1330 |
+ target_unbundlings[dep] = libs, defines |
1331 |
|
1332 |
with open(args.gypfile, 'rt') as f: |
1333 |
gypdata = eval(f.read()) |
1334 |
@@ -114,9 +132,9 @@ def main(): |
1335 |
|
1336 |
if args.inplace: |
1337 |
with open(args.gypfile, 'wt') as f: |
1338 |
- f.write(repr(gypdata) + "\n") |
1339 |
+ pprint.pprint(gypdata, stream=f) |
1340 |
else: |
1341 |
- print(repr(gypdata)) |
1342 |
+ pprint.pprint(gypdata) |
1343 |
|
1344 |
|
1345 |
if __name__ == '__main__': |
1346 |
|
1347 |
diff --git a/app-editors/atom/files/transpile-coffee-script.js b/app-editors/atom/files/transpile-coffee-script.js |
1348 |
new file mode 100644 |
1349 |
index 00000000000..c32e09cad92 |
1350 |
--- /dev/null |
1351 |
+++ b/app-editors/atom/files/transpile-coffee-script.js |
1352 |
@@ -0,0 +1,23 @@ |
1353 |
+'use strict' |
1354 |
+ |
1355 |
+const CompileCache = require(process.env.ATOM_SRC_ROOT + '/src/compile-cache') |
1356 |
+const fs = require('fs') |
1357 |
+const glob = require('glob') |
1358 |
+const path = require('path') |
1359 |
+ |
1360 |
+module.exports = function () { |
1361 |
+ let paths = new Set() |
1362 |
+ |
1363 |
+ for (let pattern of process.argv.slice(2)) { |
1364 |
+ for (let path of glob.sync(pattern, {nodir: true})) { |
1365 |
+ paths.add(path) |
1366 |
+ } |
1367 |
+ } |
1368 |
+ |
1369 |
+ for (let path of paths) { |
1370 |
+ let jsPath = coffeePath.replace(/coffee$/g, 'js') |
1371 |
+ fs.writeFileSync( |
1372 |
+ jsPath, CompileCache.addPathToCache(coffeePath, process.env.ATOM_HOME)) |
1373 |
+ fs.unlinkSync(coffeePath) |
1374 |
+ } |
1375 |
+} |
1376 |
|
1377 |
diff --git a/profiles/package.mask b/profiles/package.mask |
1378 |
index bbbcc070110..1f6f318b2e2 100644 |
1379 |
--- a/profiles/package.mask |
1380 |
+++ b/profiles/package.mask |
1381 |
@@ -29,6 +29,10 @@ |
1382 |
|
1383 |
#--- END OF EXAMPLES --- |
1384 |
|
1385 |
+# Patrice Clement <elvis@×××××.io> (01 Oct 2017) |
1386 |
+# Mask Atom betas for testing. |
1387 |
+app-editors/atom:beta |
1388 |
+ |
1389 |
# Michael Palimaka <kensington@g.o> (01 Oct 2017) |
1390 |
# Fails to build (bug #622632). Requires dead and vulnerable qtwebkit4 |
1391 |
# (bug #620710). Masked for removal in 30 days. |