1 |
commit: 713a24a45007e5594a1f1e4c36f562ea81078069 |
2 |
Author: Elvis Pranskevichus <elvis <AT> magic <DOT> io> |
3 |
AuthorDate: Fri Sep 28 20:57:40 2018 +0000 |
4 |
Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 23 13:20:10 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=713a24a4 |
7 |
|
8 |
dev-util/electron: Drop old versions |
9 |
|
10 |
These have security vulnerabilities and compilation issues. |
11 |
|
12 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
13 |
Signed-off-by: Elvis Pranskevichus <elvis <AT> magic.io> |
14 |
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org> |
15 |
|
16 |
dev-util/electron/Manifest | 5 - |
17 |
dev-util/electron/electron-1.6.16.ebuild | 881 ------------------------------ |
18 |
dev-util/electron/electron-1.7.15.ebuild | 888 ------------------------------- |
19 |
3 files changed, 1774 deletions(-) |
20 |
|
21 |
diff --git a/dev-util/electron/Manifest b/dev-util/electron/Manifest |
22 |
index bc631b2fed7..926697a20cb 100644 |
23 |
--- a/dev-util/electron/Manifest |
24 |
+++ b/dev-util/electron/Manifest |
25 |
@@ -3,9 +3,7 @@ DIST browserify-14.0.0.tar.gz 1847439 BLAKE2B 50d84f51d8640fa881751339e1d37f04d6 |
26 |
DIST chromium-56.0.2924.87.tar.xz 514429808 BLAKE2B 96e688230266f00917c6a6ebfaeb9b4e1cbe882a6bd907034a339d7a7b36fe97b451978898fb910938a36e47a9e25fb88117fe764dae759127d391e902533b47 SHA512 1c154004a9bca73e2491c73520a5f7d5c50c5b9d66e8e2660bf46585dd9b6ad3db706a9d824356f319794fa790bc3918ae6199843bcba717b9e74efbf26882c9 |
27 |
DIST chromium-58.0.3029.110.tar.xz 518167664 BLAKE2B dc9b4eee10236b892c82c6c12f649aed30454124496794485430e6119ee83e420564b2f2fbd21a3d1525cfb3de3524210c50770cbf74b2dbfdb18b35445a740a SHA512 412dc94e23d6699b959f23956f5f82f4c600050649a8a2e694bb2c6e166245e3670f4549ee1c08a0df05b4e361f040d1739515180b8631adbfac9c907af8d93f |
28 |
DIST chromium-61.0.3163.100.tar.xz 556305252 BLAKE2B 88b9dc05d626ec33c2044cd8bb5a5bd2e36c4ba5c231230b5b6529d62cc100874099d17633ca320a0c668b130797d6b222107d2efcd6f80b5b0b460d378f4454 SHA512 4dfd3a493ceb7c605eeab6f387541273d529e8b935a6104927e34836469aedcfcbb4a1154591585621d5c2e842e68701d32328acba842f840a20498822165f78 |
29 |
-DIST electron-1.6.16.tar.gz 4957555 BLAKE2B c72433ed076bc6b68b81b136db4dcf1a0fe17f16c7859e5176c215d86164f0c3d531310d8edbee9f52038722aa6dbc7934d9d9a5511bcb978bb9c255122f1794 SHA512 f657aae526defa8526948c89b8667475d1fb27f1884a1a4655773052cf3b3578483d3d51e35e6aa077579c3023056eec5d2a06f24a2c4013ca078fb82f850182 |
30 |
DIST electron-1.6.18.tar.gz 4965032 BLAKE2B ecb085a75717fb472740583dbd31634bd8b4be8365fdaf3334e558a8076577d3a973ba78c87136bdf42be14a8fcbe0b7816f49a1eccc162c62941485a2bb09fb SHA512 bd10d34e9a91350671a8c1af807fd01d7379bd7c9eca7c3f096349a5dbefaa78e063ee6a27fa5029a19daec0ca70fbe45f9964e27945a5f47ac83416540aacda |
31 |
-DIST electron-1.7.15.tar.gz 5172906 BLAKE2B 9b3785eed455cf2864572582a37cb7b107e96b207879c8975870383714bc1103073840409246392433af7c4edf2404d519d16ea4185cb1e6925b2ef6cf93a9aa SHA512 ade60d6810a85f9d92ff8213d2c38059f49dd8304220feb0759622390176d9a145b14b2df1b2541cb153ffff4c83d00001297c3d85de0530a1a75e0544e22fe2 |
32 |
DIST electron-1.7.16.tar.gz 5174554 BLAKE2B 421fde393533c4af26a046a3a1a6ef067306ac6990fe9b7f74436b00e939b85d07f39bb7b9f02547288105adfd069f2640238e83cf444a3a99723441da0556f9 SHA512 84815598f14330916dc65f1326a841e73a8c1551c4b9ba21667562f6c67eb770529b3049d53951e91b07356e4d7cfc3ed3a5e3722305d7282adfc871c3195a35 |
33 |
DIST electron-2.0.10.tar.gz 3012289 BLAKE2B 3d4f2560e754917c7e72e6450ccf9d6d5f8a7741fb5c426d6db9cad01780be5531671bea55eb9033f5de288617d8cc366a17b1a77eac5bd32440ff8e9ee53a5e SHA512 5663e9b018a51bf7f7c87a8c5b51cf631a91980bf01fdcb207f2054da2bfaffdebfe027bd8c27dfa0af523fd09ec1c52076a7f6de9c5bf9a0ffbb898d1797b59 |
34 |
DIST electron-breakpad-67f738b7adb47dc1e3b272fb99062f4192fa6651.tar.gz 5168487 BLAKE2B 41583e3297c2e8a612720f2087720cb7bc4ebf0aaaf5481029bd65458b26e5e824da283f474cf70d8933f80538e9f6c4b8a5843f27a6448b727ec9f12578b526 SHA512 303d1545dbe8e5fdece0fcd90c2ad09fab24483b176df1491580b9b382a607c0a814681cd58bcb7166b9cfc5af882a2b0d2fcc175d23f747b37c921040b68310 |
35 |
@@ -14,7 +12,6 @@ DIST electron-brightray-909c49265493bd095c27cefd999567be2107899a.tar.gz 98022 BL |
36 |
DIST electron-chromium-breakpad-82f0452e6b687b3c1e14e08d172b2f3fb79ae91a.tar.gz 1141359 BLAKE2B 7145fc178dcb62e9f14123da03e98f5e37c29f3a58799e675b3638eb0694771d1320de8bc70d97daa5c8c21db548efa3aa3c86d2018d6cea95f288b39cae4020 SHA512 4c8353a34061f4e061bb9e23945c0fb7a56f1b9f249b323cd3315cafcecdaca5c1f63940e2334ded03413cf26f5aa4a5bd8f1720fb2ba422a97d70f121d7d3d4 |
37 |
DIST electron-chromium-breakpad-c566c50d81f7b1edeaee9f11f5d07bda858d6b64.tar.gz 1141356 BLAKE2B 6a16d29639c668a6360514ed56373f4da5396650ba63d3aa7a3bca66a89ef1b2244bbe4a2e02ea0439f999c872bbb12e0d1289051c49cebf3d931ae7255b83b7 SHA512 9fb07facb147d401655cefea103cb1499de9ca27093c756a3b5d6ff1117a288ac491fedf01df61775ce6590e852e942cf7db1e135d6d30e94188283a53dd8e10 |
38 |
DIST electron-grit-9536fb6429147d27ef1563088341825db0a893cd.tar.gz 378461 BLAKE2B cb194cca884419f1c85524740860db244b06a237428add2cd9afaae8e0fe63ccb266b8e5e44f2125da57d263f167aec6c46c9c3451c5217100d58825f4322ecd SHA512 515797740421d5f80912b33dab2039c35b2ae432a0c4351aa031461ef6c82b7a1775c3d4d41ba6c646f81ba3ddf3bbfcb35b81da1ef88b486a2a67d15f09ec86 |
39 |
-DIST electron-libchromiumcontent-2f7b83669315f9492380334d1a8b1cd9bc758efd.tar.gz 70588 BLAKE2B 1f4d76577547c3dc24ca615f16563260ef44e6d6944ae0486cd7965bbdfa4149f26fe827c13cdbc8372eec95c1698763a56a645ac9845f9685ef752e33ab5ddb SHA512 2d065b024eb9928ba8abfa03d729b3ab1da96f436b76999371641dd468b38167b0812ff8538db1b7e1dc6a4f102cfbcce9cb8580837d593b0369d37c9f63c2c7 |
40 |
DIST electron-libchromiumcontent-4a4acde5522c21fe2f0a21f5ca29f99e90b03adc.tar.gz 73046 BLAKE2B 051b69473c5a97746aa2f18fc94d4909ad52e0a0edc638ba3950d70b46fb798523da0d62f4a7f427187f80406f8efc3c9e04039f90567521c4f29adb0ab82fbf SHA512 960f8b27adcf0df459bae024092971e8c10f1dfa933e3374303d7fd0ecaf2cf201674c474dfce6500609d229f1b4441968dfbc46a2d6220723b7ceebec277dba |
41 |
DIST electron-libchromiumcontent-a9b88fab38a8162bb485cc5854973f71ea0bc7a6.tar.gz 427806 BLAKE2B 21274045953499b7656366520d93acb63515995e7d6614afa5bba097e80bf833611fd715f0a8782dbdcb3c7c11ce2c4f5c2789483d4847e5bd73567123022dfd SHA512 da23b6119aa39d2ebc39b20280e2b6c0c26eba3e45271a3b8b196149ae8fb17f7ae63b97821ecdbc74c8d28617e361a3570e89c716d560a3b0caa7fa1f673f09 |
42 |
DIST electron-libchromiumcontent-cbd04c0dccc7655cd42f02baee3a622d5170ac08.tar.gz 161487 BLAKE2B de2f7f708aafc2f9033fb0dbee50880f9441196c81ba355bae966a1ffbb0c2f30c86cbb30021af599ac3abf071431f99c07a7a51b45db41901624148e1988369 SHA512 f207fdddecda879ff3c83e1503af0e919c1f6fe2e3666ac9d40c9fc21dfb3a679e1f0ab3ce7b89057a412934c5a9c96ed846761c669875ee0c3a1955308be184 |
43 |
@@ -24,8 +21,6 @@ DIST electron-native-mate-fd0e7dc4ab778f0d1ccda6c9640464ea06ee771e.tar.gz 23926 |
44 |
DIST electron-node-51abeb37cad3f2098c0f0fffdff739f4ac2393e8.tar.gz 50344964 BLAKE2B 36f91e8ae7d1ae4e99c44128398589e015224c664c86d3869327a4c433fdf8efdb758d4462ec3d8997399bf6d62cfe63f91ae8ee4886aab7817b1654c94592a2 SHA512 8f31577a4ef836b5535ec69d8a020c06e92c01667a0d4b857fcb6789025a6903d42ba3f9b51fd0828d39e88dd7ba44a07cfb3a59023b04c4f5cb89e1a27874bc |
45 |
DIST electron-node-9b1683e7000481ec6214eafa3eef7ac4594eb410.tar.gz 46194500 BLAKE2B 36537f40a597f9ed969abe385de8cf58fd2f48526021461ab5feb0e061a2dc0d4a49109191254e69b685101f6aa79d1c870091f0eae251ba8b3bc0b3e6a975e6 SHA512 f258cf5597154e976e1e4c0b81f6b63e9b344e4a28492137b80d59dc841490d4ad69e6bab2456a6334a42e51dfe2862cc389e837a4baac90a698ff60e5b08ab4 |
46 |
DIST electron-node-a992f2ff412b85606ec1d4c1eb00ad832fa1e640.tar.gz 46772284 BLAKE2B 453ade1d1540f099d7225f3c758fc1455dcae3a6b8ada00c20b85519bfd61beb3fc3beb083f063de2ce52c5b2e83eb67acea23f2605e201031b42552747e522b SHA512 532bc27e026fd032e8747150bac885277ae2e6cede3053e61690b846e380d664daa0b49e843c44d937a5f84f902f149323b8dc873dcfcf8ddc27b6feb1df750d |
47 |
-DIST electron-patches-1.6.16.tar.gz 28592 BLAKE2B bd64ff7ad03a8ecb9422702cc33746d57464228a3ee7ae7fa9ecc30ad5507a8cb2db71caf5f6700cfe1d963e9957d50c1e5c784e148aaabc11aef9d90d2508f0 SHA512 b53b5f88532a0898878abac71b36c410c3734da871266703932238f707e54a4f6af92cc4792dc645ba02069ec5e9e548317e0e121556210f69dfbb63d5a1fa03 |
48 |
-DIST electron-patches-1.7.15.tar.gz 58386 BLAKE2B d11ae9fd93cecb71a1ae625ab2377be0040c19ab2c858e4afba72835b4dab3d2f8c19d4192ff9ce4452ddefe54c07800d7530fee443e08b8140ea428752ac4b0 SHA512 deb639de2fcb2f1451e3fdc5dd8beb7fb24d86406430f2202fbda8e719dc7c4f14e9edcded00b8a452e22eac926fb21ab19b16fbc22778a8315d68da3441ae8d |
49 |
DIST electron-patches-f0fb7725cfe73704dce84ec51bdccc024dc7ceff.tar.gz 88340 BLAKE2B 759f8da023fae94ac0639387ace26694b2ff9dfd978f783cae2f1ccaaf749200ec2cdcfb771fbd3dc8a605521886c8e3383b7ed565eb250f753d238fd30ad6ef SHA512 c542d8fcf95123dc4ebced608ae0d1d9bc04db67f89c50f219bdf4ed8e916059333d1e3571387bf2992b46c3b0a02692f7ec2531920f693db30c7ed401bb73d4 |
50 |
DIST electron-pdf-viewer-a050a339cfeabcfb5f07c313161d2ee27b6c3a39.tar.gz 38431 BLAKE2B 962b1eeaa74544d57a5664fc6965b9f43e6d94671a08be024bb3001d7cf7e3ee02b2c63c2074e2ed4d6484dc5db7515cb170bf7432a8d11ccf595716e5c4500e SHA512 a028b67c0644d4ddcfc5aee4e2abb305648eb666082ea2c151cb6b9b3972503093cadb32b102aa19b04c8e863c2ac55bb20cccbf2abbf7832f9cfd3c3618612e |
51 |
DIST electron-pdf-viewer-a5251e497fb52e699b28f627e3cbb6d8cefb62df.tar.gz 42117 BLAKE2B afd5ca8897ff70cc8d1d51855c6b1cfdf9a6e1ffb667c740f323ef9e4e11ed22ecac7e8c0447dbaa6488e4b11ba4e8606e654f792bb42d0b4c805e7d4a32aab4 SHA512 2db9c756ebff5148c6011775b2740671b7ab6693242400b417893eace648720c51e709bd108d766910f24b543b88c60fd292ba9aa8aa88bff1ea40d43961ad5b |
52 |
|
53 |
diff --git a/dev-util/electron/electron-1.6.16.ebuild b/dev-util/electron/electron-1.6.16.ebuild |
54 |
deleted file mode 100644 |
55 |
index 58491cdd564..00000000000 |
56 |
--- a/dev-util/electron/electron-1.6.16.ebuild |
57 |
+++ /dev/null |
58 |
@@ -1,881 +0,0 @@ |
59 |
-# Copyright 1999-2018 Gentoo Foundation |
60 |
-# Distributed under the terms of the GNU General Public License v2 |
61 |
- |
62 |
-EAPI="6" |
63 |
-PYTHON_COMPAT=( python2_7 ) |
64 |
- |
65 |
-CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he |
66 |
- hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr |
67 |
- sv sw ta te th tr uk vi zh-CN zh-TW" |
68 |
- |
69 |
-inherit check-reqs chromium-2 gnome2-utils flag-o-matic multilib \ |
70 |
- multiprocessing pax-utils portability python-any-r1 toolchain-funcs \ |
71 |
- versionator virtualx xdg-utils |
72 |
- |
73 |
-# Keep this in sync with vendor/brightray/vendor/libchromiumcontent/VERSION |
74 |
-CHROMIUM_VERSION="56.0.2924.87" |
75 |
-# Keep this in sync with vendor/breakpad |
76 |
-BREAKPAD_COMMIT="c566c50d81f7b1edeaee9f11f5d07bda858d6b64" |
77 |
-# Keep this in sync with vendor/breakpad/src (and find the corresponding |
78 |
-# commit in https://github.com/google/breakpad/) |
79 |
-BREAKPAD_SRC_COMMIT="e35167de7516448fcc2bf687ad580b9d8b6aedc2" |
80 |
-# Keep this in sync with vendor/brightray |
81 |
-BRIGHTRAY_COMMIT="909c49265493bd095c27cefd999567be2107899a" |
82 |
-# Keep this in sync with vendor/node |
83 |
-NODE_COMMIT="9b1683e7000481ec6214eafa3eef7ac4594eb410" |
84 |
-# Keep this in sync with vendor/native_mate |
85 |
-NATIVE_MATE_COMMIT="fd0e7dc4ab778f0d1ccda6c9640464ea06ee771e" |
86 |
-# Keep this in sync with vendor/pdf_viewer |
87 |
-PDF_VIEWER_COMMIT="a050a339cfeabcfb5f07c313161d2ee27b6c3a39" |
88 |
-# Keep this in sync with vendor/pdf_viewer/vendor/grit |
89 |
-GRIT_COMMIT="9536fb6429147d27ef1563088341825db0a893cd" |
90 |
-# Keep this in sync with script/lib/config.py:LIBCHROMIUMCONTENT_COMMIT |
91 |
-LIBCHROMIUMCONTENT_COMMIT="a9b88fab38a8162bb485cc5854973f71ea0bc7a6" |
92 |
-# Keep this in sync with package.json#devDependencies |
93 |
-ASAR_VERSION="0.13.0" |
94 |
-BROWSERIFY_VERSION="14.0.0" |
95 |
- |
96 |
-PATCHES_P="gentoo-electron-patches-${P}" |
97 |
-CHROMIUM_P="chromium-${CHROMIUM_VERSION}" |
98 |
-BREAKPAD_P="chromium-breakpad-${BREAKPAD_COMMIT}" |
99 |
-BREAKPAD_SRC_P="breakpad-${BREAKPAD_SRC_COMMIT}" |
100 |
-BRIGHTRAY_P="brightray-${BRIGHTRAY_COMMIT}" |
101 |
-NODE_P="node-${NODE_COMMIT}" |
102 |
-NATIVE_MATE_P="native-mate-${NATIVE_MATE_COMMIT}" |
103 |
-PDF_VIEWER_P="pdf-viewer-${PDF_VIEWER_COMMIT}" |
104 |
-GRIT_P="grit-${GRIT_COMMIT}" |
105 |
-LIBCHROMIUMCONTENT_P="libchromiumcontent-${LIBCHROMIUMCONTENT_COMMIT}" |
106 |
-ASAR_P="asar-${ASAR_VERSION}" |
107 |
-BROWSERIFY_P="browserify-${BROWSERIFY_VERSION}" |
108 |
- |
109 |
-DESCRIPTION="Cross platform application development framework based on web technologies" |
110 |
-HOMEPAGE="https://electronjs.org/" |
111 |
-SRC_URI=" |
112 |
- https://commondatastorage.googleapis.com/chromium-browser-official/${CHROMIUM_P}.tar.xz |
113 |
- https://github.com/electron/electron/archive/v${PV}.tar.gz -> ${P}.tar.gz |
114 |
- https://github.com/electron/chromium-breakpad/archive/${BREAKPAD_COMMIT}.tar.gz -> electron-${BREAKPAD_P}.tar.gz |
115 |
- https://github.com/google/breakpad/archive/${BREAKPAD_SRC_COMMIT}.tar.gz -> electron-${BREAKPAD_SRC_P}.tar.gz |
116 |
- https://github.com/electron/brightray/archive/${BRIGHTRAY_COMMIT}.tar.gz -> electron-${BRIGHTRAY_P}.tar.gz |
117 |
- https://github.com/electron/node/archive/${NODE_COMMIT}.tar.gz -> electron-${NODE_P}.tar.gz |
118 |
- https://github.com/zcbenz/native-mate/archive/${NATIVE_MATE_COMMIT}.tar.gz -> electron-${NATIVE_MATE_P}.tar.gz |
119 |
- https://github.com/electron/pdf-viewer/archive/${PDF_VIEWER_COMMIT}.tar.gz -> electron-${PDF_VIEWER_P}.tar.gz |
120 |
- https://github.com/elprans/grit/archive/${GRIT_COMMIT}.tar.gz -> electron-${GRIT_P}.tar.gz |
121 |
- https://github.com/electron/libchromiumcontent/archive/${LIBCHROMIUMCONTENT_COMMIT}.tar.gz -> electron-${LIBCHROMIUMCONTENT_P}.tar.gz |
122 |
- https://github.com/elprans/asar/releases/download/v${ASAR_VERSION}-gentoo/asar-build.tar.gz -> ${ASAR_P}.tar.gz |
123 |
- https://github.com/elprans/node-browserify/releases/download/${BROWSERIFY_VERSION}-gentoo/browserify-build.tar.gz -> ${BROWSERIFY_P}.tar.gz |
124 |
- https://github.com/elprans/gentoo-electron-patches/archive/${P}.tar.gz -> electron-patches-${PV}.tar.gz |
125 |
-" |
126 |
- |
127 |
-S="${WORKDIR}/${P}" |
128 |
-CHROMIUM_S="${S}/chromium" |
129 |
-NODE_S="${S}/vendor/node" |
130 |
-BREAKPAD_S="${S}/vendor/breakpad" |
131 |
-BREAKPAD_SRC_S="${BREAKPAD_S}/src" |
132 |
-BRIGHTRAY_S="${S}/vendor/brightray" |
133 |
-NATIVE_MATE_S="${S}/vendor/native_mate" |
134 |
-PDF_VIEWER_S="${S}/vendor/pdf_viewer" |
135 |
-GRIT_S="${PDF_VIEWER_S}/vendor/grit" |
136 |
-LIBCC_S="${BRIGHTRAY_S}/vendor/libchromiumcontent" |
137 |
- |
138 |
-LICENSE="BSD" |
139 |
-SLOT="$(get_version_component_range 1-2)" |
140 |
-KEYWORDS="~amd64" |
141 |
-IUSE="cups custom-cflags gnome gnome-keyring kerberos lto neon pic +proprietary-codecs pulseaudio selinux +system-ffmpeg +tcmalloc" |
142 |
-RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )" |
143 |
- |
144 |
-# Native Client binaries are compiled with different set of flags, bug #452066. |
145 |
-QA_FLAGS_IGNORED=".*\.nexe" |
146 |
- |
147 |
-# Native Client binaries may be stripped by the build system, which uses the |
148 |
-# right tools for it, bug #469144 . |
149 |
-QA_PRESTRIPPED=".*\.nexe" |
150 |
- |
151 |
-COMMON_DEPEND=" |
152 |
- app-arch/bzip2:= |
153 |
- >=app-eselect/eselect-electron-2.0 |
154 |
- cups? ( >=net-print/cups-1.3.11:= ) |
155 |
- >=dev-libs/elfutils-0.149 |
156 |
- dev-libs/expat:= |
157 |
- dev-libs/glib:2 |
158 |
- >=dev-libs/icu-58:= |
159 |
- >=dev-libs/jsoncpp-0.5.0-r1:= |
160 |
- dev-libs/nspr:= |
161 |
- >=dev-libs/nss-3.14.3:= |
162 |
- >=dev-libs/re2-0.2016.05.01:= |
163 |
- gnome? ( >=gnome-base/gconf-2.24.0:= ) |
164 |
- gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= ) |
165 |
- >=media-libs/alsa-lib-1.0.19:= |
166 |
- media-libs/fontconfig:= |
167 |
- media-libs/freetype:= |
168 |
- media-libs/libexif:= |
169 |
- media-libs/libjpeg-turbo:= |
170 |
- media-libs/libpng:= |
171 |
- media-libs/libvpx:=[svc] |
172 |
- media-libs/speex:= |
173 |
- pulseaudio? ( media-sound/pulseaudio:= ) |
174 |
- system-ffmpeg? ( >=media-video/ffmpeg-3:= ) |
175 |
- sys-apps/dbus:= |
176 |
- sys-apps/pciutils:= |
177 |
- >=sys-libs/libcap-2.22:= |
178 |
- virtual/udev |
179 |
- x11-libs/cairo:= |
180 |
- x11-libs/gdk-pixbuf:2 |
181 |
- x11-libs/libdrm |
182 |
- x11-libs/libnotify:= |
183 |
- x11-libs/libX11:= |
184 |
- x11-libs/libXcomposite:= |
185 |
- x11-libs/libXcursor:= |
186 |
- x11-libs/libXdamage:= |
187 |
- x11-libs/libXext:= |
188 |
- x11-libs/libXfixes:= |
189 |
- >=x11-libs/libXi-1.6.0:= |
190 |
- x11-libs/libXinerama:= |
191 |
- x11-libs/libXrandr:= |
192 |
- x11-libs/libXrender:= |
193 |
- x11-libs/libXScrnSaver:= |
194 |
- x11-libs/libXtst:= |
195 |
- x11-libs/pango:= |
196 |
- app-arch/snappy:= |
197 |
- dev-libs/libxml2:=[icu] |
198 |
- dev-libs/libxslt:= |
199 |
- media-libs/flac:= |
200 |
- >=media-libs/harfbuzz-1.3.1:=[icu(+)] |
201 |
- >=media-libs/libwebp-0.4.0:= |
202 |
- sys-libs/zlib:=[minizip] |
203 |
- kerberos? ( virtual/krb5 ) |
204 |
-" |
205 |
-# For nvidia-drivers blocker, see bug #413637 . |
206 |
-RDEPEND="${COMMON_DEPEND} |
207 |
- !<dev-util/electron-0.36.12-r4 |
208 |
- x11-misc/xdg-utils |
209 |
- virtual/opengl |
210 |
- virtual/ttf-fonts |
211 |
- x11-libs/gtk+:2 |
212 |
- selinux? ( sec-policy/selinux-chromium ) |
213 |
- tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 ) |
214 |
-" |
215 |
-# dev-vcs/git - https://bugs.gentoo.org/593476 |
216 |
-DEPEND="${COMMON_DEPEND} |
217 |
- >=app-arch/gzip-1.7 |
218 |
- !arm? ( |
219 |
- dev-lang/yasm |
220 |
- ) |
221 |
- dev-lang/perl |
222 |
- dev-perl/JSON |
223 |
- >=dev-util/gperf-3.0.3 |
224 |
- dev-util/ninja |
225 |
- net-libs/nodejs |
226 |
- sys-apps/hwids[usb(+)] |
227 |
- >=sys-devel/bison-2.4.3 |
228 |
- sys-devel/flex |
229 |
- virtual/pkgconfig |
230 |
- dev-vcs/git |
231 |
- x11-libs/gtk+:2 |
232 |
- x11-libs/gtk+:3 |
233 |
- $(python_gen_any_dep ' |
234 |
- dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}] |
235 |
- >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}] |
236 |
- dev-python/html5lib[${PYTHON_USEDEP}] |
237 |
- dev-python/simplejson[${PYTHON_USEDEP}] |
238 |
- ') |
239 |
-" |
240 |
- |
241 |
-# Keep this in sync with the python_gen_any_dep call. |
242 |
-python_check_deps() { |
243 |
- has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && |
244 |
- has_version --host-root ">=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]" && |
245 |
- has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" && |
246 |
- has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]" |
247 |
-} |
248 |
- |
249 |
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then |
250 |
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; |
251 |
-fi |
252 |
- |
253 |
-pre_build_checks() { |
254 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
255 |
- local -x CPP="$(tc-getCXX) -E" |
256 |
- if tc-is-clang && ! version_is_at_least "3.9.1" "$(clang-fullversion)"; then |
257 |
- # bugs: #601654 |
258 |
- die "At least clang 3.9.1 is required" |
259 |
- fi |
260 |
- if tc-is-gcc && ! version_is_at_least 4.9 "$(gcc-version)"; then |
261 |
- # bugs: #535730, #525374, #518668, #600288 |
262 |
- die "At least gcc 4.9 is required" |
263 |
- fi |
264 |
- fi |
265 |
- |
266 |
- # LTO pass requires more file descriptors |
267 |
- if use lto; then |
268 |
- local lto_n_rlimit_min="16384" |
269 |
- local maxfiles=$(ulimit -n -H) |
270 |
- if [ "${maxfiles}" -lt "${lto_n_rlimit_min}" ]; then |
271 |
- eerror "" |
272 |
- eerror "Building with USE=\"lto\" requires file descriptor" \ |
273 |
- "limit to be no less than ${lto_n_rlimit_min}." |
274 |
- eerror "The current limit for portage is ${maxfiles}." |
275 |
- eerror "Please add the following to /etc/security/limits.conf:" |
276 |
- eerror "" |
277 |
- eerror " root hard nofile ${lto_n_rlimit_min}" |
278 |
- eerror " root soft nofile ${lto_n_rlimit_min}" |
279 |
- eerror "" |
280 |
- die |
281 |
- fi |
282 |
- fi |
283 |
- |
284 |
- # Check build requirements, bug #541816 and bug #471810 . |
285 |
- CHECKREQS_MEMORY="3G" |
286 |
- use lto && CHECKREQS_MEMORY="7G" |
287 |
- CHECKREQS_DISK_BUILD="5G" |
288 |
- eshopts_push -s extglob |
289 |
- if is-flagq '-g?(gdb)?([1-9])'; then |
290 |
- CHECKREQS_DISK_BUILD="25G" |
291 |
- CHECKREQS_MEMORY="16G" |
292 |
- fi |
293 |
- eshopts_pop |
294 |
- check-reqs_pkg_pretend |
295 |
-} |
296 |
- |
297 |
-pkg_pretend() { |
298 |
- pre_build_checks |
299 |
-} |
300 |
- |
301 |
-pkg_setup() { |
302 |
- pre_build_checks |
303 |
- |
304 |
- # Make sure the build system will use the right python, bug #344367. |
305 |
- python-any-r1_pkg_setup |
306 |
- |
307 |
- chromium_suid_sandbox_check_kernel_config |
308 |
-} |
309 |
- |
310 |
-_unnest_patches() { |
311 |
- local _s="${1%/}/" |
312 |
- local path |
313 |
- local relpath |
314 |
- local out |
315 |
- |
316 |
- (find "${_s}" -mindepth 2 -name '*.patch' -printf "%P\n" || die) \ |
317 |
- | while read -r path; do |
318 |
- relpath="$(dirname ${path})" |
319 |
- out="${_s}/__${relpath////_}_$(basename ${path})" |
320 |
- sed -r -e "s|^([-+]{3}) ([ab])/(.*)$|\1 \2/${relpath}/\3|g" \ |
321 |
- "${_s}/${path}" > "${out}" || die |
322 |
- done |
323 |
-} |
324 |
- |
325 |
-_get_install_suffix() { |
326 |
- local c=(${SLOT//\// }) |
327 |
- local slot=${c[0]} |
328 |
- local suffix |
329 |
- |
330 |
- if [[ "${slot}" == "0" ]]; then |
331 |
- suffix="" |
332 |
- else |
333 |
- suffix="-${slot}" |
334 |
- fi |
335 |
- |
336 |
- echo -n "${suffix}" |
337 |
-} |
338 |
- |
339 |
-_get_install_dir() { |
340 |
- echo -n "/usr/$(get_libdir)/electron$(_get_install_suffix)" |
341 |
-} |
342 |
- |
343 |
-_get_target_arch() { |
344 |
- local myarch="$(tc-arch)" |
345 |
- local target_arch |
346 |
- |
347 |
- if [[ $myarch = amd64 ]] ; then |
348 |
- target_arch=x64 |
349 |
- elif [[ $myarch = x86 ]] ; then |
350 |
- target_arch=ia32 |
351 |
- elif [[ $myarch = arm64 ]] ; then |
352 |
- target_arch=arm64 |
353 |
- elif [[ $myarch = arm ]] ; then |
354 |
- target_arch=arm |
355 |
- else |
356 |
- die "Failed to determine target arch, got '$myarch'." |
357 |
- fi |
358 |
- |
359 |
- echo -n "${target_arch}" |
360 |
-} |
361 |
- |
362 |
-src_prepare() { |
363 |
- mv "${WORKDIR}/${CHROMIUM_P}" "${CHROMIUM_S}" || die |
364 |
- rm -r "${NODE_S}" && |
365 |
- mv "${WORKDIR}/${NODE_P}" "${NODE_S}" || die |
366 |
- rm -r "${BREAKPAD_S}" && |
367 |
- mv "${WORKDIR}/${BREAKPAD_P}" "${BREAKPAD_S}" || die |
368 |
- rm -r "${BREAKPAD_SRC_S}" && |
369 |
- mv "${WORKDIR}/${BREAKPAD_SRC_P}/src" "${BREAKPAD_SRC_S}" || die |
370 |
- rm -r "${BRIGHTRAY_S}" && |
371 |
- mv "${WORKDIR}/${BRIGHTRAY_P}" "${BRIGHTRAY_S}" || die |
372 |
- rm -r "${NATIVE_MATE_S}" && |
373 |
- mv "${WORKDIR}/${NATIVE_MATE_P}" "${NATIVE_MATE_S}" || die |
374 |
- rm -r "${PDF_VIEWER_S}" && |
375 |
- mv "${WORKDIR}/${PDF_VIEWER_P}" "${PDF_VIEWER_S}" || die |
376 |
- rm -r "${GRIT_S}" && |
377 |
- mv "${WORKDIR}/${GRIT_P}" "${GRIT_S}" || die |
378 |
- rm -r "${LIBCC_S}" && |
379 |
- mv "${WORKDIR}/${LIBCHROMIUMCONTENT_P}" "${LIBCC_S}" || die |
380 |
- rsync -a "${WORKDIR}/${ASAR_P}/node_modules/" \ |
381 |
- "${S}/node_modules/" || die |
382 |
- rsync -a "${WORKDIR}/${BROWSERIFY_P}/node_modules/" \ |
383 |
- "${S}/node_modules/" || die |
384 |
- |
385 |
- # node patches |
386 |
- cd "${NODE_S}" || die |
387 |
- # make sure node uses the correct version of v8 |
388 |
- rm -r deps/v8 || die |
389 |
- ln -s "${CHROMIUM_S}/v8" deps/ || die |
390 |
- |
391 |
- # make sure we use python2.* while using gyp |
392 |
- sed -i -e "s/python/${EPYTHON}/" \ |
393 |
- deps/npm/node_modules/node-gyp/gyp/gyp || die |
394 |
- sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" \ |
395 |
- deps/npm/node_modules/node-gyp/lib/configure.js || die |
396 |
- |
397 |
- python_fix_shebang "${CHROMIUM_S}/build/gyp_chromium" |
398 |
- python_fix_shebang "${S}/tools/" |
399 |
- |
400 |
- # less verbose install output (stating the same as portage, basically) |
401 |
- sed -i -e "/print/d" tools/install.py || die |
402 |
- |
403 |
- # proper libdir, hat tip @ryanpcmcquen |
404 |
- # https://github.com/iojs/io.js/issues/504 |
405 |
- local LIBDIR=$(get_libdir) |
406 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
407 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die |
408 |
- sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die |
409 |
- |
410 |
- # Apply libcc Chromium patches. |
411 |
- cd "${CHROMIUM_S}" || die |
412 |
- _unnest_patches "${LIBCC_S}/patches" |
413 |
- eapply "${LIBCC_S}/patches" |
414 |
- |
415 |
- # Apply Gentoo patches |
416 |
- cd "${S}" || die |
417 |
- _unnest_patches "${WORKDIR}/${PATCHES_P}/${PV}" |
418 |
- eapply "${WORKDIR}/${PATCHES_P}/${PV}" |
419 |
- |
420 |
- # Merge chromiumcontent component into chromium source tree. |
421 |
- mkdir -p "${CHROMIUM_S}/chromiumcontent" || die |
422 |
- cp -a "${LIBCC_S}/chromiumcontent" "${CHROMIUM_S}/" || die |
423 |
- cp -a "${LIBCC_S}/tools/linux/" "${CHROMIUM_S}/tools/" || die |
424 |
- |
425 |
- local keeplibs=( |
426 |
- base/third_party/dmg_fp |
427 |
- base/third_party/dynamic_annotations |
428 |
- base/third_party/icu |
429 |
- base/third_party/nspr |
430 |
- base/third_party/superfasthash |
431 |
- base/third_party/symbolize |
432 |
- base/third_party/valgrind |
433 |
- base/third_party/xdg_mime |
434 |
- base/third_party/xdg_user_dirs |
435 |
- breakpad/src/third_party/curl |
436 |
- chrome/third_party/mozilla_security_manager |
437 |
- courgette/third_party |
438 |
- net/third_party/mozilla_security_manager |
439 |
- net/third_party/nss |
440 |
- third_party/WebKit |
441 |
- third_party/analytics |
442 |
- third_party/angle |
443 |
- third_party/angle/src/common/third_party/numerics |
444 |
- third_party/angle/src/third_party/compiler |
445 |
- third_party/angle/src/third_party/libXNVCtrl |
446 |
- third_party/angle/src/third_party/murmurhash |
447 |
- third_party/angle/src/third_party/trace_event |
448 |
- third_party/boringssl |
449 |
- third_party/brotli |
450 |
- third_party/cacheinvalidation |
451 |
- third_party/catapult |
452 |
- third_party/catapult/third_party/polymer |
453 |
- third_party/catapult/third_party/py_vulcanize |
454 |
- third_party/catapult/third_party/py_vulcanize/third_party/rcssmin |
455 |
- third_party/catapult/third_party/py_vulcanize/third_party/rjsmin |
456 |
- third_party/catapult/tracing/third_party/d3 |
457 |
- third_party/catapult/tracing/third_party/gl-matrix |
458 |
- third_party/catapult/tracing/third_party/jszip |
459 |
- third_party/catapult/tracing/third_party/mannwhitneyu |
460 |
- third_party/ced |
461 |
- third_party/cld_2 |
462 |
- third_party/cld_3 |
463 |
- third_party/cros_system_api |
464 |
- third_party/devscripts |
465 |
- third_party/dom_distiller_js |
466 |
- third_party/fips181 |
467 |
- third_party/flatbuffers |
468 |
- third_party/flot |
469 |
- third_party/google_input_tools |
470 |
- third_party/google_input_tools/third_party/closure_library |
471 |
- third_party/google_input_tools/third_party/closure_library/third_party/closure |
472 |
- third_party/hunspell |
473 |
- third_party/iccjpeg |
474 |
- third_party/inspector_protocol |
475 |
- third_party/jinja2 |
476 |
- third_party/jstemplate |
477 |
- third_party/khronos |
478 |
- third_party/leveldatabase |
479 |
- third_party/libXNVCtrl |
480 |
- third_party/libaddressinput |
481 |
- third_party/libjingle |
482 |
- third_party/libphonenumber |
483 |
- third_party/libsecret |
484 |
- third_party/libsrtp |
485 |
- third_party/libudev |
486 |
- third_party/libusb |
487 |
- third_party/libwebm |
488 |
- third_party/libxml/chromium |
489 |
- third_party/libyuv |
490 |
- third_party/lss |
491 |
- third_party/lzma_sdk |
492 |
- third_party/markupsafe |
493 |
- third_party/mesa |
494 |
- third_party/modp_b64 |
495 |
- third_party/mt19937ar |
496 |
- third_party/openh264 |
497 |
- third_party/openmax_dl |
498 |
- third_party/opus |
499 |
- third_party/ots |
500 |
- third_party/pdfium |
501 |
- third_party/pdfium/third_party/agg23 |
502 |
- third_party/pdfium/third_party/base |
503 |
- third_party/pdfium/third_party/bigint |
504 |
- third_party/pdfium/third_party/freetype |
505 |
- third_party/pdfium/third_party/lcms2-2.6 |
506 |
- third_party/pdfium/third_party/libjpeg |
507 |
- third_party/pdfium/third_party/libopenjpeg20 |
508 |
- third_party/pdfium/third_party/libpng16 |
509 |
- third_party/pdfium/third_party/libtiff |
510 |
- third_party/pdfium/third_party/zlib_v128 |
511 |
- third_party/ply |
512 |
- third_party/polymer |
513 |
- third_party/protobuf |
514 |
- third_party/protobuf/third_party/six |
515 |
- third_party/qcms |
516 |
- third_party/sfntly |
517 |
- third_party/skia |
518 |
- third_party/smhasher |
519 |
- third_party/sqlite |
520 |
- third_party/tcmalloc |
521 |
- third_party/usrsctp |
522 |
- third_party/web-animations-js |
523 |
- third_party/webdriver |
524 |
- third_party/webrtc |
525 |
- third_party/widevine |
526 |
- third_party/woff2 |
527 |
- third_party/x86inc |
528 |
- third_party/zlib/google |
529 |
- url/third_party/mozilla |
530 |
- v8/src/third_party/valgrind |
531 |
- v8/third_party/inspector_protocol |
532 |
- |
533 |
- # gyp -> gn leftovers |
534 |
- base/third_party/libevent |
535 |
- third_party/adobe |
536 |
- third_party/speech-dispatcher |
537 |
- third_party/usb_ids |
538 |
- third_party/xdg-utils |
539 |
- third_party/yasm/run_yasm.py |
540 |
- ) |
541 |
- if ! use system-ffmpeg; then |
542 |
- keeplibs+=( third_party/ffmpeg ) |
543 |
- fi |
544 |
- |
545 |
- cd "${CHROMIUM_S}" || die |
546 |
- |
547 |
- # Remove most bundled libraries. Some are still needed. |
548 |
- ebegin "Unbundling libraries" |
549 |
- build/linux/unbundle/remove_bundled_libraries.py \ |
550 |
- "${keeplibs[@]}" --do-remove || die |
551 |
- eend |
552 |
- |
553 |
- cd "${S}" || die |
554 |
- |
555 |
- eapply_user |
556 |
-} |
557 |
- |
558 |
-src_configure() { |
559 |
- local myconf_gn="" |
560 |
- local myconf_gyp="" |
561 |
- |
562 |
- cd "${CHROMIUM_S}" || die |
563 |
- |
564 |
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. |
565 |
- myconf_gn+=" is_debug=false" |
566 |
- |
567 |
- # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
568 |
- myconf_gn+=" enable_nacl=false" |
569 |
- |
570 |
- # Use system-provided libraries. |
571 |
- # TODO: use_system_hunspell (upstream changes needed). |
572 |
- # TODO: use_system_libsrtp (bug #459932). |
573 |
- # TODO: use_system_libusb (http://crbug.com/266149). |
574 |
- # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077). |
575 |
- # TODO: use_system_protobuf (bug #525560). |
576 |
- # TODO: use_system_ssl (http://crbug.com/58087). |
577 |
- # TODO: use_system_sqlite (http://crbug.com/22208). |
578 |
- |
579 |
- # libevent: https://bugs.gentoo.org/593458 |
580 |
- local gn_system_libraries=" |
581 |
- flac |
582 |
- harfbuzz-ng |
583 |
- icu |
584 |
- libjpeg |
585 |
- libpng |
586 |
- libvpx |
587 |
- libwebp |
588 |
- libxml |
589 |
- libxslt |
590 |
- re2 |
591 |
- snappy |
592 |
- yasm |
593 |
- zlib" |
594 |
- if use system-ffmpeg; then |
595 |
- gn_system_libraries+=" ffmpeg" |
596 |
- fi |
597 |
- build/linux/unbundle/replace_gn_files.py --system-libraries ${gn_system_libraries} || die |
598 |
- |
599 |
- # Optional dependencies. |
600 |
- myconf_gn+=" use_cups=$(usex cups true false)" |
601 |
- myconf_gn+=" use_gconf=$(usex gnome true false)" |
602 |
- myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)" |
603 |
- myconf_gn+=" use_gtk3=false" |
604 |
- myconf_gn+=" use_kerberos=$(usex kerberos true false)" |
605 |
- myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" |
606 |
- |
607 |
- # TODO: link_pulseaudio=true for GN. |
608 |
- |
609 |
- myconf_gn+=" fieldtrial_testing_like_official_build=true" |
610 |
- |
611 |
- if tc-is-clang; then |
612 |
- myconf_gn+=" is_clang=true clang_base_path=\"/usr\" clang_use_chrome_plugins=false" |
613 |
- else |
614 |
- myconf_gn+=" is_clang=false" |
615 |
- fi |
616 |
- |
617 |
- # Never use bundled gold binary. Disable gold linker flags for now. |
618 |
- # Do not use bundled clang. |
619 |
- # Trying to use gold results in linker crash. |
620 |
- myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false" |
621 |
- |
622 |
- ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
623 |
- myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" |
624 |
- myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" |
625 |
- |
626 |
- # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
627 |
- # Note: these are for Gentoo use ONLY. For your own distribution, |
628 |
- # please get your own set of keys. Feel free to contact chromium@g.o |
629 |
- # for more info. |
630 |
- local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" |
631 |
- local google_default_client_id="329227923882.apps.googleusercontent.com" |
632 |
- local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" |
633 |
- myconf_gn+=" google_api_key=\"${google_api_key}\"" |
634 |
- myconf_gn+=" google_default_client_id=\"${google_default_client_id}\"" |
635 |
- myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\"" |
636 |
- |
637 |
- local target_arch=$(_get_target_arch) |
638 |
- local ffmpeg_target_arch="${target_arch}" |
639 |
- |
640 |
- if [[ ${ffmpeg_target_arch} = arm ]]; then |
641 |
- ffmpeg_target_arch=$(usex neon arm-neon arm) |
642 |
- fi |
643 |
- |
644 |
- # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
645 |
- # Depending on GCC version the warnings are different and we don't want |
646 |
- # the build to fail because of that. |
647 |
- myconf_gn+=" treat_warnings_as_errors=false" |
648 |
- |
649 |
- # Disable fatal linker warnings, bug 506268. |
650 |
- myconf_gn+=" fatal_linker_warnings=false" |
651 |
- |
652 |
- # Avoid CFLAGS problems, bug #352457, bug #390147. |
653 |
- if ! use custom-cflags; then |
654 |
- replace-flags "-Os" "-O2" |
655 |
- strip-flags |
656 |
- |
657 |
- filter-flags "-Wl,--as-needed" |
658 |
- |
659 |
- # Prevent linker from running out of address space, bug #471810 . |
660 |
- if use x86; then |
661 |
- filter-flags "-g*" |
662 |
- fi |
663 |
- |
664 |
- # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
665 |
- if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
666 |
- filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 |
667 |
- fi |
668 |
- fi |
669 |
- |
670 |
- # Make sure the build system will use the right tools, bug #340795. |
671 |
- tc-export AR CC CXX NM |
672 |
- |
673 |
- # https://bugs.gentoo.org/588596 |
674 |
- append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks) |
675 |
- |
676 |
- # Define a custom toolchain for GN |
677 |
- myconf_gn+=" custom_toolchain=\"${FILESDIR}/toolchain:default\"" |
678 |
- |
679 |
- myconf_gn+=" icu_use_data_file=false" |
680 |
- |
681 |
- use lto && myconf_gn+=" allow_posix_link_time_opt=true" |
682 |
- |
683 |
- # Tools for building programs to be executed on the build system, bug #410883. |
684 |
- if tc-is-cross-compiler; then |
685 |
- export AR_host=$(tc-getBUILD_AR) |
686 |
- export CC_host=$(tc-getBUILD_CC) |
687 |
- export CXX_host=$(tc-getBUILD_CXX) |
688 |
- export NM_host=$(tc-getBUILD_NM) |
689 |
- fi |
690 |
- |
691 |
- # Bug 491582. |
692 |
- export TMPDIR="${WORKDIR}/temp" |
693 |
- mkdir -p -m 755 "${TMPDIR}" || die |
694 |
- |
695 |
- if ! use system-ffmpeg; then |
696 |
- local build_ffmpeg_args="" |
697 |
- if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then |
698 |
- build_ffmpeg_args+=" --disable-asm" |
699 |
- fi |
700 |
- |
701 |
- # Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
702 |
- einfo "Configuring bundled ffmpeg..." |
703 |
- pushd third_party/ffmpeg > /dev/null || die |
704 |
- chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ |
705 |
- --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die |
706 |
- chromium/scripts/copy_config.sh || die |
707 |
- chromium/scripts/generate_gn.py || die |
708 |
- popd > /dev/null || die |
709 |
- fi |
710 |
- |
711 |
- third_party/libaddressinput/chromium/tools/update-strings.py || die |
712 |
- |
713 |
- touch chrome/test/data/webui/i18n_process_css_test.html || die |
714 |
- |
715 |
- einfo "Configuring bundled nodejs..." |
716 |
- pushd "${S}/vendor/node" > /dev/null || die |
717 |
- # Make sure gyp_node does not run |
718 |
- echo '#!/usr/bin/env python' > tools/gyp_node.py || die |
719 |
- # --shared-libuv cannot be used as electron's node fork |
720 |
- # patches uv_loop structure. |
721 |
- ./configure --shared --without-bundled-v8 --shared-openssl \ |
722 |
- --shared-http-parser --shared-zlib --without-npm \ |
723 |
- --with-intl=system-icu --without-dtrace \ |
724 |
- --dest-cpu=${target_arch} --prefix="" || die |
725 |
- popd > /dev/null || die |
726 |
- |
727 |
- # libchromiumcontent configuration |
728 |
- myconf_gn+=" root_extra_deps = [\"//chromiumcontent:chromiumcontent\"]" |
729 |
- myconf_gn+=" is_electron_build = true" |
730 |
- myconf_gn+=" is_component_build = false" |
731 |
- |
732 |
- einfo "Configuring chromiumcontent..." |
733 |
- # TODO: bootstrapped gn binary hangs when using tcmalloc with portage's sandbox. |
734 |
- tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn} use_allocator=\"none\"" || die |
735 |
- # Remove the glibc allocator shim so that it doesn't get picked up |
736 |
- # by Electron's build_libs script. |
737 |
- rm out/Release/obj/base/allocator/unified_allocator_shim/allocator_shim_default_dispatch_to_glibc.o || die |
738 |
- |
739 |
- myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")" |
740 |
- out/Release/gn gen --args="${myconf_gn}" out/Release || die |
741 |
- |
742 |
- cd "${S}" || die |
743 |
-} |
744 |
- |
745 |
-eninja() { |
746 |
- if [[ -z ${NINJAOPTS+set} ]]; then |
747 |
- local jobs=$(makeopts_jobs) |
748 |
- local loadavg=$(makeopts_loadavg) |
749 |
- |
750 |
- if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then |
751 |
- NINJAOPTS+=" -j ${jobs}" |
752 |
- fi |
753 |
- if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then |
754 |
- NINJAOPTS+=" -l ${loadavg}" |
755 |
- fi |
756 |
- fi |
757 |
- set -- ninja -v ${NINJAOPTS} "$@" |
758 |
- echo "$@" |
759 |
- "$@" || die |
760 |
-} |
761 |
- |
762 |
-src_compile() { |
763 |
- local compile_target="${S}/out/R" |
764 |
- local myconf_gyp="" |
765 |
- local chromium_target="${CHROMIUM_S}/out/Release" |
766 |
- local libcc_path="${S}/vendor/brightray/vendor/libchromiumcontent" |
767 |
- local libcc_dist_path="${libcc_path}/dist/main" |
768 |
- local libcc_dist_static_path="${libcc_dist_path}/static_library" |
769 |
- local libcc_dist_shared_path="${libcc_dist_path}/shared_library" |
770 |
- local libcc_output="${CHROMIUM_S}/out/Release/obj/chromiumcontent" |
771 |
- local libcc_output_shared="${libcc_output}-shared" |
772 |
- local target_arch=$(_get_target_arch) |
773 |
- local l="" |
774 |
- local create_dist_args="" |
775 |
- |
776 |
- tc-export AR CC CXX NM |
777 |
- |
778 |
- mkdir -p "${compile_target}" || die |
779 |
- |
780 |
- cd "${CHROMIUM_S}" || die |
781 |
- |
782 |
- # Build mksnapshot and pax-mark it. |
783 |
- eninja -C "${chromium_target}" mksnapshot || die |
784 |
- pax-mark m "${chromium_target}/mksnapshot" |
785 |
- cp -a "${chromium_target}/mksnapshot" "${compile_target}/" || die |
786 |
- |
787 |
- # Build chromedriver. |
788 |
- eninja -C "${chromium_target}" chromedriver |
789 |
- cp -a "${chromium_target}/chromedriver" "${compile_target}/" || die |
790 |
- |
791 |
- # Build libchromiumcontent components. |
792 |
- eninja -C "${chromium_target}" chromiumcontent:chromiumcontent |
793 |
- |
794 |
- cd "${S}" || die |
795 |
- |
796 |
- # Gather and prepare built components of libchromiumcontent. |
797 |
- create_dist_args+=" --target_arch=${target_arch} --component=static_library" |
798 |
- create_dist_args+=" --no_zip" |
799 |
- create_dist_args+=" --system-icu" |
800 |
- CHROMIUM_BUILD_DIR="${chromium_target}" \ |
801 |
- "${EPYTHON}" "${libcc_path}"/script/create-dist ${create_dist_args} || die |
802 |
- |
803 |
- # v8 is built as a shared library, so copy it manually |
804 |
- # for generate_filenames_gypi to find. |
805 |
- mkdir -p "${libcc_dist_shared_path}" || die |
806 |
- cp "${chromium_target}/libv8.so" "${libcc_dist_shared_path}" || die |
807 |
- |
808 |
- "${EPYTHON}" "${libcc_path}"/tools/generate_filenames_gypi.py \ |
809 |
- "${libcc_dist_path}/filenames.gypi" \ |
810 |
- "${CHROMIUM_S}" \ |
811 |
- "${libcc_dist_shared_path}" \ |
812 |
- "${libcc_dist_static_path}" |
813 |
- |
814 |
- # Configure electron. |
815 |
- myconf_gyp+=" |
816 |
- $(gyp_use cups) |
817 |
- $(gyp_use gnome use_gconf) |
818 |
- $(gyp_use gnome-keyring use_gnome_keyring) |
819 |
- $(gyp_use gnome-keyring linux_link_gnome_keyring) |
820 |
- $(gyp_use lto)" |
821 |
- |
822 |
- myconf_gyp+=" -Duse_system_icu=1" |
823 |
- |
824 |
- if [[ $(tc-getCC) == *clang* ]]; then |
825 |
- myconf_gyp+=" -Dclang=1" |
826 |
- else |
827 |
- myconf_gyp+=" -Dclang=0" |
828 |
- fi |
829 |
- |
830 |
- # Never use bundled gold binary. Disable gold linker flags for now. |
831 |
- # Do not use bundled clang. |
832 |
- myconf_gyp+=" |
833 |
- -Dclang_use_chrome_plugins=0 |
834 |
- -Dhost_clang=0 |
835 |
- -Dlinux_use_bundled_binutils=0 |
836 |
- -Dlinux_use_bundled_gold=0 |
837 |
- -Dlinux_use_gold_flags=0 |
838 |
- -Dsysroot=" |
839 |
- |
840 |
- myconf_gyp+=" -Dtarget_arch=${target_arch}" |
841 |
- myconf_gyp+=" -Dpython=${EPYTHON}" |
842 |
- |
843 |
- # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
844 |
- # Depending on GCC version the warnings are different and we don't want |
845 |
- # the build to fail because of that. |
846 |
- myconf_gyp+=" -Dwerror=" |
847 |
- |
848 |
- # Disable fatal linker warnings, bug 506268. |
849 |
- myconf_gyp+=" -Ddisable_fatal_linker_warnings=1" |
850 |
- |
851 |
- myconf_gyp+=" -Dicu_use_data_file_flag=0" |
852 |
- myconf_gyp+=" -Dgenerate_character_data=0" |
853 |
- |
854 |
- myconf_gyp+=" -Dlibchromiumcontent_component=0" |
855 |
- myconf_gyp+=" -Dcomponent=static_library" |
856 |
- myconf_gyp+=" -Dlibrary=static_library" |
857 |
- myconf_gyp+=" -Icommon.gypi electron.gyp" |
858 |
- |
859 |
- EGYP_CHROMIUM_COMMAND="${CHROMIUM_S}/build/gyp_chromium" \ |
860 |
- egyp_chromium ${myconf_gyp} || die |
861 |
- |
862 |
- mkdir -p "${compile_target}/lib/" || die |
863 |
- # Copy libv8 and snapshot files so the node binary can find them. |
864 |
- cp "${chromium_target}/libv8.so" "${compile_target}/lib/" || die |
865 |
- cp "${chromium_target}/natives_blob.bin" "${compile_target}" || die |
866 |
- cp "${chromium_target}/snapshot_blob.bin" "${compile_target}" || die |
867 |
- |
868 |
- # Copy generated shim headers. |
869 |
- mkdir -p "${compile_target}/gen" || die |
870 |
- cp -r "${chromium_target}/gen/shim_headers" \ |
871 |
- "${compile_target}/gen" || die |
872 |
- |
873 |
- # Build the Node binary and pax-mark it. |
874 |
- eninja -C ${compile_target} nodebin |
875 |
- pax-mark m ${compile_target}/nodebin |
876 |
- |
877 |
- # Finally, build Electron. |
878 |
- eninja -C ${compile_target} electron |
879 |
- pax-mark m ${compile_target}/electron |
880 |
- |
881 |
- echo "v${PV}" > ${compile_target}/version |
882 |
-} |
883 |
- |
884 |
-src_install() { |
885 |
- local install_dir="$(_get_install_dir)" |
886 |
- local install_suffix="$(_get_install_suffix)" |
887 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
888 |
- |
889 |
- pushd out/R/locales > /dev/null || die |
890 |
- chromium_remove_language_paks |
891 |
- popd > /dev/null || die |
892 |
- |
893 |
- # Install Electron |
894 |
- insinto "${install_dir}" |
895 |
- exeinto "${install_dir}" |
896 |
- newexe out/R/nodebin node |
897 |
- doexe out/R/electron |
898 |
- doexe out/R/chromedriver |
899 |
- doexe out/R/mksnapshot |
900 |
- doins out/R/libv8.so |
901 |
- fperms +x "${install_dir}/libv8.so" |
902 |
- doins out/R/libnode.so |
903 |
- fperms +x "${install_dir}/libnode.so" |
904 |
- doins out/R/natives_blob.bin |
905 |
- doins out/R/snapshot_blob.bin |
906 |
- doins out/R/blink_image_resources_200_percent.pak |
907 |
- doins out/R/content_resources_200_percent.pak |
908 |
- doins out/R/content_shell.pak |
909 |
- doins out/R/pdf_viewer_resources.pak |
910 |
- doins out/R/ui_resources_200_percent.pak |
911 |
- doins out/R/views_resources_200_percent.pak |
912 |
- doins -r out/R/resources |
913 |
- doins -r out/R/locales |
914 |
- dosym "${install_dir}/electron" "/usr/bin/electron${install_suffix}" |
915 |
- |
916 |
- doins out/R/version |
917 |
- |
918 |
- # Install Node headers |
919 |
- HEADERS_ONLY=1 \ |
920 |
- "${S}/vendor/node/tools/install.py" install "${ED}" "/usr" || die |
921 |
- # set up a symlink structure that npm expects.. |
922 |
- dodir /usr/include/node/deps/{v8,uv} |
923 |
- dosym . /usr/include/node/src |
924 |
- for var in deps/{uv,v8}/include; do |
925 |
- dosym ../.. /usr/include/node/${var} |
926 |
- done |
927 |
- |
928 |
- dodir "/usr/include/electron${install_suffix}" |
929 |
- mv "${ED}/usr/include/node" \ |
930 |
- "${ED}/usr/include/electron${install_suffix}/node" || die |
931 |
-} |
932 |
- |
933 |
-pkg_postinst() { |
934 |
- electron-config update |
935 |
-} |
936 |
- |
937 |
-pkg_postrm() { |
938 |
- electron-config update |
939 |
-} |
940 |
|
941 |
diff --git a/dev-util/electron/electron-1.7.15.ebuild b/dev-util/electron/electron-1.7.15.ebuild |
942 |
deleted file mode 100644 |
943 |
index ee39885c1cf..00000000000 |
944 |
--- a/dev-util/electron/electron-1.7.15.ebuild |
945 |
+++ /dev/null |
946 |
@@ -1,888 +0,0 @@ |
947 |
-# Copyright 1999-2018 Gentoo Foundation |
948 |
-# Distributed under the terms of the GNU General Public License v2 |
949 |
- |
950 |
-EAPI="6" |
951 |
-PYTHON_COMPAT=( python2_7 ) |
952 |
- |
953 |
-CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he |
954 |
- hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr |
955 |
- sv sw ta te th tr uk vi zh-CN zh-TW" |
956 |
- |
957 |
-inherit check-reqs chromium-2 gnome2-utils flag-o-matic multilib \ |
958 |
- multiprocessing pax-utils portability python-any-r1 toolchain-funcs \ |
959 |
- versionator virtualx xdg-utils |
960 |
- |
961 |
-# Keep this in sync with vendor/libchromiumcontent/VERSION |
962 |
-CHROMIUM_VERSION="58.0.3029.110" |
963 |
-# Keep this in sync with vendor/breakpad |
964 |
-BREAKPAD_COMMIT="c566c50d81f7b1edeaee9f11f5d07bda858d6b64" |
965 |
-# Keep this in sync with vendor/breakpad/src (and find the corresponding |
966 |
-# commit in https://github.com/google/breakpad/) |
967 |
-BREAKPAD_SRC_COMMIT="e35167de7516448fcc2bf687ad580b9d8b6aedc2" |
968 |
-# Keep this in sync with vendor/node |
969 |
-NODE_COMMIT="a992f2ff412b85606ec1d4c1eb00ad832fa1e640" |
970 |
-# Keep this in sync with vendor/native_mate |
971 |
-NATIVE_MATE_COMMIT="7d9c1a80f025f4c46f7da8ea73246fe0f1968579" |
972 |
-# Keep this in sync with vendor/pdf_viewer |
973 |
-PDF_VIEWER_COMMIT="beb36874a6b61d7a18b92bf7dcd1f0661e4c59cf" |
974 |
-# Keep this in sync with vendor/pdf_viewer/vendor/grit |
975 |
-GRIT_COMMIT="9536fb6429147d27ef1563088341825db0a893cd" |
976 |
-# Keep this in sync with vendor/libchromiumcontent |
977 |
-LIBCHROMIUMCONTENT_COMMIT="2f7b83669315f9492380334d1a8b1cd9bc758efd" |
978 |
-# Keep this in sync with package.json#devDependencies |
979 |
-ASAR_VERSION="0.13.0" |
980 |
-BROWSERIFY_VERSION="14.0.0" |
981 |
-NINJA_VERSION="1.8.2" |
982 |
- |
983 |
-PATCHES_P="gentoo-electron-patches-${P}" |
984 |
-CHROMIUM_P="chromium-${CHROMIUM_VERSION}" |
985 |
-BREAKPAD_P="chromium-breakpad-${BREAKPAD_COMMIT}" |
986 |
-BREAKPAD_SRC_P="breakpad-${BREAKPAD_SRC_COMMIT}" |
987 |
-NODE_P="node-${NODE_COMMIT}" |
988 |
-NATIVE_MATE_P="native-mate-${NATIVE_MATE_COMMIT}" |
989 |
-PDF_VIEWER_P="pdf-viewer-${PDF_VIEWER_COMMIT}" |
990 |
-GRIT_P="grit-${GRIT_COMMIT}" |
991 |
-LIBCHROMIUMCONTENT_P="libchromiumcontent-${LIBCHROMIUMCONTENT_COMMIT}" |
992 |
-ASAR_P="asar-${ASAR_VERSION}" |
993 |
-BROWSERIFY_P="browserify-${BROWSERIFY_VERSION}" |
994 |
- |
995 |
-DESCRIPTION="Cross platform application development framework based on web technologies" |
996 |
-HOMEPAGE="https://electronjs.org/" |
997 |
-SRC_URI=" |
998 |
- https://commondatastorage.googleapis.com/chromium-browser-official/${CHROMIUM_P}.tar.xz |
999 |
- https://github.com/electron/electron/archive/v${PV}.tar.gz -> ${P}.tar.gz |
1000 |
- https://github.com/electron/chromium-breakpad/archive/${BREAKPAD_COMMIT}.tar.gz -> electron-${BREAKPAD_P}.tar.gz |
1001 |
- https://github.com/google/breakpad/archive/${BREAKPAD_SRC_COMMIT}.tar.gz -> electron-${BREAKPAD_SRC_P}.tar.gz |
1002 |
- https://github.com/electron/node/archive/${NODE_COMMIT}.tar.gz -> electron-${NODE_P}.tar.gz |
1003 |
- https://github.com/zcbenz/native-mate/archive/${NATIVE_MATE_COMMIT}.tar.gz -> electron-${NATIVE_MATE_P}.tar.gz |
1004 |
- https://github.com/electron/pdf-viewer/archive/${PDF_VIEWER_COMMIT}.tar.gz -> electron-${PDF_VIEWER_P}.tar.gz |
1005 |
- https://github.com/elprans/grit/archive/${GRIT_COMMIT}.tar.gz -> electron-${GRIT_P}.tar.gz |
1006 |
- https://github.com/electron/libchromiumcontent/archive/${LIBCHROMIUMCONTENT_COMMIT}.tar.gz -> electron-${LIBCHROMIUMCONTENT_P}.tar.gz |
1007 |
- https://github.com/elprans/asar/releases/download/v${ASAR_VERSION}-gentoo/asar-build.tar.gz -> ${ASAR_P}.tar.gz |
1008 |
- https://github.com/elprans/node-browserify/releases/download/${BROWSERIFY_VERSION}-gentoo/browserify-build.tar.gz -> ${BROWSERIFY_P}.tar.gz |
1009 |
- https://github.com/elprans/gentoo-electron-patches/archive/${P}.tar.gz -> electron-patches-${PV}.tar.gz |
1010 |
- https://github.com/ninja-build/ninja/archive/v${NINJA_VERSION}.tar.gz -> ninja-${NINJA_VERSION}.tar.gz |
1011 |
-" |
1012 |
- |
1013 |
-S="${WORKDIR}/${P}" |
1014 |
-CHROMIUM_S="${S}/chromium" |
1015 |
-NODE_S="${S}/vendor/node" |
1016 |
-BREAKPAD_S="${S}/vendor/breakpad" |
1017 |
-BREAKPAD_SRC_S="${BREAKPAD_S}/src" |
1018 |
-NATIVE_MATE_S="${S}/vendor/native_mate" |
1019 |
-PDF_VIEWER_S="${S}/vendor/pdf_viewer" |
1020 |
-GRIT_S="${PDF_VIEWER_S}/vendor/grit" |
1021 |
-LIBCC_S="${S}/vendor/libchromiumcontent" |
1022 |
- |
1023 |
-LICENSE="BSD" |
1024 |
-SLOT="$(get_version_component_range 1-2)" |
1025 |
-KEYWORDS="~amd64" |
1026 |
-IUSE="cups custom-cflags gconf gnome-keyring gtk3 kerberos lto neon pic |
1027 |
- +proprietary-codecs pulseaudio selinux +system-ffmpeg +tcmalloc" |
1028 |
-RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )" |
1029 |
- |
1030 |
-# Native Client binaries are compiled with different set of flags, bug #452066. |
1031 |
-QA_FLAGS_IGNORED=".*\.nexe" |
1032 |
- |
1033 |
-# Native Client binaries may be stripped by the build system, which uses the |
1034 |
-# right tools for it, bug #469144 . |
1035 |
-QA_PRESTRIPPED=".*\.nexe" |
1036 |
- |
1037 |
-COMMON_DEPEND=" |
1038 |
- app-arch/bzip2:= |
1039 |
- >=app-eselect/eselect-electron-2.0 |
1040 |
- cups? ( >=net-print/cups-1.3.11:= ) |
1041 |
- >=dev-libs/elfutils-0.149 |
1042 |
- dev-libs/expat:= |
1043 |
- dev-libs/glib:2 |
1044 |
- >=dev-libs/icu-58:= |
1045 |
- >=dev-libs/jsoncpp-0.5.0-r1:= |
1046 |
- dev-libs/libxml2:=[icu] |
1047 |
- dev-libs/libxslt:= |
1048 |
- dev-libs/nspr:= |
1049 |
- >=dev-libs/nss-3.14.3:= |
1050 |
- >=dev-libs/re2-0.2016.05.01:= |
1051 |
- gconf? ( >=gnome-base/gconf-2.24.0:= ) |
1052 |
- gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= ) |
1053 |
- >=media-libs/alsa-lib-1.0.19:= |
1054 |
- media-libs/fontconfig:= |
1055 |
- media-libs/freetype:= |
1056 |
- >=media-libs/harfbuzz-1.3.1:=[icu(+)] |
1057 |
- media-libs/libexif:= |
1058 |
- media-libs/libjpeg-turbo:= |
1059 |
- media-libs/libpng:= |
1060 |
- >=media-libs/libvpx-1.7.0:=[postproc,svc] |
1061 |
- media-libs/speex:= |
1062 |
- pulseaudio? ( media-sound/pulseaudio:= ) |
1063 |
- system-ffmpeg? ( >=media-video/ffmpeg-3:= ) |
1064 |
- sys-apps/dbus:= |
1065 |
- sys-apps/pciutils:= |
1066 |
- >=sys-libs/libcap-2.22:= |
1067 |
- virtual/udev |
1068 |
- x11-libs/cairo:= |
1069 |
- x11-libs/gdk-pixbuf:2 |
1070 |
- x11-libs/libdrm |
1071 |
- x11-libs/libnotify:= |
1072 |
- x11-libs/libX11:= |
1073 |
- x11-libs/libXcomposite:= |
1074 |
- x11-libs/libXcursor:= |
1075 |
- x11-libs/libXdamage:= |
1076 |
- x11-libs/libXext:= |
1077 |
- x11-libs/libXfixes:= |
1078 |
- >=x11-libs/libXi-1.6.0:= |
1079 |
- x11-libs/libXinerama:= |
1080 |
- x11-libs/libXrandr:= |
1081 |
- x11-libs/libXrender:= |
1082 |
- x11-libs/libXScrnSaver:= |
1083 |
- x11-libs/libXtst:= |
1084 |
- x11-libs/pango:= |
1085 |
- app-arch/snappy:= |
1086 |
- media-libs/flac:= |
1087 |
- >=media-libs/libwebp-0.4.0:= |
1088 |
- sys-libs/zlib:=[minizip] |
1089 |
- kerberos? ( virtual/krb5 ) |
1090 |
-" |
1091 |
-# For nvidia-drivers blocker, see bug #413637 . |
1092 |
-RDEPEND="${COMMON_DEPEND} |
1093 |
- !<dev-util/electron-0.36.12-r4 |
1094 |
- x11-misc/xdg-utils |
1095 |
- virtual/opengl |
1096 |
- virtual/ttf-fonts |
1097 |
- !gtk3? ( x11-libs/gtk+:2 ) |
1098 |
- gtk3? ( x11-libs/gtk+:3[X] ) |
1099 |
- selinux? ( sec-policy/selinux-chromium ) |
1100 |
- tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 ) |
1101 |
-" |
1102 |
-# dev-vcs/git - https://bugs.gentoo.org/593476 |
1103 |
-DEPEND="${COMMON_DEPEND} |
1104 |
- >=app-arch/gzip-1.7 |
1105 |
- !arm? ( |
1106 |
- dev-lang/yasm |
1107 |
- ) |
1108 |
- dev-lang/perl |
1109 |
- dev-perl/JSON |
1110 |
- >=dev-util/gperf-3.0.3 |
1111 |
- dev-util/ninja |
1112 |
- net-libs/nodejs |
1113 |
- sys-apps/hwids[usb(+)] |
1114 |
- >=sys-devel/bison-2.4.3 |
1115 |
- sys-devel/flex |
1116 |
- virtual/pkgconfig |
1117 |
- dev-vcs/git |
1118 |
- x11-libs/gtk+:2 |
1119 |
- x11-libs/gtk+:3 |
1120 |
- $(python_gen_any_dep ' |
1121 |
- dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}] |
1122 |
- >=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}] |
1123 |
- dev-python/html5lib[${PYTHON_USEDEP}] |
1124 |
- dev-python/simplejson[${PYTHON_USEDEP}] |
1125 |
- ') |
1126 |
-" |
1127 |
- |
1128 |
-# Keep this in sync with the python_gen_any_dep call. |
1129 |
-python_check_deps() { |
1130 |
- has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" && |
1131 |
- has_version --host-root ">=dev-python/beautifulsoup-4.3.2:4[${PYTHON_USEDEP}]" && |
1132 |
- has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" && |
1133 |
- has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]" |
1134 |
-} |
1135 |
- |
1136 |
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then |
1137 |
- EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; |
1138 |
-fi |
1139 |
- |
1140 |
-pre_build_checks() { |
1141 |
- if [[ ${MERGE_TYPE} != binary ]]; then |
1142 |
- local -x CPP="$(tc-getCXX) -E" |
1143 |
- if tc-is-clang && ! version_is_at_least "3.9.1" "$(clang-fullversion)"; then |
1144 |
- # bugs: #601654 |
1145 |
- die "At least clang 3.9.1 is required" |
1146 |
- fi |
1147 |
- if tc-is-gcc && ! version_is_at_least 4.9 "$(gcc-version)"; then |
1148 |
- # bugs: #535730, #525374, #518668, #600288 |
1149 |
- die "At least gcc 4.9 is required" |
1150 |
- fi |
1151 |
- fi |
1152 |
- |
1153 |
- # LTO pass requires more file descriptors |
1154 |
- if use lto; then |
1155 |
- local lto_n_rlimit_min="16384" |
1156 |
- local maxfiles=$(ulimit -n -H) |
1157 |
- if [ "${maxfiles}" -lt "${lto_n_rlimit_min}" ]; then |
1158 |
- eerror "" |
1159 |
- eerror "Building with USE=\"lto\" requires file descriptor" \ |
1160 |
- "limit to be no less than ${lto_n_rlimit_min}." |
1161 |
- eerror "The current limit for portage is ${maxfiles}." |
1162 |
- eerror "Please add the following to /etc/security/limits.conf:" |
1163 |
- eerror "" |
1164 |
- eerror " root hard nofile ${lto_n_rlimit_min}" |
1165 |
- eerror " root soft nofile ${lto_n_rlimit_min}" |
1166 |
- eerror "" |
1167 |
- die |
1168 |
- fi |
1169 |
- fi |
1170 |
- |
1171 |
- # Check build requirements, bug #541816 and bug #471810 . |
1172 |
- CHECKREQS_MEMORY="3G" |
1173 |
- use lto && CHECKREQS_MEMORY="7G" |
1174 |
- CHECKREQS_DISK_BUILD="5G" |
1175 |
- eshopts_push -s extglob |
1176 |
- if is-flagq '-g?(gdb)?([1-9])'; then |
1177 |
- CHECKREQS_DISK_BUILD="25G" |
1178 |
- CHECKREQS_MEMORY="16G" |
1179 |
- fi |
1180 |
- eshopts_pop |
1181 |
- check-reqs_pkg_pretend |
1182 |
-} |
1183 |
- |
1184 |
-pkg_pretend() { |
1185 |
- pre_build_checks |
1186 |
-} |
1187 |
- |
1188 |
-pkg_setup() { |
1189 |
- pre_build_checks |
1190 |
- |
1191 |
- # Make sure the build system will use the right python, bug #344367. |
1192 |
- python-any-r1_pkg_setup |
1193 |
- |
1194 |
- chromium_suid_sandbox_check_kernel_config |
1195 |
-} |
1196 |
- |
1197 |
-_unnest_patches() { |
1198 |
- local _s="${1%/}/" |
1199 |
- local path |
1200 |
- local relpath |
1201 |
- local out |
1202 |
- |
1203 |
- (find "${_s}" -mindepth 2 -name '*.patch' -printf "%P\n" || die) \ |
1204 |
- | while read -r path; do |
1205 |
- relpath="$(dirname ${path})" |
1206 |
- out="${_s}/__${relpath////_}_$(basename ${path})" |
1207 |
- sed -r -e "s|^([-+]{3}) ([ab])/(.*)$|\1 \2/${relpath}/\3|g" \ |
1208 |
- "${_s}/${path}" > "${out}" || die |
1209 |
- done |
1210 |
-} |
1211 |
- |
1212 |
-_get_install_suffix() { |
1213 |
- local c=(${SLOT//\// }) |
1214 |
- local slot=${c[0]} |
1215 |
- local suffix |
1216 |
- |
1217 |
- if [[ "${slot}" == "0" ]]; then |
1218 |
- suffix="" |
1219 |
- else |
1220 |
- suffix="-${slot}" |
1221 |
- fi |
1222 |
- |
1223 |
- echo -n "${suffix}" |
1224 |
-} |
1225 |
- |
1226 |
-_get_install_dir() { |
1227 |
- echo -n "/usr/$(get_libdir)/electron$(_get_install_suffix)" |
1228 |
-} |
1229 |
- |
1230 |
-_get_target_arch() { |
1231 |
- local myarch="$(tc-arch)" |
1232 |
- local target_arch |
1233 |
- |
1234 |
- if [[ $myarch = amd64 ]] ; then |
1235 |
- target_arch=x64 |
1236 |
- elif [[ $myarch = x86 ]] ; then |
1237 |
- target_arch=ia32 |
1238 |
- elif [[ $myarch = arm64 ]] ; then |
1239 |
- target_arch=arm64 |
1240 |
- elif [[ $myarch = arm ]] ; then |
1241 |
- target_arch=arm |
1242 |
- else |
1243 |
- die "Failed to determine target arch, got '$myarch'." |
1244 |
- fi |
1245 |
- |
1246 |
- echo -n "${target_arch}" |
1247 |
-} |
1248 |
- |
1249 |
-src_prepare() { |
1250 |
- mv "${WORKDIR}/${CHROMIUM_P}" "${CHROMIUM_S}" || die |
1251 |
- rm -r "${NODE_S}" && |
1252 |
- mv "${WORKDIR}/${NODE_P}" "${NODE_S}" || die |
1253 |
- rm -r "${BREAKPAD_S}" && |
1254 |
- mv "${WORKDIR}/${BREAKPAD_P}" "${BREAKPAD_S}" || die |
1255 |
- rm -r "${BREAKPAD_SRC_S}" && |
1256 |
- mv "${WORKDIR}/${BREAKPAD_SRC_P}/src" "${BREAKPAD_SRC_S}" || die |
1257 |
- rm -r "${NATIVE_MATE_S}" && |
1258 |
- mv "${WORKDIR}/${NATIVE_MATE_P}" "${NATIVE_MATE_S}" || die |
1259 |
- rm -r "${PDF_VIEWER_S}" && |
1260 |
- mv "${WORKDIR}/${PDF_VIEWER_P}" "${PDF_VIEWER_S}" || die |
1261 |
- rm -r "${GRIT_S}" && |
1262 |
- mv "${WORKDIR}/${GRIT_P}" "${GRIT_S}" || die |
1263 |
- rm -r "${LIBCC_S}" && |
1264 |
- mv "${WORKDIR}/${LIBCHROMIUMCONTENT_P}" "${LIBCC_S}" || die |
1265 |
- rsync -a "${WORKDIR}/${ASAR_P}/node_modules/" \ |
1266 |
- "${S}/node_modules/" || die |
1267 |
- rsync -a "${WORKDIR}/${BROWSERIFY_P}/node_modules/" \ |
1268 |
- "${S}/node_modules/" || die |
1269 |
- |
1270 |
- # node patches |
1271 |
- cd "${NODE_S}" || die |
1272 |
- # make sure node uses the correct version of v8 |
1273 |
- rm -r deps/v8 || die |
1274 |
- ln -s "${CHROMIUM_S}/v8" deps/ || die |
1275 |
- |
1276 |
- # make sure we use python2.* while using gyp |
1277 |
- sed -i -e "s/python/${EPYTHON}/" \ |
1278 |
- deps/npm/node_modules/node-gyp/gyp/gyp || die |
1279 |
- sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" \ |
1280 |
- deps/npm/node_modules/node-gyp/lib/configure.js || die |
1281 |
- |
1282 |
- python_fix_shebang "${CHROMIUM_S}/chrome/browser" |
1283 |
- python_fix_shebang "${CHROMIUM_S}/build/gyp_chromium" |
1284 |
- python_fix_shebang "${S}/tools/" |
1285 |
- |
1286 |
- # less verbose install output (stating the same as portage, basically) |
1287 |
- sed -i -e "/print/d" tools/install.py || die |
1288 |
- |
1289 |
- # proper libdir, hat tip @ryanpcmcquen |
1290 |
- # https://github.com/iojs/io.js/issues/504 |
1291 |
- local LIBDIR=$(get_libdir) |
1292 |
- sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die |
1293 |
- sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die |
1294 |
- sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die |
1295 |
- |
1296 |
- # Fix broken patch |
1297 |
- cd "${LIBCC_S}" || die |
1298 |
- eapply "${FILESDIR}/${P}-v8-crankshaft-rce-fix.patch" |
1299 |
- |
1300 |
- # Apply libcc Chromium patches. |
1301 |
- cd "${CHROMIUM_S}" || die |
1302 |
- _unnest_patches "${LIBCC_S}/patches" |
1303 |
- eapply "${LIBCC_S}/patches" |
1304 |
- |
1305 |
- # Apply Gentoo patches |
1306 |
- cd "${S}" || die |
1307 |
- _unnest_patches "${WORKDIR}/${PATCHES_P}/${PV}" |
1308 |
- eapply "${WORKDIR}/${PATCHES_P}/${PV}" |
1309 |
- |
1310 |
- # Merge chromiumcontent component into chromium source tree. |
1311 |
- mkdir -p "${CHROMIUM_S}/chromiumcontent" || die |
1312 |
- cp -a "${LIBCC_S}/chromiumcontent" "${CHROMIUM_S}/" || die |
1313 |
- cp -a "${LIBCC_S}/tools/linux/" "${CHROMIUM_S}/tools/" || die |
1314 |
- |
1315 |
- if use gtk3; then |
1316 |
- sed -i -e 's/gtk2/gtk3/g' "${CHROMIUM_S}/chromiumcontent/BUILD.gn" \ |
1317 |
- || die |
1318 |
- fi |
1319 |
- |
1320 |
- local keeplibs=( |
1321 |
- base/third_party/dmg_fp |
1322 |
- base/third_party/dynamic_annotations |
1323 |
- base/third_party/icu |
1324 |
- base/third_party/nspr |
1325 |
- base/third_party/superfasthash |
1326 |
- base/third_party/symbolize |
1327 |
- base/third_party/valgrind |
1328 |
- base/third_party/xdg_mime |
1329 |
- base/third_party/xdg_user_dirs |
1330 |
- breakpad/src/third_party/curl |
1331 |
- chrome/third_party/mozilla_security_manager |
1332 |
- courgette/third_party |
1333 |
- net/third_party/mozilla_security_manager |
1334 |
- net/third_party/nss |
1335 |
- third_party/WebKit |
1336 |
- third_party/analytics |
1337 |
- third_party/angle |
1338 |
- third_party/angle/src/common/third_party/numerics |
1339 |
- third_party/angle/src/third_party/compiler |
1340 |
- third_party/angle/src/third_party/libXNVCtrl |
1341 |
- third_party/angle/src/third_party/murmurhash |
1342 |
- third_party/angle/src/third_party/trace_event |
1343 |
- third_party/boringssl |
1344 |
- third_party/brotli |
1345 |
- third_party/cacheinvalidation |
1346 |
- third_party/catapult |
1347 |
- third_party/catapult/third_party/polymer |
1348 |
- third_party/catapult/third_party/py_vulcanize |
1349 |
- third_party/catapult/third_party/py_vulcanize/third_party/rcssmin |
1350 |
- third_party/catapult/third_party/py_vulcanize/third_party/rjsmin |
1351 |
- third_party/catapult/tracing/third_party/d3 |
1352 |
- third_party/catapult/tracing/third_party/gl-matrix |
1353 |
- third_party/catapult/tracing/third_party/jszip |
1354 |
- third_party/catapult/tracing/third_party/mannwhitneyu |
1355 |
- third_party/ced |
1356 |
- third_party/cld_2 |
1357 |
- third_party/cld_3 |
1358 |
- third_party/cros_system_api |
1359 |
- third_party/devscripts |
1360 |
- third_party/dom_distiller_js |
1361 |
- third_party/fips181 |
1362 |
- third_party/flatbuffers |
1363 |
- third_party/flot |
1364 |
- third_party/google_input_tools |
1365 |
- third_party/google_input_tools/third_party/closure_library |
1366 |
- third_party/google_input_tools/third_party/closure_library/third_party/closure |
1367 |
- third_party/hunspell |
1368 |
- third_party/iccjpeg |
1369 |
- third_party/inspector_protocol |
1370 |
- third_party/jinja2 |
1371 |
- third_party/jstemplate |
1372 |
- third_party/khronos |
1373 |
- third_party/leveldatabase |
1374 |
- third_party/libXNVCtrl |
1375 |
- third_party/libaddressinput |
1376 |
- third_party/libjingle |
1377 |
- third_party/libphonenumber |
1378 |
- third_party/libsecret |
1379 |
- third_party/libsrtp |
1380 |
- third_party/libudev |
1381 |
- third_party/libusb |
1382 |
- third_party/libwebm |
1383 |
- third_party/libxml/chromium |
1384 |
- third_party/libyuv |
1385 |
- third_party/lss |
1386 |
- third_party/lzma_sdk |
1387 |
- third_party/markupsafe |
1388 |
- third_party/mesa |
1389 |
- third_party/modp_b64 |
1390 |
- third_party/mt19937ar |
1391 |
- third_party/node |
1392 |
- third_party/node/node_modules/vulcanize/third_party/UglifyJS2 |
1393 |
- third_party/openh264 |
1394 |
- third_party/openmax_dl |
1395 |
- third_party/opus |
1396 |
- third_party/ots |
1397 |
- third_party/pdfium |
1398 |
- third_party/pdfium/third_party/agg23 |
1399 |
- third_party/pdfium/third_party/base |
1400 |
- third_party/pdfium/third_party/bigint |
1401 |
- third_party/pdfium/third_party/freetype |
1402 |
- third_party/pdfium/third_party/lcms2-2.6 |
1403 |
- third_party/pdfium/third_party/libjpeg |
1404 |
- third_party/pdfium/third_party/libopenjpeg20 |
1405 |
- third_party/pdfium/third_party/libpng16 |
1406 |
- third_party/pdfium/third_party/libtiff |
1407 |
- third_party/pdfium/third_party/zlib_v128 |
1408 |
- third_party/ply |
1409 |
- third_party/polymer |
1410 |
- third_party/protobuf |
1411 |
- third_party/protobuf/third_party/six |
1412 |
- third_party/qcms |
1413 |
- third_party/sfntly |
1414 |
- third_party/skia |
1415 |
- third_party/smhasher |
1416 |
- third_party/sqlite |
1417 |
- third_party/tcmalloc |
1418 |
- third_party/usrsctp |
1419 |
- third_party/web-animations-js |
1420 |
- third_party/webdriver |
1421 |
- third_party/webrtc |
1422 |
- third_party/widevine |
1423 |
- third_party/woff2 |
1424 |
- third_party/x86inc |
1425 |
- third_party/zlib/google |
1426 |
- url/third_party/mozilla |
1427 |
- v8/src/third_party/valgrind |
1428 |
- v8/third_party/inspector_protocol |
1429 |
- |
1430 |
- # gyp -> gn leftovers |
1431 |
- base/third_party/libevent |
1432 |
- third_party/adobe |
1433 |
- third_party/speech-dispatcher |
1434 |
- third_party/usb_ids |
1435 |
- third_party/xdg-utils |
1436 |
- third_party/yasm/run_yasm.py |
1437 |
- ) |
1438 |
- if ! use system-ffmpeg; then |
1439 |
- keeplibs+=( third_party/ffmpeg ) |
1440 |
- fi |
1441 |
- |
1442 |
- cd "${CHROMIUM_S}" || die |
1443 |
- |
1444 |
- # Remove most bundled libraries. Some are still needed. |
1445 |
- ebegin "Unbundling libraries" |
1446 |
- build/linux/unbundle/remove_bundled_libraries.py \ |
1447 |
- "${keeplibs[@]}" --do-remove || die |
1448 |
- eend |
1449 |
- |
1450 |
- cd "${S}" || die |
1451 |
- |
1452 |
- eapply_user |
1453 |
-} |
1454 |
- |
1455 |
-src_configure() { |
1456 |
- local myconf_gn="" |
1457 |
- local myconf_gyp="" |
1458 |
- |
1459 |
- cd "${CHROMIUM_S}" || die |
1460 |
- |
1461 |
- # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. |
1462 |
- myconf_gn+=" is_debug=false" |
1463 |
- |
1464 |
- # Disable nacl, we can't build without pnacl (http://crbug.com/269560). |
1465 |
- myconf_gn+=" enable_nacl=false" |
1466 |
- |
1467 |
- # Use system-provided libraries. |
1468 |
- # TODO: use_system_hunspell (upstream changes needed). |
1469 |
- # TODO: use_system_libsrtp (bug #459932). |
1470 |
- # TODO: use_system_libusb (http://crbug.com/266149). |
1471 |
- # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077). |
1472 |
- # TODO: use_system_protobuf (bug #525560). |
1473 |
- # TODO: use_system_ssl (http://crbug.com/58087). |
1474 |
- # TODO: use_system_sqlite (http://crbug.com/22208). |
1475 |
- |
1476 |
- # libevent: https://bugs.gentoo.org/593458 |
1477 |
- local gn_system_libraries=( |
1478 |
- flac |
1479 |
- harfbuzz-ng |
1480 |
- icu |
1481 |
- libjpeg |
1482 |
- libpng |
1483 |
- libvpx |
1484 |
- libwebp |
1485 |
- libxml |
1486 |
- libxslt |
1487 |
- re2 |
1488 |
- snappy |
1489 |
- yasm |
1490 |
- zlib) |
1491 |
- if use system-ffmpeg; then |
1492 |
- gn_system_libraries+=( ffmpeg ) |
1493 |
- fi |
1494 |
- build/linux/unbundle/replace_gn_files.py \ |
1495 |
- --system-libraries ${gn_system_libraries[@]} || die |
1496 |
- |
1497 |
- # Optional dependencies. |
1498 |
- myconf_gn+=" use_cups=$(usex cups true false)" |
1499 |
- myconf_gn+=" use_gconf=$(usex gconf true false)" |
1500 |
- myconf_gn+=" use_gnome_keyring=$(usex gnome-keyring true false)" |
1501 |
- myconf_gn+=" use_gtk3=$(usex gtk3 true false)" |
1502 |
- myconf_gn+=" use_kerberos=$(usex kerberos true false)" |
1503 |
- myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" |
1504 |
- |
1505 |
- # TODO: link_pulseaudio=true for GN. |
1506 |
- |
1507 |
- myconf_gn+=" fieldtrial_testing_like_official_build=true" |
1508 |
- |
1509 |
- if tc-is-clang; then |
1510 |
- myconf_gn+=" is_clang=true clang_base_path=\"/usr\" clang_use_chrome_plugins=false" |
1511 |
- else |
1512 |
- myconf_gn+=" is_clang=false" |
1513 |
- fi |
1514 |
- |
1515 |
- # Never use bundled gold binary. Disable gold linker flags for now. |
1516 |
- # Do not use bundled clang. |
1517 |
- # Trying to use gold results in linker crash. |
1518 |
- myconf_gn+=" use_gold=false use_sysroot=false linux_use_bundled_binutils=false" |
1519 |
- |
1520 |
- ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" |
1521 |
- myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" |
1522 |
- myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" |
1523 |
- |
1524 |
- # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . |
1525 |
- # Note: these are for Gentoo use ONLY. For your own distribution, |
1526 |
- # please get your own set of keys. Feel free to contact chromium@g.o |
1527 |
- # for more info. |
1528 |
- local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" |
1529 |
- local google_default_client_id="329227923882.apps.googleusercontent.com" |
1530 |
- local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu" |
1531 |
- myconf_gn+=" google_api_key=\"${google_api_key}\"" |
1532 |
- myconf_gn+=" google_default_client_id=\"${google_default_client_id}\"" |
1533 |
- myconf_gn+=" google_default_client_secret=\"${google_default_client_secret}\"" |
1534 |
- |
1535 |
- local target_arch=$(_get_target_arch) |
1536 |
- local ffmpeg_target_arch="${target_arch}" |
1537 |
- |
1538 |
- if [[ ${ffmpeg_target_arch} = arm ]]; then |
1539 |
- ffmpeg_target_arch=$(usex neon arm-neon arm) |
1540 |
- fi |
1541 |
- |
1542 |
- # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
1543 |
- # Depending on GCC version the warnings are different and we don't want |
1544 |
- # the build to fail because of that. |
1545 |
- myconf_gn+=" treat_warnings_as_errors=false" |
1546 |
- |
1547 |
- # Disable fatal linker warnings, bug 506268. |
1548 |
- myconf_gn+=" fatal_linker_warnings=false" |
1549 |
- |
1550 |
- # Avoid CFLAGS problems, bug #352457, bug #390147. |
1551 |
- if ! use custom-cflags; then |
1552 |
- replace-flags "-Os" "-O2" |
1553 |
- strip-flags |
1554 |
- |
1555 |
- filter-flags "-Wl,--as-needed" |
1556 |
- |
1557 |
- # Prevent linker from running out of address space, bug #471810 . |
1558 |
- if use x86; then |
1559 |
- filter-flags "-g*" |
1560 |
- fi |
1561 |
- |
1562 |
- # Prevent libvpx build failures. Bug 530248, 544702, 546984. |
1563 |
- if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then |
1564 |
- filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 |
1565 |
- fi |
1566 |
- fi |
1567 |
- |
1568 |
- # Make sure the build system will use the right tools, bug #340795. |
1569 |
- tc-export AR CC CXX NM |
1570 |
- |
1571 |
- # https://bugs.gentoo.org/588596 |
1572 |
- append-cxxflags $(test-flags-CXX -fno-delete-null-pointer-checks) |
1573 |
- |
1574 |
- # Define a custom toolchain for GN |
1575 |
- myconf_gn+=" custom_toolchain=\"${FILESDIR}/toolchain:default\"" |
1576 |
- |
1577 |
- myconf_gn+=" icu_use_data_file=false" |
1578 |
- |
1579 |
- use lto && myconf_gn+=" allow_posix_link_time_opt=true" |
1580 |
- |
1581 |
- # Tools for building programs to be executed on the build system, bug #410883. |
1582 |
- if tc-is-cross-compiler; then |
1583 |
- export AR_host=$(tc-getBUILD_AR) |
1584 |
- export CC_host=$(tc-getBUILD_CC) |
1585 |
- export CXX_host=$(tc-getBUILD_CXX) |
1586 |
- export NM_host=$(tc-getBUILD_NM) |
1587 |
- fi |
1588 |
- |
1589 |
- # Bug 491582. |
1590 |
- export TMPDIR="${WORKDIR}/temp" |
1591 |
- mkdir -p -m 755 "${TMPDIR}" || die |
1592 |
- |
1593 |
- if ! use system-ffmpeg; then |
1594 |
- local build_ffmpeg_args="" |
1595 |
- if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then |
1596 |
- build_ffmpeg_args+=" --disable-asm" |
1597 |
- fi |
1598 |
- |
1599 |
- # Re-configure bundled ffmpeg. See bug #491378 for example reasons. |
1600 |
- einfo "Configuring bundled ffmpeg..." |
1601 |
- pushd third_party/ffmpeg > /dev/null || die |
1602 |
- chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \ |
1603 |
- --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die |
1604 |
- chromium/scripts/copy_config.sh || die |
1605 |
- chromium/scripts/generate_gn.py || die |
1606 |
- popd > /dev/null || die |
1607 |
- fi |
1608 |
- |
1609 |
- third_party/libaddressinput/chromium/tools/update-strings.py || die |
1610 |
- |
1611 |
- touch chrome/test/data/webui/i18n_process_css_test.html || die |
1612 |
- |
1613 |
- einfo "Configuring bundled nodejs..." |
1614 |
- pushd "${S}/vendor/node" > /dev/null || die |
1615 |
- # Make sure gyp_node does not run |
1616 |
- echo '#!/usr/bin/env python' > tools/gyp_node.py || die |
1617 |
- # --shared-libuv cannot be used as electron's node fork |
1618 |
- # patches uv_loop structure. |
1619 |
- ./configure --shared --without-bundled-v8 --shared-openssl \ |
1620 |
- --shared-http-parser --shared-zlib --without-npm \ |
1621 |
- --with-intl=system-icu --without-dtrace \ |
1622 |
- --dest-cpu=${target_arch} --prefix="" || die |
1623 |
- popd > /dev/null || die |
1624 |
- |
1625 |
- # libchromiumcontent configuration |
1626 |
- myconf_gn+=" root_extra_deps = [\"//chromiumcontent:chromiumcontent\"]" |
1627 |
- myconf_gn+=" is_electron_build = true" |
1628 |
- myconf_gn+=" is_component_build = false" |
1629 |
- myconf_gn+=" use_allocator=$(usex tcmalloc \"tcmalloc\" \"none\")" |
1630 |
- |
1631 |
- einfo "Configuring chromiumcontent..." |
1632 |
- tools/gn/bootstrap/bootstrap.py -v --gn-gen-args "${myconf_gn}" || die |
1633 |
- out/Release/gn gen --args="${myconf_gn}" out/Release || die |
1634 |
- |
1635 |
- cd "${S}" || die |
1636 |
-} |
1637 |
- |
1638 |
-eninja() { |
1639 |
- if [[ -z ${NINJAOPTS+set} ]]; then |
1640 |
- local jobs=$(makeopts_jobs) |
1641 |
- local loadavg=$(makeopts_loadavg) |
1642 |
- |
1643 |
- if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then |
1644 |
- NINJAOPTS+=" -j ${jobs}" |
1645 |
- fi |
1646 |
- if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then |
1647 |
- NINJAOPTS+=" -l ${loadavg}" |
1648 |
- fi |
1649 |
- fi |
1650 |
- set -- ninja -v ${NINJAOPTS} "$@" |
1651 |
- echo "$@" |
1652 |
- "$@" || die |
1653 |
-} |
1654 |
- |
1655 |
-src_compile() { |
1656 |
- local compile_target="${S}/out/R" |
1657 |
- local myconf_gyp="" |
1658 |
- local chromium_target="${CHROMIUM_S}/out/Release" |
1659 |
- local libcc_path="${S}/vendor/libchromiumcontent" |
1660 |
- local libcc_dist_path="${libcc_path}/dist/main" |
1661 |
- local libcc_dist_static_path="${libcc_dist_path}/static_library" |
1662 |
- local libcc_dist_shared_path="${libcc_dist_path}/shared_library" |
1663 |
- local libcc_output="${CHROMIUM_S}/out/Release/obj/chromiumcontent" |
1664 |
- local libcc_output_shared="${libcc_output}-shared" |
1665 |
- local target_arch=$(_get_target_arch) |
1666 |
- local l="" |
1667 |
- local create_dist_args="" |
1668 |
- |
1669 |
- tc-export AR CC CXX NM |
1670 |
- |
1671 |
- mkdir -p "${compile_target}" || die |
1672 |
- |
1673 |
- cd "${CHROMIUM_S}" || die |
1674 |
- |
1675 |
- # Build mksnapshot and pax-mark it. |
1676 |
- eninja -C "${chromium_target}" mksnapshot || die |
1677 |
- pax-mark m "${chromium_target}/mksnapshot" |
1678 |
- cp -a "${chromium_target}/mksnapshot" "${compile_target}/" || die |
1679 |
- |
1680 |
- # Build chromedriver. |
1681 |
- eninja -C "${chromium_target}" chromedriver |
1682 |
- cp -a "${chromium_target}/chromedriver" "${compile_target}/" || die |
1683 |
- |
1684 |
- # Build libchromiumcontent components. |
1685 |
- eninja -C "${chromium_target}" chromiumcontent:chromiumcontent |
1686 |
- |
1687 |
- cd "${S}" || die |
1688 |
- |
1689 |
- # Gather and prepare built components of libchromiumcontent. |
1690 |
- create_dist_args+=" --target_arch=${target_arch} --component=static_library" |
1691 |
- create_dist_args+=" --no_zip" |
1692 |
- create_dist_args+=" --system-icu" |
1693 |
- CHROMIUM_BUILD_DIR="${chromium_target}" \ |
1694 |
- PYTHONPATH="${WORKDIR}/ninja-${NINJA_VERSION}/misc" \ |
1695 |
- "${EPYTHON}" "${libcc_path}"/script/create-dist ${create_dist_args} || die |
1696 |
- |
1697 |
- # v8 is built as a shared library, so copy it manually |
1698 |
- # for generate_filenames_gypi to find. |
1699 |
- mkdir -p "${libcc_dist_shared_path}" || die |
1700 |
- cp "${chromium_target}/libv8.so" "${libcc_dist_shared_path}" || die |
1701 |
- |
1702 |
- "${EPYTHON}" "${libcc_path}"/tools/generate_filenames_gypi.py \ |
1703 |
- "${libcc_dist_path}/filenames.gypi" \ |
1704 |
- "${CHROMIUM_S}" \ |
1705 |
- "${libcc_dist_shared_path}" \ |
1706 |
- "${libcc_dist_static_path}" |
1707 |
- |
1708 |
- # Configure electron. |
1709 |
- myconf_gyp+=" |
1710 |
- $(gyp_use cups) |
1711 |
- $(gyp_use gconf use_gconf) |
1712 |
- $(gyp_use gnome-keyring use_gnome_keyring) |
1713 |
- $(gyp_use gnome-keyring linux_link_gnome_keyring) |
1714 |
- $(gyp_use gtk3) |
1715 |
- $(gyp_use lto)" |
1716 |
- |
1717 |
- myconf_gyp+=" -Duse_system_icu=1" |
1718 |
- |
1719 |
- if [[ $(tc-getCC) == *clang* ]]; then |
1720 |
- myconf_gyp+=" -Dclang=1" |
1721 |
- else |
1722 |
- myconf_gyp+=" -Dclang=0" |
1723 |
- fi |
1724 |
- |
1725 |
- # Never use bundled gold binary. Disable gold linker flags for now. |
1726 |
- # Do not use bundled clang. |
1727 |
- myconf_gyp+=" |
1728 |
- -Dclang_use_chrome_plugins=0 |
1729 |
- -Dhost_clang=0 |
1730 |
- -Dlinux_use_bundled_binutils=0 |
1731 |
- -Dlinux_use_bundled_gold=0 |
1732 |
- -Dlinux_use_gold_flags=0 |
1733 |
- -Dsysroot=" |
1734 |
- |
1735 |
- myconf_gyp+=" -Dtarget_arch=${target_arch}" |
1736 |
- myconf_gyp+=" -Dpython=${EPYTHON}" |
1737 |
- |
1738 |
- # Make sure that -Werror doesn't get added to CFLAGS by the build system. |
1739 |
- # Depending on GCC version the warnings are different and we don't want |
1740 |
- # the build to fail because of that. |
1741 |
- myconf_gyp+=" -Dwerror=" |
1742 |
- |
1743 |
- # Disable fatal linker warnings, bug 506268. |
1744 |
- myconf_gyp+=" -Ddisable_fatal_linker_warnings=1" |
1745 |
- |
1746 |
- myconf_gyp+=" -Dicu_use_data_file_flag=0" |
1747 |
- myconf_gyp+=" -Dgenerate_character_data=0" |
1748 |
- |
1749 |
- myconf_gyp+=" -Dlibchromiumcontent_component=0" |
1750 |
- myconf_gyp+=" -Dcomponent=static_library" |
1751 |
- myconf_gyp+=" -Dlibrary=static_library" |
1752 |
- myconf_gyp+=" -Icommon.gypi electron.gyp" |
1753 |
- |
1754 |
- EGYP_CHROMIUM_COMMAND="${CHROMIUM_S}/build/gyp_chromium" \ |
1755 |
- egyp_chromium ${myconf_gyp} || die |
1756 |
- |
1757 |
- mkdir -p "${compile_target}/lib/" || die |
1758 |
- # Copy libv8 and snapshot files so the node binary can find them. |
1759 |
- cp "${chromium_target}/libv8.so" "${compile_target}/lib/" || die |
1760 |
- cp "${chromium_target}/natives_blob.bin" "${compile_target}" || die |
1761 |
- cp "${chromium_target}/snapshot_blob.bin" "${compile_target}" || die |
1762 |
- |
1763 |
- # Copy generated shim headers. |
1764 |
- mkdir -p "${compile_target}/gen" || die |
1765 |
- cp -r "${chromium_target}/gen/shim_headers" \ |
1766 |
- "${compile_target}/gen" || die |
1767 |
- |
1768 |
- # Build the Node binary and pax-mark it. |
1769 |
- eninja -C ${compile_target} nodebin |
1770 |
- pax-mark m ${compile_target}/nodebin |
1771 |
- |
1772 |
- # Finally, build Electron. |
1773 |
- eninja -C ${compile_target} electron |
1774 |
- pax-mark m ${compile_target}/electron |
1775 |
- |
1776 |
- echo "v${PV}" > ${compile_target}/version |
1777 |
-} |
1778 |
- |
1779 |
-src_install() { |
1780 |
- local install_dir="$(_get_install_dir)" |
1781 |
- local install_suffix="$(_get_install_suffix)" |
1782 |
- local LIBDIR="${ED}/usr/$(get_libdir)" |
1783 |
- |
1784 |
- pushd out/R/locales > /dev/null || die |
1785 |
- chromium_remove_language_paks |
1786 |
- popd > /dev/null || die |
1787 |
- |
1788 |
- # Install Electron |
1789 |
- insinto "${install_dir}" |
1790 |
- exeinto "${install_dir}" |
1791 |
- newexe out/R/nodebin node |
1792 |
- doexe out/R/electron |
1793 |
- doexe out/R/chromedriver |
1794 |
- doexe out/R/mksnapshot |
1795 |
- doins out/R/libv8.so |
1796 |
- fperms +x "${install_dir}/libv8.so" |
1797 |
- doins out/R/libnode.so |
1798 |
- fperms +x "${install_dir}/libnode.so" |
1799 |
- doins out/R/natives_blob.bin |
1800 |
- doins out/R/snapshot_blob.bin |
1801 |
- doins out/R/blink_image_resources_200_percent.pak |
1802 |
- doins out/R/content_resources_200_percent.pak |
1803 |
- doins out/R/content_shell.pak |
1804 |
- doins out/R/pdf_viewer_resources.pak |
1805 |
- doins out/R/ui_resources_200_percent.pak |
1806 |
- doins out/R/views_resources_200_percent.pak |
1807 |
- doins -r out/R/resources |
1808 |
- doins -r out/R/locales |
1809 |
- dosym "${install_dir}/electron" "/usr/bin/electron${install_suffix}" |
1810 |
- |
1811 |
- doins out/R/version |
1812 |
- |
1813 |
- # Install Node headers |
1814 |
- HEADERS_ONLY=1 \ |
1815 |
- "${S}/vendor/node/tools/install.py" install "${ED}" "/usr" || die |
1816 |
- # set up a symlink structure that npm expects.. |
1817 |
- dodir /usr/include/node/deps/{v8,uv} |
1818 |
- dosym . /usr/include/node/src |
1819 |
- for var in deps/{uv,v8}/include; do |
1820 |
- dosym ../.. /usr/include/node/${var} |
1821 |
- done |
1822 |
- |
1823 |
- dodir "/usr/include/electron${install_suffix}" |
1824 |
- mv "${ED}/usr/include/node" \ |
1825 |
- "${ED}/usr/include/electron${install_suffix}/node" || die |
1826 |
-} |
1827 |
- |
1828 |
-pkg_postinst() { |
1829 |
- electron-config update |
1830 |
-} |
1831 |
- |
1832 |
-pkg_postrm() { |
1833 |
- electron-config update |
1834 |
-} |