Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/electron/files/, dev-util/electron/
Date: Tue, 03 May 2016 15:00:45
Message-Id: 1462286756.1b299909903085240575a3f5c9aaf5377a4a13fe.monsieurp@gentoo
1 commit: 1b299909903085240575a3f5c9aaf5377a4a13fe
2 Author: Elvis Pranskevichus <elvis <AT> magic <DOT> io>
3 AuthorDate: Tue Apr 5 16:29:26 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Tue May 3 14:45:56 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b299909
7
8 dev-util/electron: Add ebuild for Github's Electron (v0.36.9)
9
10 Electron is an application framework built on top of Chromium and NodeJS.
11 It allows creating cross-platform desktop apps using Web tech. [1]
12
13 The main user of Electron is the Atom IDE [2]. Microsoft Visual Studio
14 Code is also based on Electron. It is also useful for the creation of
15 desktop wrappers for popular web services, e.g. Google Music [3].
16
17 Unfortunately, current upstream's approach to "building Electron from
18 source" involves downloading a pre-built libchromiumcontent.so binary
19 from the Internet, which poses obvious security and compatibility risks.
20
21 This ebuild is based heavily on the Chromium ebuild and follows similar
22 unbunling policy.
23
24 Additionally, Electron-specific NodeJS headers are installed to
25 /usr/include so that native modules built for Electron-based apps can be
26 compiled against the correct version of NodeJS embedded in Electron.
27
28 [1] http://electron.atom.io/
29 [2] http://atom.io/
30 [3] https://github.com/twolfson/google-music-electron
31
32 Gentoo-Bug: https://bugs.gentoo.org/579116
33 Closes: https://github.com/gentoo/gentoo/pull/1200
34 Package-Manager: portage-2.2.28
35
36 Acked-by: Mike Gilbert <floppym <AT> gentoo.org>
37 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
38
39 dev-util/electron/Manifest | 7 +
40 dev-util/electron/electron-0.36.12.ebuild | 722 +++++++++++++++++++++
41 .../files/brightray-gentoo-build-fixes.patch | 81 +++
42 .../electron/files/chromium-disable-widevine.patch | 9 +
43 dev-util/electron/files/chromium-lto-fixes.patch | 26 +
44 .../files/chromium-remove-gardiner-mod-font.patch | 13 +
45 dev-util/electron/files/chromium-shared-v8.patch | 15 +
46 .../electron/files/chromium-system-ffmpeg-r0.patch | 54 ++
47 .../electron/files/chromium-system-jinja-r7.patch | 35 +
48 .../electron/files/chromium-system-libvpx-r0.patch | 20 +
49 .../files/electron-gentoo-build-fixes.patch | 157 +++++
50 .../libchromiumcontent-gentoo-build-fixes.patch | 75 +++
51 .../electron/files/node-gentoo-build-fixes.patch | 50 ++
52 dev-util/electron/metadata.xml | 22 +
53 14 files changed, 1286 insertions(+)
54
55 diff --git a/dev-util/electron/Manifest b/dev-util/electron/Manifest
56 new file mode 100644
57 index 0000000..749fd63
58 --- /dev/null
59 +++ b/dev-util/electron/Manifest
60 @@ -0,0 +1,7 @@
61 +DIST asar-0.10.0.tar.gz 975433 SHA256 49e743a952957aa22668b472ba926427f9e051ececeaadb922f8aff2bc8fd1ee SHA512 702fa0e496a1db55a61d7e00d55456f8703f7af00e458f26413771dc71cd03e9418e0334bb1a500aaabe14ab598e19c64612ebf6411c77e30004833c8d5d151e WHIRLPOOL a2e4f8563f779aea19357962f0ac0895005ff93a601d409a7b2c685348cba845106729e1f2a39f95001c186c0c0ba914d73ff1364d488e0853dbbabda0e80bb3
62 +DIST brightray-9bc1d21b69ac99bed546d42035dc1205ea6b04af.tar.gz 74416 SHA256 9cb944145085384423efdbdbe4dd523b71eaf517fd040e1993666832ffac4fa6 SHA512 c7a16f3634111a43d45959e0406488dc7417848403a6261204b58f67d62688f888f733ca23f3eac3a2dc76955c185ce845d63a6dc1e5a0fba54fb115202414d0 WHIRLPOOL c1ebe0e3adbd74da772778589f59f30a2e288723d62cf8bc686c1b0795daef4c31e9d38363b29dae9b162ccf856707f7a9eb34c8b31ca76042870d7adfa14e99
63 +DIST chromium-47.0.2526.110.tar.xz 394673276 SHA256 edab0d78709ba5edd35e85d82241de884d75dc46abdf7621b6178fa6647d14af SHA512 7b83b4b9c192782035984a08f5102dc6bc9c8590f78dc74fe46ff431b7de3d33ee48e41c0b1fb3f8ff2881871f2a1c4c4c4c16297b42456082b514fb741fc1c4 WHIRLPOOL b9b4053089cdf0a37a81ef491a97749a6473d280b7ed9d391ef4b98a844dd8e0ecbc9b97b72b654c65c3ea9f706519262b8f62f5e5ba97cb005a8c98a40f2b28
64 +DIST electron-0.36.12.tar.gz 3068567 SHA256 8e4ee7ed37d32ad73f8cbfb132ce0009506a01a68d5a71bafd6858c6bc11f9a6 SHA512 37d016768e57f81b01338cea6d0d5eaa6ea72d83a2122b54c9c73e37b0afc7fb8351b0cb846afda29206379d5625657b815b002c2eb3c31babcd0cffa47ae3de WHIRLPOOL a358e353259d377dd59ae563f38b2fe185ade6d7a00bbad8c61831c92b4e200ac1f2f25b79564eae11d9082a569be342ccd4be6e400955cd65729e9299b48796
65 +DIST electron-node-a507a3c3816d6ac085ed46250c489a3d76ab8b3c.tar.gz 36578658 SHA256 56489ffa9d58b736008f5c1c2775bc10f3afe02d3c768035e7742893cc8e1d82 SHA512 a5b62c05ec7300a26b3feab3c1e796a87691d41fa7c039541574878491df51e9075685abc5d630fc62bca95bf821eeede041d4ab36caedaf76156844f1095ea6 WHIRLPOOL 8675b05753cf905cfb2fc0ebb19fc256489a7b932c57be291eb2fc7194de599c07f4120541f4a61cccdb43b09b6280c7c02f9565aef98129c584fdca4c154279
66 +DIST libchromiumcontent-ad63d8ba890bcaad2f1b7e6de148b7992f4d3af7.tar.gz 400648 SHA256 36b46659fff3053ce273d3ed159fca74e18ebc873694f857a521d3c48fc079b1 SHA512 5fcb5e3dd98d5875ff7aa9f9f4d02af45487534d0301ca7a0a7adde934f528fedc3dfaf886b9031027e41309eb8ba658b72a56af4ad8dc44cce458b9c04a0e47 WHIRLPOOL 31d28804f91bbdece8709ddac359e7f5c079b034137734041f274838d138d8e141fe12c0ecf1e66f92b15e8c653526a1779d3bcc342e3ecc9a39a18c689a94a6
67 +DIST native-mate-e719eab878c264bb03188d0cd6eb9ad6882bc13a.tar.gz 23818 SHA256 82da85193f6924ce395004ce9dfd1198848cf8f14b7904321e67cad26a39f794 SHA512 4272648127fb0bf90b36d2c090bea718d560737c1c7443a5b3c0de12999ffe607429b2112ecee36ece5d26cde54e78964303250ffd350a19c132c9733b72c523 WHIRLPOOL c275163b9f3f424f5909f17c67f5b029f03bf76679296781bd6d74e64d903dd29cf5c28f1c4e399a049331f54f03175fe2c02de9ef6bf65040d9cef05be44a51
68
69 diff --git a/dev-util/electron/electron-0.36.12.ebuild b/dev-util/electron/electron-0.36.12.ebuild
70 new file mode 100644
71 index 0000000..73d6199
72 --- /dev/null
73 +++ b/dev-util/electron/electron-0.36.12.ebuild
74 @@ -0,0 +1,722 @@
75 +# Copyright 1999-2016 Gentoo Foundation
76 +# Distributed under the terms of the GNU General Public License v2
77 +# $Id$
78 +
79 +EAPI="5"
80 +PYTHON_COMPAT=( python2_7 )
81 +
82 +CHROMIUM_LANGS="am ar bg bn ca cs da de el en_GB es es_LA et fa fi fil fr gu he
83 + 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
84 + sv sw ta te th tr uk vi zh_CN zh_TW"
85 +
86 +inherit check-reqs chromium eutils flag-o-matic multilib multiprocessing pax-utils \
87 + portability python-any-r1 readme.gentoo-r1 toolchain-funcs versionator virtualx
88 +
89 +# Keep this in sync with vendor/brightray/vendor/libchromiumcontent/VERSION
90 +CHROMIUM_VERSION="47.0.2526.110"
91 +# Keep this in sync with vendor/brightray
92 +BRIGHTRAY_COMMIT="9bc1d21b69ac99bed546d42035dc1205ea6b04af"
93 +# Keep this in sync with vendor/node
94 +NODE_COMMIT="a507a3c3816d6ac085ed46250c489a3d76ab8b3c"
95 +# Keep this in sync with vendor/native_mate
96 +NATIVE_MATE_COMMIT="e719eab878c264bb03188d0cd6eb9ad6882bc13a"
97 +# Keep this in sync with vendor/brightray/vendor/libchromiumcontent
98 +LIBCHROMIUMCONTENT_COMMIT="ad63d8ba890bcaad2f1b7e6de148b7992f4d3af7"
99 +# Keep this in sync with package.json#devDependencies
100 +ASAR_VERSION="0.10.0"
101 +
102 +CHROMIUM_P="chromium-${CHROMIUM_VERSION}"
103 +BRIGHTRAY_P="brightray-${BRIGHTRAY_COMMIT}"
104 +NODE_P="node-${NODE_COMMIT}"
105 +NATIVE_MATE_P="native-mate-${NATIVE_MATE_COMMIT}"
106 +LIBCHROMIUMCONTENT_P="libchromiumcontent-${LIBCHROMIUMCONTENT_COMMIT}"
107 +ASAR_P="asar-${ASAR_VERSION}"
108 +
109 +DESCRIPTION="Cross platform application development framework based on web technologies"
110 +HOMEPAGE="http://electron.atom.io/"
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/brightray/archive/${BRIGHTRAY_COMMIT}.tar.gz -> ${BRIGHTRAY_P}.tar.gz
115 + https://github.com/electron/node/archive/${NODE_COMMIT}.tar.gz -> electron-${NODE_P}.tar.gz
116 + https://github.com/zcbenz/native-mate/archive/${NATIVE_MATE_COMMIT}.tar.gz -> ${NATIVE_MATE_P}.tar.gz
117 + https://github.com/electron/libchromiumcontent/archive/${LIBCHROMIUMCONTENT_COMMIT}.tar.gz -> ${LIBCHROMIUMCONTENT_P}.tar.gz
118 + https://github.com/elprans/asar/releases/download/v${ASAR_VERSION}-gentoo/asar-build.tar.gz -> ${ASAR_P}.tar.gz
119 +"
120 +
121 +S="${WORKDIR}/${CHROMIUM_P}"
122 +ELECTRON_S="${WORKDIR}/${P}"
123 +NODE_S="${S}/vendor/node"
124 +BRIGHTRAY_S="${S}/vendor/brightray"
125 +NATIVE_MATE_S="${S}/vendor/native_mate"
126 +LIBCC_S="${BRIGHTRAY_S}/vendor/libchromiumcontent"
127 +
128 +LICENSE="BSD"
129 +SLOT="0/$(get_version_component_range 2)"
130 +KEYWORDS="~amd64"
131 +IUSE="custom-cflags cups gnome gnome-keyring gtk3 hidpi kerberos lto neon pic +proprietary-codecs pulseaudio selinux +system-ffmpeg +tcmalloc"
132 +RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
133 +
134 +# Native Client binaries are compiled with different set of flags, bug #452066.
135 +QA_FLAGS_IGNORED=".*\.nexe"
136 +
137 +# Native Client binaries may be stripped by the build system, which uses the
138 +# right tools for it, bug #469144 .
139 +QA_PRESTRIPPED=".*\.nexe"
140 +
141 +RDEPEND=">=app-accessibility/speech-dispatcher-0.8:=
142 + app-arch/bzip2:=
143 + app-arch/snappy:=
144 + cups? ( >=net-print/cups-1.3.11:= )
145 + >=dev-libs/elfutils-0.149
146 + dev-libs/expat:=
147 + dev-libs/glib:=
148 + >=dev-libs/icu-55.1:=
149 + >=dev-libs/jsoncpp-0.5.0-r1:=
150 + >=dev-libs/libevent-1.4.13:=
151 + dev-libs/libxml2:=[icu]
152 + dev-libs/libxslt:=
153 + dev-libs/nspr:=
154 + >=dev-libs/nss-3.14.3:=
155 + dev-libs/re2:=
156 + gnome? ( >=gnome-base/gconf-2.24.0:= )
157 + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.12:= )
158 + >=media-libs/alsa-lib-1.0.19:=
159 + media-libs/flac:=
160 + media-libs/fontconfig:=
161 + media-libs/freetype:=
162 + >=media-libs/harfbuzz-0.9.41:=[icu(+)]
163 + media-libs/libexif:=
164 + >=media-libs/libjpeg-turbo-1.2.0-r1:=
165 + media-libs/libpng:0=
166 + >=media-libs/libwebp-0.4.0:=
167 + media-libs/speex:=
168 + pulseaudio? ( media-sound/pulseaudio:= )
169 + system-ffmpeg? ( >=media-video/ffmpeg-2.7.2:=[opus,vorbis,vpx] )
170 + sys-apps/dbus:=
171 + sys-apps/pciutils:=
172 + >=sys-libs/libcap-2.22:=
173 + sys-libs/zlib:=[minizip]
174 + virtual/udev
175 + x11-libs/cairo:=
176 + x11-libs/gdk-pixbuf:=
177 + gtk3? ( x11-libs/gtk+:3= )
178 + !gtk3? ( x11-libs/gtk+:2= )
179 + x11-libs/libdrm
180 + x11-libs/libX11:=
181 + x11-libs/libXcomposite:=
182 + x11-libs/libXcursor:=
183 + x11-libs/libXdamage:=
184 + x11-libs/libXext:=
185 + x11-libs/libXfixes:=
186 + >=x11-libs/libXi-1.6.0:=
187 + x11-libs/libXinerama:=
188 + x11-libs/libXrandr:=
189 + x11-libs/libXrender:=
190 + x11-libs/libXScrnSaver:=
191 + x11-libs/libXtst:=
192 + x11-libs/pango:=
193 + kerberos? ( virtual/krb5 )
194 + >=net-libs/http-parser-2.6.2:=
195 + >=dev-libs/libuv-1.8.0:=
196 + >=dev-libs/openssl-1.0.2g:0=[-bindist]"
197 +DEPEND="${RDEPEND}
198 + !arm? (
199 + dev-lang/yasm
200 + )
201 + dev-lang/perl
202 + dev-perl/JSON
203 + >=dev-util/gperf-3.0.3
204 + dev-util/ninja
205 + net-libs/nodejs[npm]
206 + sys-apps/hwids[usb(+)]
207 + >=sys-devel/bison-2.4.3
208 + sys-devel/flex
209 + virtual/pkgconfig"
210 +
211 +# For nvidia-drivers blocker, see bug #413637 .
212 +RDEPEND+="
213 + x11-misc/xdg-utils
214 + virtual/opengl
215 + virtual/ttf-fonts
216 + selinux? ( sec-policy/selinux-chromium )
217 + tcmalloc? ( !<x11-drivers/nvidia-drivers-331.20 )"
218 +
219 +# Python dependencies. The DEPEND part needs to be kept in sync
220 +# with python_check_deps.
221 +DEPEND+=" $(python_gen_any_dep '
222 + dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]
223 + dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
224 + dev-python/html5lib[${PYTHON_USEDEP}]
225 + dev-python/jinja[${PYTHON_USEDEP}]
226 + dev-python/jsmin[${PYTHON_USEDEP}]
227 + dev-python/ply[${PYTHON_USEDEP}]
228 + dev-python/simplejson[${PYTHON_USEDEP}]
229 +')"
230 +python_check_deps() {
231 + has_version --host-root "dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]" &&
232 + has_version --host-root "dev-python/beautifulsoup:4[${PYTHON_USEDEP}]" &&
233 + has_version --host-root "dev-python/html5lib[${PYTHON_USEDEP}]" &&
234 + has_version --host-root "dev-python/jinja[${PYTHON_USEDEP}]" &&
235 + has_version --host-root "dev-python/jsmin[${PYTHON_USEDEP}]" &&
236 + has_version --host-root "dev-python/ply[${PYTHON_USEDEP}]" &&
237 + has_version --host-root "dev-python/simplejson[${PYTHON_USEDEP}]"
238 +}
239 +
240 +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
241 + EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
242 +fi
243 +
244 +pkg_pretend() {
245 + if [[ $(tc-getCC)$ == *gcc* ]] && \
246 + [[ $(gcc-major-version)$(gcc-minor-version) -lt 48 ]]; then
247 + die 'At least gcc 4.8 is required, see bugs: #535730, #525374, #518668.'
248 + fi
249 +
250 + # LTO pass requires more file descriptors
251 + if use lto; then
252 + local lto_n_rlimit_min="16384"
253 + local maxfiles=$(ulimit -n -H)
254 + if [ "${maxfiles}" -lt "${lto_n_rlimit_min}" ]; then
255 + eerror ""
256 + eerror "Building with USE=\"lto\" requires file descriptor" \
257 + "limit to be no less than ${lto_n_rlimit_min}."
258 + eerror "The current limit for portage is ${maxfiles}."
259 + eerror "Please add the following to /etc/security/limits.conf:"
260 + eerror ""
261 + eerror " root hard nofile ${lto_n_rlimit_min}"
262 + eerror " root soft nofile ${lto_n_rlimit_min}"
263 + eerror ""
264 + die
265 + fi
266 + fi
267 +
268 + # Check build requirements, bug #541816 and bug #471810 .
269 + CHECKREQS_MEMORY="3G"
270 + use lto && CHECKREQS_MEMORY="5G"
271 + CHECKREQS_DISK_BUILD="10G"
272 + eshopts_push -s extglob
273 + if is-flagq '-g?(gdb)?([1-9])'; then
274 + CHECKREQS_DISK_BUILD="25G"
275 + fi
276 + eshopts_pop
277 + check-reqs_pkg_pretend
278 +}
279 +
280 +pkg_setup() {
281 + # Make sure the build system will use the right python, bug #344367.
282 + python-any-r1_pkg_setup
283 +
284 + chromium_suid_sandbox_check_kernel_config
285 +}
286 +
287 +_unnest_patches() {
288 + local _s="${1%/}/" relpath out
289 +
290 + for f in $(find "${_s}" -mindepth 2 -name *.patch -printf \"%P\"\\n); do
291 + relpath="$(dirname ${f})"
292 + out="${_s}/${relpath////_}_$(basename ${f})"
293 + sed -r -e "s|^([-+]{3}) (.*)$|\1 ${relpath}/\2 ${f}|g" > "${out}"
294 + done
295 +}
296 +
297 +_get_install_suffix() {
298 + local c=(${SLOT//\// })
299 + local slot=${c[0]}
300 + local suffix
301 +
302 + if [[ "${slot}" == "0" ]]; then
303 + suffix=""
304 + else
305 + suffix="-${slot}"
306 + fi
307 +
308 + echo -n "${suffix}"
309 +}
310 +
311 +_get_install_dir() {
312 + echo -n "/usr/$(get_libdir)/electron$(_get_install_suffix)"
313 +}
314 +
315 +src_prepare() {
316 + # Merge Electron code and its submodules into the Chromium source tree
317 + # so that everything can be configured and built in a single pass.
318 + #
319 + rsync -a --ignore-existing "${ELECTRON_S}/" "${S}/" || die
320 + rm -r "${NODE_S}" &&
321 + mv "${WORKDIR}/${NODE_P}" "${NODE_S}" || die
322 + rm -r "${BRIGHTRAY_S}" &&
323 + mv "${WORKDIR}/${BRIGHTRAY_P}" "${BRIGHTRAY_S}" || die
324 + rm -r "${NATIVE_MATE_S}" &&
325 + mv "${WORKDIR}/${NATIVE_MATE_P}" "${NATIVE_MATE_S}" || die
326 + rm -r "${LIBCC_S}" &&
327 + mv "${WORKDIR}/${LIBCHROMIUMCONTENT_P}" "${LIBCC_S}" || die
328 + rm -r "${S}/vendor/breakpad" &&
329 + ln -s "../breakpad" "${S}/vendor/breakpad" || die
330 + ln -s "${WORKDIR}/${ASAR_P}/node_modules" "${S}/node_modules" || die
331 +
332 + # electron patches
333 + epatch "${FILESDIR}/electron-gentoo-build-fixes.patch"
334 +
335 + # node patches
336 + cd "${NODE_S}" || die
337 + epatch "${FILESDIR}/node-gentoo-build-fixes.patch"
338 + # make sure node uses the correct version of v8
339 + rm -r deps/v8 || die
340 + ln -s ../../../v8 deps/ || die
341 +
342 + # make sure we use python2.* while using gyp
343 + sed -i -e "s/python/${EPYTHON}/" deps/npm/node_modules/node-gyp/gyp/gyp || die
344 + sed -i -e "s/|| 'python'/|| '${EPYTHON}'/" deps/npm/node_modules/node-gyp/lib/configure.js || die
345 +
346 + # less verbose install output (stating the same as portage, basically)
347 + sed -i -e "/print/d" tools/install.py || die
348 +
349 + # proper libdir, hat tip @ryanpcmcquen https://github.com/iojs/io.js/issues/504
350 + local LIBDIR=$(get_libdir)
351 + sed -i -e "s|lib/|${LIBDIR}/|g" tools/install.py || die
352 + sed -i -e "s/'lib'/'${LIBDIR}'/" lib/module.js || die
353 + sed -i -e "s|\"lib\"|\"${LIBDIR}\"|" deps/npm/lib/npm.js || die
354 +
355 + # brightray patches
356 + cd "${BRIGHTRAY_S}" || die
357 + epatch "${FILESDIR}/brightray-gentoo-build-fixes.patch"
358 +
359 + # libcc patches
360 + cd "${LIBCC_S}" || die
361 + epatch "${FILESDIR}/libchromiumcontent-gentoo-build-fixes.patch"
362 +
363 + # chromium patches
364 + cd "${S}" || die
365 + epatch "${FILESDIR}/chromium-system-ffmpeg-r0.patch"
366 + epatch "${FILESDIR}/chromium-system-jinja-r7.patch"
367 + epatch "${FILESDIR}/chromium-disable-widevine.patch"
368 + epatch "${FILESDIR}/chromium-remove-gardiner-mod-font.patch"
369 + epatch "${FILESDIR}/chromium-shared-v8.patch"
370 + epatch "${FILESDIR}/chromium-lto-fixes.patch"
371 +
372 + # libcc chromium patches
373 + _unnest_patches "${LIBCC_S}/patches"
374 +
375 + EPATCH_SOURCE="${LIBCC_S}/patches" \
376 + EPATCH_SUFFIX="patch" \
377 + EPATCH_FORCE="yes" \
378 + EPATCH_EXCLUDE="third_party_icu*" \
379 + EPATCH_MULTI_MSG="Applying libchromiumcontent patches..." \
380 + epatch
381 +
382 + # build scripts
383 + mkdir -p "${S}/chromiumcontent" || die
384 + cp -a "${LIBCC_S}/chromiumcontent" "${S}/" || die
385 + cp -a "${LIBCC_S}/tools/linux/" "${S}/tools/" || die
386 +
387 + local conditional_bundled_libraries=""
388 + if ! use system-ffmpeg; then
389 + conditional_bundled_libraries+=" third_party/ffmpeg"
390 + fi
391 +
392 + # Remove most bundled libraries. Some are still needed.
393 + build/linux/unbundle/remove_bundled_libraries.py \
394 + ${conditional_bundled_libraries} \
395 + 'base/third_party/dmg_fp' \
396 + 'base/third_party/dynamic_annotations' \
397 + 'base/third_party/icu' \
398 + 'base/third_party/nspr' \
399 + 'base/third_party/superfasthash' \
400 + 'base/third_party/symbolize' \
401 + 'base/third_party/valgrind' \
402 + 'base/third_party/xdg_mime' \
403 + 'base/third_party/xdg_user_dirs' \
404 + 'breakpad/src/third_party/curl' \
405 + 'chrome/third_party/mozilla_security_manager' \
406 + 'courgette/third_party' \
407 + 'crypto/third_party/nss' \
408 + 'net/third_party/mozilla_security_manager' \
409 + 'net/third_party/nss' \
410 + 'third_party/WebKit' \
411 + 'third_party/analytics' \
412 + 'third_party/angle' \
413 + 'third_party/angle/src/third_party/compiler' \
414 + 'third_party/boringssl' \
415 + 'third_party/brotli' \
416 + 'third_party/cacheinvalidation' \
417 + 'third_party/catapult' \
418 + 'third_party/catapult/tracing/third_party/components/polymer' \
419 + 'third_party/catapult/tracing/third_party/d3' \
420 + 'third_party/catapult/tracing/third_party/gl-matrix' \
421 + 'third_party/catapult/tracing/third_party/jszip' \
422 + 'third_party/catapult/tracing/third_party/tvcm' \
423 + 'third_party/catapult/tracing/third_party/tvcm/third_party/rcssmin' \
424 + 'third_party/catapult/tracing/third_party/tvcm/third_party/rjsmin' \
425 + 'third_party/cld_2' \
426 + 'third_party/cros_system_api' \
427 + 'third_party/cython/python_flags.py' \
428 + 'third_party/devscripts' \
429 + 'third_party/dom_distiller_js' \
430 + 'third_party/dom_distiller_js/dist/proto_gen/third_party/dom_distiller_js' \
431 + 'third_party/fips181' \
432 + 'third_party/flot' \
433 + 'third_party/google_input_tools' \
434 + 'third_party/google_input_tools/third_party/closure_library' \
435 + 'third_party/google_input_tools/third_party/closure_library/third_party/closure' \
436 + 'third_party/hunspell' \
437 + 'third_party/iccjpeg' \
438 + 'third_party/jstemplate' \
439 + 'third_party/khronos' \
440 + 'third_party/leveldatabase' \
441 + 'third_party/libXNVCtrl' \
442 + 'third_party/libaddressinput' \
443 + 'third_party/libjingle' \
444 + 'third_party/libphonenumber' \
445 + 'third_party/libsecret' \
446 + 'third_party/libsrtp' \
447 + 'third_party/libudev' \
448 + 'third_party/libusb' \
449 + 'third_party/libvpx_new' \
450 + 'third_party/libvpx_new/source/libvpx/third_party/x86inc' \
451 + 'third_party/libxml/chromium' \
452 + 'third_party/libwebm' \
453 + 'third_party/libyuv' \
454 + 'third_party/lss' \
455 + 'third_party/lzma_sdk' \
456 + 'third_party/mesa' \
457 + 'third_party/modp_b64' \
458 + 'third_party/mojo' \
459 + 'third_party/mt19937ar' \
460 + 'third_party/npapi' \
461 + 'third_party/openmax_dl' \
462 + 'third_party/opus' \
463 + 'third_party/ots' \
464 + 'third_party/pdfium' \
465 + 'third_party/pdfium/third_party/agg23' \
466 + 'third_party/pdfium/third_party/base' \
467 + 'third_party/pdfium/third_party/bigint' \
468 + 'third_party/pdfium/third_party/freetype' \
469 + 'third_party/pdfium/third_party/lcms2-2.6' \
470 + 'third_party/pdfium/third_party/libjpeg' \
471 + 'third_party/pdfium/third_party/libopenjpeg20' \
472 + 'third_party/pdfium/third_party/zlib_v128' \
473 + 'third_party/polymer' \
474 + 'third_party/protobuf' \
475 + 'third_party/qcms' \
476 + 'third_party/readability' \
477 + 'third_party/sfntly' \
478 + 'third_party/skia' \
479 + 'third_party/smhasher' \
480 + 'third_party/sqlite' \
481 + 'third_party/tcmalloc' \
482 + 'third_party/usrsctp' \
483 + 'third_party/web-animations-js' \
484 + 'third_party/webdriver' \
485 + 'third_party/webrtc' \
486 + 'third_party/widevine' \
487 + 'third_party/x86inc' \
488 + 'third_party/zlib/google' \
489 + 'url/third_party/mozilla' \
490 + 'v8/src/third_party/fdlibm' \
491 + 'v8/src/third_party/valgrind' \
492 + --do-remove || die
493 +
494 + epatch_user
495 +}
496 +
497 +src_configure() {
498 + local myconf=""
499 +
500 + # Never tell the build system to "enable" SSE2, it has a few unexpected
501 + # additions, bug #336871.
502 + myconf+=" -Ddisable_sse2=1"
503 +
504 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
505 + myconf+=" -Ddisable_nacl=1"
506 +
507 + # Disable glibc Native Client toolchain, we don't need it (bug #417019).
508 + # myconf+=" -Ddisable_glibc=1"
509 +
510 + # TODO: also build with pnacl
511 + # myconf+=" -Ddisable_pnacl=1"
512 +
513 + # It would be awkward for us to tar the toolchain and get it untarred again
514 + # during the build.
515 + # myconf+=" -Ddisable_newlib_untar=1"
516 +
517 + # Make it possible to remove third_party/adobe.
518 + echo > "${T}/flapper_version.h" || die
519 + myconf+=" -Dflapper_version_h_file=${T}/flapper_version.h"
520 +
521 + # Use system-provided libraries.
522 + # TODO: use_system_hunspell (upstream changes needed).
523 + # TODO: use_system_libsrtp (bug #459932).
524 + # TODO: use_system_libusb (http://crbug.com/266149).
525 + # TODO: use_system_libvpx (http://crbug.com/494939).
526 + # TODO: use_system_opus (https://code.google.com/p/webrtc/issues/detail?id=3077).
527 + # TODO: use_system_protobuf (bug #525560).
528 + # TODO: use_system_ssl (http://crbug.com/58087).
529 + # TODO: use_system_sqlite (http://crbug.com/22208).
530 + myconf+="
531 + -Duse_system_bzip2=1
532 + -Duse_system_ffmpeg=$(usex system-ffmpeg 1 0)
533 + -Duse_system_flac=1
534 + -Duse_system_harfbuzz=1
535 + -Duse_system_icu=1
536 + -Duse_system_jsoncpp=1
537 + -Duse_system_libevent=1
538 + -Duse_system_libjpeg=1
539 + -Duse_system_libpng=1
540 + -Duse_system_libwebp=1
541 + -Duse_system_libxml=1
542 + -Duse_system_libxslt=1
543 + -Duse_system_minizip=1
544 + -Duse_system_nspr=1
545 + -Duse_system_re2=1
546 + -Duse_system_snappy=1
547 + -Duse_system_speex=1
548 + -Duse_system_xdg_utils=1
549 + -Duse_system_zlib=1"
550 +
551 + # Needed for system icu - we don't need additional data files.
552 + myconf+=" -Dicu_use_data_file_flag=0"
553 +
554 + # TODO: patch gyp so that this arm conditional is not needed.
555 + if ! use arm; then
556 + myconf+="
557 + -Duse_system_yasm=1"
558 + fi
559 +
560 + # Optional dependencies.
561 + # TODO: linux_link_kerberos, bug #381289.
562 + myconf+="
563 + $(gyp_use cups)
564 + $(gyp_use gnome use_gconf)
565 + $(gyp_use gnome-keyring use_gnome_keyring)
566 + $(gyp_use gnome-keyring linux_link_gnome_keyring)
567 + $(gyp_use gtk3)
568 + $(gyp_use hidpi enable_hidpi)
569 + $(gyp_use kerberos)
570 + $(gyp_use lto)
571 + $(gyp_use pulseaudio)
572 + $(gyp_use tcmalloc use_allocator tcmalloc none)"
573 +
574 + # Use explicit library dependencies instead of dlopen.
575 + # This makes breakages easier to detect by revdep-rebuild.
576 + myconf+="
577 + -Dlinux_link_gsettings=1
578 + -Dlinux_link_libpci=1
579 + -Dlinux_link_libspeechd=1
580 + -Dlibspeechd_h_prefix=speech-dispatcher/"
581 +
582 + # TODO: use the file at run time instead of effectively compiling it in.
583 + myconf+="
584 + -Dusb_ids_path=/usr/share/misc/usb.ids"
585 +
586 + # Save space by removing DLOG and DCHECK messages (about 6% reduction).
587 + myconf+="
588 + -Dlogging_like_official_build=1"
589 +
590 + if [[ $(tc-getCC) == *clang* ]]; then
591 + myconf+=" -Dclang=1"
592 + else
593 + myconf+=" -Dclang=0"
594 + fi
595 +
596 + # Never use bundled gold binary. Disable gold linker flags for now.
597 + # Do not use bundled clang.
598 + myconf+="
599 + -Dclang_use_chrome_plugins=0
600 + -Dhost_clang=0
601 + -Dlinux_use_bundled_binutils=0
602 + -Dlinux_use_bundled_gold=0
603 + -Dlinux_use_gold_flags=0"
604 +
605 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
606 + myconf+=" -Dproprietary_codecs=1 -Dffmpeg_branding=${ffmpeg_branding}"
607 +
608 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
609 + # Note: these are for Gentoo use ONLY. For your own distribution,
610 + # please get your own set of keys. Feel free to contact chromium@g.o
611 + # for more info.
612 + myconf+=" -Dgoogle_api_key=AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc
613 + -Dgoogle_default_client_id=329227923882.apps.googleusercontent.com
614 + -Dgoogle_default_client_secret=vgKG0NNv7GoDpbtoFNLxCUXu"
615 +
616 + local myarch="$(tc-arch)"
617 + if [[ $myarch = amd64 ]] ; then
618 + target_arch=x64
619 + ffmpeg_target_arch=x64
620 + elif [[ $myarch = x86 ]] ; then
621 + target_arch=ia32
622 + ffmpeg_target_arch=ia32
623 + elif [[ $myarch = arm ]] ; then
624 + target_arch=arm
625 + ffmpeg_target_arch=$(usex neon arm-neon arm)
626 + # TODO: re-enable NaCl (NativeClient).
627 + local CTARGET=${CTARGET:-${CHOST}}
628 + if [[ $(tc-is-softfloat) == "no" ]]; then
629 +
630 + myconf+=" -Darm_float_abi=hard"
631 + fi
632 + filter-flags "-mfpu=*"
633 + use neon || myconf+=" -Darm_fpu=${ARM_FPU:-vfpv3-d16}"
634 +
635 + if [[ ${CTARGET} == armv[78]* ]]; then
636 + myconf+=" -Darmv7=1"
637 + else
638 + myconf+=" -Darmv7=0"
639 + fi
640 + myconf+=" -Dsysroot=
641 + $(gyp_use neon arm_neon)
642 + -Ddisable_nacl=1"
643 + else
644 + die "Failed to determine target arch, got '$myarch'."
645 + fi
646 +
647 + myconf+=" -Dtarget_arch=${target_arch}"
648 +
649 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
650 + # Depending on GCC version the warnings are different and we don't want
651 + # the build to fail because of that.
652 + myconf+=" -Dwerror="
653 +
654 + # Disable fatal linker warnings, bug 506268.
655 + myconf+=" -Ddisable_fatal_linker_warnings=1"
656 +
657 + # Avoid CFLAGS problems, bug #352457, bug #390147.
658 + if ! use custom-cflags; then
659 + replace-flags "-Os" "-O2"
660 + strip-flags
661 +
662 + # Prevent linker from running out of address space, bug #471810 .
663 + if use x86; then
664 + filter-flags "-g*"
665 + fi
666 +
667 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
668 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
669 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2
670 + fi
671 + fi
672 +
673 + # Make sure the build system will use the right tools, bug #340795.
674 + tc-export AR CC CXX NM
675 +
676 + # Tools for building programs to be executed on the build system, bug #410883.
677 + if tc-is-cross-compiler; then
678 + export AR_host=$(tc-getBUILD_AR)
679 + export CC_host=$(tc-getBUILD_CC)
680 + export CXX_host=$(tc-getBUILD_CXX)
681 + export NM_host=$(tc-getBUILD_NM)
682 + fi
683 +
684 + # Bug 491582.
685 + export TMPDIR="${WORKDIR}/temp"
686 + mkdir -p -m 755 "${TMPDIR}" || die
687 +
688 + if ! use system-ffmpeg; then
689 + local build_ffmpeg_args=""
690 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
691 + build_ffmpeg_args+=" --disable-asm"
692 + fi
693 +
694 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
695 + einfo "Configuring bundled ffmpeg..."
696 + pushd third_party/ffmpeg > /dev/null || die
697 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
698 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
699 + chromium/scripts/copy_config.sh || die
700 + chromium/scripts/generate_gyp.py || die
701 + popd > /dev/null || die
702 + fi
703 +
704 + third_party/libaddressinput/chromium/tools/update-strings.py || die
705 +
706 + einfo "Configuring bundled nodejs..."
707 + pushd vendor/node > /dev/null || die
708 + # Make sure gyp_node does not run
709 + echo '#!/usr/bin/env python' > tools/gyp_node.py || die
710 + ./configure --shared-openssl --shared-libuv --shared-http-parser \
711 + --shared-zlib --without-npm --with-intl=system-icu \
712 + --without-dtrace --dest-cpu=${target_arch} \
713 + --prefix="" || die
714 + popd > /dev/null || die
715 +
716 + # libchromiumcontent configuration
717 + myconf+=" -Dcomponent=static_library"
718 + myconf+=" -Dmac_mas_build=0"
719 + myconf+=' -Dicu_small="false"'
720 + myconf+=" -Dlibchromiumcontent_component=0"
721 + myconf+=" -Dlibrary=static_library"
722 + myconf+=" -Dmas_build=0"
723 +
724 + einfo "Configuring electron..."
725 + build/linux/unbundle/replace_gyp_files.py ${myconf} || die
726 +
727 + myconf+=" -Ivendor/node/config.gypi
728 + -Icommon.gypi
729 + atom.gyp"
730 +
731 + egyp_chromium ${myconf} || die
732 +}
733 +
734 +eninja() {
735 + if [[ -z ${NINJAOPTS+set} ]]; then
736 + local jobs=$(makeopts_jobs)
737 + local loadavg=$(makeopts_loadavg)
738 +
739 + if [[ ${MAKEOPTS} == *-j* && ${jobs} != 999 ]]; then
740 + NINJAOPTS+=" -j ${jobs}"
741 + fi
742 + if [[ ${MAKEOPTS} == *-l* && ${loadavg} != 999 ]]; then
743 + NINJAOPTS+=" -l ${loadavg}"
744 + fi
745 + fi
746 + set -- ninja -v ${NINJAOPTS} "$@"
747 + echo "$@"
748 + "$@"
749 +}
750 +
751 +src_compile() {
752 + local ninja_targets="electron"
753 +
754 + # Even though ninja autodetects number of CPUs, we respect
755 + # user's options, for debugging with -j 1 or any other reason.
756 + eninja -C out/R ${ninja_targets} || die
757 +}
758 +
759 +src_install() {
760 + local install_dir="$(_get_install_dir)"
761 + local install_suffix="$(_get_install_suffix)"
762 + local LIBDIR="${ED}/usr/$(get_libdir)"
763 +
764 + pushd out/R/locales > /dev/null || die
765 + chromium_remove_language_paks
766 + popd > /dev/null || die
767 +
768 + # Install Electron
769 + insinto "${install_dir}"
770 + exeinto "${install_dir}"
771 + doexe out/R/electron
772 + doins out/R/libv8.so
773 + doins out/R/libnode.so
774 + fperms +x "${install_dir}/libv8.so" "${install_dir}/libnode.so"
775 + doins out/R/content_shell.pak
776 + doins out/R/natives_blob.bin
777 + doins out/R/snapshot_blob.bin
778 + rm -r out/R/resources/inspector || die
779 + doins -r out/R/resources
780 + doins -r out/R/locales
781 + dosym "${install_dir}/electron" "/usr/bin/electron${install_suffix}"
782 +
783 + # Install Node headers
784 + HEADERS_ONLY=1 \
785 + "${S}/vendor/node/tools/install.py" install "${ED}" "/usr" || die
786 + # set up a symlink structure that npm expects..
787 + dodir /usr/include/node/deps/{v8,uv}
788 + dosym . /usr/include/node/src
789 + for var in deps/{uv,v8}/include; do
790 + dosym ../.. /usr/include/node/${var}
791 + done
792 +
793 + dodir "/usr/include/electron${install_suffix}"
794 + mv "${ED}/usr/include/node" \
795 + "${ED}/usr/include/electron${install_suffix}/node" || die
796 +}
797
798 diff --git a/dev-util/electron/files/brightray-gentoo-build-fixes.patch b/dev-util/electron/files/brightray-gentoo-build-fixes.patch
799 new file mode 100644
800 index 0000000..a678084
801 --- /dev/null
802 +++ b/dev-util/electron/files/brightray-gentoo-build-fixes.patch
803 @@ -0,0 +1,81 @@
804 +From c9e2e0237170884bc1069a64f2635bb1ffc1b948 Mon Sep 17 00:00:00 2001
805 +From: Elvis Pranskevichus <elvis@×××××.io>
806 +Date: Mon, 8 Feb 2016 15:14:58 -0500
807 +Subject: [PATCH] brightray build fixes
808 +
809 +---
810 + brightray.gyp | 5 +++--
811 + brightray.gypi | 21 ++++++++-------------
812 + 2 files changed, 11 insertions(+), 15 deletions(-)
813 +
814 +diff --git a/brightray.gyp b/brightray.gyp
815 +index d7120ea..6150318 100644
816 +--- a/brightray.gyp
817 ++++ b/brightray.gyp
818 +@@ -9,6 +9,9 @@
819 + 'targets': [
820 + {
821 + 'target_name': 'brightray',
822 ++ 'dependencies': [
823 ++ '<(libchromiumcontent_src_dir)/chromiumcontent/chromiumcontent.gyp:chromiumcontent_all'
824 ++ ],
825 + 'type': 'static_library',
826 + 'include_dirs': [
827 + '.',
828 +@@ -100,8 +103,6 @@
829 + }, {
830 + 'link_settings': {
831 + 'libraries': [
832 +- # Link with ffmpeg.
833 +- '<(libchromiumcontent_dir)/libffmpeg.so',
834 + # Following libraries are required by libchromiumcontent:
835 + '-lasound',
836 + '-lcap',
837 +diff --git a/brightray.gypi b/brightray.gypi
838 +index 4513fa9..95bdfa1 100644
839 +--- a/brightray.gypi
840 ++++ b/brightray.gypi
841 +@@ -1,9 +1,14 @@
842 + {
843 +- 'includes': [
844 +- 'vendor/download/libchromiumcontent/filenames.gypi',
845 +- ],
846 + 'variables': {
847 + 'libchromiumcontent_component%': 1,
848 ++ 'libchromiumcontent_src_dir': '<(DEPTH)',
849 ++ 'libchromiumcontent_shared_libraries_dir': '<(SHARED_INTERMEDIATE_DIR)',
850 ++ 'libchromiumcontent_static_libraries_dir': '<(SHARED_INTERMEDIATE_DIR)',
851 ++ 'libchromiumcontent_shared_libraries': [],
852 ++ 'libchromiumcontent_static_libraries': [],
853 ++ 'libchromiumcontent_shared_v8_libraries': [],
854 ++ 'libchromiumcontent_static_v8_libraries': [],
855 ++ 'pkg-config%': 'pkg-config',
856 + 'conditions': [
857 + # The "libchromiumcontent_component" is defined when calling "gyp".
858 + ['libchromiumcontent_component', {
859 +@@ -258,22 +263,12 @@
860 + 'conditions': [
861 + ['OS=="linux"', {
862 + 'cflags': [
863 +- '-O2',
864 +- # Generate symbols, will be stripped later.
865 +- '-g',
866 +- # Don't emit the GCC version ident directives, they just end up
867 +- # in the .comment section taking up binary size.
868 +- '-fno-ident',
869 + # Put data and code in their own sections, so that unused symbols
870 + # can be removed at link time with --gc-sections.
871 + '-fdata-sections',
872 + '-ffunction-sections',
873 + ],
874 + 'ldflags': [
875 +- # Specifically tell the linker to perform optimizations.
876 +- # See http://lwn.net/Articles/192624/ .
877 +- '-Wl,-O1',
878 +- '-Wl,--as-needed',
879 + '-Wl,--gc-sections',
880 + ],
881 + }], # OS=="linux"
882 +--
883 +2.7.3
884 +
885
886 diff --git a/dev-util/electron/files/chromium-disable-widevine.patch b/dev-util/electron/files/chromium-disable-widevine.patch
887 new file mode 100644
888 index 0000000..5b16646
889 --- /dev/null
890 +++ b/dev-util/electron/files/chromium-disable-widevine.patch
891 @@ -0,0 +1,9 @@
892 +--- a/third_party/widevine/cdm/stub/widevine_cdm_version.h
893 ++++ b/third_party/widevine/cdm/stub/widevine_cdm_version.h
894 +@@ -10,6 +10,5 @@
895 +
896 + #include "third_party/widevine/cdm/widevine_cdm_common.h"
897 +
898 +-#define WIDEVINE_CDM_AVAILABLE
899 +
900 + #endif // WIDEVINE_CDM_VERSION_H_
901
902 diff --git a/dev-util/electron/files/chromium-lto-fixes.patch b/dev-util/electron/files/chromium-lto-fixes.patch
903 new file mode 100644
904 index 0000000..7de3df1
905 --- /dev/null
906 +++ b/dev-util/electron/files/chromium-lto-fixes.patch
907 @@ -0,0 +1,26 @@
908 +diff --git a/build/common.gypi.orig b/build/common.gypi
909 +index cce7b3c..3b905c0 100644
910 +--- a/build/common.gypi.orig
911 ++++ b/build/common.gypi
912 +@@ -6096,7 +6096,7 @@
913 + 'target_conditions': [
914 + ['_toolset=="target"', {
915 + 'ldflags': [
916 +- '-flto=32',
917 ++ '-flto=4'
918 + ],
919 + }],
920 + ],
921 +diff --git a/build/android/disable_gcc_lto.gypi.orig b/build/android/disable_gcc_lto.gypi
922 +index a733c7a..57570f8 100644
923 +--- a/build/android/disable_gcc_lto.gypi.orig
924 ++++ b/build/android/disable_gcc_lto.gypi
925 +@@ -8,7 +8,7 @@
926 + 'target_conditions': [
927 + ['_toolset=="target"', {
928 + 'conditions': [
929 +- ['OS=="android" and clang==0 and (use_lto==1 or use_lto_o2==1)', {
930 ++ ['(OS=="android" or OS=="linux") and clang==0 and (use_lto==1 or use_lto_o2==1)', {
931 + 'cflags!': [
932 + '-flto',
933 + '-ffat-lto-objects',
934
935 diff --git a/dev-util/electron/files/chromium-remove-gardiner-mod-font.patch b/dev-util/electron/files/chromium-remove-gardiner-mod-font.patch
936 new file mode 100644
937 index 0000000..cf1955f
938 --- /dev/null
939 +++ b/dev-util/electron/files/chromium-remove-gardiner-mod-font.patch
940 @@ -0,0 +1,13 @@
941 +diff --git a/test_runner.gyp b/test_runner.gyp
942 +index 30ffa75..8838bdf 100644
943 +--- a/components/test_runner/test_runner.gyp
944 ++++ b/components/test_runner/test_runner.gyp
945 +@@ -162,8 +162,6 @@
946 + 'files': [
947 + 'resources/fonts/AHEM____.TTF',
948 + 'resources/fonts/fonts.conf',
949 +- '../../third_party/gardiner_mod/GardinerModBug.ttf',
950 +- '../../third_party/gardiner_mod/GardinerModCat.ttf',
951 + ]
952 + }],
953 + }],
954
955 diff --git a/dev-util/electron/files/chromium-shared-v8.patch b/dev-util/electron/files/chromium-shared-v8.patch
956 new file mode 100644
957 index 0000000..67d97c8
958 --- /dev/null
959 +++ b/dev-util/electron/files/chromium-shared-v8.patch
960 @@ -0,0 +1,15 @@
961 +diff --git a/v8/tools/gyp/v8.gyp.orig b/v8/tools/gyp/v8.gyp
962 +index bcb5801..3162456 100644
963 +--- a/v8/tools/gyp/v8.gyp.orig
964 ++++ b/v8/tools/gyp/v8.gyp
965 +@@ -48,8 +48,8 @@
966 + }, {
967 + 'toolsets': ['target'],
968 + }],
969 +- ['component=="shared_library"', {
970 +- 'type': '<(component)',
971 ++ ['v8_target_type=="shared_library"', {
972 ++ 'type': 'shared_library',
973 + 'sources': [
974 + # Note: on non-Windows we still build this file so that gyp
975 + # has some sources to link into the component.
976
977 diff --git a/dev-util/electron/files/chromium-system-ffmpeg-r0.patch b/dev-util/electron/files/chromium-system-ffmpeg-r0.patch
978 new file mode 100644
979 index 0000000..667e0ec
980 --- /dev/null
981 +++ b/dev-util/electron/files/chromium-system-ffmpeg-r0.patch
982 @@ -0,0 +1,54 @@
983 +diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
984 +index 677bd76..23a21f8 100644
985 +--- a/media/ffmpeg/ffmpeg_common.h
986 ++++ b/media/ffmpeg/ffmpeg_common.h
987 +@@ -19,20 +19,12 @@
988 +
989 + // Include FFmpeg header files.
990 + extern "C" {
991 +-// Disable deprecated features which result in spammy compile warnings. This
992 +-// list of defines must mirror those in the 'defines' section of the ffmpeg.gyp
993 +-// file or the headers below will generate different structures.
994 +-#define FF_API_PIX_FMT_DESC 0
995 +-#define FF_API_OLD_DECODE_AUDIO 0
996 +-#define FF_API_DESTRUCT_PACKET 0
997 +-#define FF_API_GET_BUFFER 0
998 +
999 + // Temporarily disable possible loss of data warning.
1000 + // TODO(scherkus): fix and upstream the compiler warnings.
1001 + MSVC_PUSH_DISABLE_WARNING(4244);
1002 + #include <libavcodec/avcodec.h>
1003 + #include <libavformat/avformat.h>
1004 +-#include <libavformat/internal.h>
1005 + #include <libavformat/avio.h>
1006 + #include <libavutil/avutil.h>
1007 + #include <libavutil/imgutils.h>
1008 +diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
1009 +index 155e980..7ba327a 100644
1010 +--- a/media/filters/ffmpeg_demuxer.cc
1011 ++++ b/media/filters/ffmpeg_demuxer.cc
1012 +@@ -966,24 +966,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
1013 + // If no estimate is found, the stream entry will be kInfiniteDuration().
1014 + std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
1015 + kInfiniteDuration());
1016 +- const AVFormatInternal* internal = format_context->internal;
1017 +- if (internal && internal->packet_buffer &&
1018 +- format_context->start_time != static_cast<int64>(AV_NOPTS_VALUE)) {
1019 +- struct AVPacketList* packet_buffer = internal->packet_buffer;
1020 +- while (packet_buffer != internal->packet_buffer_end) {
1021 +- DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
1022 +- start_time_estimates.size());
1023 +- const AVStream* stream =
1024 +- format_context->streams[packet_buffer->pkt.stream_index];
1025 +- if (packet_buffer->pkt.pts != static_cast<int64>(AV_NOPTS_VALUE)) {
1026 +- const base::TimeDelta packet_pts =
1027 +- ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
1028 +- if (packet_pts < start_time_estimates[stream->index])
1029 +- start_time_estimates[stream->index] = packet_pts;
1030 +- }
1031 +- packet_buffer = packet_buffer->next;
1032 +- }
1033 +- }
1034 +
1035 + AVStream* audio_stream = NULL;
1036 + AudioDecoderConfig audio_config;
1037
1038 diff --git a/dev-util/electron/files/chromium-system-jinja-r7.patch b/dev-util/electron/files/chromium-system-jinja-r7.patch
1039 new file mode 100644
1040 index 0000000..fe28e12
1041 --- /dev/null
1042 +++ b/dev-util/electron/files/chromium-system-jinja-r7.patch
1043 @@ -0,0 +1,35 @@
1044 +--- third_party/WebKit/Source/bindings/scripts/scripts.gyp.orig 2014-08-19 09:55:10.330972228 +0000
1045 ++++ third_party/WebKit/Source/bindings/scripts/scripts.gyp 2014-08-19 09:55:26.387286232 +0000
1046 +@@ -54,7 +54,6 @@
1047 + 'actions': [{
1048 + 'action_name': 'cache_jinja_templates',
1049 + 'inputs': [
1050 +- '<@(jinja_module_files)',
1051 + 'code_generator_v8.py',
1052 + '<@(code_generator_template_files)',
1053 + ],
1054 +--- third_party/WebKit/Source/build/scripts/scripts.gypi.orig 2014-08-19 10:00:00.216521733 +0000
1055 ++++ third_party/WebKit/Source/build/scripts/scripts.gypi 2014-08-19 10:00:11.464735099 +0000
1056 +@@ -2,10 +2,6 @@
1057 + {
1058 + 'variables': {
1059 + 'scripts_for_in_files': [
1060 +- # jinja2/__init__.py contains version string, so sufficient as
1061 +- # dependency for whole jinja2 package
1062 +- '<(DEPTH)/third_party/jinja2/__init__.py',
1063 +- '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep
1064 + 'hasher.py',
1065 + 'in_file.py',
1066 + 'in_generator.py',
1067 +--- third_party/WebKit/Source/bindings/scripts/scripts.gypi.orig 2014-08-19 10:53:02.824618979 +0000
1068 ++++ third_party/WebKit/Source/bindings/scripts/scripts.gypi 2014-08-19 10:53:20.784957370 +0000
1069 +@@ -12,9 +12,6 @@
1070 + '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep
1071 + ],
1072 + 'idl_lexer_parser_files': [
1073 +- # PLY (Python Lex-Yacc)
1074 +- '<(DEPTH)/third_party/ply/lex.py',
1075 +- '<(DEPTH)/third_party/ply/yacc.py',
1076 + # Web IDL lexer/parser (base parser)
1077 + '<(DEPTH)/tools/idl_parser/idl_lexer.py',
1078 + '<(DEPTH)/tools/idl_parser/idl_node.py',
1079
1080 diff --git a/dev-util/electron/files/chromium-system-libvpx-r0.patch b/dev-util/electron/files/chromium-system-libvpx-r0.patch
1081 new file mode 100644
1082 index 0000000..cd7c164
1083 --- /dev/null
1084 +++ b/dev-util/electron/files/chromium-system-libvpx-r0.patch
1085 @@ -0,0 +1,20 @@
1086 +--- build/linux/unbundle/libvpx.gyp.orig 2016-02-08 19:16:24.646981037 -0500
1087 ++++ build/linux/unbundle/libvpx.gyp 2016-02-08 19:15:42.449979462 -0500
1088 +@@ -4,7 +4,7 @@
1089 + {
1090 + 'targets': [
1091 + {
1092 +- 'target_name': 'libvpx',
1093 ++ 'target_name': 'libvpx_new',
1094 + 'type': 'none',
1095 + 'direct_dependent_settings': {
1096 + 'cflags': [
1097 +@@ -18,8 +18,6 @@
1098 + 'vpx/vp8cx.h',
1099 + 'vpx/vp8dx.h',
1100 + 'vpx/vpx_codec.h',
1101 +- 'vpx/vpx_codec_impl_bottom.h',
1102 +- 'vpx/vpx_codec_impl_top.h',
1103 + 'vpx/vpx_decoder.h',
1104 + 'vpx/vpx_encoder.h',
1105 + 'vpx/vpx_frame_buffer.h',
1106
1107 diff --git a/dev-util/electron/files/electron-gentoo-build-fixes.patch b/dev-util/electron/files/electron-gentoo-build-fixes.patch
1108 new file mode 100644
1109 index 0000000..5a91a8f
1110 --- /dev/null
1111 +++ b/dev-util/electron/files/electron-gentoo-build-fixes.patch
1112 @@ -0,0 +1,157 @@
1113 +From 174dd209209d8f67f534ad761d8adeeddc6bf5c0 Mon Sep 17 00:00:00 2001
1114 +From: Elvis Pranskevichus <elvis@×××××.io>
1115 +Date: Mon, 8 Feb 2016 15:16:40 -0500
1116 +Subject: [PATCH] electron build fixes
1117 +
1118 +---
1119 + atom.gyp | 19 ++++++++-----------
1120 + common.gypi | 32 +++++++++++++++++++++++---------
1121 + filenames.gypi | 1 -
1122 + 3 files changed, 31 insertions(+), 21 deletions(-)
1123 +
1124 +diff --git a/atom.gyp b/atom.gyp
1125 +index 68a30cc..06109a9 100644
1126 +--- a/atom.gyp
1127 ++++ b/atom.gyp
1128 +@@ -177,7 +177,7 @@
1129 + ],
1130 + }, {
1131 + 'dependencies': [
1132 +- 'vendor/breakpad/breakpad.gyp:dump_syms#host',
1133 ++ 'breakpad/breakpad.gyp:dump_syms#host',
1134 + ],
1135 + }], # OS=="win"
1136 + ['OS=="linux"', {
1137 +@@ -194,7 +194,7 @@
1138 + }, {
1139 + 'copied_libraries': [
1140 + '<(PRODUCT_DIR)/lib/libnode.so',
1141 +- '<(libchromiumcontent_dir)/libffmpeg.so',
1142 ++ '<(PRODUCT_DIR)/lib/libv8.so',
1143 + ],
1144 + }],
1145 + ],
1146 +@@ -202,9 +202,6 @@
1147 + 'destination': '<(PRODUCT_DIR)',
1148 + 'files': [
1149 + '<@(copied_libraries)',
1150 +- '<(libchromiumcontent_dir)/locales',
1151 +- '<(libchromiumcontent_dir)/icudtl.dat',
1152 +- '<(libchromiumcontent_dir)/content_shell.pak',
1153 + '<(libchromiumcontent_dir)/natives_blob.bin',
1154 + '<(libchromiumcontent_dir)/snapshot_blob.bin',
1155 + ],
1156 +@@ -242,8 +239,8 @@
1157 + '<@(lib_sources)',
1158 + ],
1159 + 'include_dirs': [
1160 +- '.',
1161 + 'chromium_src',
1162 ++ '.',
1163 + 'vendor/brightray',
1164 + 'vendor/native_mate',
1165 + # Include atom_natives.h.
1166 +@@ -301,8 +298,8 @@
1167 + 'vendor/node/deps/uv/uv.gyp:libuv',
1168 + 'vendor/node/deps/zlib/zlib.gyp:zlib',
1169 + # Build with breakpad support.
1170 +- 'vendor/breakpad/breakpad.gyp:breakpad_handler',
1171 +- 'vendor/breakpad/breakpad.gyp:breakpad_sender',
1172 ++ 'breakpad/breakpad.gyp:breakpad_handler',
1173 ++ 'breakpad/breakpad.gyp:breakpad_sender',
1174 + ],
1175 + }], # OS=="win"
1176 + ['OS=="mac" and mas_build==0', {
1177 +@@ -333,7 +330,7 @@
1178 + # Make binary search for libraries under current directory, so we
1179 + # don't have to manually set $LD_LIBRARY_PATH:
1180 + # http://serverfault.com/questions/279068/cant-find-so-in-the-same-directory-as-the-executable
1181 +- '-rpath \$$ORIGIN',
1182 ++ '-Wl,-rpath=\$$ORIGIN/',
1183 + # Make native module dynamic loading work.
1184 + '-rdynamic',
1185 + ],
1186 +@@ -344,10 +341,10 @@
1187 + '-Wno-reserved-user-defined-literal',
1188 + ],
1189 + 'include_dirs': [
1190 +- 'vendor/breakpad/src',
1191 ++ 'breakpad/src',
1192 + ],
1193 + 'dependencies': [
1194 +- 'vendor/breakpad/breakpad.gyp:breakpad_client',
1195 ++ 'breakpad/breakpad.gyp:breakpad_client',
1196 + ],
1197 + }], # OS=="linux"
1198 + ],
1199 +diff --git a/common.gypi b/common.gypi
1200 +index 7c41c36..97a3d3a 100644
1201 +--- a/common.gypi
1202 ++++ b/common.gypi
1203 +@@ -17,28 +17,42 @@
1204 + 'node_target_type': 'shared_library',
1205 + 'node_install_npm': 'false',
1206 + 'node_prefix': '',
1207 +- 'node_shared_cares': 'false',
1208 +- 'node_shared_http_parser': 'false',
1209 +- 'node_shared_libuv': 'false',
1210 +- 'node_shared_openssl': 'false',
1211 +- 'node_shared_v8': 'true',
1212 +- 'node_shared_zlib': 'false',
1213 + 'node_tag': '',
1214 + 'node_use_dtrace': 'false',
1215 + 'node_use_etw': 'false',
1216 + 'node_use_mdb': 'false',
1217 + 'node_use_openssl': 'true',
1218 + 'node_use_perfctr': 'false',
1219 +- 'uv_library': 'static_library',
1220 +- 'uv_parent_path': 'vendor/node/deps/uv',
1221 +- 'uv_use_dtrace': 'false',
1222 + 'V8_BASE': '',
1223 + 'v8_postmortem_support': 'false',
1224 + 'v8_enable_i18n_support': 'false',
1225 ++ 'v8_gyp_path': '<(DEPTH)/v8/tools/gyp/v8.gyp',
1226 ++ 'v8_libraries': '["v8", "v8_snapshot", "v8_nosnapshot", "v8_external_snapshot", "v8_base", "v8_libbase", "v8_libplatform"]',
1227 ++ 'v8_target_type': 'shared_library',
1228 ++ 'v8_use_snapshot': 'true',
1229 ++ 'v8_use_external_startup_data': 1,
1230 + },
1231 + # Settings to compile node under Windows.
1232 + 'target_defaults': {
1233 + 'target_conditions': [
1234 ++ ['_target_name in <(v8_libraries) + ["node"]', {
1235 ++ 'cflags!': [
1236 ++ '-fvisibility=hidden',
1237 ++ '-fdata-sections',
1238 ++ '-ffunction-sections',
1239 ++ ],
1240 ++ 'cflags_cc!': [
1241 ++ '-fvisibility-inlines-hidden'
1242 ++ ],
1243 ++ }],
1244 ++
1245 ++ ['_target_name in <(v8_libraries) + ["mksnapshot"]', {
1246 ++ 'defines': [
1247 ++ 'V8_SHARED',
1248 ++ 'BUILDING_V8_SHARED',
1249 ++ ],
1250 ++ }],
1251 ++
1252 + ['_target_name in ["libuv", "http_parser", "openssl", "cares", "node", "zlib"]', {
1253 + 'msvs_disabled_warnings': [
1254 + 4013, # 'free' undefined; assuming extern returning int
1255 +diff --git a/filenames.gypi b/filenames.gypi
1256 +index abb1145..2330ccf 100644
1257 +--- a/filenames.gypi
1258 ++++ b/filenames.gypi
1259 +@@ -498,7 +498,6 @@
1260 + 'chromium_src/extensions/browser/app_window/size_constraints.h',
1261 + 'chromium_src/extensions/common/url_pattern.cc',
1262 + 'chromium_src/extensions/common/url_pattern.h',
1263 +- 'chromium_src/library_loaders/libspeechd_loader.cc',
1264 + 'chromium_src/library_loaders/libspeechd.h',
1265 + 'chromium_src/net/test/embedded_test_server/stream_listen_socket.cc',
1266 + 'chromium_src/net/test/embedded_test_server/stream_listen_socket.h',
1267 +--
1268 +2.7.3
1269 +
1270
1271 diff --git a/dev-util/electron/files/libchromiumcontent-gentoo-build-fixes.patch b/dev-util/electron/files/libchromiumcontent-gentoo-build-fixes.patch
1272 new file mode 100644
1273 index 0000000..168d8db
1274 --- /dev/null
1275 +++ b/dev-util/electron/files/libchromiumcontent-gentoo-build-fixes.patch
1276 @@ -0,0 +1,75 @@
1277 +From b7022129450eaf2136746f5332956e76848796ef Mon Sep 17 00:00:00 2001
1278 +From: Elvis Pranskevichus <elvis@×××××.io>
1279 +Date: Mon, 8 Feb 2016 15:12:12 -0500
1280 +Subject: [PATCH] libchromiumcontent build fixes
1281 +
1282 +---
1283 + chromiumcontent/chromiumcontent.gyp | 6 +++---
1284 + chromiumcontent/chromiumcontent.gypi | 26 --------------------------
1285 + 2 files changed, 3 insertions(+), 29 deletions(-)
1286 +
1287 +diff --git a/chromiumcontent/chromiumcontent.gyp b/chromiumcontent/chromiumcontent.gyp
1288 +index 52a1d36..db74a52 100644
1289 +--- a/chromiumcontent/chromiumcontent.gyp
1290 ++++ b/chromiumcontent/chromiumcontent.gyp
1291 +@@ -24,11 +24,11 @@
1292 + },
1293 + {
1294 + 'target_name': 'chromiumcontent',
1295 +- # Build chromiumcontent as shared_library otherwise some static libraries
1296 +- # will not build.
1297 +- 'type': 'shared_library',
1298 ++ 'type': 'static_library',
1299 + 'dependencies': [
1300 + '<(DEPTH)/base/base.gyp:base_prefs',
1301 ++ '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
1302 ++ '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
1303 + '<(DEPTH)/components/components.gyp:cdm_renderer',
1304 + '<(DEPTH)/components/components.gyp:devtools_discovery',
1305 + '<(DEPTH)/components/components.gyp:devtools_http_handler',
1306 +diff --git a/chromiumcontent/chromiumcontent.gypi b/chromiumcontent/chromiumcontent.gypi
1307 +index 37c572b..3f4dcea 100644
1308 +--- a/chromiumcontent/chromiumcontent.gypi
1309 ++++ b/chromiumcontent/chromiumcontent.gypi
1310 +@@ -1,17 +1,5 @@
1311 + {
1312 + 'variables': {
1313 +- # Enalbe using proprietary codecs.
1314 +- 'proprietary_codecs': 1,
1315 +- 'ffmpeg_branding': 'Chrome',
1316 +- # Enable support for Widevine CDM.
1317 +- 'enable_widevine': 1,
1318 +- # Using libc++ requires building for >= 10.7.
1319 +- 'mac_deployment_target': '10.8',
1320 +- # The 10.8 SDK does not work well with C++11.
1321 +- 'mac_sdk_min': '10.9',
1322 +- # Use the standard way of linking with msvc runtime.
1323 +- 'win_use_allocator_shim': 0,
1324 +- 'win_release_RuntimeLibrary': '2',
1325 + # The V8 libraries.
1326 + 'v8_libraries': '["v8", "v8_snapshot", "v8_nosnapshot", "v8_external_snapshot", "v8_base", "v8_libbase", "v8_libplatform"]',
1327 + # The icu libraries.
1328 +@@ -22,20 +10,6 @@
1329 + 'v8_use_external_startup_data': 1,
1330 + }],
1331 + ['OS=="linux"', {
1332 +- # Enable high DPI support on Linux.
1333 +- 'enable_hidpi': 1,
1334 +- # Use Dbus.
1335 +- 'use_dbus': 1,
1336 +- # Make Linux build contain debug symbols, this flag will add '-g' to
1337 +- # cflags.
1338 +- 'linux_dump_symbols': 1,
1339 +- # The Linux build of libchromiumcontent.so depends on, but doesn't
1340 +- # provide, tcmalloc by default. Disabling tcmalloc here also prevents
1341 +- # any conflicts when linking to binaries or libraries that don't use
1342 +- # tcmalloc.
1343 +- 'linux_use_tcmalloc': 0,
1344 +- # Force using gold linker.
1345 +- 'linux_use_bundled_gold': 1,
1346 + 'conditions': [
1347 + ['target_arch=="arm"', {
1348 + 'arm_version': 7,
1349 +--
1350 +2.4.10
1351 +
1352
1353 diff --git a/dev-util/electron/files/node-gentoo-build-fixes.patch b/dev-util/electron/files/node-gentoo-build-fixes.patch
1354 new file mode 100644
1355 index 0000000..b19cc37
1356 --- /dev/null
1357 +++ b/dev-util/electron/files/node-gentoo-build-fixes.patch
1358 @@ -0,0 +1,50 @@
1359 +From 668a003706d57c3e7a460e2fce5d110fe9737a62 Mon Sep 17 00:00:00 2001
1360 +From: Elvis Pranskevichus <elvis@×××××.io>
1361 +Date: Wed, 10 Feb 2016 14:45:13 -0500
1362 +Subject: [PATCH] Parametrize v8.gyp location
1363 +
1364 +---
1365 + node.gyp | 5 +++--
1366 + tools/install.py | 3 +++
1367 + 2 files changed, 6 insertions(+), 2 deletions(-)
1368 +
1369 +diff --git a/node.gyp b/node.gyp
1370 +index d431210..fea5e07 100644
1371 +--- a/node.gyp
1372 ++++ b/node.gyp
1373 +@@ -1,6 +1,7 @@
1374 + {
1375 + 'variables': {
1376 + 'v8_use_snapshot%': 'false',
1377 ++ 'v8_gyp_path%': 'deps/v8/tools/gyp/v8.gyp',
1378 + 'node_use_dtrace%': 'false',
1379 + 'node_use_lttng%': 'false',
1380 + 'node_use_etw%': 'false',
1381 +@@ -89,8 +90,8 @@
1382 + 'dependencies': [
1383 + 'node_js2c#host',
1384 + 'deps/cares/cares.gyp:cares',
1385 +- # 'deps/v8/tools/gyp/v8.gyp:v8',
1386 +- # 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
1387 ++ '<(v8_gyp_path):v8',
1388 ++ '<(v8_gyp_path):v8_libplatform'
1389 + ],
1390 +
1391 + 'include_dirs': [
1392 +diff --git a/tools/install.py b/tools/install.py
1393 +index cb86c65..ee85e33 100755
1394 +--- a/tools/install.py
1395 ++++ b/tools/install.py
1396 +@@ -207,6 +207,9 @@ def run(args):
1397 + if os.environ.get('HEADERS_ONLY'):
1398 + if cmd == 'install': return headers(install)
1399 + if cmd == 'uninstall': return headers(uninstall)
1400 ++ elif os.environ.get('NPM_ONLY'):
1401 ++ if cmd == 'install': return npm_files(install)
1402 ++ if cmd == 'uninstall': return npm_files(uninstall)
1403 + else:
1404 + if cmd == 'install': return files(install)
1405 + if cmd == 'uninstall': return files(uninstall)
1406 +--
1407 +2.7.3
1408 +
1409
1410 diff --git a/dev-util/electron/metadata.xml b/dev-util/electron/metadata.xml
1411 new file mode 100644
1412 index 0000000..d079fad
1413 --- /dev/null
1414 +++ b/dev-util/electron/metadata.xml
1415 @@ -0,0 +1,22 @@
1416 +<?xml version="1.0" encoding="UTF-8"?>
1417 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
1418 +<pkgmetadata>
1419 + <maintainer type="person">
1420 + <email>elvis@×××××.io</email>
1421 + <name>Elvis Pranskevichus</name>
1422 + </maintainer>
1423 + <maintainer type="project">
1424 + <email>proxy-maint@g.o</email>
1425 + <name>Proxy Maintainers</name>
1426 + </maintainer>
1427 + <longdescription>Electron is a cross platform application development framework based on web technologies based on Chromium</longdescription>
1428 + <use>
1429 + <flag name="gtk3">Use gtk3 instead of gtk2</flag>
1430 + <flag name="hidpi">Enable support for high-resolution screens (high dots per inch)</flag>
1431 + <flag name="lto">Build with link time optimization enabled</flag>
1432 + <flag name="pic">Disable optimized assembly code that is not PIC friendly</flag>
1433 + <flag name="proprietary-codecs">Enable proprietary codecs like H.264, MP3</flag>
1434 + <flag name="system-ffmpeg">Use system ffmpeg instead of the bundled one</flag>
1435 + <flag name="tcmalloc">Use bundled tcmalloc instead of system malloc</flag>
1436 + </use>
1437 +</pkgmetadata>