View | Details | Raw Unified | Return to bug 226476 | Differences between
and this patch

Collapse All | Expand All

(-)b/Mk/Uses/gecko.mk (-2 / +2 lines)
Lines 37-48 RUN_DEPENDS+= libxul>=45:www/libxul Link Here
37
.elif ${gecko_ARGS:Mfirefox}
37
.elif ${gecko_ARGS:Mfirefox}
38
38
39
_GECKO_DEFAULT_VERSION=	52
39
_GECKO_DEFAULT_VERSION=	52
40
_GECKO_VERSIONS=		52 59
40
_GECKO_VERSIONS=		52 60
41
_GECKO_TYPE=	firefox
41
_GECKO_TYPE=	firefox
42
42
43
# Dependence lines for different Firefox versions
43
# Dependence lines for different Firefox versions
44
52_DEPENDS=		${LOCALBASE}/lib/firefox/firefox:www/firefox-esr
44
52_DEPENDS=		${LOCALBASE}/lib/firefox/firefox:www/firefox-esr
45
59_DEPENDS=		${LOCALBASE}/lib/firefox/firefox:www/firefox
45
60_DEPENDS=		${LOCALBASE}/lib/firefox/firefox:www/firefox
46
46
47
.if exists(${LOCALBASE}/bin/firefox)
47
.if exists(${LOCALBASE}/bin/firefox)
48
_GECKO_INSTALLED_VER!=	${LOCALBASE}/bin/firefox --version 2>/dev/null
48
_GECKO_INSTALLED_VER!=	${LOCALBASE}/bin/firefox --version 2>/dev/null
(-)b/www/firefox-i18n/Makefile (-5 / +4 lines)
Lines 2-12 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	firefox-i18n
4
PORTNAME=	firefox-i18n
5
PORTVERSION=	59.0
5
PORTVERSION=	60.0b2
6
PORTREVISION=	1
7
CATEGORIES=	www
6
CATEGORIES=	www
8
MASTER_SITES=	MOZILLA/${PORTNAME:S|-i18n||}/releases/${DISTVERSION}/linux-i686/xpi \
7
MASTER_SITES=	MOZILLA/devedition/releases/${DISTVERSION}/linux-i686/xpi \
9
		MOZILLA/${PORTNAME:S|-i18n||}/candidates/${DISTVERSION}-candidates/build4/linux-i686/xpi
8
		MOZILLA/devedition/candidates/${DISTVERSION}-candidates/build1/linux-i686/xpi
10
PKGNAMEPREFIX=
9
PKGNAMEPREFIX=
11
DISTFILES=	${FIREFOX_I18N_:S/$/.xpi/}
10
DISTFILES=	${FIREFOX_I18N_:S/$/.xpi/}
12
DIST_SUBDIR=	xpi/${DISTNAME}
11
DIST_SUBDIR=	xpi/${DISTNAME}
Lines 16-22 COMMENT= Localized interface for Firefox Link Here
16
15
17
EXTRACT_DEPENDS=	zip:archivers/zip
16
EXTRACT_DEPENDS=	zip:archivers/zip
18
17
19
USES=		zip:infozip gecko:firefox,59,build
18
USES=		zip:infozip gecko:firefox,60,build
20
USE_XPI=	firefox
19
USE_XPI=	firefox
21
20
22
NO_ARCH=	yes
21
NO_ARCH=	yes
(-)b/www/firefox-i18n/Makefile.lang (-1 / +4 lines)
Lines 6-12 FIREFOX_I18N_ALL_= ach af an ar as ast az be bg bn-BD bn-IN br bs ca cak \ Link Here
6
			es-ES es-MX et eu fa ff fi fr fy-NL ga-IE gd gl gn	\
6
			es-ES es-MX et eu fa ff fi fr fy-NL ga-IE gd gl gn	\
7
			gu-IN he hi-IN hr hsb hu hy-AM ia id is it ja ka kab	\
7
			gu-IN he hi-IN hr hsb hu hy-AM ia id is it ja ka kab	\
8
			kk km kn ko lij lt lv mai mk ml mr ms my nb-NO ne-NP nl	\
8
			kk km kn ko lij lt lv mai mk ml mr ms my nb-NO ne-NP nl	\
9
			nn-NO or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son	\
9
			nn-NO oc or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son	\
10
			sq sr sv-SE ta te th tr uk ur uz vi xh zh-CN zh-TW
10
			sq sr sv-SE ta te th tr uk ur uz vi xh zh-CN zh-TW
11
11
12
.if defined(FIREFOX_I18N_ALL) || defined(PACKAGE_BUILDING) || target(package)
12
.if defined(FIREFOX_I18N_ALL) || defined(PACKAGE_BUILDING) || target(package)
Lines 225-230 FIREFOX_I18N+= nl Link Here
225
.if ${PORT_OPTIONS:MLANG_NN}
225
.if ${PORT_OPTIONS:MLANG_NN}
226
FIREFOX_I18N+=  nn-NO
226
FIREFOX_I18N+=  nn-NO
227
.endif
227
.endif
228
.if ${PORT_OPTIONS:MLANG_OC}
229
FIREFOX_I18N+=  oc
230
.endif
228
.if ${PORT_OPTIONS:MLANG_OR}
231
.if ${PORT_OPTIONS:MLANG_OR}
229
FIREFOX_I18N+=  or
232
FIREFOX_I18N+=  or
230
.endif
233
.endif
(-)b/www/firefox-i18n/Makefile.option (+2 lines)
Lines 73-78 OPTIONS_DEFINE= LANG_ACH \ Link Here
73
		LANG_NE \
73
		LANG_NE \
74
		LANG_NL \
74
		LANG_NL \
75
		LANG_NN \
75
		LANG_NN \
76
		LANG_OC \
76
		LANG_OR \
77
		LANG_OR \
77
		LANG_PA \
78
		LANG_PA \
78
		LANG_PL \
79
		LANG_PL \
Lines 122-127 LANG_LIJ_DESC?= Ligurian (Genoa) language support Link Here
122
LANG_MS_DESC?=	Malay language support
123
LANG_MS_DESC?=	Malay language support
123
LANG_MY_DESC?=	Burmese language support
124
LANG_MY_DESC?=	Burmese language support
124
LANG_NE_DESC?=	Nepali language support
125
LANG_NE_DESC?=	Nepali language support
126
LANG_OC_DESC?=	Occitan (lengadocian) language support
125
LANG_SW_DESC?=	Swahili language support
127
LANG_SW_DESC?=	Swahili language support
126
LANG_UR_DESC?=	Urdu (Pakistan) language support
128
LANG_UR_DESC?=	Urdu (Pakistan) language support
127
LANG_UZ_DESC?=	Uzbek language support
129
LANG_UZ_DESC?=	Uzbek language support
(-)b/www/firefox-i18n/distinfo (-195 / +197 lines)
Lines 1-195 Link Here
1
TIMESTAMP = 1520456550
1
TIMESTAMP = 1520432739
2
SHA256 (xpi/firefox-i18n-59.0/ach.xpi) = 1d3c6166b27b5e640733210faf4e7fa751d1acb8edd80448fd5cfb840c491987
2
SHA256 (xpi/firefox-i18n-60.0b2/ach.xpi) = 549dddc28203d1d9305ce994fc381711ce4fbed591bf8e81f2e7d827113db4d5
3
SIZE (xpi/firefox-i18n-59.0/ach.xpi) = 439224
3
SIZE (xpi/firefox-i18n-60.0b2/ach.xpi) = 449090
4
SHA256 (xpi/firefox-i18n-59.0/af.xpi) = 21ef31da94eb74b269e65c47961f93d17827a480756d282cf367f3ec4998866c
4
SHA256 (xpi/firefox-i18n-60.0b2/af.xpi) = f651b2abdb84a7d11cffab8dcf62f37491d3817f5726226f8c3736ff106c527f
5
SIZE (xpi/firefox-i18n-59.0/af.xpi) = 436729
5
SIZE (xpi/firefox-i18n-60.0b2/af.xpi) = 446394
6
SHA256 (xpi/firefox-i18n-59.0/an.xpi) = e544fcac272f5b3ee9365c53063164fb6f93e323c61fb0154e744fe046d0e348
6
SHA256 (xpi/firefox-i18n-60.0b2/an.xpi) = 059f8796c4f6ab4a1b3bf05e207b8ef90f2cce1218ec2392c032e93cc73042cc
7
SIZE (xpi/firefox-i18n-59.0/an.xpi) = 463403
7
SIZE (xpi/firefox-i18n-60.0b2/an.xpi) = 473114
8
SHA256 (xpi/firefox-i18n-59.0/ar.xpi) = 6443febaa553ae1f843a20ca5c78be7db122ffa98289f100cca883c86b17fb0a
8
SHA256 (xpi/firefox-i18n-60.0b2/ar.xpi) = 2a38a633aa50a6a6f2bb76060f6e479ad2a098a326aa74bed6f15fb95615b31c
9
SIZE (xpi/firefox-i18n-59.0/ar.xpi) = 486631
9
SIZE (xpi/firefox-i18n-60.0b2/ar.xpi) = 497449
10
SHA256 (xpi/firefox-i18n-59.0/as.xpi) = b8baf8448a59e13ae8ed5794f9a1b796f34029add488dc215023ff12c5549ccb
10
SHA256 (xpi/firefox-i18n-60.0b2/as.xpi) = d52da64632f045a5544e21693e26498457ed064bc95479c705a6a86789521349
11
SIZE (xpi/firefox-i18n-59.0/as.xpi) = 483300
11
SIZE (xpi/firefox-i18n-60.0b2/as.xpi) = 490528
12
SHA256 (xpi/firefox-i18n-59.0/ast.xpi) = 82876aa720ab6c98c5c1dd12fde7d62a47d1c42a87d70666b765144e620334e2
12
SHA256 (xpi/firefox-i18n-60.0b2/ast.xpi) = 17a0af0a95fa2040d3f26cd449c92bdac51ccd823deee13933be54031ae0b8b2
13
SIZE (xpi/firefox-i18n-59.0/ast.xpi) = 454341
13
SIZE (xpi/firefox-i18n-60.0b2/ast.xpi) = 464535
14
SHA256 (xpi/firefox-i18n-59.0/az.xpi) = e799b35e4a8d2272378b6f0fadee5777660af8d96e6cfa9b23d5d4e3a7088693
14
SHA256 (xpi/firefox-i18n-60.0b2/az.xpi) = 737639e42ea7a4ee34de4fade44db8d14740f94ee3510529f1a99b77bd85f857
15
SIZE (xpi/firefox-i18n-59.0/az.xpi) = 464267
15
SIZE (xpi/firefox-i18n-60.0b2/az.xpi) = 474699
16
SHA256 (xpi/firefox-i18n-59.0/be.xpi) = d4852d209ee8dfa9b88abc418f48cbb4df9599de9c4000455f50533ddc1dba08
16
SHA256 (xpi/firefox-i18n-60.0b2/be.xpi) = cbbd91eb437763799a17859bf339e96af3bfdbc26f397212182e0910bb80f047
17
SIZE (xpi/firefox-i18n-59.0/be.xpi) = 517058
17
SIZE (xpi/firefox-i18n-60.0b2/be.xpi) = 526494
18
SHA256 (xpi/firefox-i18n-59.0/bg.xpi) = ee011edf65e91faa21c8a75b8f9922484a899b4d6762f0a6a5f3b9f35521c2b3
18
SHA256 (xpi/firefox-i18n-60.0b2/bg.xpi) = 183042ae5dde5703cefc04e436005e29e4379d6701d13e64f564ed2cab83fe09
19
SIZE (xpi/firefox-i18n-59.0/bg.xpi) = 508611
19
SIZE (xpi/firefox-i18n-60.0b2/bg.xpi) = 518924
20
SHA256 (xpi/firefox-i18n-59.0/bn-BD.xpi) = 5c39189efa5daf9e8d6574b98bed66edad98bd0a4459955c666c5a9734c16d28
20
SHA256 (xpi/firefox-i18n-60.0b2/bn-BD.xpi) = 0e0b99ba805666a88f5352bd1003c21ae5e73b48e1c990b572bb57f531d7b286
21
SIZE (xpi/firefox-i18n-59.0/bn-BD.xpi) = 526351
21
SIZE (xpi/firefox-i18n-60.0b2/bn-BD.xpi) = 536619
22
SHA256 (xpi/firefox-i18n-59.0/bn-IN.xpi) = cdacc3c3002f4bb335b13bea1ddf22d0725938156afe257d45ad1a2e1148aa68
22
SHA256 (xpi/firefox-i18n-60.0b2/bn-IN.xpi) = 3771ee7e2423b2915b1f116d9ceb02eb2124d0d7e57560cc79ef436c4d97f5f8
23
SIZE (xpi/firefox-i18n-59.0/bn-IN.xpi) = 510795
23
SIZE (xpi/firefox-i18n-60.0b2/bn-IN.xpi) = 521938
24
SHA256 (xpi/firefox-i18n-59.0/br.xpi) = dfa4af49f1c379c1e299d252ba416310775c0f6a5802b1f26bb6610e20ab890d
24
SHA256 (xpi/firefox-i18n-60.0b2/br.xpi) = 33b6d07d848d8a57006d36f1e211ba6479d27c3eadd0780b4a2c8f631e133915
25
SIZE (xpi/firefox-i18n-59.0/br.xpi) = 451718
25
SIZE (xpi/firefox-i18n-60.0b2/br.xpi) = 461633
26
SHA256 (xpi/firefox-i18n-59.0/bs.xpi) = 75b095a9128248737edcb22a5c7926c51f1657762549453fe5dba045628baa97
26
SHA256 (xpi/firefox-i18n-60.0b2/bs.xpi) = 93f5937844ef793eefca086613a7c20f0d56e9053f931e3d62872afd968def47
27
SIZE (xpi/firefox-i18n-59.0/bs.xpi) = 457857
27
SIZE (xpi/firefox-i18n-60.0b2/bs.xpi) = 468560
28
SHA256 (xpi/firefox-i18n-59.0/ca.xpi) = 5171bf8d0c0f40bea63e81ae282cd41e42484b2ec06b904460c8669ee6454a3b
28
SHA256 (xpi/firefox-i18n-60.0b2/ca.xpi) = 4a83d7700e5919001766c0df8f04cac8ff307810370a7bddfb472d8f28cc62c9
29
SIZE (xpi/firefox-i18n-59.0/ca.xpi) = 464910
29
SIZE (xpi/firefox-i18n-60.0b2/ca.xpi) = 475509
30
SHA256 (xpi/firefox-i18n-59.0/cak.xpi) = eaae22a1be95e28d55aa849dc3699ebe5ee567574e38a306f26591da03a7e332
30
SHA256 (xpi/firefox-i18n-60.0b2/cak.xpi) = bafdb85ba5f777de7c6333523a9f259e50ded7e94e9a7208add22663e474c0fb
31
SIZE (xpi/firefox-i18n-59.0/cak.xpi) = 475232
31
SIZE (xpi/firefox-i18n-60.0b2/cak.xpi) = 485064
32
SHA256 (xpi/firefox-i18n-59.0/cs.xpi) = 2843a427be283937c15f98e31cb23025960822a8faf0d71d7ef30e20007cecae
32
SHA256 (xpi/firefox-i18n-60.0b2/cs.xpi) = e4536757219e593c0684ee1a52276a50fec15282a518a3c583452231b1c7c9ad
33
SIZE (xpi/firefox-i18n-59.0/cs.xpi) = 471573
33
SIZE (xpi/firefox-i18n-60.0b2/cs.xpi) = 480622
34
SHA256 (xpi/firefox-i18n-59.0/cy.xpi) = 9e83160f6142bc1189822957f7528f1a3ca4c221576cac1075dfed5731197516
34
SHA256 (xpi/firefox-i18n-60.0b2/cy.xpi) = 43b1a490160d42476d0b7081ad6222f843f25026336c707bfd890805d74c8192
35
SIZE (xpi/firefox-i18n-59.0/cy.xpi) = 454431
35
SIZE (xpi/firefox-i18n-60.0b2/cy.xpi) = 465635
36
SHA256 (xpi/firefox-i18n-59.0/da.xpi) = 5803ba7d12156ef86fcc951ceac1b53f3fbce938826d51bc6f15780c1242d935
36
SHA256 (xpi/firefox-i18n-60.0b2/da.xpi) = d9526782aebc6a9046508922a9a6bf197b9ab2ec28d26874097aae7d047b4444
37
SIZE (xpi/firefox-i18n-59.0/da.xpi) = 446947
37
SIZE (xpi/firefox-i18n-60.0b2/da.xpi) = 457683
38
SHA256 (xpi/firefox-i18n-59.0/de.xpi) = 80cb4b481073f71acaa6e6d760ebf0b599a33895eab236cf2cc3a8c000be0697
38
SHA256 (xpi/firefox-i18n-60.0b2/de.xpi) = 37b685289daf42a72aae47e3c2bf401236aec3e48a93d301feac659a18b5ebf5
39
SIZE (xpi/firefox-i18n-59.0/de.xpi) = 466271
39
SIZE (xpi/firefox-i18n-60.0b2/de.xpi) = 478046
40
SHA256 (xpi/firefox-i18n-59.0/dsb.xpi) = bcdb45e97f901fbff9b547a91a0b5c2a5bdadeea8ea5610ee5fceaf4484ef36f
40
SHA256 (xpi/firefox-i18n-60.0b2/dsb.xpi) = 01f70dac6ac7204b99dbc7ab8b715a87743865fc3ca6f199fb512bbaa2582e3f
41
SIZE (xpi/firefox-i18n-59.0/dsb.xpi) = 478973
41
SIZE (xpi/firefox-i18n-60.0b2/dsb.xpi) = 488763
42
SHA256 (xpi/firefox-i18n-59.0/el.xpi) = 466c2fef631c844ab1280e3879add57aacb98e2f30a7d8223f865d196deeb487
42
SHA256 (xpi/firefox-i18n-60.0b2/el.xpi) = e211e0e1d06c30b966f85c49c4bc5ad7e75f7375669ed0136efa1ac78e117890
43
SIZE (xpi/firefox-i18n-59.0/el.xpi) = 531406
43
SIZE (xpi/firefox-i18n-60.0b2/el.xpi) = 543012
44
SHA256 (xpi/firefox-i18n-59.0/en-GB.xpi) = cb42b3e458acc5ab249da6b55a9958585e4c064ddfb94b7bf49f9465626df0a4
44
SHA256 (xpi/firefox-i18n-60.0b2/en-GB.xpi) = 7e81107e8c2e74f2f8d6749a21f16878a3db6f4c1b86ceb34501433ec8f05014
45
SIZE (xpi/firefox-i18n-59.0/en-GB.xpi) = 434298
45
SIZE (xpi/firefox-i18n-60.0b2/en-GB.xpi) = 445086
46
SHA256 (xpi/firefox-i18n-59.0/en-US.xpi) = 44e49f00faf5c818ca025e4845f667b33c9542f5cc876fb5779c1d0fb87cc8b9
46
SHA256 (xpi/firefox-i18n-60.0b2/en-US.xpi) = 785f72065cab035368a0bd76f2a6df6808d55e0bd17f68e5a45325dfccdcb407
47
SIZE (xpi/firefox-i18n-59.0/en-US.xpi) = 432747
47
SIZE (xpi/firefox-i18n-60.0b2/en-US.xpi) = 441494
48
SHA256 (xpi/firefox-i18n-59.0/en-ZA.xpi) = 4816897d2e2f2f5f3d3a35a0f335cd34673f4cc57fe82178af7522055b508e9b
48
SHA256 (xpi/firefox-i18n-60.0b2/en-ZA.xpi) = c52aec301af2815de702d44a36c50a2be639bf68680ec140aab898305a320bff
49
SIZE (xpi/firefox-i18n-59.0/en-ZA.xpi) = 427364
49
SIZE (xpi/firefox-i18n-60.0b2/en-ZA.xpi) = 434598
50
SHA256 (xpi/firefox-i18n-59.0/eo.xpi) = c17ce4751c46e83a293d7272ca8cfeff8602b223226d8fb60aab74e9dae5e7ad
50
SHA256 (xpi/firefox-i18n-60.0b2/eo.xpi) = 3727f43f993c229eca69c115cb06dbe5d718c788c111c450cc7ad033d7114a31
51
SIZE (xpi/firefox-i18n-59.0/eo.xpi) = 453365
51
SIZE (xpi/firefox-i18n-60.0b2/eo.xpi) = 462981
52
SHA256 (xpi/firefox-i18n-59.0/es-AR.xpi) = 1a51d27cafa512ee25f9738f3b121f8d7e573ba277d1b834bae30a739c851e03
52
SHA256 (xpi/firefox-i18n-60.0b2/es-AR.xpi) = 7c08485084d4f0bbf1c24a13cfadbe803c7be5a3fbcff413a5d73864291c1083
53
SIZE (xpi/firefox-i18n-59.0/es-AR.xpi) = 461795
53
SIZE (xpi/firefox-i18n-60.0b2/es-AR.xpi) = 472501
54
SHA256 (xpi/firefox-i18n-59.0/es-CL.xpi) = f6c73332ed4ad8484aee9c87b70762ebf4795fbf340d87ee763879eb20788d14
54
SHA256 (xpi/firefox-i18n-60.0b2/es-CL.xpi) = c05fd2fb4ac0b2b389221d2dbd2fa0cc178ee79d0cfcedd1f225085f15e959fe
55
SIZE (xpi/firefox-i18n-59.0/es-CL.xpi) = 464652
55
SIZE (xpi/firefox-i18n-60.0b2/es-CL.xpi) = 475502
56
SHA256 (xpi/firefox-i18n-59.0/es-ES.xpi) = c1fc12302f57f526ef483ffb79a39c63b0f946b09fd1541989dd2b28ba7eb83c
56
SHA256 (xpi/firefox-i18n-60.0b2/es-ES.xpi) = 71e5b240cba1f4568f4ca20c72e20b286d63b0fe4ecff1ed653dc41bc35f16c4
57
SIZE (xpi/firefox-i18n-59.0/es-ES.xpi) = 348462
57
SIZE (xpi/firefox-i18n-60.0b2/es-ES.xpi) = 359479
58
SHA256 (xpi/firefox-i18n-59.0/es-MX.xpi) = 208182f94525a759cba128b892e80e99ee6dd1921906f8c054a8a515e283b35a
58
SHA256 (xpi/firefox-i18n-60.0b2/es-MX.xpi) = 685946d64122f9f035ec5e8f368ce3da49e0863c7e5e4679f37ff5df369f73ca
59
SIZE (xpi/firefox-i18n-59.0/es-MX.xpi) = 466310
59
SIZE (xpi/firefox-i18n-60.0b2/es-MX.xpi) = 476958
60
SHA256 (xpi/firefox-i18n-59.0/et.xpi) = 0414fc474c1457f8ec64a40d3f268aefe8ddc70cf85a07c5faba4b156f04353c
60
SHA256 (xpi/firefox-i18n-60.0b2/et.xpi) = 4290059a1dcf3ecc74c7761ce0143ce2f95d4023724609c74ab7c4ebd8dad6eb
61
SIZE (xpi/firefox-i18n-59.0/et.xpi) = 445393
61
SIZE (xpi/firefox-i18n-60.0b2/et.xpi) = 455969
62
SHA256 (xpi/firefox-i18n-59.0/eu.xpi) = 45a5df206d635e4b656c34e06e2c7df4b5614fd1584e7bd171432bff44cf155c
62
SHA256 (xpi/firefox-i18n-60.0b2/eu.xpi) = 9ba674684910eb87ee715aed2a0de7720ef906e0cede35fa176155faf24eca66
63
SIZE (xpi/firefox-i18n-59.0/eu.xpi) = 455235
63
SIZE (xpi/firefox-i18n-60.0b2/eu.xpi) = 464909
64
SHA256 (xpi/firefox-i18n-59.0/fa.xpi) = 375f9c9356891978d1b8558c63e34675ff3ed70dde54cbd70fbfee736a6dbe37
64
SHA256 (xpi/firefox-i18n-60.0b2/fa.xpi) = 352ed4d806025413324975a83d7be487a4afa9bf05df3157ccc56b69c74d3ef5
65
SIZE (xpi/firefox-i18n-59.0/fa.xpi) = 508096
65
SIZE (xpi/firefox-i18n-60.0b2/fa.xpi) = 519569
66
SHA256 (xpi/firefox-i18n-59.0/ff.xpi) = ef8313cd46c2e68af5388d4c705958db8e2b75c4156b2b5ee76b2822c5bb921e
66
SHA256 (xpi/firefox-i18n-60.0b2/ff.xpi) = 538203e58720cd17db3be93298874f52463974b73a742f76479b701940f19d59
67
SIZE (xpi/firefox-i18n-59.0/ff.xpi) = 455025
67
SIZE (xpi/firefox-i18n-60.0b2/ff.xpi) = 465513
68
SHA256 (xpi/firefox-i18n-59.0/fi.xpi) = 2d568720cd7f1d3106c6e1c8d02e838786a7643cdc8a74362a449127636346b6
68
SHA256 (xpi/firefox-i18n-60.0b2/fi.xpi) = 512fe170961119588d20fac84a68112ddabfc94607c8bfe562d94e83a4bc7efc
69
SIZE (xpi/firefox-i18n-59.0/fi.xpi) = 445181
69
SIZE (xpi/firefox-i18n-60.0b2/fi.xpi) = 456106
70
SHA256 (xpi/firefox-i18n-59.0/fr.xpi) = 7dad72da0d5ea4d30b70f34319a9446044d952bcdcaef8e50e8735328f86e857
70
SHA256 (xpi/firefox-i18n-60.0b2/fr.xpi) = dddc8c936ec3cb895058ed0c96c75e838cf46fb017f22fbd4e432c1314a9b3bd
71
SIZE (xpi/firefox-i18n-59.0/fr.xpi) = 473591
71
SIZE (xpi/firefox-i18n-60.0b2/fr.xpi) = 484398
72
SHA256 (xpi/firefox-i18n-59.0/fy-NL.xpi) = d1595e13a228471d0e675148d52855d0f18fb0352ac559323204dfa648233b44
72
SHA256 (xpi/firefox-i18n-60.0b2/fy-NL.xpi) = 6547fbce778ea7a5035e6b0a0c86394af24627261cc0537d26358859eaf65341
73
SIZE (xpi/firefox-i18n-59.0/fy-NL.xpi) = 462917
73
SIZE (xpi/firefox-i18n-60.0b2/fy-NL.xpi) = 473502
74
SHA256 (xpi/firefox-i18n-59.0/ga-IE.xpi) = 21c43c03c285a53f47a56be397dafed998b60fdc763d370465f692d90ba967b1
74
SHA256 (xpi/firefox-i18n-60.0b2/ga-IE.xpi) = 3b5bf250053f987dfd2b31947304c00c2b616fc92d25eec7a4204db59a7edf7f
75
SIZE (xpi/firefox-i18n-59.0/ga-IE.xpi) = 471906
75
SIZE (xpi/firefox-i18n-60.0b2/ga-IE.xpi) = 483197
76
SHA256 (xpi/firefox-i18n-59.0/gd.xpi) = 0ecf7b654d8ab199277c286849bc50e4289c30b7766e3a9de28a69cafa75aa6b
76
SHA256 (xpi/firefox-i18n-60.0b2/gd.xpi) = 574edc4c8e0a95a673be40e15c450a5d3ff95ff38ab25b61cae8a1dc41be11c6
77
SIZE (xpi/firefox-i18n-59.0/gd.xpi) = 461296
77
SIZE (xpi/firefox-i18n-60.0b2/gd.xpi) = 472666
78
SHA256 (xpi/firefox-i18n-59.0/gl.xpi) = eddfdf159b7dc97c2ab00d5c13208fb161521cbeeaefbcabd3925f68fd28db0a
78
SHA256 (xpi/firefox-i18n-60.0b2/gl.xpi) = 9947b0e5944747bbcffb27e22b78b41625ec43ae7dd848d13a035f9156610674
79
SIZE (xpi/firefox-i18n-59.0/gl.xpi) = 441613
79
SIZE (xpi/firefox-i18n-60.0b2/gl.xpi) = 449580
80
SHA256 (xpi/firefox-i18n-59.0/gn.xpi) = 14cb97943f1b501a77a843addd6b03c60518c8c30fb7337148f1803c492f91ad
80
SHA256 (xpi/firefox-i18n-60.0b2/gn.xpi) = 005de91c12db6c3ca749831386d3e6f19d434fd839e4698e39b0c8e55a7a2e19
81
SIZE (xpi/firefox-i18n-59.0/gn.xpi) = 469396
81
SIZE (xpi/firefox-i18n-60.0b2/gn.xpi) = 480555
82
SHA256 (xpi/firefox-i18n-59.0/gu-IN.xpi) = 3ffc20afbe2ad5a625079766ac286cb19f1052e874e3825169619364f8c843ba
82
SHA256 (xpi/firefox-i18n-60.0b2/gu-IN.xpi) = ce9f1814d78b66304764ae5a1e5aef53096283f93d215e367d244a7001b40a97
83
SIZE (xpi/firefox-i18n-59.0/gu-IN.xpi) = 521802
83
SIZE (xpi/firefox-i18n-60.0b2/gu-IN.xpi) = 532408
84
SHA256 (xpi/firefox-i18n-59.0/he.xpi) = 89ba85e80cf52e7743763804300a8b2e9c5e55b9d189954cf5d45c796ea77c04
84
SHA256 (xpi/firefox-i18n-60.0b2/he.xpi) = 4afbe27061e2d73688e9491826536a61af299f50102ca112dba19ec53e475c53
85
SIZE (xpi/firefox-i18n-59.0/he.xpi) = 472769
85
SIZE (xpi/firefox-i18n-60.0b2/he.xpi) = 484073
86
SHA256 (xpi/firefox-i18n-59.0/hi-IN.xpi) = 16a5e4fbbf1ddd8827afb2382b82b59039fb040b16bd36f9c214ddaa4bd82db0
86
SHA256 (xpi/firefox-i18n-60.0b2/hi-IN.xpi) = 7377f4fba4db1280476ded1acabc9d90e077af5329846c5645d76b4dc6c91748
87
SIZE (xpi/firefox-i18n-59.0/hi-IN.xpi) = 524277
87
SIZE (xpi/firefox-i18n-60.0b2/hi-IN.xpi) = 535739
88
SHA256 (xpi/firefox-i18n-59.0/hr.xpi) = 2966dafaea8224e7e9e599f048fb9725f28704af53bb5f0a311dc9ef485f7325
88
SHA256 (xpi/firefox-i18n-60.0b2/hr.xpi) = 65d7a46d5244335d5aa6f37565a6a1afef44cd10efe696ec4ffd3a4141205bd5
89
SIZE (xpi/firefox-i18n-59.0/hr.xpi) = 459976
89
SIZE (xpi/firefox-i18n-60.0b2/hr.xpi) = 471318
90
SHA256 (xpi/firefox-i18n-59.0/hsb.xpi) = 1311fdfe6784f73c1f7ead834a301e8818db253393510a0f6bc00e68ec5e4546
90
SHA256 (xpi/firefox-i18n-60.0b2/hsb.xpi) = 2e468ed6915531d4491f27136974c6f6ff5ced0455d8254028d349763cb0267d
91
SIZE (xpi/firefox-i18n-59.0/hsb.xpi) = 475939
91
SIZE (xpi/firefox-i18n-60.0b2/hsb.xpi) = 485668
92
SHA256 (xpi/firefox-i18n-59.0/hu.xpi) = c362521efa6a58d80eff294bd1d85939c42c6a29cbba6903a3d00525fd4ca9e0
92
SHA256 (xpi/firefox-i18n-60.0b2/hu.xpi) = f140fe6ae54a1afdd277a9c95d2f026d59ee8a122b103547ad6689c29b1fd940
93
SIZE (xpi/firefox-i18n-59.0/hu.xpi) = 476895
93
SIZE (xpi/firefox-i18n-60.0b2/hu.xpi) = 485990
94
SHA256 (xpi/firefox-i18n-59.0/hy-AM.xpi) = 4b28fd26b21abe6897399a72c4d99c765d3b08f55a1f36c184d33bf83d646668
94
SHA256 (xpi/firefox-i18n-60.0b2/hy-AM.xpi) = 8d86769cff8371158f9d0f7effdf21d6f775ac073d8f5090944b724d38a422ff
95
SIZE (xpi/firefox-i18n-59.0/hy-AM.xpi) = 508165
95
SIZE (xpi/firefox-i18n-60.0b2/hy-AM.xpi) = 519760
96
SHA256 (xpi/firefox-i18n-59.0/ia.xpi) = 4c7f6069edb4cfab47bad733621b23d192f4ef666556877d441f224ed5f91dd9
96
SHA256 (xpi/firefox-i18n-60.0b2/ia.xpi) = ee3e285752beb85777053d59fdb8a68197a48cba2d8639dc4c99a095eabcf4d6
97
SIZE (xpi/firefox-i18n-59.0/ia.xpi) = 448827
97
SIZE (xpi/firefox-i18n-60.0b2/ia.xpi) = 459870
98
SHA256 (xpi/firefox-i18n-59.0/id.xpi) = e11d14366748f021c336254f1557ca62d0bbd13ca308be097b28e68db5a8e02f
98
SHA256 (xpi/firefox-i18n-60.0b2/id.xpi) = d3a0e0acd8514c61669510023ffc7a5f3f4fa9fd77e8152ed6bbbda9b7372868
99
SIZE (xpi/firefox-i18n-59.0/id.xpi) = 441951
99
SIZE (xpi/firefox-i18n-60.0b2/id.xpi) = 452366
100
SHA256 (xpi/firefox-i18n-59.0/is.xpi) = 8bb7f3fb34c4fa15f297a99f5651f00a99844346a1d4469117c5dea0cd840843
100
SHA256 (xpi/firefox-i18n-60.0b2/is.xpi) = 6f317b4e2aec0158ade5e5006b9dda9c475d2dbb8e907bfc9621286351964abb
101
SIZE (xpi/firefox-i18n-59.0/is.xpi) = 451371
101
SIZE (xpi/firefox-i18n-60.0b2/is.xpi) = 462502
102
SHA256 (xpi/firefox-i18n-59.0/it.xpi) = 619b955412cd52f1379a64f9bbc23f78d595dd0139c0097ea3e93c4267eef051
102
SHA256 (xpi/firefox-i18n-60.0b2/it.xpi) = 467b86575b862c8d32c4b94ec4da8b8e45aa0e39f68ca445d3ecd3a6f721d807
103
SIZE (xpi/firefox-i18n-59.0/it.xpi) = 342522
103
SIZE (xpi/firefox-i18n-60.0b2/it.xpi) = 352060
104
SHA256 (xpi/firefox-i18n-59.0/ja.xpi) = e32dc966b1164b0a8bc5e8efbf660d8c462c9e50c93a978de88eb3915ab41247
104
SHA256 (xpi/firefox-i18n-60.0b2/ja.xpi) = adbe3d9abdb0252a108d3520a39064b800d9575c0a784210270f1b9089fbabca
105
SIZE (xpi/firefox-i18n-59.0/ja.xpi) = 508146
105
SIZE (xpi/firefox-i18n-60.0b2/ja.xpi) = 518877
106
SHA256 (xpi/firefox-i18n-59.0/ka.xpi) = d0cb6ec913abd01d5826032716cb12b780e591d273080972d3627ab5c51e2bbd
106
SHA256 (xpi/firefox-i18n-60.0b2/ka.xpi) = 054ff2854756f46568974a39231efe3c8b5b91b71c7ebb49583347dee634e83d
107
SIZE (xpi/firefox-i18n-59.0/ka.xpi) = 492567
107
SIZE (xpi/firefox-i18n-60.0b2/ka.xpi) = 502601
108
SHA256 (xpi/firefox-i18n-59.0/kab.xpi) = 3b56006aa799f9c6e402781843a4774a858532c1f53ba03f5918efa52a3dabac
108
SHA256 (xpi/firefox-i18n-60.0b2/kab.xpi) = 6dd3d4c4e98f04180274e3255e8117c59254912ef7e9055e75e0d749efe7bf7c
109
SIZE (xpi/firefox-i18n-59.0/kab.xpi) = 461838
109
SIZE (xpi/firefox-i18n-60.0b2/kab.xpi) = 471615
110
SHA256 (xpi/firefox-i18n-59.0/kk.xpi) = c1bbedcb92a43c18c654b098705d513d7663876a30875c322a61657e6046b72c
110
SHA256 (xpi/firefox-i18n-60.0b2/kk.xpi) = 08db6f8add96f8bef331ec2a31e8c84f0c6f5289a282de3b6177e5a091bc7086
111
SIZE (xpi/firefox-i18n-59.0/kk.xpi) = 517582
111
SIZE (xpi/firefox-i18n-60.0b2/kk.xpi) = 528173
112
SHA256 (xpi/firefox-i18n-59.0/km.xpi) = 9fa77a9347c77f23f52f0129a35fe290bb3d67e261817956ba265f3b68cacbe4
112
SHA256 (xpi/firefox-i18n-60.0b2/km.xpi) = 86f456a26c4b018816f2703388c1d6535440f5e6d14e8ebcf08c944d3bb9d474
113
SIZE (xpi/firefox-i18n-59.0/km.xpi) = 526357
113
SIZE (xpi/firefox-i18n-60.0b2/km.xpi) = 536932
114
SHA256 (xpi/firefox-i18n-59.0/kn.xpi) = b62f5139ee71ed4107e878a5fab2e58e1dd910598b85199d1162c67ffc426c85
114
SHA256 (xpi/firefox-i18n-60.0b2/kn.xpi) = fe63f6cacab0c61a11d6267e89254b5557c15dc93fc9fe9bb4d2817c4c533d3d
115
SIZE (xpi/firefox-i18n-59.0/kn.xpi) = 527877
115
SIZE (xpi/firefox-i18n-60.0b2/kn.xpi) = 537586
116
SHA256 (xpi/firefox-i18n-59.0/ko.xpi) = 1c498889480fa8ea9a065ba12b185283edc518d738c6db8ff780098b38bf817a
116
SHA256 (xpi/firefox-i18n-60.0b2/ko.xpi) = 6fefe78419ac5b72b7aca598ed289f40ab7d1f6a52fb827a39a21db4cd5f4e8a
117
SIZE (xpi/firefox-i18n-59.0/ko.xpi) = 487659
117
SIZE (xpi/firefox-i18n-60.0b2/ko.xpi) = 496535
118
SHA256 (xpi/firefox-i18n-59.0/lij.xpi) = 0312ca2b5aecd54f7456d8310542165f005f2e1bddc70bedb824541dcce4b65b
118
SHA256 (xpi/firefox-i18n-60.0b2/lij.xpi) = 5ac0991f943c2bc2127a49d22219a3b433826e9ea63dc9f1b4c15eb0a4c9bbf8
119
SIZE (xpi/firefox-i18n-59.0/lij.xpi) = 446604
119
SIZE (xpi/firefox-i18n-60.0b2/lij.xpi) = 457056
120
SHA256 (xpi/firefox-i18n-59.0/lt.xpi) = 7ba6037547b3e5f1d402ce698cd74dfbe6c2eca8013f9ebb9cda820233cca998
120
SHA256 (xpi/firefox-i18n-60.0b2/lt.xpi) = 2f113a23f1744bf822fbe30817ecf9fcf0a6702034bc0eeb05c1271dbb338e34
121
SIZE (xpi/firefox-i18n-59.0/lt.xpi) = 475141
121
SIZE (xpi/firefox-i18n-60.0b2/lt.xpi) = 484070
122
SHA256 (xpi/firefox-i18n-59.0/lv.xpi) = 85f32e9a7fd03423ae0b7339990c076b84409f95d9dc010089389666f891c1da
122
SHA256 (xpi/firefox-i18n-60.0b2/lv.xpi) = 0d7816b13aad0692deab0c00bf6b29fac49544021b746f6814acf147a978b29b
123
SIZE (xpi/firefox-i18n-59.0/lv.xpi) = 463653
123
SIZE (xpi/firefox-i18n-60.0b2/lv.xpi) = 475034
124
SHA256 (xpi/firefox-i18n-59.0/mai.xpi) = 2cc0ec3dc2a0296d17c0fd71060291caac8981c496acc524b26da7ef4cb62ed3
124
SHA256 (xpi/firefox-i18n-60.0b2/mai.xpi) = b7776297987d60df1cb4866b95f02ddb44c97c2b9a33665441517ccc98fc9e43
125
SIZE (xpi/firefox-i18n-59.0/mai.xpi) = 499908
125
SIZE (xpi/firefox-i18n-60.0b2/mai.xpi) = 507542
126
SHA256 (xpi/firefox-i18n-59.0/mk.xpi) = 0ffa52cdc876ceb990eb0b1d729ed5fa5fe92bfe2d65e9d4bfd759758ac216fa
126
SHA256 (xpi/firefox-i18n-60.0b2/mk.xpi) = df2f7c07c3869182d910ddb86af55151d536caf05d3482921ab272e5c0d4e7b0
127
SIZE (xpi/firefox-i18n-59.0/mk.xpi) = 484074
127
SIZE (xpi/firefox-i18n-60.0b2/mk.xpi) = 492047
128
SHA256 (xpi/firefox-i18n-59.0/ml.xpi) = ac845dba07dbbd76fe37c0bfc4dd5365e15254971f9588377a680e07745fed6f
128
SHA256 (xpi/firefox-i18n-60.0b2/ml.xpi) = c8e6f4fb2e0e51d36b6a92de063c08d897628c0b20a60f02bff9798b2bc2ca60
129
SIZE (xpi/firefox-i18n-59.0/ml.xpi) = 539733
129
SIZE (xpi/firefox-i18n-60.0b2/ml.xpi) = 550569
130
SHA256 (xpi/firefox-i18n-59.0/mr.xpi) = 8bafe1760d2a1cf0093256cd019dac2c097e79f1484bfe66a1f3f73076d3b6b3
130
SHA256 (xpi/firefox-i18n-60.0b2/mr.xpi) = 6ecc647bc64388aeeb5f32ac6dd9c4fd65a94de96534187c123704248fc71dfd
131
SIZE (xpi/firefox-i18n-59.0/mr.xpi) = 517960
131
SIZE (xpi/firefox-i18n-60.0b2/mr.xpi) = 529674
132
SHA256 (xpi/firefox-i18n-59.0/ms.xpi) = 00c44f109551b23f0a904402573c06edf4d8bf087cc0e91b52b006621883c9b5
132
SHA256 (xpi/firefox-i18n-60.0b2/ms.xpi) = 93417e8b0b409d7d82b9d0c790a8541cbec8758fe7882027fcdbcf04c2938c99
133
SIZE (xpi/firefox-i18n-59.0/ms.xpi) = 450073
133
SIZE (xpi/firefox-i18n-60.0b2/ms.xpi) = 459751
134
SHA256 (xpi/firefox-i18n-59.0/my.xpi) = 37708298e5bcf83d9570a5144b633709666b69840315c680bae3f7dd2a186001
134
SHA256 (xpi/firefox-i18n-60.0b2/my.xpi) = 2af1938050efed9f5022c1fc9bdc946921d2c6ed1ffbf0e7cd96ab0fff783b9f
135
SIZE (xpi/firefox-i18n-59.0/my.xpi) = 511892
135
SIZE (xpi/firefox-i18n-60.0b2/my.xpi) = 522045
136
SHA256 (xpi/firefox-i18n-59.0/nb-NO.xpi) = 90c61e5724b618b5fdfc65fc37d60686cd374f94a6567d6aa290c8733eb45c86
136
SHA256 (xpi/firefox-i18n-60.0b2/nb-NO.xpi) = 69b5e72319dae0ca4e78c2feec3db1d6249437497a172cf4330245b21a462803
137
SIZE (xpi/firefox-i18n-59.0/nb-NO.xpi) = 450275
137
SIZE (xpi/firefox-i18n-60.0b2/nb-NO.xpi) = 459984
138
SHA256 (xpi/firefox-i18n-59.0/ne-NP.xpi) = d6a3aebbb11faca5a07794648f13946a84807abb7325176b0da8b51e2c53f251
138
SHA256 (xpi/firefox-i18n-60.0b2/ne-NP.xpi) = b48dc523ee4d20b63ca75b8f3fc96dcfd7278d91bcff30cb6f99aa3c2a0b1377
139
SIZE (xpi/firefox-i18n-59.0/ne-NP.xpi) = 509175
139
SIZE (xpi/firefox-i18n-60.0b2/ne-NP.xpi) = 520386
140
SHA256 (xpi/firefox-i18n-59.0/nl.xpi) = 95cdc03247c2e59313c59bf819401fcf140bcf556367755f79207ce38345c123
140
SHA256 (xpi/firefox-i18n-60.0b2/nl.xpi) = 09dafbc4784f5549b1ef13a592095e9ef10f0b38a579cffbe56c6d2e48d790aa
141
SIZE (xpi/firefox-i18n-59.0/nl.xpi) = 458127
141
SIZE (xpi/firefox-i18n-60.0b2/nl.xpi) = 467152
142
SHA256 (xpi/firefox-i18n-59.0/nn-NO.xpi) = 87fa01ddab0d6545cced17229187b63bead047549ea7c73ba3947f9a555a8dd7
142
SHA256 (xpi/firefox-i18n-60.0b2/nn-NO.xpi) = d6bdaef137ca7ec4c2f5fd3a88faae0c4ea53c982ab74e4d4a202563df303943
143
SIZE (xpi/firefox-i18n-59.0/nn-NO.xpi) = 451469
143
SIZE (xpi/firefox-i18n-60.0b2/nn-NO.xpi) = 460479
144
SHA256 (xpi/firefox-i18n-59.0/or.xpi) = a00da5f2a4b7c13947a27b526c0d35673eff42d9cab0979c6670ca54ee8f68c7
144
SHA256 (xpi/firefox-i18n-60.0b2/oc.xpi) = dbc4bd23e387d0783de5a324df647bd4cd5a6a158e15dec08a0f7eaffc4ec256
145
SIZE (xpi/firefox-i18n-59.0/or.xpi) = 493180
145
SIZE (xpi/firefox-i18n-60.0b2/oc.xpi) = 477201
146
SHA256 (xpi/firefox-i18n-59.0/pa-IN.xpi) = e43dd78383255b594d8078c38d46e872565304427ab7bbeca47458477a34d4ef
146
SHA256 (xpi/firefox-i18n-60.0b2/or.xpi) = 1359d8ed163f48984309754fb89e74c693a78852d66eff45e4bacc88e10576ad
147
SIZE (xpi/firefox-i18n-59.0/pa-IN.xpi) = 492418
147
SIZE (xpi/firefox-i18n-60.0b2/or.xpi) = 500626
148
SHA256 (xpi/firefox-i18n-59.0/pl.xpi) = 323c5439304f6fbed7db49ae96ab513071551ef87e12bc11103b5b4be0d07289
148
SHA256 (xpi/firefox-i18n-60.0b2/pa-IN.xpi) = ffaa2b343cb628507905b2741ca518c2cb222ea498831662a3c6e190be8c2d03
149
SIZE (xpi/firefox-i18n-59.0/pl.xpi) = 358509
149
SIZE (xpi/firefox-i18n-60.0b2/pa-IN.xpi) = 503120
150
SHA256 (xpi/firefox-i18n-59.0/pt-BR.xpi) = 21bde4b1666858fb65682147fa235fe9688206a2e0d492affd019b3fd99e2c64
150
SHA256 (xpi/firefox-i18n-60.0b2/pl.xpi) = 001503aa9c381c6badb52f16e4dbc109e133aae4ec835dab077781f88e3f9a5f
151
SIZE (xpi/firefox-i18n-59.0/pt-BR.xpi) = 455913
151
SIZE (xpi/firefox-i18n-60.0b2/pl.xpi) = 369616
152
SHA256 (xpi/firefox-i18n-59.0/pt-PT.xpi) = d9008a9b59a265702ad5915149fa9960151bdd0699bafaf8c383ece97d182d9f
152
SHA256 (xpi/firefox-i18n-60.0b2/pt-BR.xpi) = abf591823004510a6b4e9ab091972518581c3e755e94e538006bb43a271ddeff
153
SIZE (xpi/firefox-i18n-59.0/pt-PT.xpi) = 459329
153
SIZE (xpi/firefox-i18n-60.0b2/pt-BR.xpi) = 465263
154
SHA256 (xpi/firefox-i18n-59.0/rm.xpi) = 88192d2d2b3824d45ff862ba285ce36499ae15daaf89d21037a8ebfc0500fe61
154
SHA256 (xpi/firefox-i18n-60.0b2/pt-PT.xpi) = 27ef71ed4121fd42931a85b2b86051c4db5b77ad7722164a5774258668eaea24
155
SIZE (xpi/firefox-i18n-59.0/rm.xpi) = 449756
155
SIZE (xpi/firefox-i18n-60.0b2/pt-PT.xpi) = 468269
156
SHA256 (xpi/firefox-i18n-59.0/ro.xpi) = 6fe642ecbb2d3f2c181fc8f1194c1b08cf1d6d1f76b8f205ffdfbab650f8827a
156
SHA256 (xpi/firefox-i18n-60.0b2/rm.xpi) = af51ff46f0c0b3912064a6490394eeef740c40e5bfb7c825f71da9663d78e2eb
157
SIZE (xpi/firefox-i18n-59.0/ro.xpi) = 453401
157
SIZE (xpi/firefox-i18n-60.0b2/rm.xpi) = 461202
158
SHA256 (xpi/firefox-i18n-59.0/ru.xpi) = 9905c2249e72bf8be629c59915298598ac6e63b90ba95ceee0795d077a4ad09b
158
SHA256 (xpi/firefox-i18n-60.0b2/ro.xpi) = a05bcd830bad022ca9cb4cd29bdc43072cc6ebc5aec089f74ba752aa3d0209a7
159
SIZE (xpi/firefox-i18n-59.0/ru.xpi) = 526521
159
SIZE (xpi/firefox-i18n-60.0b2/ro.xpi) = 464776
160
SHA256 (xpi/firefox-i18n-59.0/si.xpi) = 9608ae50405741a544270d2256035a8ae6484767fe737db8b98ac296ccdcda67
160
SHA256 (xpi/firefox-i18n-60.0b2/ru.xpi) = 8a0e831019164074986d9d64fd93ef13269ba4284eab51b40d6abbff3880b429
161
SIZE (xpi/firefox-i18n-59.0/si.xpi) = 492585
161
SIZE (xpi/firefox-i18n-60.0b2/ru.xpi) = 536435
162
SHA256 (xpi/firefox-i18n-59.0/sk.xpi) = ee8cc67c33edccc7b7291496fb20f2f850f6934f67a0694b1bb19774db254eb1
162
SHA256 (xpi/firefox-i18n-60.0b2/si.xpi) = 349712695adf495a12c97cc6162a364dac445bffdc6c8efd11b64141d39eb6cb
163
SIZE (xpi/firefox-i18n-59.0/sk.xpi) = 480811
163
SIZE (xpi/firefox-i18n-60.0b2/si.xpi) = 502052
164
SHA256 (xpi/firefox-i18n-59.0/sl.xpi) = 13a9308e3d93ecfb873f4fb9a4a6f14b77ac37a730c0700e7c0296ab81250de7
164
SHA256 (xpi/firefox-i18n-60.0b2/sk.xpi) = 42a99e56e26dee8ed94bb473a0d429ea628996845cbb35edbc356919b59f91c6
165
SIZE (xpi/firefox-i18n-59.0/sl.xpi) = 458823
165
SIZE (xpi/firefox-i18n-60.0b2/sk.xpi) = 489920
166
SHA256 (xpi/firefox-i18n-59.0/son.xpi) = 557087d226148a636c89313de04b7dfad71bca392dde28236163ca556f9322be
166
SHA256 (xpi/firefox-i18n-60.0b2/sl.xpi) = 2df3be84800ff89d753e2410bcc75e0ebe49e0b33c1518c51e96a1925143ffc8
167
SIZE (xpi/firefox-i18n-59.0/son.xpi) = 446398
167
SIZE (xpi/firefox-i18n-60.0b2/sl.xpi) = 468784
168
SHA256 (xpi/firefox-i18n-59.0/sq.xpi) = 492cbf457ad02ef8efdfc546207a2d6c9ea07df57741dcebf89bae235438ca55
168
SHA256 (xpi/firefox-i18n-60.0b2/son.xpi) = 0806aea637720be9350557a563166d4c624ad9b887e196627654a2c0227ecfbb
169
SIZE (xpi/firefox-i18n-59.0/sq.xpi) = 464461
169
SIZE (xpi/firefox-i18n-60.0b2/son.xpi) = 456084
170
SHA256 (xpi/firefox-i18n-59.0/sr.xpi) = 30dc2cc54bd0bb4c88bd4ec016eba9285fc1d14d27417b402c2a44967baa4fd5
170
SHA256 (xpi/firefox-i18n-60.0b2/sq.xpi) = 630c01008c219b121508cf31a174eeef57ed81c5ff9bd429835dabc6e57a9c52
171
SIZE (xpi/firefox-i18n-59.0/sr.xpi) = 486176
171
SIZE (xpi/firefox-i18n-60.0b2/sq.xpi) = 476118
172
SHA256 (xpi/firefox-i18n-59.0/sv-SE.xpi) = 69fc218bcf153772dbeb1000dc35849210d00ede91537b948b27876ec03ffddf
172
SHA256 (xpi/firefox-i18n-60.0b2/sr.xpi) = 5a021aea26cd7619306ed80acfe4ec7850b99b41c4337cbb37dc023ff61f1909
173
SIZE (xpi/firefox-i18n-59.0/sv-SE.xpi) = 458658
173
SIZE (xpi/firefox-i18n-60.0b2/sr.xpi) = 495336
174
SHA256 (xpi/firefox-i18n-59.0/ta.xpi) = d55bc8f1458d96d548d7ef3e01a1cec3dbd9c4b62f8dd539658d4ad90129fb58
174
SHA256 (xpi/firefox-i18n-60.0b2/sv-SE.xpi) = 1137f06cd3456adee9e4a5231c4f514f6058487aae02c207bbebe553739e48c2
175
SIZE (xpi/firefox-i18n-59.0/ta.xpi) = 512841
175
SIZE (xpi/firefox-i18n-60.0b2/sv-SE.xpi) = 467993
176
SHA256 (xpi/firefox-i18n-59.0/te.xpi) = 25368ecdd33ed9ec4ad5fd95f510afffc61740f2bbb33c814ec3a6863673dc39
176
SHA256 (xpi/firefox-i18n-60.0b2/ta.xpi) = 2e21a5e68c1c5c6a48a8fe4557d95352d0e840dfe89a88fe0d40ad04f9fe3a83
177
SIZE (xpi/firefox-i18n-59.0/te.xpi) = 527082
177
SIZE (xpi/firefox-i18n-60.0b2/ta.xpi) = 524089
178
SHA256 (xpi/firefox-i18n-59.0/th.xpi) = a7e8951f27666735eb6e2bb526c069ae26a7bf6ed2dde12c0b47a9adacc1c200
178
SHA256 (xpi/firefox-i18n-60.0b2/te.xpi) = aaa5184d4c123dbc014f744a9a7b35d44f73b58495133b93075a8bd3e8e1edcc
179
SIZE (xpi/firefox-i18n-59.0/th.xpi) = 498542
179
SIZE (xpi/firefox-i18n-60.0b2/te.xpi) = 537600
180
SHA256 (xpi/firefox-i18n-59.0/tr.xpi) = 50728d089f891362a4b1f0d036edbc556e8dbe922c2abdbb89ffe45d57d275f4
180
SHA256 (xpi/firefox-i18n-60.0b2/th.xpi) = 827f491959a495ecfa11394dc7e007e85f4d05de2aa7eabf24d3598c82369810
181
SIZE (xpi/firefox-i18n-59.0/tr.xpi) = 463592
181
SIZE (xpi/firefox-i18n-60.0b2/th.xpi) = 509974
182
SHA256 (xpi/firefox-i18n-59.0/uk.xpi) = 7b500089a303e93761054b3cda4e4a188ebe6ccc2a120e5c90fd5d4e7cf28cfe
182
SHA256 (xpi/firefox-i18n-60.0b2/tr.xpi) = 554e436af3db110d168b5825876cea060ae3b8ff5c18d257a333e7b82ca0c6f4
183
SIZE (xpi/firefox-i18n-59.0/uk.xpi) = 516924
183
SIZE (xpi/firefox-i18n-60.0b2/tr.xpi) = 473604
184
SHA256 (xpi/firefox-i18n-59.0/ur.xpi) = 9cc9ece7f94e13894651b4c342d226552e8544e8488e447da6c9f1ddf8884d31
184
SHA256 (xpi/firefox-i18n-60.0b2/uk.xpi) = ab52ce6f330ec911a2788bc97871f410bcf2552787112a61020d6ea8c6f2d244
185
SIZE (xpi/firefox-i18n-59.0/ur.xpi) = 507378
185
SIZE (xpi/firefox-i18n-60.0b2/uk.xpi) = 526375
186
SHA256 (xpi/firefox-i18n-59.0/uz.xpi) = 4ae7546f790afe6b931d137531a6ef6a7287f1959ed20758c62624e23d75fa53
186
SHA256 (xpi/firefox-i18n-60.0b2/ur.xpi) = 851dadfe1565b5d1089f4bfe6285b431fe9fd2517b413a7658d367d23230fc24
187
SIZE (xpi/firefox-i18n-59.0/uz.xpi) = 456922
187
SIZE (xpi/firefox-i18n-60.0b2/ur.xpi) = 516748
188
SHA256 (xpi/firefox-i18n-59.0/vi.xpi) = 778ee06852609372e0303a5354b6e8b1f2a22e999cbeedba6bf9d8d303c05bf9
188
SHA256 (xpi/firefox-i18n-60.0b2/uz.xpi) = 0e3d0cd0e7b8b839bbb84b42ab25f71b2ee7309fff37ad7156c1b778cf141b76
189
SIZE (xpi/firefox-i18n-59.0/vi.xpi) = 470067
189
SIZE (xpi/firefox-i18n-60.0b2/uz.xpi) = 467092
190
SHA256 (xpi/firefox-i18n-59.0/xh.xpi) = 41dfddbd064d2da408b93409bfacafd32226cd086a3da5e603a5a3fba4891656
190
SHA256 (xpi/firefox-i18n-60.0b2/vi.xpi) = 34fb0fd53dcb986e0d1925ef1fd0b6ea1337b41312e5172cc3e25ec6cb2aa362
191
SIZE (xpi/firefox-i18n-59.0/xh.xpi) = 460770
191
SIZE (xpi/firefox-i18n-60.0b2/vi.xpi) = 480501
192
SHA256 (xpi/firefox-i18n-59.0/zh-CN.xpi) = 03679d815dee18016aae33fba44eafe8116d025c5f5d99b9efbba29d65886b8f
192
SHA256 (xpi/firefox-i18n-60.0b2/xh.xpi) = dbb4a54b47fde3795083112451c49af0c2fb3c4a2ea919246a29ae521a023727
193
SIZE (xpi/firefox-i18n-59.0/zh-CN.xpi) = 483447
193
SIZE (xpi/firefox-i18n-60.0b2/xh.xpi) = 470331
194
SHA256 (xpi/firefox-i18n-59.0/zh-TW.xpi) = 40253d142f875a27e086c34737e0c437939cea29011160c7d7b252ad1f34f9d2
194
SHA256 (xpi/firefox-i18n-60.0b2/zh-CN.xpi) = 878d908213acbbbc0e718842998d0d7beb479946ba157617802e53dd01123c9f
195
SIZE (xpi/firefox-i18n-59.0/zh-TW.xpi) = 477087
195
SIZE (xpi/firefox-i18n-60.0b2/zh-CN.xpi) = 492500
196
SHA256 (xpi/firefox-i18n-60.0b2/zh-TW.xpi) = 49c06de4d7d2e925343a4409ef30977cf55d8844e358bce97df9b1f929602062
197
SIZE (xpi/firefox-i18n-60.0b2/zh-TW.xpi) = 493124
(-)b/www/firefox/Makefile (-9 / +8 lines)
Lines 2-29 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	firefox
4
PORTNAME=	firefox
5
DISTVERSION=	59.0
5
DISTVERSION=	60.0b2
6
PORTREVISION=	3
7
PORTEPOCH=	1
6
PORTEPOCH=	1
8
CATEGORIES=	www ipv6
7
CATEGORIES=	www ipv6
9
MASTER_SITES=	https://hg.mozilla.org/releases/mozilla-release/archive/
8
MASTER_SITES=	https://hg.mozilla.org/releases/mozilla-beta/archive/
10
DISTNAME=	${MASTER_SITES:M*hg*:S,/archive/,,:T}-e9128973a480c8aedf3a2e1c67d3e168613fa17c
9
DISTNAME=	${MASTER_SITES:M*hg*:S,/archive/,,:T}-0938d48917b73d31fa8bfa4a7c3ccd79a3f4b3f5
11
DISTFILES=	${DISTNAME:C/.*-//}${EXTRACT_SUFX}
10
DISTFILES=	${DISTNAME:C/.*-//}${EXTRACT_SUFX}
12
DIST_SUBDIR=	firefox
11
DIST_SUBDIR=	firefox
13
12
14
MAINTAINER=	gecko@FreeBSD.org
13
MAINTAINER=	gecko@FreeBSD.org
15
COMMENT=	Web browser based on the browser portion of Mozilla
14
COMMENT=	Web browser based on the browser portion of Mozilla
16
15
17
BUILD_DEPENDS=	nspr>=4.18:devel/nspr \
16
BUILD_DEPENDS=	nspr>=4.19:devel/nspr \
18
		nss>=3.35:security/nss \
17
		nss>=3.36:security/nss \
19
		icu>=59.1,1:devel/icu \
18
		icu>=59.1,1:devel/icu \
20
		libevent>=2.1.8:devel/libevent \
19
		libevent>=2.1.8:devel/libevent \
21
		harfbuzz>=1.7.4:print/harfbuzz \
20
		harfbuzz>=1.7.6:print/harfbuzz \
22
		graphite2>=1.3.10:graphics/graphite2 \
21
		graphite2>=1.3.11:graphics/graphite2 \
23
		png>=1.6.34:graphics/png \
22
		png>=1.6.34:graphics/png \
24
		libvorbis>=1.3.5,3:audio/libvorbis \
23
		libvorbis>=1.3.5,3:audio/libvorbis \
25
		libvpx>=1.5.0:multimedia/libvpx \
24
		libvpx>=1.5.0:multimedia/libvpx \
26
		sqlite3>=3.21.0:databases/sqlite3 \
25
		sqlite3>=3.22.0:databases/sqlite3 \
27
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
26
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
28
		v4l_compat>0:multimedia/v4l_compat \
27
		v4l_compat>0:multimedia/v4l_compat \
29
		autoconf-2.13:devel/autoconf213 \
28
		autoconf-2.13:devel/autoconf213 \
(-)b/www/firefox/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1520456550
1
TIMESTAMP = 1520432739
2
SHA256 (firefox/e9128973a480c8aedf3a2e1c67d3e168613fa17c.tar.bz2) = bd6c5a7635009cb1a95824287b9751f1012f8e13bec057811d882e0db75e1258
2
SHA256 (firefox/0938d48917b73d31fa8bfa4a7c3ccd79a3f4b3f5.tar.bz2) = 56a55346d8abb911dab2d1d53651c60a415b99e4a54b356ac28f3420e7ca19e1
3
SIZE (firefox/e9128973a480c8aedf3a2e1c67d3e168613fa17c.tar.bz2) = 304977546
3
SIZE (firefox/0938d48917b73d31fa8bfa4a7c3ccd79a3f4b3f5.tar.bz2) = 329655598
(-)b/www/firefox/files/patch-a-gyp-webrtc (+21490 lines)
Added Link Here
1
Revert bug 1393119, bug 1429819, bug 1436959 to unbreak WebRTC
2
3
diff --git media/webrtc/moz.build media/webrtc/moz.build
4
index 3aeb939a4e4b..115831cc69d5 100644
5
--- media/webrtc/moz.build
6
+++ media/webrtc/moz.build
7
@@ -11,7 +11,6 @@ with Files("signaling/**"):
8
     BUG_COMPONENT = ("Core", "WebRTC: Signaling")
9
 
10
 include('/build/gyp.mozbuild')
11
-include('/build/gn.mozbuild')
12
 
13
 webrtc_non_unified_sources = [
14
     'trunk/webrtc/common_audio/vad/vad_core.c',                                  # Because of name clash in the kInitCheck variable
15
@@ -57,6 +56,8 @@ webrtc_non_unified_sources = [
16
     'trunk/webrtc/video/overuse_frame_detector.cc',                              # Because of name clash with call_stats.cc on kWeightFactor
17
 ]
18
 
19
+GYP_DIRS += ['trunk']
20
+
21
 # Set gyp vars that webrtc needs when building under various analysis tools.
22
 # Primarily this prevents webrtc from setting NVALGRIND and breaking builds.
23
 gyp_vars_copy = gyp_vars.copy()
24
@@ -67,21 +68,12 @@ elif CONFIG['MOZ_ASAN']:
25
 elif CONFIG['MOZ_TSAN']:
26
     gyp_vars_copy.update(build_for_tool="tsan")
27
 
28
-GN_DIRS += ['trunk']
29
-
30
-gn_vars_copy = gn_vars.copy()
31
-
32
-GN_DIRS['trunk'].variables = gn_vars_copy
33
-GN_DIRS['trunk'].mozilla_flags = [
34
-    '-fobjc-arc',
35
-    '-mfpu=neon',
36
-    '-msse2',
37
-]
38
-
39
+GYP_DIRS['trunk'].input = 'trunk/peerconnection.gyp'
40
+GYP_DIRS['trunk'].variables = gyp_vars_copy
41
 # We allow warnings for third-party code that can be updated from upstream.
42
-GN_DIRS['trunk'].sandbox_vars['COMPILE_FLAGS'] = {'WARNINGS_AS_ERRORS': []}
43
-GN_DIRS['trunk'].sandbox_vars['FINAL_LIBRARY'] = 'webrtc'
44
-GN_DIRS['trunk'].non_unified_sources += webrtc_non_unified_sources
45
+GYP_DIRS['trunk'].sandbox_vars['COMPILE_FLAGS'] = {'WARNINGS_AS_ERRORS': []}
46
+GYP_DIRS['trunk'].sandbox_vars['FINAL_LIBRARY'] = 'webrtc'
47
+GYP_DIRS['trunk'].non_unified_sources += webrtc_non_unified_sources
48
 
49
 if CONFIG['MOZ_WEBRTC_SIGNALING']:
50
     DIRS += [
51
diff --git media/webrtc/trunk/build/OWNERS media/webrtc/trunk/build/OWNERS
52
index c644ca7d5fd5..72e8ffc0db8a 100644
53
--- media/webrtc/trunk/build/OWNERS
54
+++ media/webrtc/trunk/build/OWNERS
55
@@ -1,22 +1 @@
56
-agrieve@chromium.org
57
-dpranke@chromium.org
58
-jbudorick@chromium.org
59
-jochen@chromium.org
60
-scottmg@chromium.org
61
-thakis@chromium.org
62
-brucedawson@chromium.org
63
-
64
-per-file .gitignore=*
65
-per-file mac_toolchain.py=erikchen@chromium.org
66
-per-file mac_toolchain.py=justincohen@chromium.org
67
-per-file package_mac_toolchain.py=erikchen@chromium.org
68
-per-file package_mac_toolchain.py=justincohen@chromium.org
69
-per-file whitespace_file.txt=*
70
-per-file OWNERS.status=*
71
-
72
-# gn-dev is probably a better team here, but the tooling won't let us
73
-# have more than one team per component, and infra-dev is a catch-all
74
-# for other build-related lists.
75
-#
76
-# TEAM: infra-dev@chromium.org
77
-# COMPONENT: Build
78
+*
79
diff --git media/webrtc/trunk/build/common.croc media/webrtc/trunk/build/common.croc
80
index fde7a8b29821..7281bb4eb4d8 100644
81
--- media/webrtc/trunk/build/common.croc
82
+++ media/webrtc/trunk/build/common.croc
83
@@ -57,7 +57,7 @@
84
     },
85
     # Don't include output dirs
86
     {
87
-      'regexp' : '.*/(Debug|Release|out|xcodebuild)/',
88
+      'regexp' : '.*/(Debug|Release|sconsbuild|out|xcodebuild)/',
89
       'include' : 0,
90
     },
91
     # Don't include third-party source
92
@@ -89,7 +89,7 @@
93
     },
94
     {
95
       'stat' : '100.0 * files_instrumented / files_executable',
96
-      'format' : '*RESULT FilesInstrumentedPercent: files_instrumented_percent= %g percent',
97
+      'format' : '*RESULT FilesInstrumentedPercent: files_instrumented_percent= %g',
98
     },
99
     {
100
       'stat' : 'lines_executable',
101
@@ -111,16 +111,16 @@
102
     },
103
     {
104
       'stat' : '100.0 * lines_covered / lines_executable',
105
-      'format' : '*RESULT PercentCovered: percent_covered= %g percent',
106
+      'format' : '*RESULT PercentCovered: percent_covered= %g',
107
     },
108
     {
109
       'stat' : '100.0 * lines_covered / lines_executable',
110
-      'format' : '*RESULT PercentCoveredSource: percent_covered_source= %g percent',
111
+      'format' : '*RESULT PercentCoveredSource: percent_covered_source= %g',
112
       'group' : 'source',
113
     },
114
     {
115
       'stat' : '100.0 * lines_covered / lines_executable',
116
-      'format' : '*RESULT PercentCoveredTest: percent_covered_test= %g percent',
117
+      'format' : '*RESULT PercentCoveredTest: percent_covered_test= %g',
118
       'group' : 'test',
119
     },
120
   ],
121
diff --git media/webrtc/trunk/build/compiler_version.py media/webrtc/trunk/build/compiler_version.py
122
index 8db010811096..eae7b176dd21 100755
123
--- media/webrtc/trunk/build/compiler_version.py
124
+++ media/webrtc/trunk/build/compiler_version.py
125
@@ -14,115 +14,63 @@ import re
126
 import subprocess
127
 import sys
128
 
129
-
130
-compiler_version_cache = {}  # Map from (compiler, tool) -> version.
131
-
132
-
133
-def Usage(program_name):
134
-  print '%s MODE TOOL' % os.path.basename(program_name)
135
-  print 'MODE: host or target.'
136
-  print 'TOOL: assembler or compiler or linker.'
137
-  return 1
138
-
139
-
140
-def ParseArgs(args):
141
-  if len(args) != 2:
142
-    raise Exception('Invalid number of arguments')
143
-  mode = args[0]
144
-  tool = args[1]
145
-  if mode not in ('host', 'target'):
146
-    raise Exception('Invalid mode: %s' % mode)
147
-  if tool not in ('assembler',):
148
-    raise Exception('Invalid tool: %s' % tool)
149
-  return mode, tool
150
-
151
-
152
-def GetEnvironFallback(var_list, default):
153
-  """Look up an environment variable from a possible list of variable names."""
154
-  for var in var_list:
155
-    if var in os.environ:
156
-      return os.environ[var]
157
-  return default
158
-
159
-
160
-def GetVersion(compiler, tool):
161
-  tool_output = tool_error = None
162
-  cache_key = (compiler, tool)
163
-  cached_version = compiler_version_cache.get(cache_key)
164
-  if cached_version:
165
-    return cached_version
166
+def GetVersion(compiler):
167
   try:
168
     # Note that compiler could be something tricky like "distcc g++".
169
-    if tool == "assembler":
170
-      compiler = compiler + " -Xassembler --version -x assembler -c /dev/null"
171
-      # Unmodified: GNU assembler (GNU Binutils) 2.24
172
-      # Ubuntu: GNU assembler (GNU Binutils for Ubuntu) 2.22
173
-      # Fedora: GNU assembler version 2.23.2
174
-      version_re = re.compile(r"^GNU [^ ]+ .* (\d+).(\d+).*?$", re.M)
175
-    else:
176
-      raise Exception("Unknown tool %s" % tool)
177
-
178
-    # Force the locale to C otherwise the version string could be localized
179
-    # making regex matching fail.
180
-    env = os.environ.copy()
181
-    env["LC_ALL"] = "C"
182
-    pipe = subprocess.Popen(compiler, shell=True, env=env,
183
+    compiler = compiler + " -dumpversion"
184
+    pipe = subprocess.Popen(compiler, shell=True,
185
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
186
-    tool_output, tool_error = pipe.communicate()
187
+    gcc_output, gcc_error = pipe.communicate()
188
     if pipe.returncode:
189
       raise subprocess.CalledProcessError(pipe.returncode, compiler)
190
 
191
-    parsed_output = version_re.match(tool_output)
192
-    result = parsed_output.group(1) + parsed_output.group(2)
193
-    compiler_version_cache[cache_key] = result
194
-    return result
195
+    result = re.match(r"(\d+)\.(\d+)", gcc_output)
196
+    return result.group(1) + result.group(2)
197
   except Exception, e:
198
-    if tool_error:
199
-      sys.stderr.write(tool_error)
200
+    if gcc_error:
201
+      sys.stderr.write(gcc_error)
202
     print >> sys.stderr, "compiler_version.py failed to execute:", compiler
203
     print >> sys.stderr, e
204
     return ""
205
 
206
+def GetVersionFromEnvironment(compiler_env):
207
+  """ Returns the version of compiler
208
+
209
+  If the compiler was set by the given environment variable and exists,
210
+  return its version, otherwise None is returned.
211
+  """
212
+  cxx = os.getenv(compiler_env, None)
213
+  if cxx:
214
+    cxx_version = GetVersion(cxx)
215
+    if cxx_version != "":
216
+      return cxx_version
217
+  return None
218
+
219
+def main():
220
+  # Check if CXX_target or CXX environment variable exists an if it does use
221
+  # that compiler.
222
+  # TODO: Fix ninja (see http://crbug.com/140900) instead and remove this code
223
+  # In ninja's cross compile mode, the CXX_target is target compiler, while
224
+  # the CXX is host. The CXX_target needs be checked first, though the target
225
+  # and host compiler have different version, there seems no issue to use the
226
+  # target compiler's version number as gcc_version in Android.
227
+  cxx_version = GetVersionFromEnvironment("CXX_target")
228
+  if cxx_version:
229
+    print cxx_version
230
+    return 0
231
+
232
+  cxx_version = GetVersionFromEnvironment("CXX")
233
+  if cxx_version:
234
+    print cxx_version
235
+    return 0
236
+
237
+  # Otherwise we check the g++ version.
238
+  gccversion = GetVersion("g++")
239
+  if gccversion != "":
240
+    print gccversion
241
+    return 0
242
 
243
-def main(args):
244
-  try:
245
-    (mode, tool) = ParseArgs(args[1:])
246
-  except Exception, e:
247
-    sys.stderr.write(e.message + '\n\n')
248
-    return Usage(args[0])
249
-
250
-  ret_code, result = ExtractVersion(mode, tool)
251
-  if ret_code == 0:
252
-    print result
253
-  return ret_code
254
-
255
-
256
-def DoMain(args):
257
-  """Hook to be called from gyp without starting a separate python
258
-  interpreter."""
259
-  (mode, tool) = ParseArgs(args)
260
-  ret_code, result = ExtractVersion(mode, tool)
261
-  if ret_code == 0:
262
-    return result
263
-  raise Exception("Failed to extract compiler version for args: %s" % args)
264
-
265
-
266
-def ExtractVersion(mode, tool):
267
-  # Check if various CXX environment variables exist and use them if they
268
-  # exist. The preferences and fallback order is a close approximation of
269
-  # GenerateOutputForConfig() in GYP's ninja generator.
270
-  # The main difference being not supporting GYP's make_global_settings.
271
-  environments = ['CXX_target', 'CXX']
272
-  if mode == 'host':
273
-    environments = ['CXX_host'] + environments;
274
-  compiler = GetEnvironFallback(environments, 'c++')
275
-
276
-  if compiler:
277
-    compiler_version = GetVersion(compiler, tool)
278
-    if compiler_version != "":
279
-      return (0, compiler_version)
280
-  return (1, None)
281
-
282
+  return 1
283
 
284
 if __name__ == "__main__":
285
-  sys.exit(main(sys.argv))
286
+  sys.exit(main())
287
diff --git media/webrtc/trunk/build/copy_test_data_ios.py media/webrtc/trunk/build/copy_test_data_ios.py
288
index 6f0302f9506e..51307358355e 100755
289
--- media/webrtc/trunk/build/copy_test_data_ios.py
290
+++ media/webrtc/trunk/build/copy_test_data_ios.py
291
@@ -13,16 +13,13 @@ import sys
292
 class WrongNumberOfArgumentsException(Exception):
293
   pass
294
 
295
-def EscapePath(path):
296
-  """Returns a path with spaces escaped."""
297
-  return path.replace(" ", "\\ ")
298
-
299
 def ListFilesForPath(path):
300
   """Returns a list of all the files under a given path."""
301
   output = []
302
-  # Ignore revision control metadata directories.
303
-  if (os.path.basename(path).startswith('.git') or
304
-      os.path.basename(path).startswith('.svn')):
305
+  # Ignore dotfiles and dot directories.
306
+  # TODO(rohitrao): This will fail to exclude cases where the initial argument
307
+  # is a relative path that starts with a dot.
308
+  if os.path.basename(path).startswith('.'):
309
     return output
310
 
311
   # Files get returned without modification.
312
@@ -40,10 +37,13 @@ def ListFilesForPath(path):
313
 def CalcInputs(inputs):
314
   """Computes the full list of input files for a set of command-line arguments.
315
   """
316
-  # |inputs| is a list of paths, which may be directories.
317
+  # |inputs| is a list of strings, each of which may contain muliple paths
318
+  # separated by spaces.
319
   output = []
320
   for input in inputs:
321
-    output.extend(ListFilesForPath(input))
322
+    tokens = input.split()
323
+    for token in tokens:
324
+      output.extend(ListFilesForPath(token))
325
   return output
326
 
327
 def CopyFiles(relative_filenames, output_basedir):
328
@@ -77,15 +77,14 @@ def DoMain(argv):
329
     raise WrongNumberOfArgumentsException('<input_files> required.')
330
 
331
   files_to_copy = CalcInputs(arglist)
332
-  escaped_files = [EscapePath(x) for x in CalcInputs(arglist)]
333
   if options.list_inputs:
334
-    return '\n'.join(escaped_files)
335
+    return '\n'.join(files_to_copy)
336
 
337
   if not options.output_dir:
338
     raise WrongNumberOfArgumentsException('-o required.')
339
 
340
   if options.list_outputs:
341
-    outputs = [os.path.join(options.output_dir, x) for x in escaped_files]
342
+    outputs = [os.path.join(options.output_dir, x) for x in files_to_copy]
343
     return '\n'.join(outputs)
344
 
345
   CopyFiles(files_to_copy, options.output_dir)
346
diff --git media/webrtc/trunk/build/cp.py media/webrtc/trunk/build/cp.py
347
index 0f32536b624b..dd98e1db15d2 100755
348
--- media/webrtc/trunk/build/cp.py
349
+++ media/webrtc/trunk/build/cp.py
350
@@ -9,14 +9,13 @@ This module works much like the cp posix command - it takes 2 arguments:
351
 (src, dst) and copies the file with path |src| to |dst|.
352
 """
353
 
354
-import os
355
 import shutil
356
 import sys
357
 
358
 
359
 def Main(src, dst):
360
   # Use copy instead of copyfile to ensure the executable bit is copied.
361
-  return shutil.copy(src, os.path.normpath(dst))
362
+  return shutil.copy(src, dst)
363
 
364
 
365
 if __name__ == '__main__':
366
diff --git media/webrtc/trunk/build/dir_exists.py media/webrtc/trunk/build/dir_exists.py
367
index 70d367ec2690..0a89bc87bbf6 100755
368
--- media/webrtc/trunk/build/dir_exists.py
369
+++ media/webrtc/trunk/build/dir_exists.py
370
@@ -8,16 +8,8 @@ import os.path
371
 import sys
372
 
373
 def main():
374
-  sys.stdout.write(_is_dir(sys.argv[1]))
375
+  sys.stdout.write(str(os.path.isdir(sys.argv[1])))
376
   return 0
377
 
378
-def _is_dir(dir_name):
379
-  return str(os.path.isdir(dir_name))
380
-
381
-def DoMain(args):
382
-  """Hook to be called from gyp without starting a separate python
383
-  interpreter."""
384
-  return _is_dir(args[0])
385
-
386
 if __name__ == '__main__':
387
   sys.exit(main())
388
diff --git media/webrtc/trunk/build/download_nacl_toolchains.py media/webrtc/trunk/build/download_nacl_toolchains.py
389
index cccecce9ef95..c2007d0f1038 100755
390
--- media/webrtc/trunk/build/download_nacl_toolchains.py
391
+++ media/webrtc/trunk/build/download_nacl_toolchains.py
392
@@ -6,7 +6,6 @@
393
 """Shim to run nacl toolchain download script only if there is a nacl dir."""
394
 
395
 import os
396
-import shutil
397
 import sys
398
 
399
 
400
@@ -14,46 +13,50 @@ def Main(args):
401
   # Exit early if disable_nacl=1.
402
   if 'disable_nacl=1' in os.environ.get('GYP_DEFINES', ''):
403
     return 0
404
-  if 'OS=android' in os.environ.get('GYP_DEFINES', ''):
405
-    return 0
406
   script_dir = os.path.dirname(os.path.abspath(__file__))
407
   src_dir = os.path.dirname(script_dir)
408
   nacl_dir = os.path.join(src_dir, 'native_client')
409
   nacl_build_dir = os.path.join(nacl_dir, 'build')
410
-  package_version_dir = os.path.join(nacl_build_dir, 'package_version')
411
-  package_version = os.path.join(package_version_dir, 'package_version.py')
412
-  if not os.path.exists(package_version):
413
-    print "Can't find '%s'" % package_version
414
+  download_script = os.path.join(nacl_build_dir, 'download_toolchains.py')
415
+  if not os.path.exists(download_script):
416
+    print "Can't find '%s'" % download_script
417
     print 'Presumably you are intentionally building without NativeClient.'
418
     print 'Skipping NativeClient toolchain download.'
419
     sys.exit(0)
420
-  sys.path.insert(0, package_version_dir)
421
-  import package_version
422
+  sys.path.insert(0, nacl_build_dir)
423
+  import download_toolchains
424
 
425
+  # TODO (robertm): Finish getting PNaCl ready for prime time.
426
   # BUG:
427
   # We remove this --optional-pnacl argument, and instead replace it with
428
-  # --no-pnacl for most cases.  However, if the bot name is an sdk
429
+  # --no-pnacl for most cases.  However, if the bot name is the pnacl_sdk
430
   # bot then we will go ahead and download it.  This prevents increasing the
431
   # gclient sync time for developers, or standard Chrome bots.
432
   if '--optional-pnacl' in args:
433
     args.remove('--optional-pnacl')
434
+    # By default we don't use PNaCl toolchain yet, unless on ARM, where
435
+    # there is no other toolchain to build untrusted code at the moment.
436
+    # So analyze if we're building for ARM, or on SDK buildbot.
437
+    # TODO(olonho): we need to invent more reliable way to get build
438
+    # configuration info, to know if we're building for ARM.
439
     use_pnacl = False
440
+    if 'target_arch=arm' in os.environ.get('GYP_DEFINES', ''):
441
+      use_pnacl = True
442
     buildbot_name = os.environ.get('BUILDBOT_BUILDERNAME', '')
443
-    if 'pnacl' in buildbot_name and 'sdk' in buildbot_name:
444
+    if buildbot_name.find('pnacl') >= 0 and  buildbot_name.find('sdk') >= 0:
445
       use_pnacl = True
446
     if use_pnacl:
447
       print '\n*** DOWNLOADING PNACL TOOLCHAIN ***\n'
448
     else:
449
-      args = ['--exclude', 'pnacl_newlib'] + args
450
-
451
-  # Only download the ARM gcc toolchain if we are building for ARM
452
-  # TODO(olonho): we need to invent more reliable way to get build
453
-  # configuration info, to know if we're building for ARM.
454
-  if 'target_arch=arm' not in os.environ.get('GYP_DEFINES', ''):
455
-      args = ['--exclude', 'nacl_arm_newlib'] + args
456
+      args.append('--no-pnacl')
457
 
458
-  package_version.main(args)
459
+  # Append the name of the file to use as a version and hash source.
460
+  # NOTE:  While not recommended, it is possible to redirect this file to
461
+  # a chrome location to avoid branching NaCl if just a toolchain needs
462
+  # to be bumped.
463
+  args.append(os.path.join(nacl_dir,'TOOL_REVISIONS'))
464
 
465
+  download_toolchains.main(args)
466
   return 0
467
 
468
 
469
diff --git media/webrtc/trunk/build/extract_from_cab.py media/webrtc/trunk/build/extract_from_cab.py
470
index 080370ca9ade..1c928af36f93 100755
471
--- media/webrtc/trunk/build/extract_from_cab.py
472
+++ media/webrtc/trunk/build/extract_from_cab.py
473
@@ -12,7 +12,7 @@ import sys
474
 import tempfile
475
 
476
 def run_quiet(*args):
477
-  """Run 'expand' suppressing noisy output. Returns returncode from process."""
478
+  """Run 'expand' supressing noisy output. Returns returncode from process."""
479
   popen = subprocess.Popen(args, stdout=subprocess.PIPE)
480
   out, _ = popen.communicate()
481
   if popen.returncode:
482
diff --git media/webrtc/trunk/build/gdb-add-index media/webrtc/trunk/build/gdb-add-index
483
index 73367c835034..4975532213bc 100755
484
--- media/webrtc/trunk/build/gdb-add-index
485
+++ media/webrtc/trunk/build/gdb-add-index
486
@@ -4,181 +4,44 @@
487
 # found in the LICENSE file.
488
 #
489
 # Saves the gdb index for a given binary and its shared library dependencies.
490
-#
491
-# This will run gdb index in parallel on a number of binaries using SIGUSR1
492
-# as the communication mechanism to simulate a semaphore. Because of the
493
-# nature of this technique, using "set -e" is very difficult. The SIGUSR1
494
-# terminates a "wait" with an error which we need to interpret.
495
-#
496
-# When modifying this code, most of the real logic is in the index_one_file
497
-# function. The rest is cleanup + sempahore plumbing.
498
-
499
-function usage_exit {
500
-  echo "Usage: $0 [-f] [-r] [-n] <paths-to-binaries>..."
501
-  echo "  -f forces replacement of an existing index."
502
-  echo "  -r removes the index section."
503
-  echo "  -n don't extract the dependencies of each binary with lld."
504
-  echo "       e.g., $0 -n out/Debug/lib.unstripped/lib*"
505
-  echo
506
-  echo "  Set TOOLCHAIN_PREFIX to use a non-default set of binutils."
507
-  exit 1
508
-}
509
-
510
-# Cleanup temp directory and ensure all child jobs are dead-dead.
511
-function on_exit {
512
-  trap "" EXIT USR1  # Avoid reentrancy.
513
-
514
-  local jobs=$(jobs -p)
515
-  if [ -n "$jobs" ]; then
516
-    echo -n "Killing outstanding index jobs..."
517
-    kill -KILL $(jobs -p)
518
-    wait
519
-    echo "done"
520
-  fi
521
-
522
-  if [ -d "$directory" ]; then
523
-    echo -n "Removing temp directory $directory..."
524
-    rm -rf "$directory"
525
-    echo done
526
-  fi
527
-}
528
-
529
-# Add index to one binary.
530
-function index_one_file {
531
-  local file=$1
532
-  local basename=$(basename "$file")
533
-  local should_index_this_file="${should_index}"
534
-
535
-  local readelf_out=$(${TOOLCHAIN_PREFIX}readelf -S "$file")
536
-  if [[ $readelf_out =~ "gdb_index" ]]; then
537
-    if $remove_index; then
538
-      ${TOOLCHAIN_PREFIX}objcopy --remove-section .gdb_index "$file"
539
-      echo "Removed index from $basename."
540
-    else
541
-      echo "Skipped $basename -- already contains index."
542
-      should_index_this_file=false
543
-    fi
544
-  fi
545
-
546
-  if $should_index_this_file; then
547
-    local start=$(date +"%s%N")
548
-    echo "Adding index to $basename..."
549
-
550
-    ${TOOLCHAIN_PREFIX}gdb -batch "$file" -ex "save gdb-index $directory" \
551
-      -ex "quit"
552
-    local index_file="$directory/$basename.gdb-index"
553
-    if [ -f "$index_file" ]; then
554
-      ${TOOLCHAIN_PREFIX}objcopy --add-section .gdb_index="$index_file" \
555
-        --set-section-flags .gdb_index=readonly "$file" "$file"
556
-      local finish=$(date +"%s%N")
557
-      local elapsed=$(((finish - start) / 1000000))
558
-      echo "   ...$basename indexed. [${elapsed}ms]"
559
-    else
560
-      echo "   ...$basename unindexable."
561
-    fi
562
-  fi
563
-}
564
 
565
-# Functions that when combined, concurrently index all files in FILES_TO_INDEX
566
-# array. The global FILES_TO_INDEX is declared in the main body of the script.
567
-function async_index {
568
-  # Start a background subshell to run the index command.
569
-  {
570
-    index_one_file $1
571
-    kill -SIGUSR1 $$  # $$ resolves to the parent script.
572
-    exit 129  # See comment above wait loop at bottom.
573
-  } &
574
-}
575
+set -e
576
 
577
-cur_file_num=0
578
-function index_next {
579
-  if ((cur_file_num >= ${#files_to_index[@]})); then
580
-    return
581
-  fi
582
-
583
-  async_index "${files_to_index[cur_file_num]}"
584
-  ((cur_file_num += 1)) || true
585
-}
586
-
587
-########
588
-### Main body of the script.
589
-
590
-remove_index=false
591
-should_index=true
592
-should_index_deps=true
593
-files_to_index=()
594
-while (($# > 0)); do
595
-  case "$1" in
596
-    -h)
597
-      usage_exit
598
-      ;;
599
-    -f)
600
-      remove_index=true
601
-      ;;
602
-    -r)
603
-      remove_index=true
604
-      should_index=false
605
-      ;;
606
-    -n)
607
-      should_index_deps=false
608
-      ;;
609
-    -*)
610
-      echo "Invalid option: $1" >&2
611
-      usage_exit
612
-      ;;
613
-    *)
614
-      if [[ ! -f "$1" ]]; then
615
-        echo "Path $1 does not exist."
616
-        exit 1
617
-      fi
618
-      files_to_index+=("$1")
619
-      ;;
620
-  esac
621
-  shift
622
-done
623
-
624
-if ((${#files_to_index[@]} == 0)); then
625
-  usage_exit
626
+if [[ ! $# == 1 ]]; then
627
+  echo "Usage: $0 path-to-binary"
628
+  exit 1
629
 fi
630
 
631
-dependencies=()
632
-if $should_index_deps; then
633
-  for file in "${files_to_index[@]}"; do
634
-      # Append the shared library dependencies of this file that
635
-      # have the same dirname. The dirname is a signal that these
636
-      # shared libraries were part of the same build as the binary.
637
-      dependencies+=( \
638
-        $(ldd "$file" 2>/dev/null \
639
-          | grep $(dirname "$file") \
640
-          | sed "s/.*[ \t]\(.*\) (.*/\1/") \
641
-      )
642
-  done
643
+FILENAME="$1"
644
+if [[ ! -f "$FILENAME" ]]; then
645
+  echo "Path $FILENAME does not exist."
646
+  exit 1
647
 fi
648
-files_to_index+=("${dependencies[@]}")
649
-
650
-# Ensure we cleanup on on exit.
651
-trap on_exit EXIT INT
652
 
653
 # We're good to go! Create temp directory for index files.
654
-directory=$(mktemp -d)
655
-echo "Made temp directory $directory."
656
-
657
-# Start concurrent indexing.
658
-trap index_next USR1
659
-
660
-# 4 is an arbitrary default. When changing, remember we are likely IO bound
661
-# so basing this off the number of cores is not sensible.
662
-index_tasks=${INDEX_TASKS:-4}
663
-for ((i = 0; i < index_tasks; i++)); do
664
-  index_next
665
-done
666
-
667
-# Do a wait loop. Bash waits that terminate due a trap have an exit
668
-# code > 128. We also ensure that our subshell's "normal" exit occurs with
669
-# an exit code > 128. This allows us to do consider a > 128 exit code as
670
-# an indication that the loop should continue. Unfortunately, it also means
671
-# we cannot use set -e since technically the "wait" is failing.
672
-wait
673
-while (($? > 128)); do
674
-  wait
675
+DIRECTORY=$(mktemp -d)
676
+echo "Made temp directory $DIRECTORY."
677
+
678
+# Always remove directory on exit.
679
+trap "{ echo -n Removing temp directory $DIRECTORY...;
680
+  rm -rf $DIRECTORY; echo done; }" EXIT
681
+
682
+# Grab all the chromium shared library files.
683
+so_files=$(ldd "$FILENAME" 2>/dev/null \
684
+  | grep $(dirname "$FILENAME") \
685
+  | sed "s/.*[ \t]\(.*\) (.*/\1/")
686
+
687
+# Add index to binary and the shared library dependencies.
688
+for file in "$FILENAME" $so_files; do
689
+  basename=$(basename "$file")
690
+  echo -n "Adding index to $basename..."
691
+  readelf_out=$(readelf -S "$file")
692
+  if [[ $readelf_out =~ "gdb_index" ]]; then
693
+    echo "already contains index. Skipped."
694
+  else
695
+    gdb -batch "$file" -ex "save gdb-index $DIRECTORY" -ex "quit"
696
+    objcopy --add-section .gdb_index="$DIRECTORY"/$basename.gdb-index \
697
+      --set-section-flags .gdb_index=readonly "$file" "$file"
698
+    echo "done."
699
+  fi
700
 done
701
diff --git media/webrtc/trunk/build/gyp_chromium media/webrtc/trunk/build/gyp_chromium
702
index 4fc62bad9ba1..d13403403162 100755
703
--- media/webrtc/trunk/build/gyp_chromium
704
+++ media/webrtc/trunk/build/gyp_chromium
705
@@ -1,12 +1,175 @@
706
 #!/usr/bin/env python
707
+
708
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
709
 # Use of this source code is governed by a BSD-style license that can be
710
 # found in the LICENSE file.
711
 
712
-# Simple launcher script for gyp_chromium.py.
713
-# TODO(sbc): This should probably be shell script but for historical
714
-# reasons (all the python code used to live in this script without a
715
-# .py extension, and was often run as 'python gyp_chromium') it is
716
-# currently still python.
717
+# This script is wrapper for Chromium that adds some support for how GYP
718
+# is invoked by Chromium beyond what can be done in the gclient hooks.
719
+
720
+import glob
721
+import os
722
+import shlex
723
+import subprocess
724
+import sys
725
+
726
+script_dir = os.path.dirname(os.path.realpath(__file__))
727
+chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir))
728
+
729
+sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
730
+import gyp
731
+
732
+# Add paths so that pymod_do_main(...) can import files.
733
+sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit'))
734
+sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build'))
735
+sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build'))
736
+
737
+
738
+# On Windows, Psyco shortens warm runs of build/gyp_chromium by about
739
+# 20 seconds on a z600 machine with 12 GB of RAM, from 90 down to 70
740
+# seconds.  Conversely, memory usage of build/gyp_chromium with Psyco
741
+# maxes out at about 158 MB vs. 132 MB without it.
742
+#
743
+# Psyco uses native libraries, so we need to load a different
744
+# installation depending on which OS we are running under. It has not
745
+# been tested whether using Psyco on our Mac and Linux builds is worth
746
+# it (the GYP running time is a lot shorter, so the JIT startup cost
747
+# may not be worth it).
748
+if sys.platform == 'win32':
749
+  try:
750
+    sys.path.insert(0, os.path.join(chrome_src, 'third_party', 'psyco_win32'))
751
+    import psyco
752
+  except:
753
+    psyco = None
754
+else:
755
+  psyco = None
756
+
757
+def apply_gyp_environment(file_path=None):
758
+  """
759
+  Reads in a *.gyp_env file and applies the valid keys to os.environ.
760
+  """
761
+  if not file_path or not os.path.exists(file_path):
762
+    return
763
+  file_contents = open(file_path).read()
764
+  try:
765
+    file_data = eval(file_contents, {'__builtins__': None}, None)
766
+  except SyntaxError, e:
767
+    e.filename = os.path.abspath(file_path)
768
+    raise
769
+  supported_vars = ( 'CC',
770
+                     'CHROMIUM_GYP_FILE',
771
+                     'CHROMIUM_GYP_SYNTAX_CHECK',
772
+                     'CXX',
773
+                     'GYP_DEFINES',
774
+                     'GYP_GENERATOR_FLAGS',
775
+                     'GYP_GENERATOR_OUTPUT',
776
+                     'GYP_GENERATORS', )
777
+  for var in supported_vars:
778
+    val = file_data.get(var)
779
+    if val:
780
+      if var in os.environ:
781
+        print 'INFO: Environment value for "%s" overrides value in %s.' % (
782
+            var, os.path.abspath(file_path)
783
+        )
784
+      else:
785
+        os.environ[var] = val
786
+
787
+def additional_include_files(args=[]):
788
+  """
789
+  Returns a list of additional (.gypi) files to include, without
790
+  duplicating ones that are already specified on the command line.
791
+  """
792
+  # Determine the include files specified on the command line.
793
+  # This doesn't cover all the different option formats you can use,
794
+  # but it's mainly intended to avoid duplicating flags on the automatic
795
+  # makefile regeneration which only uses this format.
796
+  specified_includes = set()
797
+  for arg in args:
798
+    if arg.startswith('-I') and len(arg) > 2:
799
+      specified_includes.add(os.path.realpath(arg[2:]))
800
+
801
+  result = []
802
+  def AddInclude(path):
803
+    if os.path.realpath(path) not in specified_includes:
804
+      result.append(path)
805
+
806
+  # Always include common.gypi.
807
+  AddInclude(os.path.join(script_dir, 'common.gypi'))
808
+
809
+  # Optionally add supplemental .gypi files if present.
810
+  supplements = glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi'))
811
+  for supplement in supplements:
812
+    AddInclude(supplement)
813
+
814
+  return result
815
+
816
+if __name__ == '__main__':
817
+  args = sys.argv[1:]
818
+
819
+  # Use the Psyco JIT if available.
820
+  if psyco:
821
+    psyco.profile()
822
+    print "Enabled Psyco JIT."
823
+
824
+  # Fall back on hermetic python if we happen to get run under cygwin.
825
+  # TODO(bradnelson): take this out once this issue is fixed:
826
+  #    http://code.google.com/p/gyp/issues/detail?id=177
827
+  if sys.platform == 'cygwin':
828
+    python_dir = os.path.join(chrome_src, 'third_party', 'python_26')
829
+    env = os.environ.copy()
830
+    env['PATH'] = python_dir + os.pathsep + env.get('PATH', '')
831
+    p = subprocess.Popen(
832
+       [os.path.join(python_dir, 'python.exe')] + sys.argv,
833
+       env=env, shell=False)
834
+    p.communicate()
835
+    sys.exit(p.returncode)
836
+
837
+  if 'SKIP_CHROMIUM_GYP_ENV' not in os.environ:
838
+    # Update the environment based on chromium.gyp_env
839
+    gyp_env_path = os.path.join(os.path.dirname(chrome_src), 'chromium.gyp_env')
840
+    apply_gyp_environment(gyp_env_path)
841
+
842
+  # This could give false positives since it doesn't actually do real option
843
+  # parsing.  Oh well.
844
+  gyp_file_specified = False
845
+  for arg in args:
846
+    if arg.endswith('.gyp'):
847
+      gyp_file_specified = True
848
+      break
849
+
850
+  # If we didn't get a file, check an env var, and then fall back to
851
+  # assuming 'all.gyp' from the same directory as the script.
852
+  if not gyp_file_specified:
853
+    gyp_file = os.environ.get('CHROMIUM_GYP_FILE')
854
+    if gyp_file:
855
+      # Note that CHROMIUM_GYP_FILE values can't have backslashes as
856
+      # path separators even on Windows due to the use of shlex.split().
857
+      args.extend(shlex.split(gyp_file))
858
+    else:
859
+      args.append(os.path.join(script_dir, 'all.gyp'))
860
+
861
+  args.extend(['-I' + i for i in additional_include_files(args)])
862
+
863
+  # There shouldn't be a circular dependency relationship between .gyp files,
864
+  # but in Chromium's .gyp files, on non-Mac platforms, circular relationships
865
+  # currently exist.  The check for circular dependencies is currently
866
+  # bypassed on other platforms, but is left enabled on the Mac, where a
867
+  # violation of the rule causes Xcode to misbehave badly.
868
+  # TODO(mark): Find and kill remaining circular dependencies, and remove this
869
+  # option.  http://crbug.com/35878.
870
+  # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the
871
+  # list.
872
+  if sys.platform not in ('darwin',):
873
+    args.append('--no-circular-check')
874
+
875
+  # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check
876
+  # to enfore syntax checking.
877
+  syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK')
878
+  if syntax_check and int(syntax_check):
879
+    args.append('--check')
880
+
881
+  print 'Updating projects from gyp files...'
882
+  sys.stdout.flush()
883
 
884
-execfile(__file__ + '.py')
885
+  # Off we go...
886
+  sys.exit(gyp.main(args))
887
diff --git media/webrtc/trunk/build/install-build-deps-android.sh media/webrtc/trunk/build/install-build-deps-android.sh
888
index 06f79aee9984..0a90d3b10c05 100755
889
--- media/webrtc/trunk/build/install-build-deps-android.sh
890
+++ media/webrtc/trunk/build/install-build-deps-android.sh
891
@@ -1,78 +1,101 @@
892
-#!/bin/bash
893
+#!/bin/bash -e
894
 
895
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
896
 # Use of this source code is governed by a BSD-style license that can be
897
 # found in the LICENSE file.
898
 
899
-# Script to install everything needed to build chromium on android, including
900
-# items requiring sudo privileges.
901
-# See https://www.chromium.org/developers/how-tos/android-build-instructions
902
+# Script to install everything needed to build chromium on android that
903
+# requires sudo privileges.
904
+# See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions
905
 
906
-args="$@"
907
+# This script installs the sun-java6 packages (bin, jre and jdk). Sun requires
908
+# a license agreement, so upon installation it will prompt the user. To get
909
+# past the curses-based dialog press TAB <ret> TAB <ret> to agree.
910
 
911
 if ! uname -m | egrep -q "i686|x86_64"; then
912
   echo "Only x86 architectures are currently supported" >&2
913
   exit
914
 fi
915
 
916
-# Exit if any commands fail.
917
-set -e
918
+if [ "x$(id -u)" != x0 ]; then
919
+  echo "Running as non-root user."
920
+  echo "You might have to enter your password one or more times for 'sudo'."
921
+  echo
922
+fi
923
 
924
-lsb_release=$(lsb_release --codename --short)
925
+# The temporary directory used to store output of update-java-alternatives
926
+TEMPDIR=$(mktemp -d)
927
+cleanup() {
928
+  local status=${?}
929
+  trap - EXIT
930
+  rm -rf "${TEMPDIR}"
931
+  exit ${status}
932
+}
933
+trap cleanup EXIT
934
 
935
-# Install first the default Linux build deps.
936
-"$(dirname "${BASH_SOURCE[0]}")/install-build-deps.sh" \
937
-  --no-syms --lib32 --no-arm --no-chromeos-fonts --no-nacl --no-prompt "${args}"
938
+sudo apt-get update
939
 
940
 # Fix deps
941
 sudo apt-get -f install
942
 
943
-# common
944
-sudo apt-get -y install lib32z1 lighttpd python-pexpect xvfb x11-utils
945
-
946
-# Some binaries in the Android SDK require 32-bit libraries on the host.
947
-# See https://developer.android.com/sdk/installing/index.html?pkg=tools
948
-sudo apt-get -y install libncurses5:i386 libstdc++6:i386 zlib1g:i386
949
+# Install deps
950
+# This step differs depending on what Ubuntu release we are running
951
+# on since the package names are different, and Sun's Java must
952
+# be installed manually on late-model versions.
953
 
954
-# Required by //components/cronet/tools/generate_javadoc.py
955
-# TODO(375324): Stop requiring ANT.
956
-sudo apt-get -y install ant
957
-
958
-# Required for apk-patch-size-estimator
959
-sudo apt-get -y install bsdiff
960
-
961
-# Do our own error handling for java.
962
-set +e
963
-
964
-function IsJava8() {
965
-  # Arg is either "java" or "javac"
966
-  $1 -version 2>&1 | grep -q '1\.8'
967
-}
968
-
969
-if ! (IsJava8 java && IsJava8 javac); then
970
-  sudo apt-get -y install openjdk-8-jre openjdk-8-jdk
971
-fi
972
-
973
-# There can be several reasons why java8 is not default despite being installed.
974
-# Just show an error and exit.
975
-if ! (IsJava8 java && IsJava8 javac); then
976
-  echo
977
-  echo "Automatic java installation failed."
978
-  echo '`java -version` reports:'
979
-  java -version
980
-  echo
981
-  echo '`javac -version` reports:'
982
-  javac -version
983
-  echo
984
-  echo "Please ensure that JDK 8 is installed and resolves first in your PATH."
985
-  echo -n '`which java` reports: '
986
-  which java
987
-  echo -n '`which javac` reports: '
988
-  which javac
989
-  echo
990
-  echo "You might also try running:"
991
-  echo "    sudo update-java-alternatives -s java-1.8.0-openjdk-amd64"
992
-  exit 1
993
+# common
994
+sudo apt-get -y install python-pexpect xvfb x11-utils
995
+
996
+if /usr/bin/lsb_release -r -s | grep -q "12."; then
997
+  # Ubuntu 12.x
998
+  sudo apt-get -y install ant
999
+
1000
+  # Java can not be installed via ppa on Ubuntu 12.04+ so we'll
1001
+  # simply check to see if it has been setup properly -- if not
1002
+  # let the user know.
1003
+
1004
+  if ! java -version 2>&1 | grep -q "Java(TM)"; then
1005
+    echo "****************************************************************"
1006
+    echo "You need to install the Oracle Java SDK from http://goo.gl/uPRSq"
1007
+    echo "and configure it as the default command-line Java environment."
1008
+    echo "****************************************************************"
1009
+    exit
1010
+  fi
1011
+
1012
+else
1013
+  # Ubuntu 10.x
1014
+
1015
+  sudo apt-get -y install ant1.8
1016
+
1017
+  # Install sun-java6 stuff
1018
+  sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk
1019
+
1020
+  # Switch version of Java to java-6-sun
1021
+  # Sun's java is missing certain Java plugins (e.g. for firefox, mozilla).
1022
+  # These are not required to build, and thus are treated only as warnings.
1023
+  # Any errors in updating java alternatives which are not '*-javaplugin.so'
1024
+  # will cause errors and stop the script from completing successfully.
1025
+  if ! sudo update-java-alternatives -s java-6-sun \
1026
+            >& "${TEMPDIR}"/update-java-alternatives.out
1027
+  then
1028
+    # Check that there are the expected javaplugin.so errors for the update
1029
+    if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \
1030
+           /dev/null
1031
+    then
1032
+      # Print as warnings all the javaplugin.so errors
1033
+      echo 'WARNING: java-6-sun has no alternatives for the following plugins:'
1034
+      grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
1035
+    fi
1036
+    # Check if there are any errors that are not javaplugin.so
1037
+    if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \
1038
+           >& /dev/null
1039
+    then
1040
+      # If there are non-javaplugin.so errors, treat as errors and exit
1041
+      echo 'ERRORS: Failed to update alternatives for java-6-sun:'
1042
+      grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
1043
+      exit 1
1044
+    fi
1045
+  fi
1046
 fi
1047
 
1048
 echo "install-build-deps-android.sh complete."
1049
diff --git media/webrtc/trunk/build/install-build-deps.sh media/webrtc/trunk/build/install-build-deps.sh
1050
index c965a9b38e06..b77e23a6d9f6 100755
1051
--- media/webrtc/trunk/build/install-build-deps.sh
1052
+++ media/webrtc/trunk/build/install-build-deps.sh
1053
@@ -5,516 +5,166 @@
1054
 # found in the LICENSE file.
1055
 
1056
 # Script to install everything needed to build chromium (well, ideally, anyway)
1057
-# See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md
1058
+# See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions
1059
+# and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit
1060
 
1061
 usage() {
1062
   echo "Usage: $0 [--options]"
1063
   echo "Options:"
1064
   echo "--[no-]syms: enable or disable installation of debugging symbols"
1065
-  echo "--lib32: enable installation of 32-bit libraries, e.g. for V8 snapshot"
1066
-  echo "--[no-]arm: enable or disable installation of arm cross toolchain"
1067
-  echo "--[no-]chromeos-fonts: enable or disable installation of Chrome OS"\
1068
-       "fonts"
1069
-  echo "--[no-]nacl: enable or disable installation of prerequisites for"\
1070
-       "building standalone NaCl and all its toolchains"
1071
+  echo "--[no-]lib32: enable or disable installation of 32 bit libraries"
1072
   echo "--no-prompt: silently select standard options/defaults"
1073
-  echo "--quick-check: quickly try to determine if dependencies are installed"
1074
-  echo "               (this avoids interactive prompts and sudo commands,"
1075
-  echo "               so might not be 100% accurate)"
1076
-  echo "--unsupported: attempt installation even on unsupported systems"
1077
   echo "Script will prompt interactively if options not given."
1078
   exit 1
1079
 }
1080
 
1081
-# Waits for the user to press 'Y' or 'N'. Either uppercase of lowercase is
1082
-# accepted. Returns 0 for 'Y' and 1 for 'N'. If an optional parameter has
1083
-# been provided to yes_no(), the function also accepts RETURN as a user input.
1084
-# The parameter specifies the exit code that should be returned in that case.
1085
-# The function will echo the user's selection followed by a newline character.
1086
-# Users can abort the function by pressing CTRL-C. This will call "exit 1".
1087
-yes_no() {
1088
-  if [ 0 -ne "${do_default-0}" ] ; then
1089
-    [ $1 -eq 0 ] && echo "Y" || echo "N"
1090
-    return $1
1091
-  fi
1092
-  local c
1093
-  while :; do
1094
-    c="$(trap 'stty echo -iuclc icanon 2>/dev/null' EXIT INT TERM QUIT
1095
-         stty -echo iuclc -icanon 2>/dev/null
1096
-         dd count=1 bs=1 2>/dev/null | od -An -tx1)"
1097
-    case "$c" in
1098
-      " 0a") if [ -n "$1" ]; then
1099
-               [ $1 -eq 0 ] && echo "Y" || echo "N"
1100
-               return $1
1101
-             fi
1102
-             ;;
1103
-      " 79") echo "Y"
1104
-             return 0
1105
-             ;;
1106
-      " 6e") echo "N"
1107
-             return 1
1108
-             ;;
1109
-      "")    echo "Aborted" >&2
1110
-             exit 1
1111
-             ;;
1112
-      *)     # The user pressed an unrecognized key. As we are not echoing
1113
-             # any incorrect user input, alert the user by ringing the bell.
1114
-             (tput bel) 2>/dev/null
1115
-             ;;
1116
-    esac
1117
-  done
1118
-}
1119
-
1120
-# Checks whether a particular package is available in the repos.
1121
-# USAGE: $ package_exists <package name>
1122
-package_exists() {
1123
-  [ ! -z "`apt-cache search --names-only "$1"`" ]
1124
-}
1125
-
1126
-# These default to on because (some) bots need them and it keeps things
1127
-# simple for the bot setup if all bots just run the script in its default
1128
-# mode.  Developers who don't want stuff they don't need installed on their
1129
-# own workstations can pass --no-arm --no-nacl when running the script.
1130
-do_inst_arm=1
1131
-do_inst_nacl=1
1132
-
1133
 while test "$1" != ""
1134
 do
1135
   case "$1" in
1136
   --syms)                   do_inst_syms=1;;
1137
   --no-syms)                do_inst_syms=0;;
1138
   --lib32)                  do_inst_lib32=1;;
1139
-  --arm)                    do_inst_arm=1;;
1140
-  --no-arm)                 do_inst_arm=0;;
1141
-  --chromeos-fonts)         do_inst_chromeos_fonts=1;;
1142
-  --no-chromeos-fonts)      do_inst_chromeos_fonts=0;;
1143
-  --nacl)                   do_inst_nacl=1;;
1144
-  --no-nacl)                do_inst_nacl=0;;
1145
+  --no-lib32)               do_inst_lib32=0;;
1146
   --no-prompt)              do_default=1
1147
                             do_quietly="-qq --assume-yes"
1148
     ;;
1149
-  --quick-check)            do_quick_check=1;;
1150
-  --unsupported)            do_unsupported=1;;
1151
   *) usage;;
1152
   esac
1153
   shift
1154
 done
1155
 
1156
-if test "$do_inst_arm" = "1"; then
1157
-  do_inst_lib32=1
1158
-fi
1159
-
1160
-# Check for lsb_release command in $PATH
1161
-if ! which lsb_release > /dev/null; then
1162
-  echo "ERROR: lsb_release not found in \$PATH" >&2
1163
-  exit 1;
1164
+if ! egrep -q \
1165
+    'Ubuntu (10\.04|10\.10|11\.04|11\.10|12\.04|lucid|maverick|natty|oneiric|precise)' \
1166
+    /etc/issue; then
1167
+  echo "Only Ubuntu 10.04 (lucid) through 12.04 (precise) are currently" \
1168
+      "supported" >&2
1169
+  exit 1
1170
 fi
1171
 
1172
-distro_codename=$(lsb_release --codename --short)
1173
-distro_id=$(lsb_release --id --short)
1174
-supported_codenames="(trusty|xenial|yakkety)"
1175
-supported_ids="(Debian)"
1176
-if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then
1177
-  if [[ ! $distro_codename =~ $supported_codenames &&
1178
-        ! $distro_id =~ $supported_ids ]]; then
1179
-    echo -e "ERROR: The only supported distros are\n" \
1180
-      "\tUbuntu 14.04 (trusty)\n" \
1181
-      "\tUbuntu 16.04 (xenial)\n" \
1182
-      "\tUbuntu 16.10 (yakkety)\n" \
1183
-      "\tDebian 8 (jessie) or later" >&2
1184
-    exit 1
1185
-  fi
1186
-
1187
-  if ! uname -m | egrep -q "i686|x86_64"; then
1188
-    echo "Only x86 architectures are currently supported" >&2
1189
-    exit
1190
-  fi
1191
+if ! uname -m | egrep -q "i686|x86_64"; then
1192
+  echo "Only x86 architectures are currently supported" >&2
1193
+  exit
1194
 fi
1195
 
1196
-if [ "x$(id -u)" != x0 ] && [ 0 -eq "${do_quick_check-0}" ]; then
1197
+if [ "x$(id -u)" != x0 ]; then
1198
   echo "Running as non-root user."
1199
   echo "You might have to enter your password one or more times for 'sudo'."
1200
   echo
1201
 fi
1202
 
1203
 # Packages needed for chromeos only
1204
-chromeos_dev_list="libbluetooth-dev libxkbcommon-dev realpath"
1205
-
1206
-# Packages needed for development
1207
-dev_list="\
1208
-  bison
1209
-  cdbs
1210
-  curl
1211
-  dpkg-dev
1212
-  elfutils
1213
-  devscripts
1214
-  fakeroot
1215
-  flex
1216
-  fonts-ipafont
1217
-  fonts-thai-tlwg
1218
-  g++
1219
-  git-core
1220
-  git-svn
1221
-  gperf
1222
-  libasound2-dev
1223
-  libbrlapi-dev
1224
-  libav-tools
1225
-  libbz2-dev
1226
-  libcairo2-dev
1227
-  libcap-dev
1228
-  libcups2-dev
1229
-  libcurl4-gnutls-dev
1230
-  libdrm-dev
1231
-  libelf-dev
1232
-  libffi-dev
1233
-  libgconf2-dev
1234
-  libglib2.0-dev
1235
-  libglu1-mesa-dev
1236
-  libgnome-keyring-dev
1237
-  libgtk2.0-dev
1238
-  libgtk-3-dev
1239
-  libkrb5-dev
1240
-  libnspr4-dev
1241
-  libnss3-dev
1242
-  libpam0g-dev
1243
-  libpci-dev
1244
-  libpulse-dev
1245
-  libsctp-dev
1246
-  libspeechd-dev
1247
-  libsqlite3-dev
1248
-  libssl-dev
1249
-  libudev-dev
1250
-  libwww-perl
1251
-  libxslt1-dev
1252
-  libxss-dev
1253
-  libxt-dev
1254
-  libxtst-dev
1255
-  openbox
1256
-  patch
1257
-  perl
1258
-  pkg-config
1259
-  python
1260
-  python-cherrypy3
1261
-  python-crypto
1262
-  python-dev
1263
-  python-numpy
1264
-  python-opencv
1265
-  python-openssl
1266
-  python-psutil
1267
-  python-yaml
1268
-  rpm
1269
-  ruby
1270
-  subversion
1271
-  ttf-dejavu-core
1272
-  wdiff
1273
-  xcompmgr
1274
-  zip
1275
-  $chromeos_dev_list
1276
-"
1277
+chromeos_dev_list="libbluetooth-dev libpulse-dev"
1278
+
1279
+# Packages need for development
1280
+dev_list="apache2.2-bin bison curl elfutils fakeroot flex g++ gperf
1281
+          language-pack-fr libapache2-mod-php5 libasound2-dev libbz2-dev
1282
+          libcairo2-dev libcups2-dev libcurl4-gnutls-dev libdbus-glib-1-dev
1283
+          libelf-dev libgconf2-dev libgl1-mesa-dev libglib2.0-dev
1284
+          libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev
1285
+          libkrb5-dev libnspr4-dev libnss3-dev libpam0g-dev libsctp-dev
1286
+          libsqlite3-dev libssl-dev libudev-dev libwww-perl libxslt1-dev
1287
+          libxss-dev libxt-dev libxtst-dev mesa-common-dev patch
1288
+          perl php5-cgi pkg-config python python-cherrypy3 python-dev
1289
+          python-psutil rpm ruby subversion ttf-dejavu-core ttf-indic-fonts
1290
+          ttf-kochi-gothic ttf-kochi-mincho ttf-thai-tlwg wdiff git-core
1291
+          $chromeos_dev_list"
1292
 
1293
 # 64-bit systems need a minimum set of 32-bit compat packages for the pre-built
1294
-# NaCl binaries.
1295
-if file -L /sbin/init | grep -q 'ELF 64-bit'; then
1296
+# NaCl binaries. These are always needed, regardless of whether or not we want
1297
+# the full 32-bit "cross-compile" support (--lib32).
1298
+if [ "$(uname -m)" = "x86_64" ]; then
1299
   dev_list="${dev_list} libc6-i386 lib32gcc1 lib32stdc++6"
1300
 fi
1301
 
1302
 # Run-time libraries required by chromeos only
1303
-chromeos_lib_list="libpulse0 libbz2-1.0"
1304
+chromeos_lib_list="libpulse0 libbz2-1.0 libcurl4-gnutls-dev"
1305
 
1306
 # Full list of required run-time libraries
1307
-lib_list="\
1308
-  libatk1.0-0
1309
-  libc6
1310
-  libasound2
1311
-  libcairo2
1312
-  libcap2
1313
-  libcups2
1314
-  libexpat1
1315
-  libffi6
1316
-  libfontconfig1
1317
-  libfreetype6
1318
-  libglib2.0-0
1319
-  libgnome-keyring0
1320
-  libgtk2.0-0
1321
-  libgtk-3-0
1322
-  libpam0g
1323
-  libpango1.0-0
1324
-  libpci3
1325
-  libpcre3
1326
-  libpixman-1-0
1327
-  libspeechd2
1328
-  libstdc++6
1329
-  libsqlite3-0
1330
-  libx11-6
1331
-  libx11-xcb1
1332
-  libxau6
1333
-  libxcb1
1334
-  libxcomposite1
1335
-  libxcursor1
1336
-  libxdamage1
1337
-  libxdmcp6
1338
-  libxext6
1339
-  libxfixes3
1340
-  libxi6
1341
-  libxinerama1
1342
-  libxrandr2
1343
-  libxrender1
1344
-  libxtst6
1345
-  zlib1g
1346
-  $chromeos_lib_list
1347
-"
1348
+lib_list="libatk1.0-0 libc6 libasound2 libcairo2 libcups2 libdbus-glib-1-2
1349
+          libexpat1 libfontconfig1 libfreetype6 libglib2.0-0 libgnome-keyring0
1350
+          libgtk2.0-0 libpam0g libpango1.0-0 libpcre3 libpixman-1-0
1351
+          libpng12-0 libstdc++6 libsqlite3-0 libudev0 libx11-6 libxau6 libxcb1
1352
+          libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3
1353
+          libxi6 libxinerama1 libxrandr2 libxrender1 libxtst6 zlib1g
1354
+          $chromeos_lib_list"
1355
 
1356
 # Debugging symbols for all of the run-time libraries
1357
-dbg_list="\
1358
-  libatk1.0-dbg
1359
-  libc6-dbg
1360
-  libcairo2-dbg
1361
-  libffi6-dbg
1362
-  libfontconfig1-dbg
1363
-  libglib2.0-0-dbg
1364
-  libgtk2.0-0-dbg
1365
-  libgtk-3-0-dbg
1366
-  libpango1.0-0-dbg
1367
-  libpcre3-dbg
1368
-  libpixman-1-0-dbg
1369
-  libsqlite3-0-dbg
1370
-  libx11-6-dbg
1371
-  libx11-xcb1-dbg
1372
-  libxau6-dbg
1373
-  libxcb1-dbg
1374
-  libxcomposite1-dbg
1375
-  libxcursor1-dbg
1376
-  libxdamage1-dbg
1377
-  libxdmcp6-dbg
1378
-  libxext6-dbg
1379
-  libxi6-dbg
1380
-  libxinerama1-dbg
1381
-  libxrandr2-dbg
1382
-  libxrender1-dbg
1383
-  libxtst6-dbg
1384
-  zlib1g-dbg
1385
-"
1386
-
1387
-if [[ ! $distro_codename =~ "yakkety" ]]; then
1388
-  dbg_list="${dbg_list} libxfixes3-dbg"
1389
-fi
1390
-
1391
-# Find the proper version of libstdc++6-4.x-dbg.
1392
-if [ "x$distro_codename" = "xtrusty" ]; then
1393
-  dbg_list="${dbg_list} libstdc++6-4.8-dbg"
1394
-else
1395
-  dbg_list="${dbg_list} libstdc++6-4.9-dbg"
1396
-fi
1397
-
1398
-# 32-bit libraries needed e.g. to compile V8 snapshot for Android or armhf
1399
-lib32_list="linux-libc-dev:i386"
1400
-
1401
-# arm cross toolchain packages needed to build chrome on armhf
1402
-EM_REPO="deb http://emdebian.org/tools/debian/ jessie main"
1403
-EM_SOURCE=$(cat <<EOF
1404
-# Repo added by Chromium $0
1405
-${EM_REPO}
1406
-# deb-src http://emdebian.org/tools/debian/ jessie main
1407
-EOF
1408
-)
1409
-EM_ARCHIVE_KEY_FINGER="084C6C6F39159EDB67969AA87DE089671804772E"
1410
-GPP_ARM_PACKAGE="g++-arm-linux-gnueabihf"
1411
-case $distro_codename in
1412
-  jessie)
1413
-    eval $(apt-config shell APT_SOURCESDIR 'Dir::Etc::sourceparts/d')
1414
-    CROSSTOOLS_LIST="${APT_SOURCESDIR}/crosstools.list"
1415
-    arm_list="libc6-dev:armhf
1416
-              linux-libc-dev:armhf"
1417
-    if test "$do_inst_arm" = "1"; then
1418
-      if $(dpkg-query -W ${GPP_ARM_PACKAGE} &>/dev/null); then
1419
-        arm_list+=" ${GPP_ARM_PACKAGE}"
1420
-      else
1421
-        echo "The Debian Cross-toolchains repository is necessary to"
1422
-        echo "cross-compile Chromium for arm."
1423
-        echo -n "Do you want me to add it for you (y/N) "
1424
-        if yes_no 1; then
1425
-          gpg --keyserver pgp.mit.edu --recv-keys ${EM_ARCHIVE_KEY_FINGER}
1426
-          gpg -a --export ${EM_ARCHIVE_KEY_FINGER} | sudo apt-key add -
1427
-          if ! grep "^${EM_REPO}" "${CROSSTOOLS_LIST}" &>/dev/null; then
1428
-            echo "${EM_SOURCE}" | sudo tee -a "${CROSSTOOLS_LIST}" >/dev/null
1429
-          fi
1430
-          arm_list+=" ${GPP_ARM_PACKAGE}"
1431
-        fi
1432
-      fi
1433
-    fi
1434
-    ;;
1435
-  # All necessary ARM packages are available on the default repos on
1436
-  # Debian 9 and later.
1437
-  *)
1438
-    arm_list="binutils-aarch64-linux-gnu
1439
-              libc6-dev-armhf-cross
1440
-              linux-libc-dev-armhf-cross
1441
-              ${GPP_ARM_PACKAGE}"
1442
-    ;;
1443
-esac
1444
-
1445
-# Work around for dependency issue Ubuntu/Trusty: http://crbug.com/435056
1446
-case $distro_codename in
1447
-  trusty)
1448
-    arm_list+=" g++-4.8-multilib-arm-linux-gnueabihf
1449
-                gcc-4.8-multilib-arm-linux-gnueabihf"
1450
-    ;;
1451
-  xenial|yakkety)
1452
-    arm_list+=" g++-5-multilib-arm-linux-gnueabihf
1453
-                gcc-5-multilib-arm-linux-gnueabihf
1454
-                gcc-arm-linux-gnueabihf"
1455
-    ;;
1456
-esac
1457
-
1458
-# Packages to build NaCl, its toolchains, and its ports.
1459
-naclports_list="ant autoconf bison cmake gawk intltool xutils-dev xsltproc"
1460
-nacl_list="\
1461
-  g++-mingw-w64-i686
1462
-  lib32z1-dev
1463
-  libasound2:i386
1464
-  libcap2:i386
1465
-  libelf-dev:i386
1466
-  libfontconfig1:i386
1467
-  libgconf-2-4:i386
1468
-  libglib2.0-0:i386
1469
-  libgpm2:i386
1470
-  libgtk2.0-0:i386
1471
-  libgtk-3-0:i386
1472
-  libncurses5:i386
1473
-  lib32ncurses5-dev
1474
-  libnss3:i386
1475
-  libpango1.0-0:i386
1476
-  libssl-dev:i386
1477
-  libtinfo-dev
1478
-  libtinfo-dev:i386
1479
-  libtool
1480
-  libxcomposite1:i386
1481
-  libxcursor1:i386
1482
-  libxdamage1:i386
1483
-  libxi6:i386
1484
-  libxrandr2:i386
1485
-  libxss1:i386
1486
-  libxtst6:i386
1487
-  texinfo
1488
-  xvfb
1489
-  ${naclports_list}
1490
-"
1491
-
1492
-if package_exists libssl1.0.0; then
1493
-  nacl_list="${nacl_list} libssl1.0.0:i386"
1494
-else
1495
-  nacl_list="${nacl_list} libssl1.0.2:i386"
1496
-fi
1497
-
1498
-# Find the proper version of packages that depend on mesa. Only one -lts variant
1499
-# of mesa can be installed and everything that depends on it must match.
1500
-
1501
-# Query for the name and status of all mesa LTS variants, filter for only
1502
-# installed packages, extract just the name, and eliminate duplicates (there can
1503
-# be more than one with the same name in the case of multiarch). Expand into an
1504
-# array.
1505
-mesa_packages=($(dpkg-query -Wf'${package} ${status}\n' \
1506
-                            libgl1-mesa-glx-lts-\* 2>/dev/null | \
1507
-                 grep " ok installed" | cut -d " " -f 1 | sort -u))
1508
-if [ "${#mesa_packages[@]}" -eq 0 ]; then
1509
-  mesa_variant=""
1510
-elif [ "${#mesa_packages[@]}" -eq 1 ]; then
1511
-  # Strip the base package name and leave just "-lts-whatever"
1512
-  mesa_variant="${mesa_packages[0]#libgl1-mesa-glx}"
1513
-else
1514
-  echo "ERROR: unable to determine which libgl1-mesa-glx variant is installed."
1515
-  exit 1
1516
-fi
1517
-dev_list="${dev_list} libgbm-dev${mesa_variant}
1518
-          libgles2-mesa-dev${mesa_variant} libgl1-mesa-dev${mesa_variant}
1519
-          mesa-common-dev${mesa_variant}"
1520
-nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386"
1521
+dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libdbus-glib-1-2-dbg
1522
+          libfontconfig1-dbg libglib2.0-0-dbg libgtk2.0-0-dbg
1523
+          libpango1.0-0-dbg libpcre3-dbg libpixman-1-0-dbg
1524
+          libsqlite3-0-dbg
1525
+          libx11-6-dbg libxau6-dbg libxcb1-dbg libxcomposite1-dbg
1526
+          libxcursor1-dbg libxdamage1-dbg libxdmcp6-dbg libxext6-dbg
1527
+          libxfixes3-dbg libxi6-dbg libxinerama1-dbg libxrandr2-dbg
1528
+          libxrender1-dbg libxtst6-dbg zlib1g-dbg"
1529
+
1530
+# Plugin lists needed for tests.
1531
+plugin_list="flashplugin-installer"
1532
 
1533
 # Some package names have changed over time
1534
-if package_exists libpng12-0; then
1535
-  lib_list="${lib_list} libpng12-0"
1536
+if apt-cache show ttf-mscorefonts-installer >/dev/null 2>&1; then
1537
+  dev_list="${dev_list} ttf-mscorefonts-installer"
1538
 else
1539
-  lib_list="${lib_list} libpng16-16"
1540
+  dev_list="${dev_list} msttcorefonts"
1541
 fi
1542
-if package_exists libnspr4-dbg; then
1543
+if apt-cache show libnspr4-dbg >/dev/null 2>&1; then
1544
   dbg_list="${dbg_list} libnspr4-dbg libnss3-dbg"
1545
   lib_list="${lib_list} libnspr4 libnss3"
1546
 else
1547
   dbg_list="${dbg_list} libnspr4-0d-dbg libnss3-1d-dbg"
1548
   lib_list="${lib_list} libnspr4-0d libnss3-1d"
1549
 fi
1550
-if package_exists libjpeg-dev; then
1551
-  dev_list="${dev_list} libjpeg-dev"
1552
+if apt-cache show libjpeg-dev >/dev/null 2>&1; then
1553
+ dev_list="${dev_list} libjpeg-dev"
1554
 else
1555
-  dev_list="${dev_list} libjpeg62-dev"
1556
-fi
1557
-if package_exists libudev1; then
1558
-  dev_list="${dev_list} libudev1"
1559
-  nacl_list="${nacl_list} libudev1:i386"
1560
-else
1561
-  dev_list="${dev_list} libudev0"
1562
-  nacl_list="${nacl_list} libudev0:i386"
1563
-fi
1564
-if package_exists libbrlapi0.6; then
1565
-  dev_list="${dev_list} libbrlapi0.6"
1566
-else
1567
-  dev_list="${dev_list} libbrlapi0.5"
1568
-fi
1569
-if package_exists apache2-bin; then
1570
-  dev_list="${dev_list} apache2-bin"
1571
-else
1572
-  dev_list="${dev_list} apache2.2-bin"
1573
-fi
1574
-if package_exists xfonts-mathml; then
1575
-  dev_list="${dev_list} xfonts-mathml"
1576
-fi
1577
-if package_exists fonts-indic; then
1578
-  dev_list="${dev_list} fonts-indic"
1579
-else
1580
-  dev_list="${dev_list} ttf-indic-fonts"
1581
-fi
1582
-if package_exists php7.0-cgi; then
1583
-  dev_list="${dev_list} php7.0-cgi libapache2-mod-php7.0"
1584
-else
1585
-  dev_list="${dev_list} php5-cgi libapache2-mod-php5"
1586
-fi
1587
-# ttf-mscorefonts-installer is in the Debian contrib repo, which has
1588
-# dependencies on non-free software.  Install it only if the user has already
1589
-# enabled contrib.
1590
-if package_exists ttf-mscorefonts-installer; then
1591
-  dev_list="${dev_list} ttf-mscorefonts-installer"
1592
-elif package_exists msttcorefonts; then
1593
-  dev_list="${dev_list} msttcorefonts"
1594
-fi
1595
-# Ubuntu 16.04 has this package deleted.
1596
-if package_exists ttf-kochi-gothic; then
1597
-  dev_list="${dev_list} ttf-kochi-gothic"
1598
-fi
1599
-# Ubuntu 16.04 has this package deleted.
1600
-if package_exists ttf-kochi-mincho; then
1601
-  dev_list="${dev_list} ttf-kochi-mincho"
1602
+ dev_list="${dev_list} libjpeg62-dev"
1603
 fi
1604
 
1605
-# Some packages are only needed if the distribution actually supports
1606
+# Some packages are only needed, if the distribution actually supports
1607
 # installing them.
1608
-if package_exists appmenu-gtk; then
1609
+if apt-cache show appmenu-gtk >/dev/null 2>&1; then
1610
   lib_list="$lib_list appmenu-gtk"
1611
 fi
1612
 
1613
-# When cross building for arm/Android on 64-bit systems the host binaries
1614
-# that are part of v8 need to be compiled with -m32 which means
1615
-# that basic multilib support is needed.
1616
-if file -L /sbin/init | grep -q 'ELF 64-bit'; then
1617
-  # gcc-multilib conflicts with the arm cross compiler (at least in trusty) but
1618
-  # g++-X.Y-multilib gives us the 32-bit support that we need. Find out the
1619
-  # appropriate value of X and Y by seeing what version the current
1620
-  # distribution's g++-multilib package depends on.
1621
-  multilib_package=$(apt-cache depends g++-multilib --important | \
1622
-      grep -E --color=never --only-matching '\bg\+\+-[0-9.]+-multilib\b')
1623
-  lib32_list="$lib32_list $multilib_package"
1624
-fi
1625
+# Waits for the user to press 'Y' or 'N'. Either uppercase of lowercase is
1626
+# accepted. Returns 0 for 'Y' and 1 for 'N'. If an optional parameter has
1627
+# been provided to yes_no(), the function also accepts RETURN as a user input.
1628
+# The parameter specifies the exit code that should be returned in that case.
1629
+# The function will echo the user's selection followed by a newline character.
1630
+# Users can abort the function by pressing CTRL-C. This will call "exit 1".
1631
+yes_no() {
1632
+  if [ 0 -ne "${do_default-0}" ] ; then
1633
+    return $1
1634
+  fi
1635
+  local c
1636
+  while :; do
1637
+    c="$(trap 'stty echo -iuclc icanon 2>/dev/null' EXIT INT TERM QUIT
1638
+         stty -echo iuclc -icanon 2>/dev/null
1639
+         dd count=1 bs=1 2>/dev/null | od -An -tx1)"
1640
+    case "$c" in
1641
+      " 0a") if [ -n "$1" ]; then
1642
+               [ $1 -eq 0 ] && echo "Y" || echo "N"
1643
+               return $1
1644
+             fi
1645
+             ;;
1646
+      " 79") echo "Y"
1647
+             return 0
1648
+             ;;
1649
+      " 6e") echo "N"
1650
+             return 1
1651
+             ;;
1652
+      "")    echo "Aborted" >&2
1653
+             exit 1
1654
+             ;;
1655
+      *)     # The user pressed an unrecognized key. As we are not echoing
1656
+             # any incorrect user input, alert the user by ringing the bell.
1657
+             (tput bel) 2>/dev/null
1658
+             ;;
1659
+    esac
1660
+  done
1661
+}
1662
 
1663
-if test "$do_inst_syms" = "" && test 0 -eq ${do_quick_check-0}
1664
+if test "$do_inst_syms" = ""
1665
 then
1666
   echo "This script installs all tools and libraries needed to build Chromium."
1667
   echo ""
1668
@@ -527,81 +177,12 @@ then
1669
   fi
1670
 fi
1671
 if test "$do_inst_syms" = "1"; then
1672
-  echo "Including debugging symbols."
1673
-  # Many debug packages are not available in Debian stretch,
1674
-  # so exclude the ones that are missing.
1675
-  available_dbg_packages=""
1676
-  for package in ${dbg_list}; do
1677
-    if package_exists ${package}; then
1678
-      available_dbg_packages="${available_dbg_packages} ${package}"
1679
-    fi
1680
-  done
1681
-  dbg_list="${available_dbg_packages}"
1682
+  echo "Installing debugging symbols."
1683
 else
1684
-  echo "Skipping debugging symbols."
1685
+  echo "Skipping installation of debugging symbols."
1686
   dbg_list=
1687
 fi
1688
 
1689
-if test "$do_inst_lib32" = "1" ; then
1690
-  echo "Including 32-bit libraries for ARM/Android."
1691
-else
1692
-  echo "Skipping 32-bit libraries for ARM/Android."
1693
-  lib32_list=
1694
-fi
1695
-
1696
-if test "$do_inst_arm" = "1" ; then
1697
-  echo "Including ARM cross toolchain."
1698
-else
1699
-  echo "Skipping ARM cross toolchain."
1700
-  arm_list=
1701
-fi
1702
-
1703
-if test "$do_inst_nacl" = "1"; then
1704
-  echo "Including NaCl, NaCl toolchain, NaCl ports dependencies."
1705
-else
1706
-  echo "Skipping NaCl, NaCl toolchain, NaCl ports dependencies."
1707
-  nacl_list=
1708
-fi
1709
-
1710
-# The `sort -r -s -t: -k2` sorts all the :i386 packages to the front, to avoid
1711
-# confusing dpkg-query (crbug.com/446172).
1712
-packages="$(
1713
-  echo "${dev_list} ${lib_list} ${dbg_list} ${lib32_list} ${arm_list}"\
1714
-       "${nacl_list}" | tr " " "\n" | sort -u | sort -r -s -t: -k2 | tr "\n" " "
1715
-)"
1716
-
1717
-if [ 1 -eq "${do_quick_check-0}" ] ; then
1718
-  if ! missing_packages="$(dpkg-query -W -f ' ' ${packages} 2>&1)"; then
1719
-    # Distinguish between packages that actually aren't available to the
1720
-    # system (i.e. not in any repo) and packages that just aren't known to
1721
-    # dpkg (i.e. managed by apt).
1722
-    missing_packages="$(echo "${missing_packages}" | awk '{print $NF}')"
1723
-    not_installed=""
1724
-    unknown=""
1725
-    for p in ${missing_packages}; do
1726
-      if apt-cache show ${p} > /dev/null 2>&1; then
1727
-        not_installed="${p}\n${not_installed}"
1728
-      else
1729
-        unknown="${p}\n${unknown}"
1730
-      fi
1731
-    done
1732
-    if [ -n "${not_installed}" ]; then
1733
-      echo "WARNING: The following packages are not installed:"
1734
-      echo -e "${not_installed}" | sed -e "s/^/  /"
1735
-    fi
1736
-    if [ -n "${unknown}" ]; then
1737
-      echo "WARNING: The following packages are unknown to your system"
1738
-      echo "(maybe missing a repo or need to 'sudo apt-get update'):"
1739
-      echo -e "${unknown}" | sed -e "s/^/  /"
1740
-    fi
1741
-    exit 1
1742
-  fi
1743
-  exit 0
1744
-fi
1745
-
1746
-if test "$do_inst_lib32" = "1" || test "$do_inst_nacl" = "1"; then
1747
-  sudo dpkg --add-architecture i386
1748
-fi
1749
 sudo apt-get update
1750
 
1751
 # We initially run "apt-get" with the --reinstall option and parse its output.
1752
@@ -609,13 +190,14 @@ sudo apt-get update
1753
 # without accidentally promoting any packages from "auto" to "manual".
1754
 # We then re-run "apt-get" with just the list of missing packages.
1755
 echo "Finding missing packages..."
1756
+packages="${dev_list} ${lib_list} ${dbg_list} ${plugin_list}"
1757
 # Intentionally leaving $packages unquoted so it's more readable.
1758
 echo "Packages required: " $packages
1759
 echo
1760
 new_list_cmd="sudo apt-get install --reinstall $(echo $packages)"
1761
-if new_list="$(yes n | LANGUAGE=en LANG=C $new_list_cmd)"; then
1762
+if new_list="$(yes n | LANG=C $new_list_cmd)"; then
1763
   # We probably never hit this following line.
1764
-  echo "No missing packages, and the packages are up to date."
1765
+  echo "No missing packages, and the packages are up-to-date."
1766
 elif [ $? -eq 1 ]; then
1767
   # We expect apt-get to have exit status of 1.
1768
   # This indicates that we cancelled the install with "yes n|".
1769
@@ -623,7 +205,7 @@ elif [ $? -eq 1 ]; then
1770
     sed -e '1,/The following NEW packages will be installed:/d;s/^  //;t;d')
1771
   new_list=$(echo "$new_list" | sed 's/ *$//')
1772
   if [ -z "$new_list" ] ; then
1773
-    echo "No missing packages, and the packages are up to date."
1774
+    echo "No missing packages, and the packages are up-to-date."
1775
   else
1776
     echo "Installing missing packages: $new_list."
1777
     sudo apt-get install ${do_quietly-} ${new_list}
1778
@@ -644,44 +226,189 @@ else
1779
   exit 100
1780
 fi
1781
 
1782
-# Install the Chrome OS default fonts. This must go after running
1783
-# apt-get, since install-chromeos-fonts depends on curl.
1784
-if test "$do_inst_chromeos_fonts" != "0"; then
1785
-  echo
1786
-  echo "Installing Chrome OS fonts."
1787
-  dir=`echo $0 | sed -r -e 's/\/[^/]+$//'`
1788
-  if ! sudo $dir/linux/install-chromeos-fonts.py; then
1789
-    echo "ERROR: The installation of the Chrome OS default fonts failed."
1790
-    if [ `stat -f -c %T $dir` == "nfs" ]; then
1791
-      echo "The reason is that your repo is installed on a remote file system."
1792
-    else
1793
-      echo "This is expected if your repo is installed on a remote file system."
1794
-    fi
1795
-    echo "It is recommended to install your repo on a local file system."
1796
-    echo "You can skip the installation of the Chrome OS default founts with"
1797
-    echo "the command line option: --no-chromeos-fonts."
1798
-    exit 1
1799
+# Install 32bit backwards compatibility support for 64bit systems
1800
+if [ "$(uname -m)" = "x86_64" ]; then
1801
+  if test "$do_inst_lib32" = ""
1802
+  then
1803
+    echo "We no longer recommend that you use this script to install"
1804
+    echo "32bit libraries on a 64bit system. Instead, consider using"
1805
+    echo "the install-chroot.sh script to help you set up a 32bit"
1806
+    echo "environment for building and testing 32bit versions of Chrome."
1807
+    echo
1808
+    echo "If you nonetheless want to try installing 32bit libraries"
1809
+    echo "directly, you can do so by explicitly passing the --lib32"
1810
+    echo "option to install-build-deps.sh."
1811
+  fi
1812
+  if test "$do_inst_lib32" != "1"
1813
+  then
1814
+    echo "Exiting without installing any 32bit libraries."
1815
+    exit 0
1816
   fi
1817
-else
1818
-  echo "Skipping installation of Chrome OS fonts."
1819
-fi
1820
 
1821
-echo "Installing locales."
1822
-CHROMIUM_LOCALES="da_DK.UTF-8 fr_FR.UTF-8 he_IL.UTF-8 zh_TW.UTF-8"
1823
-LOCALE_GEN=/etc/locale.gen
1824
-if [ -e ${LOCALE_GEN} ]; then
1825
-  OLD_LOCALE_GEN="$(cat /etc/locale.gen)"
1826
-  for CHROMIUM_LOCALE in ${CHROMIUM_LOCALES}; do
1827
-    sudo sed -i "s/^# ${CHROMIUM_LOCALE}/${CHROMIUM_LOCALE}/" ${LOCALE_GEN}
1828
-  done
1829
-  # Regenerating locales can take a while, so only do it if we need to.
1830
-  if (echo "${OLD_LOCALE_GEN}" | cmp -s ${LOCALE_GEN}); then
1831
-    echo "Locales already up-to-date."
1832
+  echo "N.B. the code for installing 32bit libraries on a 64bit"
1833
+  echo "     system is no longer actively maintained and might"
1834
+  echo "     not work with modern versions of Ubuntu or Debian."
1835
+  echo
1836
+
1837
+  # Standard 32bit compatibility libraries
1838
+  echo "First, installing the limited existing 32-bit support..."
1839
+  cmp_list="ia32-libs lib32asound2-dev lib32stdc++6 lib32z1
1840
+            lib32z1-dev libc6-dev-i386 libc6-i386 g++-multilib"
1841
+  if [ -n "`apt-cache search lib32readline-gplv2-dev 2>/dev/null`" ]; then
1842
+    cmp_list="${cmp_list} lib32readline-gplv2-dev"
1843
   else
1844
-    sudo locale-gen
1845
+    cmp_list="${cmp_list} lib32readline5-dev"
1846
   fi
1847
-else
1848
-  for CHROMIUM_LOCALE in ${CHROMIUM_LOCALES}; do
1849
-    sudo locale-gen ${CHROMIUM_LOCALE}
1850
+  sudo apt-get install ${do_quietly-} $cmp_list
1851
+
1852
+  tmp=/tmp/install-32bit.$$
1853
+  trap 'rm -rf "${tmp}"' EXIT INT TERM QUIT
1854
+  mkdir -p "${tmp}/apt/lists/partial" "${tmp}/cache" "${tmp}/partial"
1855
+  touch "${tmp}/status"
1856
+
1857
+  [ -r /etc/apt/apt.conf ] && cp /etc/apt/apt.conf "${tmp}/apt/"
1858
+  cat >>"${tmp}/apt/apt.conf" <<EOF
1859
+        Apt::Architecture "i386";
1860
+        Dir::Cache "${tmp}/cache";
1861
+        Dir::Cache::Archives "${tmp}/";
1862
+        Dir::State::Lists "${tmp}/apt/lists/";
1863
+        Dir::State::status "${tmp}/status";
1864
+EOF
1865
+
1866
+  # Download 32bit packages
1867
+  echo "Computing list of available 32bit packages..."
1868
+  sudo apt-get -c="${tmp}/apt/apt.conf" update
1869
+
1870
+  echo "Downloading available 32bit packages..."
1871
+  sudo apt-get -c="${tmp}/apt/apt.conf" \
1872
+          --yes --download-only --force-yes --reinstall install \
1873
+          ${lib_list} ${dbg_list}
1874
+
1875
+  # Open packages, remove everything that is not a library, move the
1876
+  # library to a lib32 directory and package everything as a *.deb file.
1877
+  echo "Repackaging and installing 32bit packages for use on 64bit systems..."
1878
+  for i in ${lib_list} ${dbg_list}; do
1879
+    orig="$(echo "${tmp}/${i}"_*_i386.deb)"
1880
+    compat="$(echo "${orig}" |
1881
+              sed -e 's,\(_[^_/]*_\)i386\(.deb\),-ia32\1amd64\2,')"
1882
+    rm -rf "${tmp}/staging"
1883
+    msg="$(fakeroot -u sh -exc '
1884
+      # Unpack 32bit Debian archive
1885
+      umask 022
1886
+      mkdir -p "'"${tmp}"'/staging/dpkg/DEBIAN"
1887
+      cd "'"${tmp}"'/staging"
1888
+      ar x "'${orig}'"
1889
+      tar zCfx dpkg data.tar.gz
1890
+      tar zCfx dpkg/DEBIAN control.tar.gz
1891
+
1892
+      # Create a posix extended regular expression fragment that will
1893
+      # recognize the includes which have changed. Should be rare,
1894
+      # will almost always be empty.
1895
+      includes=`sed -n -e "s/^[0-9a-z]*  //g" \
1896
+                       -e "\,usr/include/,p" dpkg/DEBIAN/md5sums |
1897
+                  xargs -n 1 -I FILE /bin/sh -c \
1898
+                    "cmp -s dpkg/FILE /FILE || echo FILE" |
1899
+                  tr "\n" "|" |
1900
+                  sed -e "s,|$,,"`
1901
+
1902
+      # If empty, set it to not match anything.
1903
+      test -z "$includes" && includes="^//"
1904
+
1905
+      # Turn the conflicts into an extended RE for removal from the
1906
+      # Provides line.
1907
+      conflicts=`sed -n -e "/Conflicts/s/Conflicts: *//;T;s/, */|/g;p" \
1908
+                   dpkg/DEBIAN/control`
1909
+
1910
+      # Rename package, change architecture, remove conflicts and dependencies
1911
+      sed -r -i                              \
1912
+          -e "/Package/s/$/-ia32/"           \
1913
+          -e "/Architecture/s/:.*$/: amd64/" \
1914
+          -e "/Depends/s/:.*/: ia32-libs/"   \
1915
+          -e "/Provides/s/($conflicts)(, *)?//g;T1;s/, *$//;:1"   \
1916
+          -e "/Recommends/d"                 \
1917
+          -e "/Conflicts/d"                  \
1918
+        dpkg/DEBIAN/control
1919
+
1920
+      # Only keep files that live in "lib" directories or the includes
1921
+      # that have changed.
1922
+      sed -r -i                                                               \
1923
+          -e "/\/lib64\//d" -e "/\/.?bin\//d"                                 \
1924
+          -e "\,$includes,s,[ /]include/,&32/,g;s,include/32/,include32/,g"   \
1925
+          -e "s, lib/, lib32/,g"                                              \
1926
+          -e "s,/lib/,/lib32/,g"                                              \
1927
+          -e "t;d"                                                            \
1928
+          -e "\,^/usr/lib32/debug\(.*/lib32\),s,^/usr/lib32/debug,/usr/lib/debug," \
1929
+        dpkg/DEBIAN/md5sums
1930
+
1931
+      # Re-run ldconfig after installation/removal
1932
+      { echo "#!/bin/sh"; echo "[ \"x\$1\" = xconfigure ]&&ldconfig||:"; } \
1933
+        >dpkg/DEBIAN/postinst
1934
+      { echo "#!/bin/sh"; echo "[ \"x\$1\" = xremove ]&&ldconfig||:"; } \
1935
+        >dpkg/DEBIAN/postrm
1936
+      chmod 755 dpkg/DEBIAN/postinst dpkg/DEBIAN/postrm
1937
+
1938
+      # Remove any other control files
1939
+      find dpkg/DEBIAN -mindepth 1 "(" -name control -o -name md5sums -o \
1940
+                       -name postinst -o -name postrm ")" -o -print |
1941
+        xargs -r rm -rf
1942
+
1943
+      # Remove any files/dirs that live outside of "lib" directories,
1944
+      # or are not in our list of changed includes.
1945
+      find dpkg -mindepth 1 -regextype posix-extended \
1946
+          "(" -name DEBIAN -o -name lib -o -regex "dpkg/($includes)" ")" \
1947
+          -prune -o -print | tac |
1948
+        xargs -r -n 1 sh -c "rm \$0 2>/dev/null || rmdir \$0 2>/dev/null || : "
1949
+      find dpkg -name lib64 -o -name bin -o -name "?bin" |
1950
+        tac | xargs -r rm -rf
1951
+
1952
+      # Remove any symbolic links that were broken by the above steps.
1953
+      find -L dpkg -type l -print | tac | xargs -r rm -rf
1954
+
1955
+      # Rename lib to lib32, but keep debug symbols in /usr/lib/debug/usr/lib32
1956
+      # That is where gdb looks for them.
1957
+      find dpkg -type d -o -path "*/lib/*" -print |
1958
+        xargs -r -n 1 sh -c "
1959
+          i=\$(echo \"\${0}\" |
1960
+               sed -e s,/lib/,/lib32/,g \
1961
+               -e s,/usr/lib32/debug\\\\\(.*/lib32\\\\\),/usr/lib/debug\\\\1,);
1962
+          mkdir -p \"\${i%/*}\";
1963
+          mv \"\${0}\" \"\${i}\""
1964
+
1965
+      # Rename include to include32.
1966
+      [ -d "dpkg/usr/include" ] && mv "dpkg/usr/include" "dpkg/usr/include32"
1967
+
1968
+      # Prune any empty directories
1969
+      find dpkg -type d | tac | xargs -r -n 1 rmdir 2>/dev/null || :
1970
+
1971
+      # Create our own Debian package
1972
+      cd ..
1973
+      dpkg --build staging/dpkg .' 2>&1)"
1974
+    compat="$(eval echo $(echo "${compat}" |
1975
+                          sed -e 's,_[^_/]*_amd64.deb,_*_amd64.deb,'))"
1976
+    [ -r "${compat}" ] || {
1977
+      echo "${msg}" >&2
1978
+      echo "Failed to build new Debian archive!" >&2
1979
+      exit 1
1980
+    }
1981
+
1982
+    msg="$(sudo dpkg -i "${compat}" 2>&1)" && {
1983
+        echo "Installed ${compat##*/}"
1984
+      } || {
1985
+        # echo "${msg}" >&2
1986
+        echo "Skipped ${compat##*/}"
1987
+      }
1988
+  done
1989
+
1990
+  # Add symbolic links for developing 32bit code
1991
+  echo "Adding missing symbolic links, enabling 32bit code development..."
1992
+  for i in $(find /lib32 /usr/lib32 -maxdepth 1 -name \*.so.\* |
1993
+             sed -e 's/[.]so[.][0-9].*/.so/' |
1994
+             sort -u); do
1995
+    [ "x${i##*/}" = "xld-linux.so" ] && continue
1996
+    [ -r "$i" ] && continue
1997
+    j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' |
1998
+         sort -n | tail -n 1)"
1999
+    [ -r "$i.$j" ] || continue
2000
+    sudo ln -s "${i##*/}.$j" "$i"
2001
   done
2002
 fi
2003
diff --git media/webrtc/trunk/build/install-chroot.sh media/webrtc/trunk/build/install-chroot.sh
2004
index 99451ed7ea49..d2c06fc39adc 100755
2005
--- media/webrtc/trunk/build/install-chroot.sh
2006
+++ media/webrtc/trunk/build/install-chroot.sh
2007
@@ -12,7 +12,7 @@
2008
 
2009
 # Older Debian based systems had both "admin" and "adm" groups, with "admin"
2010
 # apparently being used in more places. Newer distributions have standardized
2011
-# on just the "adm" group. Check /etc/group for the preferred name of the
2012
+# on just the "adm" group. Check /etc/group for the prefered name of the
2013
 # administrator group.
2014
 admin=$(grep '^admin:' /etc/group >&/dev/null && echo admin || echo adm)
2015
 
2016
@@ -223,8 +223,7 @@ target="${distname}${arch}"
2017
       d|D) sudo rm -rf "/var/lib/chroot/${target}"      \
2018
                        "/usr/local/bin/${target%bit}"   \
2019
                        "/etc/schroot/mount-${target}"   \
2020
-                       "/etc/schroot/script-${target}"  \
2021
-                       "/etc/schroot/${target}"
2022
+                       "/etc/schroot/script-${target}"
2023
            sudo sed -ni '/^[[]'"${target%bit}"']$/,${
2024
                          :1;n;/^[[]/b2;b1;:2;p;n;b2};p' \
2025
                        "/etc/schroot/schroot.conf"
2026
@@ -350,41 +349,13 @@ grep -qs ubuntu.com /usr/share/debootstrap/scripts/"${distname}" &&
2027
 if [ -z "${chroot_groups}" ]; then
2028
   chroot_groups="${admin},$(id -gn)"
2029
 fi
2030
-
2031
-if [ -d '/etc/schroot/default' ]; then
2032
-  new_version=1
2033
-  fstab="/etc/schroot/${target}/fstab"
2034
-else
2035
-  new_version=0
2036
-  fstab="/etc/schroot/mount-${target}"
2037
-fi
2038
-
2039
-if [ "$new_version" = "1" ]; then
2040
-  sudo cp -ar /etc/schroot/default /etc/schroot/${target}
2041
-
2042
-  sudo sh -c 'cat >>/etc/schroot/schroot.conf' <<EOF
2043
-[${target%bit}]
2044
-description=${brand} ${distname} ${arch}
2045
-type=directory
2046
-directory=/var/lib/chroot/${target}
2047
-users=root
2048
-groups=${chroot_groups}
2049
-root-groups=${chroot_groups}
2050
-personality=linux$([ "${arch}" != 64bit ] && echo 32)
2051
-profile=${target}
2052
-
2053
-EOF
2054
-  [ -n "${bind_mounts}" -a "${bind_mounts}" != "NONE" ] &&
2055
-    printf "${bind_mounts}" |
2056
-      sudo sh -c "cat >>${fstab}"
2057
-else
2058
-  # Older versions of schroot wanted a "priority=" line, whereas recent
2059
-  # versions deprecate "priority=" and warn if they see it. We don't have
2060
-  # a good feature test, but scanning for the string "priority=" in the
2061
-  # existing "schroot.conf" file is a good indication of what to do.
2062
-  priority=$(grep -qs 'priority=' /etc/schroot/schroot.conf &&
2063
+# Older versions of schroot wanted a "priority=" line, whereas recent
2064
+# versions deprecate "priority=" and warn if they see it. We don't have
2065
+# a good feature test, but scanning for the string "priority=" in the
2066
+# existing "schroot.conf" file is a good indication of what to do.
2067
+priority=$(grep -qs 'priority=' /etc/schroot/schroot.conf &&
2068
            echo 'priority=3' || :)
2069
-  sudo sh -c 'cat >>/etc/schroot/schroot.conf' <<EOF
2070
+sudo sh -c 'cat >>/etc/schroot/schroot.conf' <<EOF
2071
 [${target%bit}]
2072
 description=${brand} ${distname} ${arch}
2073
 type=directory
2074
@@ -398,43 +369,38 @@ ${priority}
2075
 
2076
 EOF
2077
 
2078
-  # Set up a list of mount points that is specific to this
2079
-  # chroot environment.
2080
-  sed '/^FSTAB=/s,"[^"]*","'"${fstab}"'",' \
2081
-           /etc/schroot/script-defaults |
2082
-    sudo sh -c 'cat >/etc/schroot/script-'"${target}"
2083
-  sed '\,^/home[/[:space:]],s/\([,[:space:]]\)bind[[:space:]]/\1rbind /' \
2084
-    /etc/schroot/mount-defaults |
2085
-    sudo sh -c "cat > ${fstab}"
2086
-fi
2087
+# Set up a list of mount points that is specific to this
2088
+# chroot environment.
2089
+sed '/^FSTAB=/s,"[^"]*","/etc/schroot/mount-'"${target}"'",' \
2090
+         /etc/schroot/script-defaults |
2091
+  sudo sh -c 'cat >/etc/schroot/script-'"${target}"
2092
+sed '\,^/home[/[:space:]],s/\([,[:space:]]\)bind[[:space:]]/\1rbind /' \
2093
+  /etc/schroot/mount-defaults |
2094
+  sudo sh -c 'cat > /etc/schroot/mount-'"${target}"
2095
 
2096
 # Add the extra mount points that the user told us about
2097
 [ -n "${bind_mounts}" -a "${bind_mounts}" != "NONE" ] &&
2098
   printf "${bind_mounts}" |
2099
-    sudo sh -c 'cat >>'"${fstab}"
2100
+    sudo sh -c 'cat >>/etc/schroot/mount-'"${target}"
2101
 
2102
 # If this system has a "/media" mountpoint, import it into the chroot
2103
 # environment. Most modern distributions use this mount point to
2104
 # automatically mount devices such as CDROMs, USB sticks, etc...
2105
 if [ -d /media ] &&
2106
-   ! grep -qs '^/media' "${fstab}"; then
2107
+   ! grep -qs '^/media' /etc/schroot/mount-"${target}"; then
2108
   echo '/media /media none rw,rbind 0 0' |
2109
-    sudo sh -c 'cat >>'"${fstab}"
2110
+    sudo sh -c 'cat >>/etc/schroot/mount-'"${target}"
2111
 fi
2112
 
2113
-# Share /dev/shm, /run and /run/shm.
2114
-grep -qs '^/dev/shm' "${fstab}" ||
2115
+# Share /dev/shm and possibly /run/shm
2116
+grep -qs '^/dev/shm' /etc/schroot/mount-"${target}" ||
2117
   echo '/dev/shm /dev/shm none rw,bind 0 0' |
2118
-    sudo sh -c 'cat >>'"${fstab}"
2119
-if [ ! -d "/var/lib/chroot/${target}/run" ] &&
2120
-   ! grep -qs '^/run' "${fstab}"; then
2121
-  echo '/run /run none rw,bind 0 0' |
2122
-    sudo sh -c 'cat >>'"${fstab}"
2123
-fi
2124
-if ! grep -qs '^/run/shm' "${fstab}"; then
2125
+    sudo sh -c 'cat >>/etc/schroot/mount-'"${target}"
2126
+if [ -d "/var/lib/chroot/${target}/run" ] &&
2127
+   ! grep -qs '^/run/shm' /etc/schroot/mount-"${target}"; then
2128
   { [ -d /run ] && echo '/run/shm /run/shm none rw,bind 0 0' ||
2129
                    echo '/dev/shm /run/shm none rw,bind 0 0'; } |
2130
-    sudo sh -c 'cat >>'"${fstab}"
2131
+    sudo sh -c 'cat >>/etc/schroot/mount-'"${target}"
2132
 fi
2133
 
2134
 # Set up a special directory that changes contents depending on the target
2135
@@ -442,7 +408,7 @@ fi
2136
 d="$(readlink -f "${HOME}/chroot" 2>/dev/null || echo "${HOME}/chroot")"
2137
 s="${d}/.${target}"
2138
 echo "${s} ${d} none rw,bind 0 0" |
2139
-  sudo sh -c 'cat >>'"${target}"
2140
+  sudo sh -c 'cat >>/etc/schroot/mount-'"${target}"
2141
 mkdir -p "${s}"
2142
 
2143
 # Install a helper script to launch commands in the chroot
2144
@@ -527,69 +493,27 @@ while [ "$#" -ne 0 ]; do
2145
   esac
2146
 done
2147
 
2148
-# Start a new chroot session and keep track of the session id. We inject this
2149
-# id into all processes that run inside the chroot. Unless they go out of their
2150
-# way to clear their environment, we can then later identify our child and
2151
-# grand-child processes by scanning their environment.
2152
 session="$(schroot -c "${chroot}" -b)"
2153
-export CHROOT_SESSION_ID="${session}"
2154
-
2155
-# Set GOMA_TMP_DIR for better handling of goma inside chroot.
2156
-export GOMA_TMP_DIR="/tmp/goma_tmp_$CHROOT_SESSION_ID"
2157
-mkdir -p "$GOMA_TMP_DIR"
2158
 
2159
 if [ $# -eq 0 ]; then
2160
-  # Run an interactive shell session
2161
   schroot -c "${session}" -r -p
2162
 else
2163
-  # Run a command inside of the chroot environment
2164
   p="$1"; shift
2165
   schroot -c "${session}" -r -p "$p" -- "$@"
2166
 fi
2167
 rc=$?
2168
 
2169
-# Compute the inode of the root directory inside of the chroot environment.
2170
 i=$(schroot -c "${session}" -r -p ls -- -id /proc/self/root/. |
2171
      awk '{ print $1 }') 2>/dev/null
2172
-other_pids=
2173
 while [ -n "$i" ]; do
2174
-  # Identify processes by the inode number of their root directory. Then
2175
-  # remove all processes that we know belong to other sessions. We use
2176
-  # "sort | uniq -u" to do what amounts to a "set substraction operation".
2177
-  pids=$({ ls -id1 /proc/*/root/. 2>/dev/null |
2178
+  pids=$(ls -id1 /proc/*/root/. 2>/dev/null |
2179
          sed -e 's,^[^0-9]*'$i'.*/\([1-9][0-9]*\)/.*$,\1,
2180
                  t
2181
-                 d';
2182
-         echo "${other_pids}";
2183
-         echo "${other_pids}"; } | sort | uniq -u) >/dev/null 2>&1
2184
-  # Kill all processes that are still left running in the session. This is
2185
-  # typically an assortment of daemon processes that were started
2186
-  # automatically. They result in us being unable to tear down the session
2187
-  # cleanly.
2188
-  [ -z "${pids}" ] && break
2189
-  for j in $pids; do
2190
-    # Unfortunately, the way that schroot sets up sessions has the
2191
-    # side-effect of being unable to tell one session apart from another.
2192
-    # This can result in us attempting to kill processes in other sessions.
2193
-    # We make a best-effort to avoid doing so.
2194
-    k="$( ( xargs -0 -n1 </proc/$j/environ ) 2>/dev/null |
2195
-         sed 's/^CHROOT_SESSION_ID=/x/;t1;d;:1;q')"
2196
-    if [ -n "${k}" -a "${k#x}" != "${session}" ]; then
2197
-      other_pids="${other_pids}
2198
-${j}"
2199
-      continue
2200
-    fi
2201
-    kill -9 $pids
2202
-  done
2203
+                 d') >/dev/null 2>&1
2204
+  [ -z "$pids" ] && break
2205
+  kill -9 $pids
2206
 done
2207
-# End the chroot session. This should clean up all temporary files. But if we
2208
-# earlier failed to terminate all (daemon) processes inside of the session,
2209
-# deleting the session could fail. When that happens, the user has to manually
2210
-# clean up the stale files by invoking us with "--clean" after having killed
2211
-# all running processes.
2212
 schroot -c "${session}" -e
2213
-# Since no goma processes are running, we can remove goma directory.
2214
-rm -rf "$GOMA_TMP_DIR"
2215
 exit $rc
2216
 EOF
2217
 sudo chown root:root /usr/local/bin/"${target%bit}"
2218
@@ -659,12 +583,9 @@ sudo "/usr/local/bin/${target%bit}" dpkg --assert-multi-arch >&/dev/null &&
2219
   sudo sed -i 's/ / [arch=amd64,i386] /' \
2220
               "/var/lib/chroot/${target}/etc/apt/sources.list"
2221
   [ -d /var/lib/chroot/${target}/etc/dpkg/dpkg.cfg.d/ ] &&
2222
-  sudo "/usr/local/bin/${target%bit}" dpkg --add-architecture \
2223
-      $([ "${arch}" = "32bit" ] && echo amd64 || echo i386) >&/dev/null ||
2224
-    echo foreign-architecture \
2225
-        $([ "${arch}" = "32bit" ] && echo amd64 || echo i386) |
2226
-      sudo sh -c \
2227
-        "cat >'/var/lib/chroot/${target}/etc/dpkg/dpkg.cfg.d/multiarch'"
2228
+  echo foreign-architecture \
2229
+       $([ "${arch}" = "32bit" ] && echo amd64 || echo i386) |
2230
+    sudo sh -c "cat >'/var/lib/chroot/${target}/etc/dpkg/dpkg.cfg.d/multiarch'"
2231
 }
2232
 
2233
 # Configure "sudo" package
2234
@@ -675,7 +596,7 @@ sudo "/usr/local/bin/${target%bit}" /bin/sh -c '
2235
 # Install a few more commonly used packages
2236
 sudo "/usr/local/bin/${target%bit}" apt-get -y install                         \
2237
   autoconf automake1.9 dpkg-dev g++-multilib gcc-multilib gdb less libtool     \
2238
-  lsof strace
2239
+  strace
2240
 
2241
 # If running a 32bit environment on a 64bit machine, install a few binaries
2242
 # as 64bit. This is only done automatically if the chroot distro is the same as
2243
@@ -689,7 +610,7 @@ if [ "${copy_64}" = "y" -o \
2244
   readlinepkg=$(sudo "/usr/local/bin/${target%bit}" sh -c \
2245
     'apt-cache search "lib64readline.\$" | sort | tail -n 1 | cut -d " " -f 1')
2246
   sudo "/usr/local/bin/${target%bit}" apt-get -y install                       \
2247
-    lib64expat1 lib64ncurses5 ${readlinepkg} lib64z1 lib64stdc++6
2248
+    lib64expat1 lib64ncurses5 ${readlinepkg} lib64z1
2249
   dep=
2250
   for i in binutils gdb; do
2251
     [ -d /usr/share/doc/"$i" ] || dep="$dep $i"
2252
@@ -747,7 +668,7 @@ if [ -x "${script}" ]; then
2253
         # installing the Chrome build depencies. This prevents the chroot
2254
         # session from being closed.  So, we always try to shut down any running
2255
         # instance of dbus and rsyslog.
2256
-        sudo /usr/local/bin/"${target%bit}" sh -c "${script};
2257
+        sudo /usr/local/bin/"${target%bit}" sh -c "${script} --no-lib32;
2258
               rc=$?;
2259
               /etc/init.d/cron stop >/dev/null 2>&1 || :;
2260
               /etc/init.d/rsyslog stop >/dev/null 2>&1 || :;
2261
@@ -848,7 +769,7 @@ if [ ! -h "${HOME}/chroot" ] &&
2262
 fi
2263
 
2264
 # Clean up package files
2265
-sudo schroot -c "${target%bit}" -p -- apt-get clean
2266
+sudo schroot -c /usr/local/bin/"${target%bit}" -p -- apt-get clean
2267
 sudo apt-get clean
2268
 
2269
 trap '' INT TERM QUIT HUP
2270
diff --git media/webrtc/trunk/build/linux/chrome_linux.croc media/webrtc/trunk/build/linux/chrome_linux.croc
2271
new file mode 100644
2272
index 000000000000..f4003060f69c
2273
--- /dev/null
2274
+++ media/webrtc/trunk/build/linux/chrome_linux.croc
2275
@@ -0,0 +1,29 @@
2276
+# -*- python -*-
2277
+# Crocodile config file for Chromium linux
2278
+
2279
+# TODO(jhawkins): We'll need to add a chromeos.croc once we get a coverage bot
2280
+# for that platform.
2281
+
2282
+{
2283
+  # List of rules, applied in order
2284
+  'rules' : [
2285
+    # Specify inclusions before exclusions, since rules are in order.
2286
+
2287
+    # Don't include non-Linux platform dirs
2288
+    {
2289
+      'regexp' : '.*/(chromeos|views)/',
2290
+      'include' : 0,
2291
+    },
2292
+    # Don't include chromeos, windows, or mac specific files
2293
+    {
2294
+      'regexp' : '.*(_|/)(chromeos|mac|win|views)(\\.|_)',
2295
+      'include' : 0,
2296
+    },
2297
+
2298
+    # Groups
2299
+    {
2300
+      'regexp' : '.*_test_linux\\.',
2301
+      'group' : 'test',
2302
+    },
2303
+  ],
2304
+}
2305
diff --git media/webrtc/trunk/build/linux/dump_app_syms media/webrtc/trunk/build/linux/dump_app_syms
2306
new file mode 100755
2307
index 000000000000..632bcc76a954
2308
--- /dev/null
2309
+++ media/webrtc/trunk/build/linux/dump_app_syms
2310
@@ -0,0 +1,36 @@
2311
+#!/bin/sh
2312
+
2313
+# Copyright (c) 2010 The Chromium Authors. All rights reserved.
2314
+# Use of this source code is governed by a BSD-style license that can be
2315
+# found in the LICENSE file.
2316
+#
2317
+# Helper script to run dump_syms on Chrome Linux executables and strip
2318
+# them if needed.
2319
+
2320
+set -e
2321
+
2322
+usage() {
2323
+  echo -n "$0 <dump_syms_exe> <strip_binary> " >&2
2324
+  echo "<binary_with_symbols> <symbols_output>" >&2
2325
+}
2326
+
2327
+
2328
+if [ $# -ne 4 ]; then
2329
+  usage
2330
+  exit 1
2331
+fi
2332
+
2333
+SCRIPTDIR="$(readlink -f "$(dirname "$0")")"
2334
+DUMPSYMS="$1"
2335
+STRIP_BINARY="$2"
2336
+INFILE="$3"
2337
+OUTFILE="$4"
2338
+
2339
+# Dump the symbols from the given binary.
2340
+if [ ! -e "$OUTFILE" -o "$INFILE" -nt "$OUTFILE" ]; then
2341
+  "$DUMPSYMS" "$INFILE" > "$OUTFILE"
2342
+fi
2343
+
2344
+if [ "$STRIP_BINARY" != "0" ]; then
2345
+  strip "$INFILE"
2346
+fi
2347
diff --git media/webrtc/trunk/build/linux/pkg-config-wrapper media/webrtc/trunk/build/linux/pkg-config-wrapper
2348
new file mode 100755
2349
index 000000000000..c39e5cd3f38c
2350
--- /dev/null
2351
+++ media/webrtc/trunk/build/linux/pkg-config-wrapper
2352
@@ -0,0 +1,47 @@
2353
+#!/bin/bash
2354
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
2355
+# Use of this source code is governed by a BSD-style license that can be
2356
+# found in the LICENSE file.
2357
+
2358
+# This program wraps around pkg-config to generate the correct include and
2359
+# library paths when cross-compiling using a sysroot.
2360
+# The assumption is that the sysroot contains the .pc files in usr/lib/pkgconfig
2361
+# and usr/share/pkgconfig (relative to the sysroot) and that they output paths
2362
+# relative to some parent path of the sysroot.
2363
+# This assumption is valid for a range of sysroots, in particular: a
2364
+# LSB-compliant root filesystem mounted at the sysroot, and a board build
2365
+# directory of a Chromium OS chroot.
2366
+
2367
+root="$1"
2368
+shift
2369
+target_arch="$1"
2370
+shift
2371
+
2372
+if [ -z "$root" -o -z "$target_arch" ]
2373
+then
2374
+  echo "usage: $0 /path/to/sysroot target_arch [pkg-config-arguments] package" >&2
2375
+  exit 1
2376
+fi
2377
+
2378
+if [ "$target_arch" = "x64" ]
2379
+then
2380
+  libpath="lib64"
2381
+else
2382
+  libpath="lib"
2383
+fi
2384
+
2385
+rewrite=`dirname $0`/rewrite_dirs.py
2386
+package=${!#}
2387
+
2388
+config_path=$root/usr/$libpath/pkgconfig:$root/usr/share/pkgconfig
2389
+set -e
2390
+# Some sysroots, like the Chromium OS ones, may generate paths that are not
2391
+# relative to the sysroot. For example,
2392
+# /path/to/chroot/build/x86-generic/usr/lib/pkgconfig/pkg.pc may have all paths
2393
+# relative to /path/to/chroot (i.e. prefix=/build/x86-generic/usr) instead of
2394
+# relative to /path/to/chroot/build/x86-generic (i.e prefix=/usr).
2395
+# To support this correctly, it's necessary to extract the prefix to strip from
2396
+# pkg-config's |prefix| variable.
2397
+prefix=`PKG_CONFIG_PATH=$config_path pkg-config --variable=prefix "$package" | sed -e 's|/usr$||'`
2398
+result=`PKG_CONFIG_PATH=$config_path pkg-config "$@"`
2399
+echo "$result"| $rewrite --sysroot "$root" --strip-prefix "$prefix"
2400
diff --git media/webrtc/trunk/build/linux/python_arch.sh media/webrtc/trunk/build/linux/python_arch.sh
2401
new file mode 100755
2402
index 000000000000..01e41d066e2a
2403
--- /dev/null
2404
+++ media/webrtc/trunk/build/linux/python_arch.sh
2405
@@ -0,0 +1,42 @@
2406
+#!/bin/sh
2407
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
2408
+# Use of this source code is governed by a BSD-style license that can be
2409
+# found in the LICENSE file.
2410
+
2411
+# This figures out the architecture of the version of Python we are building
2412
+# pyautolib against.
2413
+#
2414
+#  python_arch.sh /usr/lib/libpython2.5.so.1.0
2415
+#  python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0
2416
+#
2417
+
2418
+python=$(readlink -f "$1")
2419
+if [ ! -r "$python" ]; then
2420
+  echo unknown
2421
+  exit 0
2422
+fi
2423
+file_out=$(file "$python")
2424
+if [ $? -ne 0 ]; then
2425
+  echo unknown
2426
+  exit 0
2427
+fi
2428
+
2429
+echo $file_out | grep -qs "ARM"
2430
+if [ $? -eq 0 ]; then
2431
+  echo arm
2432
+  exit 0
2433
+fi
2434
+
2435
+echo $file_out | grep -qs "x86-64"
2436
+if [ $? -eq 0 ]; then
2437
+  echo x64
2438
+  exit 0
2439
+fi
2440
+
2441
+echo $file_out | grep -qs "Intel 80386"
2442
+if [ $? -eq 0 ]; then
2443
+  echo ia32
2444
+  exit 0
2445
+fi
2446
+
2447
+exit 1
2448
diff --git media/webrtc/trunk/build/linux/rewrite_dirs.py media/webrtc/trunk/build/linux/rewrite_dirs.py
2449
new file mode 100755
2450
index 000000000000..30f22f0cd617
2451
--- /dev/null
2452
+++ media/webrtc/trunk/build/linux/rewrite_dirs.py
2453
@@ -0,0 +1,71 @@
2454
+#!/usr/bin/env python
2455
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
2456
+# Use of this source code is governed by a BSD-style license that can be
2457
+# found in the LICENSE file.
2458
+
2459
+"""Rewrites paths in -I, -L and other option to be relative to a sysroot."""
2460
+
2461
+import sys
2462
+import os
2463
+import optparse
2464
+
2465
+REWRITE_PREFIX = ['-I',
2466
+                  '-idirafter',
2467
+                  '-imacros',
2468
+                  '-imultilib',
2469
+                  '-include',
2470
+                  '-iprefix',
2471
+                  '-iquote',
2472
+                  '-isystem',
2473
+                  '-L']
2474
+
2475
+def RewritePath(path, opts):
2476
+  """Rewrites a path by stripping the prefix and prepending the sysroot."""
2477
+  sysroot = opts.sysroot
2478
+  prefix = opts.strip_prefix
2479
+  if os.path.isabs(path) and not path.startswith(sysroot):
2480
+    if path.startswith(prefix):
2481
+      path = path[len(prefix):]
2482
+    path = path.lstrip('/')
2483
+    return os.path.join(sysroot, path)
2484
+  else:
2485
+    return path
2486
+
2487
+
2488
+def RewriteLine(line, opts):
2489
+  """Rewrites all the paths in recognized options."""
2490
+  args = line.split()
2491
+  count = len(args)
2492
+  i = 0
2493
+  while i < count:
2494
+    for prefix in REWRITE_PREFIX:
2495
+      # The option can be either in the form "-I /path/to/dir" or
2496
+      # "-I/path/to/dir" so handle both.
2497
+      if args[i] == prefix:
2498
+        i += 1
2499
+        try:
2500
+          args[i] = RewritePath(args[i], opts)
2501
+        except IndexError:
2502
+          sys.stderr.write('Missing argument following %s\n' % prefix)
2503
+          break
2504
+      elif args[i].startswith(prefix):
2505
+        args[i] = prefix + RewritePath(args[i][len(prefix):], opts)
2506
+    i += 1
2507
+
2508
+  return ' '.join(args)
2509
+
2510
+
2511
+def main(argv):
2512
+  parser = optparse.OptionParser()
2513
+  parser.add_option('-s', '--sysroot', default='/', help='sysroot to prepend')
2514
+  parser.add_option('-p', '--strip-prefix', default='', help='prefix to strip')
2515
+  opts, args = parser.parse_args(argv[1:])
2516
+
2517
+  for line in sys.stdin.readlines():
2518
+    line = RewriteLine(line.strip(), opts)
2519
+    print line
2520
+  return 0
2521
+
2522
+
2523
+if __name__ == '__main__':
2524
+  sys.exit(main(sys.argv))
2525
diff --git media/webrtc/trunk/build/linux/system.gyp media/webrtc/trunk/build/linux/system.gyp
2526
new file mode 100644
2527
index 000000000000..e36e558a8bdd
2528
--- /dev/null
2529
+++ media/webrtc/trunk/build/linux/system.gyp
2530
@@ -0,0 +1,637 @@
2531
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
2532
+# Use of this source code is governed by a BSD-style license that can be
2533
+# found in the LICENSE file.
2534
+
2535
+{
2536
+  'variables': {
2537
+    'conditions': [
2538
+      ['sysroot!=""', {
2539
+        'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
2540
+      }, {
2541
+        'pkg-config': 'pkg-config'
2542
+      }]
2543
+    ],
2544
+  },
2545
+  'conditions': [
2546
+    [ 'os_posix==1 and OS!="mac"', {
2547
+      'variables': {
2548
+        # We use our own copy of libssl3, although we still need to link against
2549
+        # the rest of NSS.
2550
+        'use_system_ssl%': 0,
2551
+      },
2552
+    }, {
2553
+      'variables': {
2554
+        'use_system_ssl%': 1,
2555
+      },
2556
+    }],
2557
+    [ 'chromeos==0', {
2558
+      # Hide GTK and related dependencies for Chrome OS, so they won't get
2559
+      # added back to Chrome OS. Don't try to use GTK on Chrome OS.
2560
+      'targets': [
2561
+        {
2562
+          'target_name': 'gtk',
2563
+          'type': 'none',
2564
+          'toolsets': ['host', 'target'],
2565
+          'variables': {
2566
+            # gtk requires gmodule, but it does not list it as a dependency
2567
+            # in some misconfigured systems.
2568
+            'gtk_packages': 'gmodule-2.0 gtk+-2.0 gthread-2.0',
2569
+          },
2570
+          'conditions': [
2571
+            ['_toolset=="target"', {
2572
+              'direct_dependent_settings': {
2573
+                'cflags': [
2574
+                  '<!@(<(pkg-config) --cflags <(gtk_packages))',
2575
+                ],
2576
+              },
2577
+              'link_settings': {
2578
+                'ldflags': [
2579
+                  '<!@(<(pkg-config) --libs-only-L --libs-only-other <(gtk_packages))',
2580
+                ],
2581
+                'libraries': [
2582
+                  '<!@(<(pkg-config) --libs-only-l <(gtk_packages))',
2583
+                ],
2584
+              },
2585
+            }, {
2586
+              'direct_dependent_settings': {
2587
+                'cflags': [
2588
+                  '<!@(pkg-config --cflags <(gtk_packages))',
2589
+                ],
2590
+              },
2591
+              'link_settings': {
2592
+                'ldflags': [
2593
+                  '<!@(pkg-config --libs-only-L --libs-only-other <(gtk_packages))',
2594
+                ],
2595
+                'libraries': [
2596
+                  '<!@(pkg-config --libs-only-l <(gtk_packages))',
2597
+                ],
2598
+              },
2599
+            }],
2600
+          ],
2601
+        },
2602
+        {
2603
+          'target_name': 'gtkprint',
2604
+          'type': 'none',
2605
+          'conditions': [
2606
+            ['_toolset=="target"', {
2607
+              'direct_dependent_settings': {
2608
+                'cflags': [
2609
+                  '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)',
2610
+                ],
2611
+              },
2612
+              'link_settings': {
2613
+                'ldflags': [
2614
+                  '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)',
2615
+                ],
2616
+                'libraries': [
2617
+                  '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)',
2618
+                ],
2619
+              },
2620
+            }],
2621
+          ],
2622
+        },
2623
+        {
2624
+          'target_name': 'gdk',
2625
+          'type': 'none',
2626
+          'conditions': [
2627
+            ['_toolset=="target"', {
2628
+              'direct_dependent_settings': {
2629
+                'cflags': [
2630
+                  '<!@(<(pkg-config) --cflags gdk-2.0)',
2631
+                ],
2632
+              },
2633
+              'link_settings': {
2634
+                'ldflags': [
2635
+                  '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)',
2636
+                ],
2637
+                'libraries': [
2638
+                  '<!@(<(pkg-config) --libs-only-l gdk-2.0)',
2639
+                ],
2640
+              },
2641
+            }],
2642
+          ],
2643
+        },
2644
+      ],  # targets
2645
+    }, {  # chromeos==1
2646
+      'targets': [
2647
+        {
2648
+          # TODO(satorux): Remove this once dbus-glib clients are gone.
2649
+          'target_name': 'dbus-glib',
2650
+          'type': 'none',
2651
+          'direct_dependent_settings': {
2652
+            'cflags': [
2653
+              '<!@(<(pkg-config) --cflags dbus-glib-1)',
2654
+            ],
2655
+          },
2656
+          'link_settings': {
2657
+            'ldflags': [
2658
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-glib-1)',
2659
+            ],
2660
+            'libraries': [
2661
+              '<!@(<(pkg-config) --libs-only-l dbus-glib-1)',
2662
+            ],
2663
+          },
2664
+        },
2665
+      ],
2666
+    }]
2667
+  ],  # conditions
2668
+  'targets': [
2669
+    {
2670
+      'target_name': 'ssl',
2671
+      'type': 'none',
2672
+      'conditions': [
2673
+        ['_toolset=="target"', {
2674
+          'conditions': [
2675
+            ['use_openssl==1', {
2676
+              'dependencies': [
2677
+                '../../third_party/openssl/openssl.gyp:openssl',
2678
+              ],
2679
+            }],
2680
+            ['use_openssl==0 and use_system_ssl==0', {
2681
+              'dependencies': [
2682
+                '../../net/third_party/nss/ssl.gyp:libssl',
2683
+                '../../third_party/zlib/zlib.gyp:zlib',
2684
+              ],
2685
+              'direct_dependent_settings': {
2686
+                'include_dirs+': [
2687
+                  # We need for our local copies of the libssl3 headers to come
2688
+                  # before other includes, as we are shadowing system headers.
2689
+                  '<(DEPTH)/net/third_party/nss/ssl',
2690
+                ],
2691
+                'cflags': [
2692
+                  '<!@(<(pkg-config) --cflags nss)',
2693
+                ],
2694
+              },
2695
+              'link_settings': {
2696
+                'ldflags': [
2697
+                  '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
2698
+                ],
2699
+                'libraries': [
2700
+                  '<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
2701
+                ],
2702
+              },
2703
+            }],
2704
+            ['use_openssl==0 and use_system_ssl==1', {
2705
+              'direct_dependent_settings': {
2706
+                'cflags': [
2707
+                  '<!@(<(pkg-config) --cflags nss)',
2708
+                ],
2709
+                'defines': [
2710
+                  'USE_SYSTEM_SSL',
2711
+                ],
2712
+              },
2713
+              'link_settings': {
2714
+                'ldflags': [
2715
+                  '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
2716
+                ],
2717
+                'libraries': [
2718
+                  '<!@(<(pkg-config) --libs-only-l nss)',
2719
+                ],
2720
+              },
2721
+            }],
2722
+          ]
2723
+        }],
2724
+      ],
2725
+    },
2726
+    {
2727
+      'target_name': 'freetype2',
2728
+      'type': 'none',
2729
+      'conditions': [
2730
+        ['_toolset=="target"', {
2731
+          'direct_dependent_settings': {
2732
+            'cflags': [
2733
+              '<!@(<(pkg-config) --cflags freetype2)',
2734
+            ],
2735
+          },
2736
+          'link_settings': {
2737
+            'ldflags': [
2738
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)',
2739
+            ],
2740
+            'libraries': [
2741
+              '<!@(<(pkg-config) --libs-only-l freetype2)',
2742
+            ],
2743
+          },
2744
+        }],
2745
+      ],
2746
+    },
2747
+    {
2748
+      'target_name': 'fontconfig',
2749
+      'type': 'none',
2750
+      'conditions': [
2751
+        ['_toolset=="target"', {
2752
+          'direct_dependent_settings': {
2753
+            'cflags': [
2754
+              '<!@(<(pkg-config) --cflags fontconfig)',
2755
+            ],
2756
+          },
2757
+          'link_settings': {
2758
+            'ldflags': [
2759
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
2760
+            ],
2761
+            'libraries': [
2762
+              '<!@(<(pkg-config) --libs-only-l fontconfig)',
2763
+            ],
2764
+          },
2765
+        }],
2766
+      ],
2767
+    },
2768
+    {
2769
+      'target_name': 'gconf',
2770
+      'type': 'none',
2771
+      'conditions': [
2772
+        ['use_gconf==1 and _toolset=="target"', {
2773
+          'direct_dependent_settings': {
2774
+            'cflags': [
2775
+              '<!@(<(pkg-config) --cflags gconf-2.0)',
2776
+            ],
2777
+            'defines': [
2778
+              'USE_GCONF',
2779
+            ],
2780
+          },
2781
+          'link_settings': {
2782
+            'ldflags': [
2783
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)',
2784
+            ],
2785
+            'libraries': [
2786
+              '<!@(<(pkg-config) --libs-only-l gconf-2.0)',
2787
+            ],
2788
+          },
2789
+        }],
2790
+      ],
2791
+    },
2792
+    {
2793
+      'target_name': 'gio',
2794
+      'type': 'none',
2795
+      'conditions': [
2796
+        ['use_gio==1 and _toolset=="target"', {
2797
+          'direct_dependent_settings': {
2798
+            'cflags': [
2799
+              '<!@(<(pkg-config) --cflags gio-2.0)',
2800
+            ],
2801
+            'defines': [
2802
+              'USE_GIO',
2803
+            ],
2804
+            'conditions': [
2805
+              ['linux_link_gsettings==0', {
2806
+                'defines': ['DLOPEN_GSETTINGS'],
2807
+              }],
2808
+            ],
2809
+          },
2810
+          'link_settings': {
2811
+            'ldflags': [
2812
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other gio-2.0)',
2813
+            ],
2814
+            'libraries': [
2815
+              '<!@(<(pkg-config) --libs-only-l gio-2.0)',
2816
+            ],
2817
+            'conditions': [
2818
+              ['linux_link_gsettings==0 and OS=="linux"', {
2819
+                'libraries': [
2820
+                  '-ldl',
2821
+                ],
2822
+              }],
2823
+            ],
2824
+          },
2825
+        }],
2826
+      ],
2827
+    },
2828
+    {
2829
+      'target_name': 'x11',
2830
+      'type': 'none',
2831
+      'toolsets': ['host', 'target'],
2832
+      'conditions': [
2833
+        ['_toolset=="target"', {
2834
+          'direct_dependent_settings': {
2835
+            'cflags': [
2836
+              '<!@(<(pkg-config) --cflags x11)',
2837
+            ],
2838
+          },
2839
+          'link_settings': {
2840
+            'ldflags': [
2841
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
2842
+            ],
2843
+            'libraries': [
2844
+              '<!@(<(pkg-config) --libs-only-l x11 xi)',
2845
+            ],
2846
+          },
2847
+        }, {
2848
+          'direct_dependent_settings': {
2849
+            'cflags': [
2850
+              '<!@(pkg-config --cflags x11)',
2851
+            ],
2852
+          },
2853
+          'link_settings': {
2854
+            'ldflags': [
2855
+              '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
2856
+            ],
2857
+            'libraries': [
2858
+              '<!@(pkg-config --libs-only-l x11 xi)',
2859
+            ],
2860
+          },
2861
+        }],
2862
+      ],
2863
+    },
2864
+    {
2865
+      'target_name': 'xext',
2866
+      'type': 'none',
2867
+      'conditions': [
2868
+        ['_toolset=="target"', {
2869
+          'direct_dependent_settings': {
2870
+            'cflags': [
2871
+              '<!@(<(pkg-config) --cflags xext)',
2872
+            ],
2873
+          },
2874
+          'link_settings': {
2875
+            'ldflags': [
2876
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
2877
+            ],
2878
+            'libraries': [
2879
+              '<!@(<(pkg-config) --libs-only-l xext)',
2880
+            ],
2881
+          },
2882
+        }],
2883
+      ],
2884
+    },
2885
+    {
2886
+      'target_name': 'xfixes',
2887
+      'type': 'none',
2888
+      'conditions': [
2889
+        ['_toolset=="target"', {
2890
+          'direct_dependent_settings': {
2891
+            'cflags': [
2892
+              '<!@(<(pkg-config) --cflags xfixes)',
2893
+            ],
2894
+          },
2895
+          'link_settings': {
2896
+            'ldflags': [
2897
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
2898
+            ],
2899
+            'libraries': [
2900
+              '<!@(<(pkg-config) --libs-only-l xfixes)',
2901
+            ],
2902
+          },
2903
+        }],
2904
+      ],
2905
+    },
2906
+    {
2907
+      'target_name': 'libgcrypt',
2908
+      'type': 'none',
2909
+      'conditions': [
2910
+        ['_toolset=="target" and use_cups==1', {
2911
+          'direct_dependent_settings': {
2912
+            'cflags': [
2913
+              '<!@(libgcrypt-config --cflags)',
2914
+            ],
2915
+          },
2916
+          'link_settings': {
2917
+            'libraries': [
2918
+              '<!@(libgcrypt-config --libs)',
2919
+            ],
2920
+          },
2921
+        }],
2922
+      ],
2923
+    },
2924
+    {
2925
+      'target_name': 'selinux',
2926
+      'type': 'none',
2927
+      'conditions': [
2928
+        ['_toolset=="target"', {
2929
+          'link_settings': {
2930
+            'libraries': [
2931
+              '-lselinux',
2932
+            ],
2933
+          },
2934
+        }],
2935
+      ],
2936
+    },
2937
+    {
2938
+      'target_name': 'gnome_keyring',
2939
+      'type': 'none',
2940
+      'conditions': [
2941
+        ['use_gnome_keyring==1', {
2942
+          'direct_dependent_settings': {
2943
+            'cflags': [
2944
+              '<!@(<(pkg-config) --cflags gnome-keyring-1)',
2945
+            ],
2946
+            'defines': [
2947
+              'USE_GNOME_KEYRING',
2948
+            ],
2949
+            'conditions': [
2950
+              ['linux_link_gnome_keyring==0', {
2951
+                'defines': ['DLOPEN_GNOME_KEYRING'],
2952
+              }],
2953
+            ],
2954
+          },
2955
+          'conditions': [
2956
+            ['linux_link_gnome_keyring!=0', {
2957
+              'link_settings': {
2958
+                'ldflags': [
2959
+                  '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
2960
+                ],
2961
+                'libraries': [
2962
+                  '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
2963
+                ],
2964
+              },
2965
+            }, {
2966
+              'conditions': [
2967
+                ['OS=="linux"', {
2968
+                 'link_settings': {
2969
+                   'libraries': [
2970
+                     '-ldl',
2971
+                   ],
2972
+                 },
2973
+                }],
2974
+              ],
2975
+            }],
2976
+          ],
2977
+        }],
2978
+      ],
2979
+    },
2980
+    {
2981
+      # The unit tests use a few convenience functions from the GNOME
2982
+      # Keyring library directly. We ignore linux_link_gnome_keyring and
2983
+      # link directly in this version of the target to allow this.
2984
+      # *** Do not use this target in the main binary! ***
2985
+      'target_name': 'gnome_keyring_direct',
2986
+      'type': 'none',
2987
+      'conditions': [
2988
+        ['use_gnome_keyring==1', {
2989
+          'direct_dependent_settings': {
2990
+            'cflags': [
2991
+              '<!@(<(pkg-config) --cflags gnome-keyring-1)',
2992
+            ],
2993
+            'defines': [
2994
+              'USE_GNOME_KEYRING',
2995
+            ],
2996
+            'conditions': [
2997
+              ['linux_link_gnome_keyring==0', {
2998
+                'defines': ['DLOPEN_GNOME_KEYRING'],
2999
+              }],
3000
+            ],
3001
+          },
3002
+          'link_settings': {
3003
+            'ldflags': [
3004
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other gnome-keyring-1)',
3005
+            ],
3006
+            'libraries': [
3007
+              '<!@(<(pkg-config) --libs-only-l gnome-keyring-1)',
3008
+            ],
3009
+          },
3010
+        }],
3011
+      ],
3012
+    },
3013
+    {
3014
+      'target_name': 'dbus',
3015
+      'type': 'none',
3016
+      'direct_dependent_settings': {
3017
+        'cflags': [
3018
+          '<!@(<(pkg-config) --cflags dbus-1)',
3019
+        ],
3020
+      },
3021
+      'link_settings': {
3022
+        'ldflags': [
3023
+          '<!@(<(pkg-config) --libs-only-L --libs-only-other dbus-1)',
3024
+        ],
3025
+        'libraries': [
3026
+          '<!@(<(pkg-config) --libs-only-l dbus-1)',
3027
+        ],
3028
+      },
3029
+    },
3030
+    {
3031
+      'target_name': 'glib',
3032
+      'type': 'none',
3033
+      'toolsets': ['host', 'target'],
3034
+      'variables': {
3035
+        'glib_packages': 'glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0',
3036
+      },
3037
+      'conditions': [
3038
+        ['_toolset=="target"', {
3039
+          'direct_dependent_settings': {
3040
+            'cflags': [
3041
+              '<!@(<(pkg-config) --cflags <(glib_packages))',
3042
+            ],
3043
+          },
3044
+          'link_settings': {
3045
+            'ldflags': [
3046
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other <(glib_packages))',
3047
+            ],
3048
+            'libraries': [
3049
+              '<!@(<(pkg-config) --libs-only-l <(glib_packages))',
3050
+            ],
3051
+          },
3052
+        }, {
3053
+          'direct_dependent_settings': {
3054
+            'cflags': [
3055
+              '<!@(pkg-config --cflags <(glib_packages))',
3056
+            ],
3057
+          },
3058
+          'link_settings': {
3059
+            'ldflags': [
3060
+              '<!@(pkg-config --libs-only-L --libs-only-other <(glib_packages))',
3061
+            ],
3062
+            'libraries': [
3063
+              '<!@(pkg-config --libs-only-l <(glib_packages))',
3064
+            ],
3065
+          },
3066
+        }],
3067
+        ['chromeos==1', {
3068
+          'link_settings': {
3069
+            'libraries': [ '-lXtst' ]
3070
+          }
3071
+        }],
3072
+      ],
3073
+    },
3074
+    {
3075
+      'target_name': 'pangocairo',
3076
+      'type': 'none',
3077
+      'toolsets': ['host', 'target'],
3078
+      'conditions': [
3079
+        ['_toolset=="target"', {
3080
+          'direct_dependent_settings': {
3081
+            'cflags': [
3082
+              '<!@(<(pkg-config) --cflags pangocairo)',
3083
+            ],
3084
+          },
3085
+          'link_settings': {
3086
+            'ldflags': [
3087
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other pangocairo)',
3088
+            ],
3089
+            'libraries': [
3090
+              '<!@(<(pkg-config) --libs-only-l pangocairo)',
3091
+            ],
3092
+          },
3093
+        }, {
3094
+          'direct_dependent_settings': {
3095
+            'cflags': [
3096
+              '<!@(pkg-config --cflags pangocairo)',
3097
+            ],
3098
+          },
3099
+          'link_settings': {
3100
+            'ldflags': [
3101
+              '<!@(pkg-config --libs-only-L --libs-only-other pangocairo)',
3102
+            ],
3103
+            'libraries': [
3104
+              '<!@(pkg-config --libs-only-l pangocairo)',
3105
+            ],
3106
+          },
3107
+        }],
3108
+      ],
3109
+    },
3110
+    {
3111
+      'target_name': 'libresolv',
3112
+      'type': 'none',
3113
+      'link_settings': {
3114
+        'libraries': [
3115
+          '-lresolv',
3116
+        ],
3117
+      },
3118
+    },
3119
+    {
3120
+      'target_name': 'ibus',
3121
+      'type': 'none',
3122
+      'conditions': [
3123
+        ['use_ibus==1', {
3124
+          'variables': {
3125
+            'ibus_min_version': '1.3.99.20110425',
3126
+          },
3127
+          'direct_dependent_settings': {
3128
+            'defines': ['HAVE_IBUS=1'],
3129
+            'cflags': [
3130
+              '<!@(<(pkg-config) --cflags "ibus-1.0 >= <(ibus_min_version)")',
3131
+            ],
3132
+          },
3133
+          'link_settings': {
3134
+            'ldflags': [
3135
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other "ibus-1.0 >= <(ibus_min_version)")',
3136
+            ],
3137
+            'libraries': [
3138
+              '<!@(<(pkg-config) --libs-only-l "ibus-1.0 >= <(ibus_min_version)")',
3139
+            ],
3140
+          },
3141
+        }],
3142
+      ],
3143
+    },
3144
+    {
3145
+      'target_name': 'udev',
3146
+      'type': 'none',
3147
+      'conditions': [
3148
+        # libudev is not available on *BSD
3149
+        ['_toolset=="target" and os_bsd!=1', {
3150
+          'direct_dependent_settings': {
3151
+            'cflags': [
3152
+              '<!@(<(pkg-config) --cflags libudev)'
3153
+            ],
3154
+          },
3155
+          'link_settings': {
3156
+            'ldflags': [
3157
+              '<!@(<(pkg-config) --libs-only-L --libs-only-other libudev)',
3158
+            ],
3159
+            'libraries': [
3160
+              '<!@(<(pkg-config) --libs-only-l libudev)',
3161
+            ],
3162
+          },
3163
+        }],
3164
+      ],
3165
+    },
3166
+  ],
3167
+}
3168
diff --git media/webrtc/trunk/build/mac/OWNERS media/webrtc/trunk/build/mac/OWNERS
3169
index a2d7cc837d70..c56e89dd1235 100644
3170
--- media/webrtc/trunk/build/mac/OWNERS
3171
+++ media/webrtc/trunk/build/mac/OWNERS
3172
@@ -1,4 +1,2 @@
3173
 mark@chromium.org
3174
-rsesek@chromium.org
3175
-
3176
-# COMPONENT: Build
3177
+thomasvl@chromium.org
3178
diff --git media/webrtc/trunk/build/mac/find_sdk.py media/webrtc/trunk/build/mac/find_sdk.py
3179
index 7217093c3ebe..3e90dd95bb7a 100755
3180
--- media/webrtc/trunk/build/mac/find_sdk.py
3181
+++ media/webrtc/trunk/build/mac/find_sdk.py
3182
@@ -3,19 +3,18 @@
3183
 # Use of this source code is governed by a BSD-style license that can be
3184
 # found in the LICENSE file.
3185
 
3186
-"""Prints the lowest locally available SDK version greater than or equal to a
3187
-given minimum sdk version to standard output. If --developer_dir is passed, then
3188
-the script will use the Xcode toolchain located at DEVELOPER_DIR.
3189
-
3190
-Usage:
3191
-  python find_sdk.py [--developer_dir DEVELOPER_DIR] 10.6  # Ignores SDKs < 10.6
3192
-"""
3193
-
3194
 import os
3195
 import re
3196
 import subprocess
3197
 import sys
3198
 
3199
+"""Prints the lowest locally available SDK version greater than or equal to a
3200
+given minimum sdk version to standard output.
3201
+
3202
+Usage:
3203
+  python find_sdk.py 10.6  # Ignores SDKs < 10.6
3204
+"""
3205
+
3206
 from optparse import OptionParser
3207
 
3208
 
3209
@@ -32,64 +31,54 @@ def main():
3210
   parser.add_option("--sdk_path",
3211
                     action="store", type="string", dest="sdk_path", default="",
3212
                     help="user-specified SDK path; bypasses verification")
3213
-  parser.add_option("--print_sdk_path",
3214
-                    action="store_true", dest="print_sdk_path", default=False,
3215
-                    help="Additionaly print the path the SDK (appears first).")
3216
-  parser.add_option("--developer_dir", help='Path to Xcode.')
3217
-  options, args = parser.parse_args()
3218
-  if len(args) != 1:
3219
-    parser.error('Please specify a minimum SDK version')
3220
+  (options, args) = parser.parse_args()
3221
   min_sdk_version = args[0]
3222
 
3223
-  if options.developer_dir:
3224
-    os.environ['DEVELOPER_DIR'] = options.developer_dir
3225
-
3226
-  job = subprocess.Popen(['xcode-select', '-print-path'],
3227
-                         stdout=subprocess.PIPE,
3228
-                         stderr=subprocess.STDOUT)
3229
-  out, err = job.communicate()
3230
-  if job.returncode != 0:
3231
-    print >> sys.stderr, out
3232
-    print >> sys.stderr, err
3233
-    raise Exception('Error %d running xcode-select' % job.returncode)
3234
-  sdk_dir = os.path.join(
3235
+  if sys.platform == 'darwin':
3236
+    job = subprocess.Popen(['xcode-select', '-print-path'],
3237
+                           stdout=subprocess.PIPE,
3238
+                           stderr=subprocess.STDOUT)
3239
+    out, err = job.communicate()
3240
+    if job.returncode != 0:
3241
+      print >>sys.stderr, out
3242
+      print >>sys.stderr, err
3243
+      raise Exception(('Error %d running xcode-select, you might have to run '
3244
+                       '|sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer| '
3245
+                       'if you are using Xcode 4.') % job.returncode)
3246
+    # The Developer folder moved in Xcode 4.3.
3247
+    xcode43_sdk_path = os.path.join(
3248
       out.rstrip(), 'Platforms/MacOSX.platform/Developer/SDKs')
3249
-  sdks = [re.findall('^MacOSX(10\.\d+)\.sdk$', s) for s in os.listdir(sdk_dir)]
3250
-  sdks = [s[0] for s in sdks if s]  # [['10.5'], ['10.6']] => ['10.5', '10.6']
3251
-  sdks = [s for s in sdks  # ['10.5', '10.6'] => ['10.6']
3252
-          if parse_version(s) >= parse_version(min_sdk_version)]
3253
-  if not sdks:
3254
-    raise Exception('No %s+ SDK found' % min_sdk_version)
3255
-  best_sdk = sorted(sdks, key=parse_version)[0]
3256
+    if os.path.isdir(xcode43_sdk_path):
3257
+      sdk_dir = xcode43_sdk_path
3258
+    else:
3259
+      sdk_dir = os.path.join(out.rstrip(), 'SDKs')
3260
+    sdks = [re.findall('^MacOSX(10\.\d+)\.sdk$', s) for s in os.listdir(sdk_dir)]
3261
+    sdks = [s[0] for s in sdks if s]  # [['10.5'], ['10.6']] => ['10.5', '10.6']
3262
+    sdks = [s for s in sdks  # ['10.5', '10.6'] => ['10.6']
3263
+            if parse_version(s) >= parse_version(min_sdk_version)]
3264
+    if not sdks:
3265
+      raise Exception('No %s+ SDK found' % min_sdk_version)
3266
+    best_sdk = sorted(sdks, key=parse_version)[0]
3267
+  else:
3268
+    best_sdk = ""
3269
 
3270
   if options.verify and best_sdk != min_sdk_version and not options.sdk_path:
3271
-    print >> sys.stderr, ''
3272
-    print >> sys.stderr, '                                           vvvvvvv'
3273
-    print >> sys.stderr, ''
3274
-    print >> sys.stderr, \
3275
+    print >>sys.stderr, ''
3276
+    print >>sys.stderr, '                                           vvvvvvv'
3277
+    print >>sys.stderr, ''
3278
+    print >>sys.stderr, \
3279
         'This build requires the %s SDK, but it was not found on your system.' \
3280
         % min_sdk_version
3281
-    print >> sys.stderr, \
3282
+    print >>sys.stderr, \
3283
         'Either install it, or explicitly set mac_sdk in your GYP_DEFINES.'
3284
-    print >> sys.stderr, ''
3285
-    print >> sys.stderr, '                                           ^^^^^^^'
3286
-    print >> sys.stderr, ''
3287
-    sys.exit(1)
3288
-
3289
-  if options.print_sdk_path:
3290
-    print subprocess.check_output(
3291
-        ['xcrun', '-sdk', 'macosx' + best_sdk, '--show-sdk-path']).strip()
3292
+    print >>sys.stderr, ''
3293
+    print >>sys.stderr, '                                           ^^^^^^^'
3294
+    print >>sys.stderr, ''
3295
+    return min_sdk_version
3296
 
3297
   return best_sdk
3298
 
3299
 
3300
 if __name__ == '__main__':
3301
-  if sys.platform == 'darwin' and os.environ.get('MOZ_AUTOMATION') != '1':
3302
-    print main()
3303
-  else:
3304
-    # Mozilla builds cross-compile on Linux or install an SDK from tooltool, so
3305
-    # return some fake data to keep the build system happy. These values aren't
3306
-    # used anywhere.
3307
-    print "."
3308
-    print "."
3309
-  sys.exit(0)
3310
+  print main()
3311
+
3312
diff --git media/webrtc/trunk/build/mac/tweak_info_plist.py media/webrtc/trunk/build/mac/tweak_info_plist.py
3313
index 920c62daf99f..9b57e7da01ba 100755
3314
--- media/webrtc/trunk/build/mac/tweak_info_plist.py
3315
+++ media/webrtc/trunk/build/mac/tweak_info_plist.py
3316
@@ -22,19 +22,17 @@
3317
 
3318
 import optparse
3319
 import os
3320
+from os import environ as env
3321
 import plistlib
3322
 import re
3323
 import subprocess
3324
 import sys
3325
 import tempfile
3326
 
3327
-TOP = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
3328
+TOP = os.path.join(env['SRCROOT'], '..')
3329
 
3330
-
3331
-def _ConvertPlist(source_plist, output_plist, fmt):
3332
-  """Convert |source_plist| to |fmt| and save as |output_plist|."""
3333
-  return subprocess.call(
3334
-      ['plutil', '-convert', fmt, '-o', output_plist, source_plist])
3335
+sys.path.insert(0, os.path.join(TOP, "build/util"))
3336
+import lastchange
3337
 
3338
 
3339
 def _GetOutput(args):
3340
@@ -67,68 +65,37 @@ def _RemoveKeys(plist, *keys):
3341
       pass
3342
 
3343
 
3344
-def _ApplyVersionOverrides(version, keys, overrides, separator='.'):
3345
-  """Applies version overrides.
3346
-
3347
-  Given a |version| string as "a.b.c.d" (assuming a default separator) with
3348
-  version components named by |keys| then overrides any value that is present
3349
-  in |overrides|.
3350
-
3351
-  >>> _ApplyVersionOverrides('a.b', ['major', 'minor'], {'minor': 'd'})
3352
-  'a.d'
3353
-  """
3354
-  if not overrides:
3355
-    return version
3356
-  version_values = version.split(separator)
3357
-  for i, (key, value) in enumerate(zip(keys, version_values)):
3358
-    if key in overrides:
3359
-      version_values[i] = overrides[key]
3360
-  return separator.join(version_values)
3361
-
3362
-
3363
-def _GetVersion(version_format, values, overrides=None):
3364
-  """Generates a version number according to |version_format| using the values
3365
-  from |values| or |overrides| if given."""
3366
-  result = version_format
3367
-  for key in values:
3368
-    if overrides and key in overrides:
3369
-      value = overrides[key]
3370
-    else:
3371
-      value = values[key]
3372
-    result = result.replace('@%s@' % key, value)
3373
-  return result
3374
-
3375
-
3376
-def _AddVersionKeys(
3377
-    plist, version_format_for_key, version=None, overrides=None):
3378
+def _AddVersionKeys(plist):
3379
   """Adds the product version number into the plist. Returns True on success and
3380
   False on error. The error will be printed to stderr."""
3381
-  if not version:
3382
-    # Pull in the Chrome version number.
3383
-    VERSION_TOOL = os.path.join(TOP, 'build/util/version.py')
3384
-    VERSION_FILE = os.path.join(TOP, 'chrome/VERSION')
3385
-    (stdout, retval) = _GetOutput([
3386
-        VERSION_TOOL, '-f', VERSION_FILE,
3387
-        '-t', '@MAJOR@.@MINOR@.@BUILD@.@PATCH@'])
3388
-
3389
-    # If the command finished with a non-zero return code, then report the
3390
-    # error up.
3391
-    if retval != 0:
3392
-      return False
3393
-
3394
-    version = stdout.strip()
3395
-
3396
-  # Parse the given version number, that should be in MAJOR.MINOR.BUILD.PATCH
3397
-  # format (where each value is a number). Note that str.isdigit() returns
3398
-  # True if the string is composed only of digits (and thus match \d+ regexp).
3399
-  groups = version.split('.')
3400
-  if len(groups) != 4 or not all(element.isdigit() for element in groups):
3401
-    print >>sys.stderr, 'Invalid version string specified: "%s"' % version
3402
+  # Pull in the Chrome version number.
3403
+  VERSION_TOOL = os.path.join(TOP, 'chrome/tools/build/version.py')
3404
+  VERSION_FILE = os.path.join(TOP, 'chrome/VERSION')
3405
+
3406
+  (stdout, retval1) = _GetOutput([VERSION_TOOL, '-f', VERSION_FILE, '-t',
3407
+                                  '@MAJOR@.@MINOR@.@BUILD@.@PATCH@'])
3408
+  full_version = stdout.rstrip()
3409
+
3410
+  (stdout, retval2) = _GetOutput([VERSION_TOOL, '-f', VERSION_FILE, '-t',
3411
+                                  '@BUILD@.@PATCH@'])
3412
+  bundle_version = stdout.rstrip()
3413
+
3414
+  # If either of the two version commands finished with non-zero returncode,
3415
+  # report the error up.
3416
+  if retval1 or retval2:
3417
     return False
3418
-  values = dict(zip(('MAJOR', 'MINOR', 'BUILD', 'PATCH'), groups))
3419
 
3420
-  for key in version_format_for_key:
3421
-    plist[key] = _GetVersion(version_format_for_key[key], values, overrides)
3422
+  # Add public version info so "Get Info" works.
3423
+  plist['CFBundleShortVersionString'] = full_version
3424
+
3425
+  # Honor the 429496.72.95 limit.  The maximum comes from splitting 2^32 - 1
3426
+  # into  6, 2, 2 digits.  The limitation was present in Tiger, but it could
3427
+  # have been fixed in later OS release, but hasn't been tested (it's easy
3428
+  # enough to find out with "lsregister -dump).
3429
+  # http://lists.apple.com/archives/carbon-dev/2006/Jun/msg00139.html
3430
+  # BUILD will always be an increasing value, so BUILD_PATH gives us something
3431
+  # unique that meetings what LS wants.
3432
+  plist['CFBundleVersion'] = bundle_version
3433
 
3434
   # Return with no error.
3435
   return True
3436
@@ -137,16 +104,11 @@ def _AddVersionKeys(
3437
 def _DoSCMKeys(plist, add_keys):
3438
   """Adds the SCM information, visible in about:version, to property list. If
3439
   |add_keys| is True, it will insert the keys, otherwise it will remove them."""
3440
-  scm_revision = None
3441
+  scm_path, scm_revision = None, None
3442
   if add_keys:
3443
-    # Pull in the Chrome revision number.
3444
-    VERSION_TOOL = os.path.join(TOP, 'build/util/version.py')
3445
-    LASTCHANGE_FILE = os.path.join(TOP, 'build/util/LASTCHANGE')
3446
-    (stdout, retval) = _GetOutput([VERSION_TOOL, '-f', LASTCHANGE_FILE, '-t',
3447
-                                  '@LASTCHANGE@'])
3448
-    if retval:
3449
-      return False
3450
-    scm_revision = stdout.rstrip()
3451
+    version_info = lastchange.FetchVersionInfo(
3452
+        default_lastchange=None, directory=TOP)
3453
+    scm_path, scm_revision = version_info.url, version_info.revision
3454
 
3455
   # See if the operation failed.
3456
   _RemoveKeys(plist, 'SCMRevision')
3457
@@ -155,17 +117,67 @@ def _DoSCMKeys(plist, add_keys):
3458
   elif add_keys:
3459
     print >>sys.stderr, 'Could not determine SCM revision.  This may be OK.'
3460
 
3461
-  return True
3462
+  if scm_path != None:
3463
+    plist['SCMPath'] = scm_path
3464
+  else:
3465
+    _RemoveKeys(plist, 'SCMPath')
3466
+
3467
+
3468
+def _DoPDFKeys(plist, add_keys):
3469
+  """Adds PDF support to the document types list. If add_keys is True, it will
3470
+  add the type information dictionary. If it is False, it will remove it if
3471
+  present."""
3472
 
3473
+  PDF_FILE_EXTENSION = 'pdf'
3474
 
3475
-def _AddBreakpadKeys(plist, branding, platform):
3476
+  def __AddPDFKeys(sub_plist):
3477
+    """Writes the keys into a sub-dictionary of the plist."""
3478
+    sub_plist['CFBundleTypeExtensions'] = [PDF_FILE_EXTENSION]
3479
+    sub_plist['CFBundleTypeIconFile'] = 'document.icns'
3480
+    sub_plist['CFBundleTypeMIMETypes'] = 'application/pdf'
3481
+    sub_plist['CFBundleTypeName'] = 'PDF Document'
3482
+    sub_plist['CFBundleTypeRole'] = 'Viewer'
3483
+
3484
+  DOCUMENT_TYPES_KEY = 'CFBundleDocumentTypes'
3485
+
3486
+  # First get the list of document types, creating it if necessary.
3487
+  try:
3488
+    extensions = plist[DOCUMENT_TYPES_KEY]
3489
+  except KeyError:
3490
+    # If this plist doesn't have a type dictionary, create one if set to add the
3491
+    # keys. If not, bail.
3492
+    if not add_keys:
3493
+      return
3494
+    extensions = plist[DOCUMENT_TYPES_KEY] = []
3495
+
3496
+  # Loop over each entry in the list, looking for one that handles PDF types.
3497
+  for i, ext in enumerate(extensions):
3498
+    # If an entry for .pdf files is found...
3499
+    if 'CFBundleTypeExtensions' not in ext:
3500
+      continue
3501
+    if PDF_FILE_EXTENSION in ext['CFBundleTypeExtensions']:
3502
+      if add_keys:
3503
+        # Overwrite the existing keys with new ones.
3504
+        __AddPDFKeys(ext)
3505
+      else:
3506
+        # Otherwise, delete the entry entirely.
3507
+        del extensions[i]
3508
+      return
3509
+
3510
+  # No PDF entry exists. If one needs to be added, do so now.
3511
+  if add_keys:
3512
+    pdf_entry = {}
3513
+    __AddPDFKeys(pdf_entry)
3514
+    extensions.append(pdf_entry)
3515
+
3516
+
3517
+def _AddBreakpadKeys(plist, branding):
3518
   """Adds the Breakpad keys. This must be called AFTER _AddVersionKeys() and
3519
   also requires the |branding| argument."""
3520
   plist['BreakpadReportInterval'] = '3600'  # Deliberately a string.
3521
-  plist['BreakpadProduct'] = '%s_%s' % (branding, platform)
3522
+  plist['BreakpadProduct'] = '%s_Mac' % branding
3523
   plist['BreakpadProductDisplay'] = branding
3524
-  plist['BreakpadURL'] = 'https://clients2.google.com/cr/report'
3525
-
3526
+  plist['BreakpadVersion'] = plist['CFBundleShortVersionString']
3527
   # These are both deliberately strings and not boolean.
3528
   plist['BreakpadSendAndExit'] = 'YES'
3529
   plist['BreakpadSkipConfirm'] = 'YES'
3530
@@ -183,24 +195,6 @@ def _RemoveBreakpadKeys(plist):
3531
       'BreakpadSkipConfirm')
3532
 
3533
 
3534
-def _TagSuffixes():
3535
-  # Keep this list sorted in the order that tag suffix components are to
3536
-  # appear in a tag value. That is to say, it should be sorted per ASCII.
3537
-  components = ('full',)
3538
-  assert tuple(sorted(components)) == components
3539
-
3540
-  components_len = len(components)
3541
-  combinations = 1 << components_len
3542
-  tag_suffixes = []
3543
-  for combination in xrange(0, combinations):
3544
-    tag_suffix = ''
3545
-    for component_index in xrange(0, components_len):
3546
-      if combination & (1 << component_index):
3547
-        tag_suffix += '-' + components[component_index]
3548
-    tag_suffixes.append(tag_suffix)
3549
-  return tag_suffixes
3550
-
3551
-
3552
 def _AddKeystoneKeys(plist, bundle_identifier):
3553
   """Adds the Keystone keys. This must be called AFTER _AddVersionKeys() and
3554
   also requires the |bundle_identifier| argument (com.example.product)."""
3555
@@ -208,11 +202,6 @@ def _AddKeystoneKeys(plist, bundle_identifier):
3556
   plist['KSProductID'] = bundle_identifier
3557
   plist['KSUpdateURL'] = 'https://tools.google.com/service/update2'
3558
 
3559
-  _RemoveKeys(plist, 'KSChannelID')
3560
-  for tag_suffix in _TagSuffixes():
3561
-    if tag_suffix:
3562
-      plist['KSChannelID' + tag_suffix] = tag_suffix
3563
-
3564
 
3565
 def _RemoveKeystoneKeys(plist):
3566
   """Removes any set Keystone keys."""
3567
@@ -221,100 +210,37 @@ def _RemoveKeystoneKeys(plist):
3568
       'KSProductID',
3569
       'KSUpdateURL')
3570
 
3571
-  tag_keys = []
3572
-  for tag_suffix in _TagSuffixes():
3573
-    tag_keys.append('KSChannelID' + tag_suffix)
3574
-  _RemoveKeys(plist, *tag_keys)
3575
-
3576
 
3577
 def Main(argv):
3578
   parser = optparse.OptionParser('%prog [options]')
3579
-  parser.add_option('--plist', dest='plist_path', action='store',
3580
-      type='string', default=None, help='The path of the plist to tweak.')
3581
-  parser.add_option('--output', dest='plist_output', action='store',
3582
-      type='string', default=None, help='If specified, the path to output ' + \
3583
-      'the tweaked plist, rather than overwriting the input.')
3584
   parser.add_option('--breakpad', dest='use_breakpad', action='store',
3585
       type='int', default=False, help='Enable Breakpad [1 or 0]')
3586
+  parser.add_option('--breakpad_uploads', dest='breakpad_uploads',
3587
+      action='store', type='int', default=False,
3588
+      help='Enable Breakpad\'s uploading of crash dumps [1 or 0]')
3589
   parser.add_option('--keystone', dest='use_keystone', action='store',
3590
       type='int', default=False, help='Enable Keystone [1 or 0]')
3591
   parser.add_option('--scm', dest='add_scm_info', action='store', type='int',
3592
       default=True, help='Add SCM metadata [1 or 0]')
3593
+  parser.add_option('--pdf', dest='add_pdf_support', action='store', type='int',
3594
+      default=False, help='Add PDF file handler support [1 or 0]')
3595
   parser.add_option('--branding', dest='branding', action='store',
3596
       type='string', default=None, help='The branding of the binary')
3597
   parser.add_option('--bundle_id', dest='bundle_identifier',
3598
       action='store', type='string', default=None,
3599
       help='The bundle id of the binary')
3600
-  parser.add_option('--platform', choices=('ios', 'mac'), default='mac',
3601
-      help='The target platform of the bundle')
3602
-  parser.add_option('--version-overrides', action='append',
3603
-      help='Key-value pair to override specific component of version '
3604
-           'like key=value (can be passed multiple time to configure '
3605
-           'more than one override)')
3606
-  parser.add_option('--format', choices=('binary1', 'xml1', 'json'),
3607
-      default='xml1', help='Format to use when writing property list '
3608
-          '(default: %(default)s)')
3609
-  parser.add_option('--version', dest='version', action='store', type='string',
3610
-      default=None, help='The version string [major.minor.build.patch]')
3611
   (options, args) = parser.parse_args(argv)
3612
 
3613
   if len(args) > 0:
3614
     print >>sys.stderr, parser.get_usage()
3615
     return 1
3616
 
3617
-  if not options.plist_path:
3618
-    print >>sys.stderr, 'No --plist specified.'
3619
-    return 1
3620
-
3621
-  # Read the plist into its parsed format. Convert the file to 'xml1' as
3622
-  # plistlib only supports that format in Python 2.7.
3623
-  with tempfile.NamedTemporaryFile() as temp_info_plist:
3624
-    retcode = _ConvertPlist(options.plist_path, temp_info_plist.name, 'xml1')
3625
-    if retcode != 0:
3626
-      return retcode
3627
-    plist = plistlib.readPlist(temp_info_plist.name)
3628
-
3629
-  # Convert overrides.
3630
-  overrides = {}
3631
-  if options.version_overrides:
3632
-    for pair in options.version_overrides:
3633
-      if not '=' in pair:
3634
-        print >>sys.stderr, 'Invalid value for --version-overrides:', pair
3635
-        return 1
3636
-      key, value = pair.split('=', 1)
3637
-      overrides[key] = value
3638
-      if key not in ('MAJOR', 'MINOR', 'BUILD', 'PATCH'):
3639
-        print >>sys.stderr, 'Unsupported key for --version-overrides:', key
3640
-        return 1
3641
-
3642
-  if options.platform == 'mac':
3643
-    version_format_for_key = {
3644
-      # Add public version info so "Get Info" works.
3645
-      'CFBundleShortVersionString': '@MAJOR@.@MINOR@.@BUILD@.@PATCH@',
3646
-
3647
-      # Honor the 429496.72.95 limit.  The maximum comes from splitting 2^32 - 1
3648
-      # into  6, 2, 2 digits.  The limitation was present in Tiger, but it could
3649
-      # have been fixed in later OS release, but hasn't been tested (it's easy
3650
-      # enough to find out with "lsregister -dump).
3651
-      # http://lists.apple.com/archives/carbon-dev/2006/Jun/msg00139.html
3652
-      # BUILD will always be an increasing value, so BUILD_PATH gives us
3653
-      # something unique that meetings what LS wants.
3654
-      'CFBundleVersion': '@BUILD@.@PATCH@',
3655
-    }
3656
-  else:
3657
-    version_format_for_key = {
3658
-      'CFBundleShortVersionString': '@MAJOR@.@BUILD@.@PATCH@',
3659
-      'CFBundleVersion': '@MAJOR@.@MINOR@.@BUILD@.@PATCH@'
3660
-    }
3661
-
3662
-  if options.use_breakpad:
3663
-    version_format_for_key['BreakpadVersion'] = \
3664
-        '@MAJOR@.@MINOR@.@BUILD@.@PATCH@'
3665
+  # Read the plist into its parsed format.
3666
+  DEST_INFO_PLIST = os.path.join(env['TARGET_BUILD_DIR'], env['INFOPLIST_PATH'])
3667
+  plist = plistlib.readPlist(DEST_INFO_PLIST)
3668
 
3669
   # Insert the product version.
3670
-  if not _AddVersionKeys(
3671
-      plist, version_format_for_key, version=options.version,
3672
-      overrides=overrides):
3673
+  if not _AddVersionKeys(plist):
3674
     return 2
3675
 
3676
   # Add Breakpad if configured to do so.
3677
@@ -322,15 +248,22 @@ def Main(argv):
3678
     if options.branding is None:
3679
       print >>sys.stderr, 'Use of Breakpad requires branding.'
3680
       return 1
3681
-    # Map gyp "OS" / gn "target_os" passed via the --platform parameter to
3682
-    # the platform as known by breakpad.
3683
-    platform = {'mac': 'Mac', 'ios': 'iOS'}[options.platform]
3684
-    _AddBreakpadKeys(plist, options.branding, platform)
3685
+    _AddBreakpadKeys(plist, options.branding)
3686
+    if options.breakpad_uploads:
3687
+      plist['BreakpadURL'] = 'https://clients2.google.com/cr/report'
3688
+    else:
3689
+      # This allows crash dumping to a file without uploading the
3690
+      # dump, for testing purposes.  Breakpad does not recognise
3691
+      # "none" as a special value, but this does stop crash dump
3692
+      # uploading from happening.  We need to specify something
3693
+      # because if "BreakpadURL" is not present, Breakpad will not
3694
+      # register its crash handler and no crash dumping will occur.
3695
+      plist['BreakpadURL'] = 'none'
3696
   else:
3697
     _RemoveBreakpadKeys(plist)
3698
 
3699
-  # Add Keystone if configured to do so.
3700
-  if options.use_keystone:
3701
+  # Only add Keystone in Release builds.
3702
+  if options.use_keystone and env['CONFIGURATION'] == 'Release':
3703
     if options.bundle_identifier is None:
3704
       print >>sys.stderr, 'Use of Keystone requires the bundle id.'
3705
       return 1
3706
@@ -339,20 +272,21 @@ def Main(argv):
3707
     _RemoveKeystoneKeys(plist)
3708
 
3709
   # Adds or removes any SCM keys.
3710
-  if not _DoSCMKeys(plist, options.add_scm_info):
3711
-    return 3
3712
+  _DoSCMKeys(plist, options.add_scm_info)
3713
 
3714
-  output_path = options.plist_path
3715
-  if options.plist_output is not None:
3716
-    output_path = options.plist_output
3717
+  # Adds or removes the PDF file handler entry.
3718
+  _DoPDFKeys(plist, options.add_pdf_support)
3719
 
3720
   # Now that all keys have been mutated, rewrite the file.
3721
-  with tempfile.NamedTemporaryFile() as temp_info_plist:
3722
-    plistlib.writePlist(plist, temp_info_plist.name)
3723
-
3724
-    # Convert Info.plist to the format requested by the --format flag. Any
3725
-    # format would work on Mac but iOS requires specific format.
3726
-    return _ConvertPlist(temp_info_plist.name, output_path, options.format)
3727
+  temp_info_plist = tempfile.NamedTemporaryFile()
3728
+  plistlib.writePlist(plist, temp_info_plist.name)
3729
+
3730
+  # Info.plist will work perfectly well in any plist format, but traditionally
3731
+  # applications use xml1 for this, so convert it to ensure that it's valid.
3732
+  proc = subprocess.Popen(['plutil', '-convert', 'xml1', '-o', DEST_INFO_PLIST,
3733
+                           temp_info_plist.name])
3734
+  proc.wait()
3735
+  return proc.returncode
3736
 
3737
 
3738
 if __name__ == '__main__':
3739
diff --git media/webrtc/trunk/build/precompile.h media/webrtc/trunk/build/precompile.h
3740
index 50a9b87e2fb2..a3c5193c611f 100644
3741
--- media/webrtc/trunk/build/precompile.h
3742
+++ media/webrtc/trunk/build/precompile.h
3743
@@ -2,8 +2,17 @@
3744
 // Use of this source code is governed by a BSD-style license that can be
3745
 // found in the LICENSE file.
3746
 
3747
-// This file is used as a precompiled header for both C and C++ files. So
3748
-// any C++ headers must go in the __cplusplus block below.
3749
+// Precompiled header for Chromium project on Windows, not used by
3750
+// other build configurations. Using precompiled headers speeds the
3751
+// build up significantly, around 1/4th on VS 2010 on an HP Z600 with 12
3752
+// GB of memory.
3753
+//
3754
+// Numeric comments beside includes are the number of times they were
3755
+// included under src/chrome/browser on 2011/8/20, which was used as a
3756
+// baseline for deciding what to include in the PCH. Includes without
3757
+// a numeric comment are generally included at least 5 times. It may
3758
+// be possible to tweak the speed of the build by commenting out or
3759
+// removing some of the less frequently used headers.
3760
 
3761
 #if defined(BUILD_PRECOMPILE_H_)
3762
 #error You shouldn't include the precompiled header file more than once.
3763
@@ -11,40 +20,84 @@
3764
 
3765
 #define BUILD_PRECOMPILE_H_
3766
 
3767
-#define _USE_MATH_DEFINES
3768
+// The Windows header needs to come before almost all the other
3769
+// Windows-specific headers.
3770
+#include <Windows.h>
3771
+#include <dwmapi.h>
3772
+#include <shellapi.h>
3773
+#include <wincrypt.h>  // 4
3774
+#include <wtypes.h>  // 2
3775
+
3776
+// Defines in atlbase.h cause conflicts; if we could figure out how
3777
+// this family of headers can be included in the PCH, it might speed
3778
+// up the build as several of them are used frequently.
3779
+/*
3780
+#include <atlbase.h>
3781
+#include <atlapp.h>
3782
+#include <atlcom.h>
3783
+#include <atlcrack.h>  // 2
3784
+#include <atlctrls.h>  // 2
3785
+#include <atlmisc.h>  // 2
3786
+#include <atlsafe.h>  // 1
3787
+#include <atltheme.h>  // 1
3788
+#include <atlwin.h>  // 2
3789
+*/
3790
+
3791
+// Objbase.h and other files that rely on it bring in [ #define
3792
+// interface struct ] which can cause problems in a multi-platform
3793
+// build like Chrome's. #undef-ing it does not work as there are
3794
+// currently 118 targets that break if we do this, so leaving out of
3795
+// the precompiled header for now.
3796
+//#include <commctrl.h>  // 2
3797
+//#include <commdlg.h>  // 3
3798
+//#include <cryptuiapi.h>  // 2
3799
+//#include <Objbase.h>  // 2
3800
+//#include <objidl.h>  // 1
3801
+//#include <ole2.h>  // 1
3802
+//#include <oleacc.h>  // 2
3803
+//#include <oleauto.h>  // 1
3804
+//#include <oleidl.h>  // 1
3805
+//#include <propkey.h>  // 2
3806
+//#include <propvarutil.h>  // 2
3807
+//#include <pstore.h>  // 2
3808
+//#include <shlguid.h>  // 1
3809
+//#include <shlwapi.h>  // 1
3810
+//#include <shobjidl.h>  // 4
3811
+//#include <urlhist.h>  // 2
3812
+
3813
+// Caused other conflicts in addition to the 'interface' issue above.
3814
+// #include <shlobj.h>
3815
 
3816
 #include <errno.h>
3817
 #include <fcntl.h>
3818
-#include <limits.h>
3819
+#include <limits.h>  // 4
3820
 #include <math.h>
3821
-#include <memory.h>
3822
+#include <memory.h>  // 1
3823
 #include <signal.h>
3824
-#include <stdarg.h>
3825
+#include <stdarg.h>  // 1
3826
 #include <stddef.h>
3827
 #include <stdio.h>
3828
 #include <stdlib.h>
3829
 #include <string.h>
3830
-#include <time.h>
3831
-
3832
-#if defined(__cplusplus)
3833
+#include <time.h>  // 4
3834
 
3835
 #include <algorithm>
3836
-#include <bitset>
3837
+#include <bitset>  // 3
3838
 #include <cmath>
3839
 #include <cstddef>
3840
-#include <cstdio>
3841
-#include <cstdlib>
3842
+#include <cstdio>  // 3
3843
+#include <cstdlib>  // 2
3844
 #include <cstring>
3845
 #include <deque>
3846
-#include <fstream>
3847
+#include <fstream>  // 3
3848
 #include <functional>
3849
-#include <iomanip>
3850
-#include <iosfwd>
3851
+#include <iomanip>  // 2
3852
+#include <iosfwd>  // 2
3853
 #include <iterator>
3854
 #include <limits>
3855
 #include <list>
3856
 #include <map>
3857
-#include <numeric>
3858
+#include <numeric>  // 2
3859
 #include <ostream>
3860
 #include <queue>
3861
 #include <set>
3862
@@ -53,5 +106,3 @@
3863
 #include <string>
3864
 #include <utility>
3865
 #include <vector>
3866
-
3867
-#endif  // __cplusplus
3868
diff --git media/webrtc/trunk/build/sanitize-mac-build-log.sed media/webrtc/trunk/build/sanitize-mac-build-log.sed
3869
index b4111c7b828a..3312eac5a86c 100755
3870
--- media/webrtc/trunk/build/sanitize-mac-build-log.sed
3871
+++ media/webrtc/trunk/build/sanitize-mac-build-log.sed
3872
@@ -1,3 +1,5 @@
3873
+#!/bin/echo Use sanitize-mac-build-log.sh or sed -f
3874
+
3875
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3876
 # Use of this source code is governed by a BSD-style license that can be
3877
 # found in the LICENSE file.
3878
@@ -15,8 +17,8 @@
3879
 # Xcode prints a short "compiling foobar.o" line followed by the lengthy
3880
 # full command line.  These deletions drop the command line.
3881
 \|^    /Developer/usr/bin/|d
3882
-\|^    /Developer/Library/PrivateFrameworks/DevToolsCore\.framework/|d
3883
-\|^    /Developer/Library/Xcode/Plug-ins/CoreBuildTasks\.xcplugin/|d
3884
+\|^    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/|d
3885
+\|^    /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/|d
3886
 
3887
 # Drop any goma command lines as well.
3888
 \|^    .*/gomacc |d
3889
@@ -26,8 +28,8 @@
3890
 \|^    /Users/[^/]*/bin/|d
3891
 
3892
 # There's already a nice note for bindings, don't need the command line.
3893
-\|^python scripts/rule_binding\.py|d
3894
+\|^python scripts/rule_binding.py|d
3895
 
3896
 # Shorten the "compiling foobar.o" line.
3897
-s|^Distributed-CompileC (.*) normal i386 c\+\+ com\.apple\.compilers\.gcc\.4_2|    CC \1|
3898
-s|^CompileC (.*) normal i386 c\+\+ com\.apple\.compilers\.gcc\.4_2|    CC \1|
3899
+s|^Distributed-CompileC \(.*\) normal i386 c++ com.apple.compilers.gcc.4_2|    CC \1|
3900
+s|^CompileC \(.*\) normal i386 c++ com.apple.compilers.gcc.4_2|    CC \1|
3901
diff --git media/webrtc/trunk/build/sanitize-mac-build-log.sh media/webrtc/trunk/build/sanitize-mac-build-log.sh
3902
index df5a7af29eb6..dc743fabb51f 100755
3903
--- media/webrtc/trunk/build/sanitize-mac-build-log.sh
3904
+++ media/webrtc/trunk/build/sanitize-mac-build-log.sh
3905
@@ -2,4 +2,5 @@
3906
 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3907
 # Use of this source code is governed by a BSD-style license that can be
3908
 # found in the LICENSE file.
3909
-sed -r -f `dirname "${0}"`/`basename "${0}" sh`sed
3910
+sed -f `dirname "${0}"`/`basename "${0}" sh`sed
3911
+
3912
diff --git media/webrtc/trunk/build/sanitize-win-build-log.sed media/webrtc/trunk/build/sanitize-win-build-log.sed
3913
index c18e664c83a0..c8bffde87447 100755
3914
--- media/webrtc/trunk/build/sanitize-win-build-log.sed
3915
+++ media/webrtc/trunk/build/sanitize-win-build-log.sed
3916
@@ -1,3 +1,5 @@
3917
+#!/bin/echo Use sanitize-win-build-log.sh or sed -f
3918
+
3919
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3920
 # Use of this source code is governed by a BSD-style license that can be
3921
 # found in the LICENSE file.
3922
@@ -6,10 +8,10 @@
3923
 # machine-parsable.
3924
 
3925
 # Drop uninformative lines.
3926
-/The operation completed successfully\./d
3927
+/The operation completed successfully./d
3928
 
3929
 # Drop parallelization indicators on lines.
3930
-s/^[0-9]+>//
3931
+s/^[0-9]\+>//
3932
 
3933
 # Shorten bindings generation lines
3934
-s/^.*"python".*idl_compiler\.py".*("[^"]+\.idl").*$/  idl_compiler \1/
3935
+s/^.*"perl".*generate-bindings.pl".*\("[^"]\+\.idl"\).*$/  generate-bindings \1/
3936
diff --git media/webrtc/trunk/build/sanitize-win-build-log.sh media/webrtc/trunk/build/sanitize-win-build-log.sh
3937
index df5a7af29eb6..dc743fabb51f 100755
3938
--- media/webrtc/trunk/build/sanitize-win-build-log.sh
3939
+++ media/webrtc/trunk/build/sanitize-win-build-log.sh
3940
@@ -2,4 +2,5 @@
3941
 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3942
 # Use of this source code is governed by a BSD-style license that can be
3943
 # found in the LICENSE file.
3944
-sed -r -f `dirname "${0}"`/`basename "${0}" sh`sed
3945
+sed -f `dirname "${0}"`/`basename "${0}" sh`sed
3946
+
3947
diff --git media/webrtc/trunk/build/update-linux-sandbox.sh media/webrtc/trunk/build/update-linux-sandbox.sh
3948
index fa2d1077af61..ebf8c105a5c5 100755
3949
--- media/webrtc/trunk/build/update-linux-sandbox.sh
3950
+++ media/webrtc/trunk/build/update-linux-sandbox.sh
3951
@@ -6,7 +6,7 @@
3952
 
3953
 BUILDTYPE="${BUILDTYPE:-Debug}"
3954
 CHROME_SRC_DIR="${CHROME_SRC_DIR:-$(dirname -- $(readlink -fn -- "$0"))/..}"
3955
-CHROME_OUT_DIR="${CHROME_SRC_DIR}/${CHROMIUM_OUT_DIR:-out}/${BUILDTYPE}"
3956
+CHROME_OUT_DIR="${CHROME_SRC_DIR}/out/${BUILDTYPE}"
3957
 CHROME_SANDBOX_BUILD_PATH="${CHROME_OUT_DIR}/chrome_sandbox"
3958
 CHROME_SANDBOX_INST_PATH="/usr/local/sbin/chrome-devel-sandbox"
3959
 CHROME_SANDBOX_INST_DIR=$(dirname -- "$CHROME_SANDBOX_INST_PATH")
3960
@@ -39,9 +39,8 @@ if [ ! -d "${CHROME_OUT_DIR}" ]; then
3961
 fi
3962
 
3963
 if [ ! -f "${CHROME_SANDBOX_BUILD_PATH}" ]; then
3964
-  echo "Could not find ${CHROME_SANDBOX_BUILD_PATH}"
3965
-  echo -n "BUILDTYPE is $BUILDTYPE, use \"BUILDTYPE=<value> ${0}\" to override "
3966
-  echo "after you build the chrome_sandbox target"
3967
+  echo -n "Could not find ${CHROME_SANDBOX_BUILD_PATH}, "
3968
+  echo "please make sure you build the chrome_sandbox target"
3969
   exit 1
3970
 fi
3971
 
3972
diff --git media/webrtc/trunk/build/util/lastchange.py media/webrtc/trunk/build/util/lastchange.py
3973
index 0e3102f4b824..a101341ef7d3 100755
3974
--- media/webrtc/trunk/build/util/lastchange.py
3975
+++ media/webrtc/trunk/build/util/lastchange.py
3976
@@ -13,11 +13,56 @@ import os
3977
 import subprocess
3978
 import sys
3979
 
3980
+_GIT_SVN_ID_REGEX = re.compile(r'.*git-svn-id:\s*([^@]*)@([0-9]+)', re.DOTALL)
3981
+
3982
 class VersionInfo(object):
3983
-  def __init__(self, revision):
3984
+  def __init__(self, url, revision):
3985
+    self.url = url
3986
     self.revision = revision
3987
 
3988
 
3989
+def FetchSVNRevision(directory, svn_url_regex):
3990
+  """
3991
+  Fetch the Subversion branch and revision for a given directory.
3992
+
3993
+  Errors are swallowed.
3994
+
3995
+  Returns:
3996
+    A VersionInfo object or None on error.
3997
+  """
3998
+  try:
3999
+    proc = subprocess.Popen(['svn', 'info'],
4000
+                            stdout=subprocess.PIPE,
4001
+                            stderr=subprocess.PIPE,
4002
+                            cwd=directory,
4003
+                            shell=(sys.platform=='win32'))
4004
+  except OSError:
4005
+    # command is apparently either not installed or not executable.
4006
+    return None
4007
+  if not proc:
4008
+    return None
4009
+
4010
+  attrs = {}
4011
+  for line in proc.stdout:
4012
+    line = line.strip()
4013
+    if not line:
4014
+      continue
4015
+    key, val = line.split(': ', 1)
4016
+    attrs[key] = val
4017
+
4018
+  try:
4019
+    match = svn_url_regex.search(attrs['URL'])
4020
+    if match:
4021
+      url = match.group(2)
4022
+    else:
4023
+      url = ''
4024
+    revision = attrs['Revision']
4025
+  except KeyError:
4026
+    return None
4027
+
4028
+  return VersionInfo(url, revision)
4029
+
4030
+
4031
 def RunGitCommand(directory, command):
4032
   """
4033
   Launches git subcommand.
4034
@@ -54,74 +99,74 @@ def FetchGitRevision(directory):
4035
   Returns:
4036
     A VersionInfo object or None on error.
4037
   """
4038
-  hsh = ''
4039
-  git_args = ['log', '-1', '--format=%H']
4040
-  proc = RunGitCommand(directory, git_args)
4041
+  proc = RunGitCommand(directory, ['rev-parse', 'HEAD'])
4042
   if proc:
4043
     output = proc.communicate()[0].strip()
4044
     if proc.returncode == 0 and output:
4045
-      hsh = output
4046
-  if not hsh:
4047
-    return None
4048
-  pos = ''
4049
-  proc = RunGitCommand(directory, ['cat-file', 'commit', hsh])
4050
-  if proc:
4051
-    output = proc.communicate()[0]
4052
-    if proc.returncode == 0 and output:
4053
-      for line in reversed(output.splitlines()):
4054
-        if line.startswith('Cr-Commit-Position:'):
4055
-          pos = line.rsplit()[-1].strip()
4056
-          break
4057
-  return VersionInfo('%s-%s' % (hsh, pos))
4058
+      return VersionInfo('git', output[:7])
4059
+  return None
4060
 
4061
 
4062
-def FetchVersionInfo(directory=None):
4063
+def FetchGitSVNURLAndRevision(directory, svn_url_regex):
4064
   """
4065
-  Returns the last change (in the form of a branch, revision tuple),
4066
-  from some appropriate revision control system.
4067
-  """
4068
-  version_info = FetchGitRevision(directory)
4069
-  if not version_info:
4070
-    version_info = VersionInfo(None)
4071
-  return version_info
4072
+  Fetch the Subversion URL and revision through Git.
4073
 
4074
+  Errors are swallowed.
4075
 
4076
-def GetHeaderGuard(path):
4077
+  Returns:
4078
+    A tuple containing the Subversion URL and revision.
4079
   """
4080
-  Returns the header #define guard for the given file path.
4081
-  This treats everything after the last instance of "src/" as being a
4082
-  relevant part of the guard. If there is no "src/", then the entire path
4083
-  is used.
4084
+  proc = RunGitCommand(directory, ['log', '-1',
4085
+                                   '--grep=git-svn-id', '--format=%b'])
4086
+  if proc:
4087
+    output = proc.communicate()[0].strip()
4088
+    if proc.returncode == 0 and output:
4089
+      # Extract the latest SVN revision and the SVN URL.
4090
+      # The target line is the last "git-svn-id: ..." line like this:
4091
+      # git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85528 0039d316....
4092
+      match = _GIT_SVN_ID_REGEX.search(output)
4093
+      if match:
4094
+        revision = match.group(2)
4095
+        url_match = svn_url_regex.search(match.group(1))
4096
+        if url_match:
4097
+          url = url_match.group(2)
4098
+        else:
4099
+          url = ''
4100
+        return url, revision
4101
+  return None, None
4102
+
4103
+
4104
+def FetchGitSVNRevision(directory, svn_url_regex):
4105
   """
4106
-  src_index = path.rfind('src/')
4107
-  if src_index != -1:
4108
-    guard = path[src_index + 4:]
4109
-  else:
4110
-    guard = path
4111
-  guard = guard.upper()
4112
-  return guard.replace('/', '_').replace('.', '_').replace('\\', '_') + '_'
4113
+  Fetch the Git-SVN identifier for the local tree.
4114
 
4115
-
4116
-def GetHeaderContents(path, define, version):
4117
-  """
4118
-  Returns what the contents of the header file should be that indicate the given
4119
-  revision.
4120
+  Errors are swallowed.
4121
   """
4122
-  header_guard = GetHeaderGuard(path)
4123
+  url, revision = FetchGitSVNURLAndRevision(directory, svn_url_regex)
4124
+  if url and revision:
4125
+    return VersionInfo(url, revision)
4126
+  return None
4127
 
4128
-  header_contents = """/* Generated by lastchange.py, do not edit.*/
4129
 
4130
-#ifndef %(header_guard)s
4131
-#define %(header_guard)s
4132
-
4133
-#define %(define)s "%(version)s"
4134
+def FetchVersionInfo(default_lastchange, directory=None,
4135
+                     directory_regex_prior_to_src_url='chrome|svn'):
4136
+  """
4137
+  Returns the last change (in the form of a branch, revision tuple),
4138
+  from some appropriate revision control system.
4139
+  """
4140
+  svn_url_regex = re.compile(
4141
+      r'.*/(' + directory_regex_prior_to_src_url + r')(/.*)')
4142
 
4143
-#endif  // %(header_guard)s
4144
-"""
4145
-  header_contents = header_contents % { 'header_guard': header_guard,
4146
-                                        'define': define,
4147
-                                        'version': version }
4148
-  return header_contents
4149
+  version_info = (FetchSVNRevision(directory, svn_url_regex) or
4150
+                  FetchGitSVNRevision(directory, svn_url_regex) or
4151
+                  FetchGitRevision(directory))
4152
+  if not version_info:
4153
+    if default_lastchange and os.path.exists(default_lastchange):
4154
+      revision = open(default_lastchange, 'r').read().strip()
4155
+      version_info = VersionInfo(None, revision)
4156
+    else:
4157
+      version_info = VersionInfo(None, None)
4158
+  return version_info
4159
 
4160
 
4161
 def WriteIfChanged(file_name, contents):
4162
@@ -145,25 +190,15 @@ def main(argv=None):
4163
     argv = sys.argv
4164
 
4165
   parser = optparse.OptionParser(usage="lastchange.py [options]")
4166
-  parser.add_option("-m", "--version-macro",
4167
-                    help="Name of C #define when using --header. Defaults to " +
4168
-                    "LAST_CHANGE.",
4169
-                    default="LAST_CHANGE")
4170
+  parser.add_option("-d", "--default-lastchange", metavar="FILE",
4171
+                    help="default last change input FILE")
4172
   parser.add_option("-o", "--output", metavar="FILE",
4173
-                    help="Write last change to FILE. " +
4174
-                    "Can be combined with --header to write both files.")
4175
-  parser.add_option("", "--header", metavar="FILE",
4176
-                    help="Write last change to FILE as a C/C++ header. " +
4177
-                    "Can be combined with --output to write both files.")
4178
+                    help="write last change to FILE")
4179
   parser.add_option("--revision-only", action='store_true',
4180
-                    help="Just print the GIT hash. Overrides any " +
4181
-                    "file-output-related options.")
4182
-  parser.add_option("-s", "--source-dir", metavar="DIR",
4183
-                    help="Use repository in the given directory.")
4184
+                    help="just print the SVN revision number")
4185
   opts, args = parser.parse_args(argv[1:])
4186
 
4187
   out_file = opts.output
4188
-  header = opts.header
4189
 
4190
   while len(args) and out_file is None:
4191
     if out_file is None:
4192
@@ -173,12 +208,8 @@ def main(argv=None):
4193
     parser.print_help()
4194
     sys.exit(2)
4195
 
4196
-  if opts.source_dir:
4197
-    src_dir = opts.source_dir
4198
-  else:
4199
-    src_dir = os.path.dirname(os.path.abspath(__file__))
4200
-
4201
-  version_info = FetchVersionInfo(directory=src_dir)
4202
+  version_info = FetchVersionInfo(opts.default_lastchange,
4203
+      os.path.dirname(sys.argv[0]))
4204
 
4205
   if version_info.revision == None:
4206
     version_info.revision = '0'
4207
@@ -187,15 +218,10 @@ def main(argv=None):
4208
     print version_info.revision
4209
   else:
4210
     contents = "LASTCHANGE=%s\n" % version_info.revision
4211
-    if not out_file and not opts.header:
4212
-      sys.stdout.write(contents)
4213
+    if out_file:
4214
+      WriteIfChanged(out_file, contents)
4215
     else:
4216
-      if out_file:
4217
-        WriteIfChanged(out_file, contents)
4218
-      if header:
4219
-        WriteIfChanged(header,
4220
-                       GetHeaderContents(header, opts.version_macro,
4221
-                                         version_info.revision))
4222
+      sys.stdout.write(contents)
4223
 
4224
   return 0
4225
 
4226
diff --git media/webrtc/trunk/build/whitespace_file.txt media/webrtc/trunk/build/whitespace_file.txt
4227
index f2fa9b113c11..087f0ad752ee 100644
4228
--- media/webrtc/trunk/build/whitespace_file.txt
4229
+++ media/webrtc/trunk/build/whitespace_file.txt
4230
@@ -1,33 +1,30 @@
4231
-Copyright 2014 The Chromium Authors. All rights reserved.
4232
+Copyright (c) 2012 The Chromium Authors. All rights reserved.
4233
 Use of this useless file is governed by a BSD-style license that can be
4234
 found in the LICENSE file.
4235
 
4236
-
4237
 This file is used for making non-code changes to trigger buildbot cycles. Make
4238
 any modification below this line.
4239
 
4240
-======================================================================
4241
+=========================================================================
4242
 
4243
-Let's make a story. Add zero+ sentences for every commit:
4244
+Let's make a story. Add one sentence for every commit:
4245
 
4246
-CHÄPTER 1:
4247
-It was a dark and blinky night; the rain fell in torrents -- except at
4248
+CHAPTER 1.0:
4249
+It was a dark and stormy night; the rain fell in torrents -- except at
4250
 occasional intervals, when it was checked by a violent gust of wind which
4251
 swept up the streets (for it is in London that our scene lies), rattling along
4252
 the housetops, and fiercely agitating the scanty flame of the lamps that
4253
-struggled against the elements. A hooded figure emerged.
4254
-
4255
-It was a Domo-Kun.
4256
-
4257
-"What took you so long?", inquired his wife.
4258
+struggled against the darkness. A hooded figure emerged.
4259
 
4260
+It was a Domo-Kun. "What took you so long?", inquired his wife.
4261
 Silence. Oblivious to his silence, she continued, "Did Mr. Usagi enjoy the
4262
 waffles you brought him?" "You know him, he's not one to forego a waffle,
4263
-no matter how burnt," he snickered.
4264
+no matter how burnt", he snickered.
4265
 
4266
-The pause was filled with the sound of compile errors.
4267
+The pause was filled with the sound of thunder.
4268
 
4269
-CHAPTER 2:
4270
+
4271
+CHAPTER 2.0:
4272
 The jelly was as dark as night, and just as runny.
4273
 The Domo-Kun shuddered, remembering the way Mr. Usagi had speared his waffles
4274
 with his fork, watching the runny jelly spread and pool across his plate,
4275
@@ -41,27 +38,24 @@ when the fan was last cleaned.
4276
 
4277
 There was a poignant pause.
4278
 
4279
-CHAPTER 3:
4280
+CHAPTER 3.0:
4281
 Mr. Usagi felt that something wasn't right. Shortly after the Domo-Kun left he
4282
 began feeling sick. He thought out loud to himself, "No, he wouldn't have done
4283
-that to me." He considered that perhaps he shouldn't have pushed so hard.
4284
+that to me." He considered that perhaps he shouldn't have pushed him so far.
4285
 Perhaps he shouldn't have been so cold and sarcastic, after the unimaginable
4286
-horror that had occurred just the week before.
4287
+horror that had occurred, just the week before.
4288
 
4289
-Next time, there won't be any sushi. Why sushi with waffles anyway?  It's like
4290
-adorning breakfast cereal with halibut -- shameful.
4291
+Next time, there won't be any sushi. Why sushis with waffles anyway?  It's like
4292
+salmon in a cereal bowl.
4293
 
4294
 CHAPTER 4:
4295
 The taste of stale sushi in his mouth the next morning was unbearable. He
4296
-wondered where the sushi came from as he attempted to wash the taste away with
4297
-a bottle of 3000¥ sake. He tries to recall the cook's face.  Green? Probably.
4298
+wondered where the sushi came from. He tries to recall the cook's face.  Purple?
4299
 
4300
 CHAPTER 5:
4301
-Many tears later, Mr. Usagi would laugh at the memory of the earnest,
4302
-well-intentioned Domo-Kun. Another day in the life. That is when he realized that
4303
-life goes on.
4304
-
4305
-$CHAPTER6
4306
+Many years later, Mr. Usagi would laugh at the memory of the earnest,
4307
+well-intentioned Domo-Kun.
4308
+Another day in the life...
4309
 
4310
 TRUISMS (1978-1983)
4311
 JENNY HOLZER
4312
@@ -71,104 +65,5 @@ A MAN CAN'T KNOW WHAT IT IS TO BE A MOTHER
4313
 A NAME MEANS A LOT JUST BY ITSELF
4314
 A POSITIVE ATTITUDE MEANS ALL THE DIFFERENCE IN THE WORLD
4315
 A RELAXED MAN IS NOT NECESSARILY A BETTER MAN
4316
-NO ONE SHOULD EVER USE SVN
4317
-AN INFLEXIBLE POSITION SOMETIMES IS A SIGN OF PARALYSIS
4318
-IT IS MANS FATE TO OUTSMART HIMSELF
4319
-BEING SURE OF YOURSELF MEANS YOU'RE A FOOL
4320
-AM NOT
4321
-ARE TOO
4322
-IF AT FIRST YOU DON'T SUCCEED: TRY, EXCEPT, FINALLY
4323
-AND THEN, TIME LEAPT BACKWARDS
4324
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhh LOT
4325
-I'm really tempted to change something above the line.
4326
-Reeccciiiipppppeeeeeesssssss!!!!!!!!!
4327
-PEOPLE SAY "FAILURE IS NOT AN OPTION", BUT FAILURE IS ALWAYS AN OPTION.
4328
-WHAT GOES UP MUST HAVE A NON-ZERO VELOCITY
4329
-
4330
-I can feel the heat closing in, feel them out there making their moves...
4331
-What could possibly go wrong? We've already ate our cake.
4332
-
4333
-Stand Still. Pause Clocks. We can make the World Stop.
4334
-WUBWUBWUBWUBWUB
4335
-
4336
-I want a 1917 build and you will give me what I want.
4337
-
4338
-This sentence is false.
4339
-
4340
-Beauty is in the eyes of a Beholder.
4341
-
4342
-I'm the best at space.
4343
-
4344
-The first time Yossarian saw the chaplain, he fell madly in love with him.
4345
-*
4346
-*
4347
-*
4348
-Give not thyself up, then, to fire, lest it invert thee, deaden thee; as for
4349
-the time it did me. There is a wisdom that is woe; but there is a woe that is
4350
-madness. And there is a Catskill eagle in some souls that can alike dive down
4351
-into the blackest gorges, and soar out of them again and become invisible in
4352
-the sunny spaces. And even if he for ever flies within the gorge, that gorge
4353
-is in the mountains; so that even in his lowest swoop the mountain eagle is
4354
-still higher than other birds upon the plain, even though they soar.
4355
-*
4356
-*
4357
-*
4358
-
4359
-I'm here to commit lines and drop rhymes
4360
-*
4361
-This is a line to test and try uploading a cl.
4362
-
4363
-And lo, in the year 2014, there was verily an attempt to upgrade to GCC 4.8 on
4364
-the Android bots, and it was good. Except on one bot, where it was bad. And
4365
-lo, the change was reverted, and GCC went back to 4.6, where code is slower
4366
-and less optimized. And verily did it break the build, because artifacts had
4367
-been created with 4.8, and alignment was no longer the same, and a great
4368
-sadness descended upon the Android GN buildbot, and it did refuseth to build
4369
-any more. But the sheriffs thought to themselves: Placebo! Let us clobber the
4370
-bot, and perhaps it will rebuild with GCC 4.6, which hath worked for many many
4371
-seasons. And so they modified the whitespace file with these immortal lines,
4372
-and visited it upon the bots, that great destruction might be wrought upon
4373
-their outdated binaries. In clobberus, veritas.
4374
-
4375
-As the git approaches, light begins to shine through the SCM thrice again...
4376
-However, the git, is, after all, quite stupid.
4377
-
4378
-Suddenly Domo-Kun found itself in a room filled with dazzling mirrors. As
4379
-Domo-Kun looked around, it realized that some of the mirrors were actually but
4380
-pale reflections of true reality.
4381
-
4382
-A herd of wild gits appears!  Time for CQ :D
4383
-And one more for sizes.py...
4384
-
4385
-What's an overmarketed dietary supplement expressing sadness, relief,
4386
-tiredness, or a similar feeling.?  Ah-Sigh-ee.
4387
-
4388
-It was love at first sight.  The moment Yossarian first laid eyes on the chaplain, he fell madly in love with him.
4389
-
4390
-Cool whitespace change for git-cl land
4391
-
4392
-Oh god the bots are red! I'm blind! Mmmm, cronuts.
4393
-
4394
-If you stand on your head, you will get footprints in your hair.
4395
-
4396
-sigh
4397
-sigher
4398
-pick up cls
4399
-
4400
-In the BUILD we trust.
4401
-^_^
4402
-
4403
-In the masters we don't.
4404
-In the tryservers, we don't either.
4405
-In the CQ sometimes.
4406
-Auto-generated by git-eject-upstream (http://goo.gl/cIHsYR)
4407
-My sandwiches are like my children: I love them all.
4408
-No, really, I couldn't eat another bit.
4409
-When I hunger I think of you, and a pastrami sandwich.
4410
-Do make a terrible mistake every once in a while.
4411
-I just made two.
4412
-Mistakes are the best sometimes.
4413
-\o/
4414
-This is groovy.
4415
-
4416
-SECRET ENDING: IT WAS _____ ALL ALONG!
4417
+
4418
+This commit will change the world as we know it.
4419
diff --git media/webrtc/trunk/gtest/moz.build media/webrtc/trunk/gtest/moz.build
4420
index 1f9f5c4d802b..71f4441f5fb0 100644
4421
--- media/webrtc/trunk/gtest/moz.build
4422
+++ media/webrtc/trunk/gtest/moz.build
4423
@@ -32,14 +32,14 @@ USE_LIBS += [
4424
     '/media/webrtc/trunk/third_party/gflags/gflags_gflags/gflags',
4425
     '/testing/gtest/gtest',
4426
     'media_libopus',
4427
-    'mozglue',
4428
     'speex',
4429
     'webrtc',
4430
-    'webrtc_common_gn',
4431
-    'webrtc_gn',
4432
-    'webrtc_i420_gn',
4433
-    'webrtc_vp8_gn',
4434
-    'webrtc_vp9_gn',
4435
+    'webrtc_common',
4436
+    'webrtc_i420',
4437
+    'webrtc_lib',
4438
+    'webrtc_utility',
4439
+    'webrtc_vp8',
4440
+    'webrtc_vp9',
4441
     'yuv',
4442
 ]
4443
 
4444
diff --git media/webrtc/trunk/webrtc/BUILD.gn media/webrtc/trunk/webrtc/BUILD.gn
4445
index c808a47ca300..805eaf0d847e 100644
4446
--- media/webrtc/trunk/webrtc/BUILD.gn
4447
+++ media/webrtc/trunk/webrtc/BUILD.gn
4448
@@ -11,9 +11,7 @@
4449
 import("//build/config/linux/pkg_config.gni")
4450
 import("//build/config/sanitizers/sanitizers.gni")
4451
 import("build/webrtc.gni")
4452
-if (!build_with_mozilla) {
4453
-  import("//third_party/protobuf/proto_library.gni")
4454
-}
4455
+import("//third_party/protobuf/proto_library.gni")
4456
 if (is_android) {
4457
   import("//build/config/android/config.gni")
4458
   import("//build/config/android/rules.gni")
4459
@@ -76,12 +74,6 @@ config("common_inherited_config") {
4460
       "WEBRTC_LINUX",
4461
       "WEBRTC_ANDROID",
4462
     ]
4463
-
4464
-    if (build_with_mozilla) {
4465
-      defines += [
4466
-        "WEBRTC_ANDROID_OPENSLES",
4467
-      ]
4468
-    }
4469
   }
4470
   if (is_chromeos) {
4471
     defines += [ "CHROMEOS" ]
4472
@@ -252,41 +244,26 @@ if (!build_with_chromium) {
4473
 
4474
     deps = [
4475
       ":webrtc_common",
4476
+      "api",
4477
       "api:transport_api",
4478
       "audio",
4479
       "base",
4480
       "call",
4481
       "common_audio",
4482
       "common_video",
4483
+      "logging",
4484
       "media",
4485
       "modules",
4486
       "modules/video_capture:video_capture_internal_impl",
4487
+      "p2p",
4488
+      "pc",
4489
       "sdk",
4490
+      "stats",
4491
       "system_wrappers",
4492
       "video",
4493
       "voice_engine",
4494
     ]
4495
 
4496
-    if (build_with_mozilla) {
4497
-      deps += [
4498
-        "api:video_frame_api",
4499
-        "system_wrappers:field_trial_default",
4500
-        "system_wrappers:metrics_default",
4501
-      ]
4502
-
4503
-      if (!is_android) {
4504
-        deps += [ "video_engine" ]
4505
-      }
4506
-    } else {
4507
-      deps += [
4508
-        "api",
4509
-        "logging",
4510
-        "p2p",
4511
-        "pc",
4512
-        "stats",
4513
-      ]
4514
-    }
4515
-
4516
     if (rtc_enable_protobuf) {
4517
       defines += [ "ENABLE_RTC_EVENT_LOG" ]
4518
       deps += [ "logging:rtc_event_log_proto" ]
4519
diff --git media/webrtc/trunk/webrtc/api/api.gyp media/webrtc/trunk/webrtc/api/api.gyp
4520
new file mode 100644
4521
index 000000000000..2ee17acfe779
4522
--- /dev/null
4523
+++ media/webrtc/trunk/webrtc/api/api.gyp
4524
@@ -0,0 +1,255 @@
4525
+# Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
4526
+#
4527
+# Use of this source code is governed by a BSD-style license
4528
+# that can be found in the LICENSE file in the root of the source
4529
+# tree. An additional intellectual property rights grant can be found
4530
+# in the file PATENTS.  All contributing project authors may
4531
+# be found in the AUTHORS file in the root of the source tree.
4532
+
4533
+{
4534
+  'includes': [ '../build/common.gypi', ],
4535
+  'conditions': [
4536
+    ['os_posix == 1 and OS != "mac" and OS != "ios"', {
4537
+      'conditions': [
4538
+        ['sysroot!=""', {
4539
+          'variables': {
4540
+            'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
4541
+          },
4542
+        }, {
4543
+          'variables': {
4544
+            'pkg-config': 'pkg-config'
4545
+          },
4546
+        }],
4547
+      ],
4548
+    }],
4549
+    # Excluded from the Chromium build since they cannot be built due to
4550
+    # incompability with Chromium's logging implementation.
4551
+    ['OS=="android" and build_with_chromium==0 and build_with_mozilla==0', {
4552
+      'targets': [
4553
+        {
4554
+          'target_name': 'libjingle_peerconnection_jni',
4555
+          'type': 'static_library',
4556
+          'dependencies': [
4557
+            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
4558
+            '<(webrtc_root)/system_wrappers/system_wrappers.gyp:metrics_default',
4559
+            'libjingle_peerconnection',
4560
+          ],
4561
+          'sources': [
4562
+            'android/jni/androidmediacodeccommon.h',
4563
+            'android/jni/androidmediadecoder_jni.cc',
4564
+            'android/jni/androidmediadecoder_jni.h',
4565
+            'android/jni/androidmediaencoder_jni.cc',
4566
+            'android/jni/androidmediaencoder_jni.h',
4567
+            'android/jni/androidmetrics_jni.cc',
4568
+            'android/jni/androidnetworkmonitor_jni.cc',
4569
+            'android/jni/androidnetworkmonitor_jni.h',
4570
+            'android/jni/androidvideotracksource_jni.cc',
4571
+            'android/jni/classreferenceholder.cc',
4572
+            'android/jni/classreferenceholder.h',
4573
+            'android/jni/jni_helpers.cc',
4574
+            'android/jni/jni_helpers.h',
4575
+            'android/jni/native_handle_impl.cc',
4576
+            'android/jni/native_handle_impl.h',
4577
+            'android/jni/peerconnection_jni.cc',
4578
+            'android/jni/surfacetexturehelper_jni.cc',
4579
+            'android/jni/surfacetexturehelper_jni.h',
4580
+            'androidvideotracksource.cc',
4581
+            'androidvideotracksource.h',
4582
+          ],
4583
+          'include_dirs': [
4584
+            '<(libyuv_dir)/include',
4585
+          ],
4586
+          # TODO(kjellander): Make the code compile without disabling these flags.
4587
+          # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
4588
+          'cflags': [
4589
+            '-Wno-sign-compare',
4590
+            '-Wno-unused-variable',
4591
+          ],
4592
+          'cflags!': [
4593
+            '-Wextra',
4594
+          ],
4595
+          'msvs_disabled_warnings': [
4596
+            4245,  # conversion from 'int' to 'size_t', signed/unsigned mismatch.
4597
+            4267,  # conversion from 'size_t' to 'int', possible loss of data.
4598
+            4389,  # signed/unsigned mismatch.
4599
+          ],
4600
+        },
4601
+        {
4602
+          'target_name': 'libjingle_peerconnection_so',
4603
+          'type': 'shared_library',
4604
+          'dependencies': [
4605
+            'libjingle_peerconnection',
4606
+            'libjingle_peerconnection_jni',
4607
+          ],
4608
+          'sources': [
4609
+           'android/jni/jni_onload.cc',
4610
+          ],
4611
+          'variables': {
4612
+            # This library uses native JNI exports; tell GYP so that the
4613
+            # required symbols will be kept.
4614
+            'use_native_jni_exports': 1,
4615
+          },
4616
+        },
4617
+      ]
4618
+    }],
4619
+  ],  # conditions
4620
+  'targets': [
4621
+    {
4622
+      'target_name': 'call_api',
4623
+      'type': 'static_library',
4624
+      'dependencies': [
4625
+        # TODO(kjellander): Add remaining dependencies when webrtc:4243 is done.
4626
+        '<(webrtc_root)/base/base.gyp:rtc_base_approved',
4627
+        '<(webrtc_root)/common.gyp:webrtc_common',
4628
+        '<(webrtc_root)/modules/modules.gyp:audio_encoder_interface',
4629
+      ],
4630
+      'sources': [
4631
+        'call/audio_receive_stream.h',
4632
+        'call/audio_send_stream.h',
4633
+        'call/audio_sink.h',
4634
+        'call/audio_state.h',
4635
+      ],
4636
+    },
4637
+    {
4638
+      'target_name': 'video_frame_api',
4639
+      'type': 'static_library',
4640
+      'dependencies': [
4641
+        '<(webrtc_root)/base/base.gyp:rtc_base_approved',
4642
+        '<(webrtc_root)/common.gyp:webrtc_common',
4643
+      ],
4644
+      'sources': [
4645
+        'call/transport.h',
4646
+        'video/i420_buffer.cc',
4647
+        'video/i420_buffer.h',
4648
+        'video/video_frame.cc',
4649
+        'video/video_frame.h',
4650
+        'video/video_frame_buffer.h',
4651
+        'video/video_rotation.h',
4652
+      ],
4653
+      'include_dirs': [
4654
+        '<(libyuv_dir)/include',
4655
+      ],
4656
+    },
4657
+    {
4658
+      'target_name': 'libjingle_peerconnection',
4659
+      'type': 'static_library',
4660
+      'dependencies': [
4661
+        ':call_api',
4662
+        ':rtc_stats_api',
4663
+        '<(webrtc_root)/media/media.gyp:rtc_media',
4664
+        '<(webrtc_root)/pc/pc.gyp:rtc_pc',
4665
+        '<(webrtc_root)/stats/stats.gyp:rtc_stats',
4666
+      ],
4667
+      'sources': [
4668
+        'audiotrack.cc',
4669
+        'audiotrack.h',
4670
+        'datachannel.cc',
4671
+        'datachannel.h',
4672
+        'datachannelinterface.h',
4673
+        'dtmfsender.cc',
4674
+        'dtmfsender.h',
4675
+        'dtmfsenderinterface.h',
4676
+        'jsep.h',
4677
+        'jsepicecandidate.cc',
4678
+        'jsepicecandidate.h',
4679
+        'jsepsessiondescription.cc',
4680
+        'jsepsessiondescription.h',
4681
+        'localaudiosource.cc',
4682
+        'localaudiosource.h',
4683
+        'mediaconstraintsinterface.cc',
4684
+        'mediaconstraintsinterface.h',
4685
+        'mediacontroller.cc',
4686
+        'mediacontroller.h',
4687
+        'mediastream.cc',
4688
+        'mediastream.h',
4689
+        'mediastreaminterface.h',
4690
+        'mediastreamobserver.cc',
4691
+        'mediastreamobserver.h',
4692
+        'mediastreamproxy.h',
4693
+        'mediastreamtrack.h',
4694
+        'mediastreamtrackproxy.h',
4695
+        'notifier.h',
4696
+        'peerconnection.cc',
4697
+        'peerconnection.h',
4698
+        'peerconnectionfactory.cc',
4699
+        'peerconnectionfactory.h',
4700
+        'peerconnectionfactoryproxy.h',
4701
+        'peerconnectioninterface.h',
4702
+        'peerconnectionproxy.h',
4703
+        'proxy.h',
4704
+        'remoteaudiosource.cc',
4705
+        'remoteaudiosource.h',
4706
+        'rtcstatscollector.cc',
4707
+        'rtcstatscollector.h',
4708
+        'rtpparameters.h',
4709
+        'rtpreceiver.cc',
4710
+        'rtpreceiver.h',
4711
+        'rtpreceiverinterface.h',
4712
+        'rtpsender.cc',
4713
+        'rtpsender.h',
4714
+        'rtpsenderinterface.h',
4715
+        'sctputils.cc',
4716
+        'sctputils.h',
4717
+        'statscollector.cc',
4718
+        'statscollector.h',
4719
+        'statstypes.cc',
4720
+        'statstypes.h',
4721
+        'streamcollection.h',
4722
+        'videocapturertracksource.cc',
4723
+        'videocapturertracksource.h',
4724
+        'videosourceproxy.h',
4725
+        'videotrack.cc',
4726
+        'videotrack.h',
4727
+        'videotracksource.cc',
4728
+        'videotracksource.h',
4729
+        'webrtcsdp.cc',
4730
+        'webrtcsdp.h',
4731
+        'webrtcsession.cc',
4732
+        'webrtcsession.h',
4733
+        'webrtcsessiondescriptionfactory.cc',
4734
+        'webrtcsessiondescriptionfactory.h',
4735
+      ],
4736
+      'conditions': [
4737
+        ['clang==1', {
4738
+          'cflags!': [
4739
+            '-Wextra',
4740
+          ],
4741
+          'xcode_settings': {
4742
+            'WARNING_CFLAGS!': ['-Wextra'],
4743
+          },
4744
+        }, {
4745
+          'cflags': [
4746
+            '-Wno-maybe-uninitialized',  # Only exists for GCC.
4747
+          ],
4748
+        }],
4749
+        ['use_quic==1', {
4750
+          'dependencies': [
4751
+            '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
4752
+          ],
4753
+          'sources': [
4754
+            'quicdatachannel.cc',
4755
+            'quicdatachannel.h',
4756
+            'quicdatatransport.cc',
4757
+            'quicdatatransport.h',
4758
+          ],
4759
+          'export_dependent_settings': [
4760
+            '<(DEPTH)/third_party/libquic/libquic.gyp:libquic',
4761
+          ],
4762
+        }],
4763
+      ],
4764
+    },  # target libjingle_peerconnection
4765
+    {
4766
+      # GN version: webrtc/api:rtc_stats_api
4767
+      'target_name': 'rtc_stats_api',
4768
+      'type': 'static_library',
4769
+      'dependencies': [
4770
+        '<(webrtc_root)/base/base.gyp:rtc_base_approved',
4771
+      ],
4772
+      'sources': [
4773
+        'stats/rtcstats.h',
4774
+        'stats/rtcstats_objects.h',
4775
+        'stats/rtcstatsreport.h',
4776
+      ],
4777
+    },  # target rtc_stats_api
4778
+  ],  # targets
4779
+}
4780
diff --git media/webrtc/trunk/webrtc/api/api_java.gyp media/webrtc/trunk/webrtc/api/api_java.gyp
4781
new file mode 100644
4782
index 000000000000..4e18035613e0
4783
--- /dev/null
4784
+++ media/webrtc/trunk/webrtc/api/api_java.gyp
4785
@@ -0,0 +1,50 @@
4786
+# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
4787
+#
4788
+# Use of this source code is governed by a BSD-style license
4789
+# that can be found in the LICENSE file in the root of the source
4790
+# tree. An additional intellectual property rights grant can be found
4791
+# in the file PATENTS.  All contributing project authors may
4792
+# be found in the AUTHORS file in the root of the source tree.
4793
+
4794
+# This file exists only because there's no other way to avoid errors in the
4795
+# Chromium build due to the inclusion of build/java.gypi. GYP unfortunately
4796
+# processes all 'includes' for all .gyp files, ignoring conditions. This
4797
+# processing takes place early in the cycle, before it's possible to use
4798
+# variables. It will go away when WebRTC has fully migrated to GN.
4799
+
4800
+{
4801
+  'includes': [ '../build/common.gypi', ],
4802
+  'conditions': [
4803
+    ['OS=="android"', {
4804
+      'targets': [
4805
+        {
4806
+          # |libjingle_peerconnection_java| builds a jar file with name
4807
+          # libjingle_peerconnection_java.jar using Chrome's build system.
4808
+          # It includes all Java files needed to setup a PeeerConnection call
4809
+          # from Android.
4810
+          'target_name': 'libjingle_peerconnection_java',
4811
+          'type': 'none',
4812
+          'dependencies': [
4813
+            '<(webrtc_root)/api/api.gyp:libjingle_peerconnection_so',
4814
+          ],
4815
+          'variables': {
4816
+            # Designate as Chromium code and point to our lint settings to
4817
+            # enable linting of the WebRTC code (this is the only way to make
4818
+            # lint_action invoke the Android linter).
4819
+            'android_manifest_path': '<(webrtc_root)/build/android/AndroidManifest.xml',
4820
+            'suppressions_file': '<(webrtc_root)/build/android/suppressions.xml',
4821
+            'chromium_code': 1,
4822
+            'java_in_dir': 'android/java',
4823
+            'webrtc_base_dir': '<(webrtc_root)/base',
4824
+            'webrtc_modules_dir': '<(webrtc_root)/modules',
4825
+            'additional_src_dirs' : [
4826
+              '<(webrtc_base_dir)/java',
4827
+              '<(webrtc_modules_dir)/audio_device/android/java/src',
4828
+            ],
4829
+          },
4830
+          'includes': ['../../build/java.gypi'],
4831
+        },
4832
+      ],  # targets
4833
+    }],  # OS=="android"
4834
+  ],  # conditions
4835
+}
4836
diff --git media/webrtc/trunk/webrtc/audio/webrtc_audio.gypi media/webrtc/trunk/webrtc/audio/webrtc_audio.gypi
4837
new file mode 100644
4838
index 000000000000..31a281c09a53
4839
--- /dev/null
4840
+++ media/webrtc/trunk/webrtc/audio/webrtc_audio.gypi
4841
@@ -0,0 +1,32 @@
4842
+# Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
4843
+#
4844
+# Use of this source code is governed by a BSD-style license
4845
+# that can be found in the LICENSE file in the root of the source
4846
+# tree. An additional intellectual property rights grant can be found
4847
+# in the file PATENTS.  All contributing project authors may
4848
+# be found in the AUTHORS file in the root of the source tree.
4849
+{
4850
+  'variables': {
4851
+    'webrtc_audio_dependencies': [
4852
+      '<(webrtc_root)/api/api.gyp:call_api',
4853
+      '<(webrtc_root)/common.gyp:webrtc_common',
4854
+      '<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
4855
+      '<(webrtc_root)/voice_engine/voice_engine.gyp:voice_engine',
4856
+      '<(webrtc_root)/webrtc.gyp:rtc_event_log_api',
4857
+    ],
4858
+    'webrtc_audio_sources': [
4859
+      'audio/audio_receive_stream.cc',
4860
+      'audio/audio_receive_stream.h',
4861
+      'audio/audio_send_stream.cc',
4862
+      'audio/audio_send_stream.h',
4863
+      'audio/audio_state.cc',
4864
+      'audio/audio_state.h',
4865
+      'audio/audio_transport_proxy.cc',
4866
+      'audio/audio_transport_proxy.h',
4867
+      'audio/conversion.h',
4868
+      'audio/scoped_voe_interface.h',
4869
+      'audio/utility/audio_frame_operations.cc',
4870
+      'audio/utility/audio_frame_operations.h',
4871
+    ],
4872
+  },
4873
+}
4874
diff --git media/webrtc/trunk/webrtc/base/BUILD.gn media/webrtc/trunk/webrtc/base/BUILD.gn
4875
index bdef9f5a2cbf..0902581f2eff 100644
4876
--- media/webrtc/trunk/webrtc/base/BUILD.gn
4877
+++ media/webrtc/trunk/webrtc/base/BUILD.gn
4878
@@ -20,22 +20,17 @@ if (is_win) {
4879
 
4880
 group("base") {
4881
   public_deps = [
4882
+    ":rtc_base",
4883
     ":rtc_base_approved",
4884
     ":rtc_task_queue",
4885
   ]
4886
-  if (!build_with_mozilla) {
4887
-    public_deps += [
4888
-      ":rtc_base",
4889
-    ]
4890
-  }
4891
-
4892
-  if (is_android && !build_with_mozilla) {
4893
+  if (is_android) {
4894
     public_deps += [ ":base_java" ]
4895
   }
4896
 }
4897
 
4898
 config("rtc_base_approved_all_dependent_config") {
4899
-  if (is_mac && !(build_with_chromium || build_with_mozilla)) {
4900
+  if (is_mac && !build_with_chromium) {
4901
     libs = [ "Foundation.framework" ]  # needed for logging_mac.mm
4902
   }
4903
 }
4904
@@ -77,7 +72,7 @@ config("rtc_base_all_dependent_config") {
4905
   }
4906
 }
4907
 
4908
-if (is_linux && !build_with_chromium && !build_with_mozilla) {
4909
+if (is_linux && !build_with_chromium) {
4910
   # Provides the same functionality as the //crypto:platform target, which
4911
   # WebRTC cannot use as we don't sync src/crypto from Chromium.
4912
   group("linux_system_ssl") {
4913
@@ -89,11 +84,9 @@ if (is_linux && !build_with_chromium && !build_with_mozilla) {
4914
 
4915
 if (!rtc_build_ssl) {
4916
   config("external_ssl_library") {
4917
-    if (!build_with_mozilla) {
4918
-      assert(rtc_ssl_root != "",
4919
-             "You must specify rtc_ssl_root when rtc_build_ssl==0.")
4920
-      include_dirs = [ rtc_ssl_root ]
4921
-    }
4922
+    assert(rtc_ssl_root != "",
4923
+           "You must specify rtc_ssl_root when rtc_build_ssl==0.")
4924
+    include_dirs = [ rtc_ssl_root ]
4925
   }
4926
 }
4927
 
4928
@@ -201,19 +194,8 @@ rtc_static_library("rtc_base_approved") {
4929
 
4930
   if (is_win) {
4931
     sources += [ "file_win.cc" ]
4932
-
4933
-    if (build_with_mozilla) {
4934
-      sources += [ "win32.cc" ]
4935
-    }
4936
   }
4937
 
4938
-  if (is_mac) {
4939
-    if (build_with_mozilla) {
4940
-      sources += [ "macutils.cc" ]
4941
-    }
4942
-  }
4943
-
4944
-
4945
   if (build_with_chromium) {
4946
     # Dependency on chromium's logging (in //base).
4947
     deps += [ "//base:base" ]
4948
@@ -341,11 +323,6 @@ rtc_static_library("rtc_task_queue") {
4949
         "task_queue_posix.cc",
4950
       ]
4951
       all_dependent_configs = [ ":enable_libevent_config" ]
4952
-
4953
-      if (build_with_mozilla) {
4954
-        include_dirs = [ "$rtc_libevent_dir/include" ]
4955
-        include_dirs += [ "$rtc_libevent_dir/linux" ]
4956
-      }
4957
     } else {
4958
       if (is_mac || is_ios) {
4959
         sources += [
4960
@@ -966,7 +943,7 @@ if (rtc_include_tests) {
4961
   }
4962
 }
4963
 
4964
-if (is_android && !build_with_mozilla) {
4965
+if (is_android) {
4966
   android_library("base_java") {
4967
     java_files = [
4968
       "java/src/org/webrtc/Logging.java",
4969
diff --git media/webrtc/trunk/webrtc/base/base.gyp media/webrtc/trunk/webrtc/base/base.gyp
4970
new file mode 100644
4971
index 000000000000..4dd48f7d5f81
4972
--- /dev/null
4973
+++ media/webrtc/trunk/webrtc/base/base.gyp
4974
@@ -0,0 +1,682 @@
4975
+# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
4976
+#
4977
+# Use of this source code is governed by a BSD-style license
4978
+# that can be found in the LICENSE file in the root of the source
4979
+# tree. An additional intellectual property rights grant can be found
4980
+# in the file PATENTS.  All contributing project authors may
4981
+# be found in the AUTHORS file in the root of the source tree.
4982
+
4983
+{
4984
+  'includes': [ '../build/common.gypi', ],
4985
+  'conditions': [
4986
+    ['os_posix==1 and OS!="mac" and OS!="ios"', {
4987
+      'conditions': [
4988
+        ['sysroot!=""', {
4989
+          'variables': {
4990
+            'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
4991
+          },
4992
+        }, {
4993
+          'variables': {
4994
+            'pkg-config': 'pkg-config'
4995
+          },
4996
+        }],
4997
+      ],
4998
+    }],
4999
+  ],
5000
+  'targets': [
5001
+    {
5002
+      # The subset of rtc_base approved for use outside of libjingle.
5003
+      'target_name': 'rtc_base_approved',
5004
+      'type': 'static_library',
5005
+      'sources': [
5006
+        'arraysize.h',
5007
+        'array_view.h',
5008
+        'atomicops.h',
5009
+        'basictypes.h',
5010
+        'base64.cc',
5011
+        'base64.h',
5012
+        'bind.h',
5013
+        'bitbuffer.cc',
5014
+        'bitbuffer.h',
5015
+        'buffer.h',
5016
+        'bufferqueue.cc',
5017
+        'bufferqueue.h',
5018
+        'bytebuffer.cc',
5019
+        'bytebuffer.h',
5020
+        'byteorder.h',
5021
+        'checks.cc',
5022
+        'checks.h',
5023
+        'common.cc',
5024
+        'common.h',
5025
+        'constructormagic.h',
5026
+        'copyonwritebuffer.cc',
5027
+        'copyonwritebuffer.h',
5028
+        'criticalsection.cc',
5029
+        'criticalsection.h',
5030
+        'deprecation.h',
5031
+        'event.cc',
5032
+        'event.h',
5033
+        'event_tracer.cc',
5034
+        'event_tracer.h',
5035
+        'numerics/exp_filter.cc',
5036
+        'numerics/exp_filter.h',
5037
+        'numerics/percentile_filter.h',
5038
+        'file.cc',
5039
+        'file.h',
5040
+        'flags.cc',
5041
+        'flags.h',
5042
+        'format_macros.h',
5043
+        'function_view.h',
5044
+        'ignore_wundef.h',
5045
+        'location.h',
5046
+        'location.cc',
5047
+        'md5.cc',
5048
+        'md5.h',
5049
+        'md5digest.cc',
5050
+        'md5digest.h',
5051
+        'mod_ops.h',
5052
+        'onetimeevent.h',
5053
+        'optional.cc',
5054
+        'optional.h',
5055
+        'pathutils.cc',
5056
+        'pathutils.h',
5057
+        'platform_file.cc',
5058
+        'platform_file.h',
5059
+        'platform_thread.cc',
5060
+        'platform_thread.h',
5061
+        'platform_thread_types.h',
5062
+        'race_checker.cc',
5063
+        'race_checker.h',
5064
+        'random.cc',
5065
+        'random.h',
5066
+        'rate_statistics.cc',
5067
+        'rate_statistics.h',
5068
+        'rate_limiter.cc',
5069
+        'rate_limiter.h',
5070
+        'ratetracker.cc',
5071
+        'ratetracker.h',
5072
+        'refcount.h',
5073
+        'refcountedobject.h',
5074
+        'safe_compare.h',
5075
+        'safe_conversions.h',
5076
+        'safe_conversions_impl.h',
5077
+        'sanitizer.h',
5078
+        'scoped_ref_ptr.h',
5079
+        'stringencode.cc',
5080
+        'stringencode.h',
5081
+        'stringutils.cc',
5082
+        'stringutils.h',
5083
+        'swap_queue.h',
5084
+        'template_util.h',
5085
+        'thread_annotations.h',
5086
+        'thread_checker.h',
5087
+        'thread_checker_impl.cc',
5088
+        'thread_checker_impl.h',
5089
+        'timestampaligner.cc',
5090
+        'timestampaligner.h',
5091
+        'timeutils.cc',
5092
+        'timeutils.h',
5093
+        'trace_event.h',
5094
+        'type_traits.h',
5095
+      ],
5096
+      'conditions': [
5097
+        ['os_posix==1', {
5098
+          'sources': [
5099
+            'file_posix.cc',
5100
+          ],
5101
+        }],
5102
+        ['OS=="win"', {
5103
+          'sources': [
5104
+            'file_win.cc',
5105
+            'win32.cc',
5106
+            'win32.h',
5107
+          ],
5108
+        }],
5109
+        ['OS=="mac"', {
5110
+          'sources': [
5111
+            'macutils.cc',
5112
+            'macutils.h',
5113
+          ],
5114
+        }],
5115
+        ['build_with_chromium==1', {
5116
+          'dependencies': [
5117
+            '<(DEPTH)/base/base.gyp:base',
5118
+          ],
5119
+          'include_dirs': [
5120
+            '../../webrtc_overrides',
5121
+          ],
5122
+          'sources': [
5123
+            '../../webrtc_overrides/webrtc/base/logging.cc',
5124
+            '../../webrtc_overrides/webrtc/base/logging.h',
5125
+          ],
5126
+        }, {
5127
+          'sources': [
5128
+            'logging.cc',
5129
+            'logging.h',
5130
+            'logging_mac.mm',
5131
+          ],
5132
+        }],
5133
+        ['OS=="mac" and build_with_chromium==0', {
5134
+          'all_dependent_settings': {
5135
+            'xcode_settings': {
5136
+              'OTHER_LDFLAGS': [
5137
+                # needed for logging_mac.mm
5138
+                '-framework Foundation',
5139
+              ],
5140
+            },
5141
+          },
5142
+        }], # OS=="mac" and build_with_chromium==0
5143
+        ['OS=="android"', {
5144
+          'link_settings': {
5145
+            'libraries': [
5146
+              '-llog',
5147
+            ],
5148
+          },
5149
+        }],
5150
+      ],
5151
+    },
5152
+    {
5153
+      'target_name': 'rtc_task_queue',
5154
+      'type': 'static_library',
5155
+      'dependencies': [
5156
+        'rtc_base_approved',
5157
+      ],
5158
+      'sources': [
5159
+        'sequenced_task_checker.h',
5160
+        'sequenced_task_checker_impl.cc',
5161
+        'sequenced_task_checker_impl.h',
5162
+        'weak_ptr.cc',
5163
+        'weak_ptr.h',
5164
+      ],
5165
+      'conditions': [
5166
+        ['build_with_chromium==1', {
5167
+          'include_dirs': [
5168
+            '../../webrtc_overrides'
5169
+          ],
5170
+          'sources' : [
5171
+            '../../webrtc_overrides/webrtc/base/task_queue.cc',
5172
+            '../../webrtc_overrides/webrtc/base/task_queue.h',
5173
+          ]
5174
+        } , {
5175
+          # If not build for chromium, use our own implementation.
5176
+          'sources' : [
5177
+            'task_queue.h',
5178
+            'task_queue_posix.h',
5179
+          ],
5180
+          'conditions': [
5181
+            #TODO: no libevent.gyp
5182
+            ['build_libevent==1', {
5183
+              'dependencies': [
5184
+                '<(DEPTH)/base/third_party/libevent/libevent.gyp:libevent',
5185
+              ],
5186
+            } , {
5187
+              'include_dirs': [
5188
+                '$(MOZ_LIBEVENT_CFLAGS)',
5189
+                '<(libevent_dir)/',
5190
+                '<(libevent_dir)/../',
5191
+                '<(libevent_dir)/include/',
5192
+              ],
5193
+              'conditions': [
5194
+                ['OS=="mac" or OS=="ios"', {
5195
+                  'include_dirs': [
5196
+                    '<(libevent_dir)/mac/',
5197
+                  ],
5198
+                }],
5199
+                ['OS=="linux"', {
5200
+                  'include_dirs': [
5201
+                    '<(libevent_dir)/linux/',
5202
+                  ],
5203
+                }],
5204
+                ['os_bsd==1', {
5205
+                  'include_dirs': [
5206
+                    '<(libevent_dir)/bsd/',
5207
+                  ],
5208
+                }],
5209
+                ['OS=="win"', {
5210
+                  'include_dirs': [
5211
+                    '<(libevent_dir)/WIN32-Code/',
5212
+                  ],
5213
+                }],
5214
+                ['OS=="android"', {
5215
+                  'include_dirs': [
5216
+                    '<(libevent_dir)/android/',
5217
+                  ],
5218
+                }],
5219
+              ],
5220
+            }],
5221
+            ['enable_libevent==1', {
5222
+              'sources': [
5223
+                'task_queue_libevent.cc',
5224
+                'task_queue_posix.cc',
5225
+              ],
5226
+              'defines': [ 'WEBRTC_BUILD_LIBEVENT',  ],
5227
+              'all_dependent_settings': {
5228
+                'defines': [ 'WEBRTC_BUILD_LIBEVENT' ],
5229
+              },
5230
+            }, {
5231
+              # If not libevent, fall back to the other task queues.
5232
+              'conditions': [
5233
+                ['OS=="mac" or OS=="ios"', {
5234
+                 'sources': [
5235
+                   'task_queue_gcd.cc',
5236
+                   'task_queue_posix.cc',
5237
+                 ],
5238
+                }],
5239
+                ['OS=="win"', {
5240
+                  'sources': [ 'task_queue_win.cc' ],
5241
+                }]
5242
+              ],
5243
+            }],
5244
+          ]
5245
+        }],
5246
+      ],
5247
+    },
5248
+    {
5249
+      'target_name': 'rtc_base',
5250
+      'type': 'static_library',
5251
+      'dependencies': [
5252
+        '../common.gyp:webrtc_common',
5253
+        'rtc_base_approved',
5254
+      ],
5255
+      'export_dependent_settings': [
5256
+        'rtc_base_approved',
5257
+      ],
5258
+      'defines': [
5259
+        'FEATURE_ENABLE_SSL',
5260
+        'SSL_USE_OPENSSL',
5261
+        'HAVE_OPENSSL_SSL_H',
5262
+        'LOGGING=1',
5263
+      ],
5264
+      'sources': [
5265
+        'applefilesystem.mm',
5266
+        'asyncinvoker.cc',
5267
+        'asyncinvoker.h',
5268
+        'asyncinvoker-inl.h',
5269
+        'asyncpacketsocket.cc',
5270
+        'asyncpacketsocket.h',
5271
+        'asyncresolverinterface.cc',
5272
+        'asyncresolverinterface.h',
5273
+        'asyncsocket.cc',
5274
+        'asyncsocket.h',
5275
+        'asynctcpsocket.cc',
5276
+        'asynctcpsocket.h',
5277
+        'asyncudpsocket.cc',
5278
+        'asyncudpsocket.h',
5279
+        'autodetectproxy.cc',
5280
+        'autodetectproxy.h',
5281
+        'crc32.cc',
5282
+        'crc32.h',
5283
+        'cryptstring.cc',
5284
+        'cryptstring.h',
5285
+        'diskcache.cc',
5286
+        'diskcache.h',
5287
+        'filerotatingstream.cc',
5288
+        'filerotatingstream.h',
5289
+        'fileutils.cc',
5290
+        'fileutils.h',
5291
+        'firewallsocketserver.cc',
5292
+        'firewallsocketserver.h',
5293
+        'gunit_prod.h',
5294
+        'helpers.cc',
5295
+        'helpers.h',
5296
+        'httpbase.cc',
5297
+        'httpbase.h',
5298
+        'httpclient.cc',
5299
+        'httpclient.h',
5300
+        'httpcommon-inl.h',
5301
+        'httpcommon.cc',
5302
+        'httpcommon.h',
5303
+        'ipaddress.cc',
5304
+        'ipaddress.h',
5305
+        'linked_ptr.h',
5306
+        'messagedigest.cc',
5307
+        'messagedigest.h',
5308
+        'messagehandler.cc',
5309
+        'messagehandler.h',
5310
+        'messagequeue.cc',
5311
+        'messagequeue.h',
5312
+        'nethelpers.cc',
5313
+        'nethelpers.h',
5314
+        'network.cc',
5315
+        'network.h',
5316
+        'networkmonitor.cc',
5317
+        'networkmonitor.h',
5318
+        'nullsocketserver.cc',
5319
+        'nullsocketserver.h',
5320
+        'openssl.h',
5321
+        'openssladapter.cc',
5322
+        'openssladapter.h',
5323
+        'openssldigest.cc',
5324
+        'openssldigest.h',
5325
+        'opensslidentity.cc',
5326
+        'opensslidentity.h',
5327
+        'opensslstreamadapter.cc',
5328
+        'opensslstreamadapter.h',
5329
+        'physicalsocketserver.cc',
5330
+        'physicalsocketserver.h',
5331
+        'proxydetect.cc',
5332
+        'proxydetect.h',
5333
+        'proxyinfo.cc',
5334
+        'proxyinfo.h',
5335
+        'ratelimiter.cc',
5336
+        'ratelimiter.h',
5337
+        'rtccertificate.cc',
5338
+        'rtccertificate.h',
5339
+        'rtccertificategenerator.cc',
5340
+        'rtccertificategenerator.h',
5341
+        'sha1.cc',
5342
+        'sha1.h',
5343
+        'sha1digest.cc',
5344
+        'sha1digest.h',
5345
+        'sharedexclusivelock.cc',
5346
+        'sharedexclusivelock.h',
5347
+        'signalthread.cc',
5348
+        'signalthread.h',
5349
+        'sigslot.cc',
5350
+        'sigslot.h',
5351
+        'sigslotrepeater.h',
5352
+        'socket.h',
5353
+        'socketadapters.cc',
5354
+        'socketadapters.h',
5355
+        'socketaddress.cc',
5356
+        'socketaddress.h',
5357
+        'socketaddresspair.cc',
5358
+        'socketaddresspair.h',
5359
+        'socketfactory.h',
5360
+        'socketpool.cc',
5361
+        'socketpool.h',
5362
+        'socketserver.h',
5363
+        'socketstream.cc',
5364
+        'socketstream.h',
5365
+        'ssladapter.cc',
5366
+        'ssladapter.h',
5367
+        'sslfingerprint.cc',
5368
+        'sslfingerprint.h',
5369
+        'sslidentity.cc',
5370
+        'sslidentity.h',
5371
+        'sslsocketfactory.cc',
5372
+        'sslsocketfactory.h',
5373
+        'sslstreamadapter.cc',
5374
+        'sslstreamadapter.h',
5375
+        'stream.cc',
5376
+        'stream.h',
5377
+        'task.cc',
5378
+        'task.h',
5379
+        'taskparent.cc',
5380
+        'taskparent.h',
5381
+        'taskrunner.cc',
5382
+        'taskrunner.h',
5383
+        'thread.cc',
5384
+        'thread.h',
5385
+      ],
5386
+      # TODO(henrike): issue 3307, make rtc_base build without disabling
5387
+      # these flags.
5388
+      'cflags!': [
5389
+        '-Wextra',
5390
+        '-Wall',
5391
+      ],
5392
+      'direct_dependent_settings': {
5393
+        'defines': [
5394
+          'FEATURE_ENABLE_SSL',
5395
+          'SSL_USE_OPENSSL',
5396
+          'HAVE_OPENSSL_SSL_H',
5397
+        ],
5398
+      },
5399
+      'conditions': [
5400
+        ['build_with_chromium==1', {
5401
+          'include_dirs': [
5402
+            '../../webrtc_overrides',
5403
+            '../../boringssl/src/include',
5404
+          ],
5405
+          'conditions': [
5406
+            ['OS=="win"', {
5407
+              'sources': [
5408
+                '../../webrtc_overrides/webrtc/base/win32socketinit.cc',
5409
+              ],
5410
+            }],
5411
+          ],
5412
+          'defines': [
5413
+            'NO_MAIN_THREAD_WRAPPING',
5414
+          ],
5415
+          'direct_dependent_settings': {
5416
+            'defines': [
5417
+              'NO_MAIN_THREAD_WRAPPING',
5418
+            ],
5419
+          },
5420
+        }, {
5421
+          'sources': [
5422
+            'callback.h',
5423
+            'fileutils_mock.h',
5424
+            'httpserver.cc',
5425
+            'httpserver.h',
5426
+            'json.cc',
5427
+            'json.h',
5428
+            'logsinks.cc',
5429
+            'logsinks.h',
5430
+            'mathutils.h',
5431
+            'natserver.cc',
5432
+            'natserver.h',
5433
+            'natsocketfactory.cc',
5434
+            'natsocketfactory.h',
5435
+            'nattypes.cc',
5436
+            'nattypes.h',
5437
+            'optionsfile.cc',
5438
+            'optionsfile.h',
5439
+            'proxyserver.cc',
5440
+            'proxyserver.h',
5441
+            'referencecountedsingletonfactory.h',
5442
+            'rollingaccumulator.h',
5443
+            'scopedptrcollection.h',
5444
+            'sslconfig.h',
5445
+            'sslroots.h',
5446
+            'testbase64.h',
5447
+            'testclient.cc',
5448
+            'testclient.h',
5449
+            'transformadapter.cc',
5450
+            'transformadapter.h',
5451
+            'virtualsocketserver.cc',
5452
+            'virtualsocketserver.h',
5453
+            'window.h',
5454
+            'windowpicker.h',
5455
+            'windowpickerfactory.h',
5456
+          ],
5457
+          'conditions': [
5458
+            ['build_json==1', {
5459
+              'dependencies': [
5460
+                '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
5461
+              ],
5462
+            }, {