Gentoo Archives: gentoo-commits

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/, www-client/firefox/files/
Date: Mon, 04 Jun 2012 11:53:06
Message-Id: 1338810768.371d63c6f908f966d9bcba5a67bd544520716ce6.nirbheek@gentoo
1 commit: 371d63c6f908f966d9bcba5a67bd544520716ce6
2 Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 4 11:29:29 2012 +0000
4 Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 4 11:52:48 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=371d63c6
7
8 firefox: add patches to support h.264 and aac/mp3 properly
9
10 ---
11 www-client/firefox/Manifest | 7 ++
12 .../files/firefox-14.0_alpha2-gst-aac-mp3.patch | 70 ++++++++++++++++++++
13 .../firefox-14.0_alpha2-gst-youtube-h264.patch | 26 +++++++
14 ...alpha2.ebuild => firefox-14.0_alpha2-r1.ebuild} | 4 +-
15 4 files changed, 106 insertions(+), 1 deletions(-)
16
17 diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest
18 index 44d7a9a..caac62a 100644
19 --- a/www-client/firefox/Manifest
20 +++ b/www-client/firefox/Manifest
21 @@ -1,3 +1,5 @@
22 +AUX firefox-14.0_alpha2-gst-aac-mp3.patch 2454 RMD160 47fe9e90b2d5acf6f25d4641b983a5a077d89a57 SHA1 234ccafcb7df3f55d4cee6f776a01987068bb685 SHA256 ef3e6539d292629a52a592cecd90a23562480d7280cfd3883d4407ad06e418a7
23 +AUX firefox-14.0_alpha2-gst-youtube-h264.patch 1437 RMD160 48daef08188b9862cef5af9192f029347a7a0a9b SHA1 03bde68c29b6acd50e4b6b6eac5fa2c12053b216 SHA256 9b871769727e6d16939c55695b4f08c6b460c3f6cf5bce46ce429f40c4801669
24 AUX gentoo-default-prefs.js-1 821 RMD160 13a7be3a165b7059e51fab2cc7fc8d31a82260eb SHA1 333339c4deb4fd41527fd87e1acf0af12cf1007c SHA256 16259ec24a231d1d60097c8d892caa80d2703ba5be72304f6da55cfce1b329de
25 AUX icon/firefox.desktop 276 RMD160 92a5671cd09e399b3330c4be31b7ac7583747031 SHA1 b757763670a00982f3cb38b8d41d7faa6eee3818 SHA256 06565ade11b6e4b448cf10339696c43f31e73cb6824491094bb6e0ab902c7cf5
26 DIST firefox-12.0-af.xpi 248464 RMD160 84e4439e4f316e068293645ec9f65371109bfabd SHA1 954468cb4d2e7b833f0a320311ce7892993727ba SHA256 eb4da7b66f26286917239430a3072afc6c4b00b39e4547271f4f2689888b4f21
27 @@ -88,5 +90,10 @@ DIST firefox-12.0-zu.xpi 255708 RMD160 42b5013ff842ed74bcb70bacf338b6239340a1c6
28 DIST firefox-12.0.source.tar.bz2 78956707 RMD160 d83eb97543fc09f84b30a46ba8217c17f30bd572 SHA1 0177185e54b7d63dc36bd5bd5c80ba6afd52e199 SHA256 9a232a10e5803b0e4a85bd986e3e88b87ccde7bdc3363ea7022d5761944dbb1d
29 DIST firefox-14.0-patches-0.1.tar.xz 9832 RMD160 70d23bc9e3860c405126bcb3a1365e81fd46fce6 SHA1 71a3c33ffa4423db46c4758690424e33a7f386da SHA256 9490723fc44e89dbf541d3427796cdab1a9398e43f869a30e35455c7fb5ee8b5
30 DIST firefox-14.0a2_7f3c5dd8e78f.source.tar.bz2 81112940 RMD160 e5412ebb1fbe471b04aeba1ad18b579224c9e2b4 SHA1 8ba004b4b6a8b31fba50c12926113e141ac917fd SHA256 c02f8e267d61ad9be7837645bf02b71a3df125c681a4a639abbfdad73b75e466
31 +<<<<<<< HEAD
32 EBUILD firefox-12.0-r2.ebuild 11062 RMD160 de99a90c98c63eeb6da65eb3d928889955d33790 SHA1 54ccc5f19e61f5f980a6ae86d41c5149d1201c96 SHA256 d73ebb5e37fd56105cc3b420dab845328ae44504f221976a3334733bc338a410
33 EBUILD firefox-14.0_alpha2.ebuild 11434 RMD160 a2bfb110306199466256300389ff1073be9939ab SHA1 a094bbf18a7fc08a17a87e29b7ce4f2465a39afc SHA256 0f4d5a55aac63caad61161f41183279ff18a086bfc863f935da8400048c7b5c6
34 +=======
35 +EBUILD firefox-12.0-r1.ebuild 11124 RMD160 8226d263a1232057d29c01917dc97d6c1ae663de SHA1 8f8c00c0611c9b3117c806a4c7a6664ebd6917b1 SHA256 a54edd364c3857119a54726004a9bbad657a542c1b467d7e90a489eea66b4cad
36 +EBUILD firefox-14.0_alpha2-r1.ebuild 11473 RMD160 38b67289f2b15c556a7655b38741e81267ef394a SHA1 1ee60c849bbe0f56c1c06c19cbb21115d791a3c0 SHA256 ab80136e68ade3730557f93e0c385ba47b2b49e49cc99abeda259b2f62b97b18
37 +>>>>>>> firefox: add patches to support h.264 and aac/mp3 properly
38
39 diff --git a/www-client/firefox/files/firefox-14.0_alpha2-gst-aac-mp3.patch b/www-client/firefox/files/firefox-14.0_alpha2-gst-aac-mp3.patch
40 new file mode 100644
41 index 0000000..136375a
42 --- /dev/null
43 +++ b/www-client/firefox/files/firefox-14.0_alpha2-gst-aac-mp3.patch
44 @@ -0,0 +1,70 @@
45 +diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h
46 +--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:37:25.791017257 +0530
47 ++++ mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:38:22.259014896 +0530
48 +@@ -305,8 +305,10 @@ public:
49 + #ifdef MOZ_GSTREAMER
50 + static bool IsH264Enabled();
51 + static bool IsH264Type(const nsACString& aType);
52 ++ static bool IsSupportedAudioType(const nsACString& aType);
53 + static const char gH264Types[3][17];
54 + static char const *const gH264Codecs[6];
55 ++ static const char gSupportedAudioTypes[2][11];
56 + #endif
57 +
58 + /**
59 +diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp
60 +--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:37:25.834017256 +0530
61 ++++ mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:40:04.358010627 +0530
62 +@@ -1865,6 +1865,11 @@ char const *const nsHTMLMediaElement::gH
63 + nsnull
64 + };
65 +
66 ++const char nsHTMLMediaElement::gSupportedAudioTypes[2][11] = {
67 ++ "audio/mp4",
68 ++ "audio/mpeg",
69 ++};
70 ++
71 + bool
72 + nsHTMLMediaElement::IsH264Enabled()
73 + {
74 +@@ -1886,6 +1891,18 @@ nsHTMLMediaElement::IsH264Type(const nsA
75 +
76 + return false;
77 + }
78 ++
79 ++bool
80 ++nsHTMLMediaElement::IsSupportedAudioType(const nsACString& aType)
81 ++{
82 ++ for (PRUint32 i = 0; i < ArrayLength(gSupportedAudioTypes); ++i) {
83 ++ if (aType.EqualsASCII(gSupportedAudioTypes[i])) {
84 ++ return true;
85 ++ }
86 ++ }
87 ++
88 ++ return false;
89 ++}
90 + #endif
91 +
92 + /* static */
93 +@@ -1919,6 +1936,11 @@ nsHTMLMediaElement::CanHandleMediaType(c
94 + #endif
95 +
96 + #ifdef MOZ_GSTREAMER
97 ++ if (IsSupportedAudioType(nsDependentCString(aMIMEType))) {
98 ++ *aCodecList = NULL;
99 ++ return CANPLAY_MAYBE;
100 ++ }
101 ++
102 + if (IsH264Type(nsDependentCString(aMIMEType))) {
103 + *aCodecList = gH264Codecs;
104 + return CANPLAY_YES;
105 +@@ -1992,7 +2014,8 @@ nsHTMLMediaElement::GetCanPlay(const nsA
106 + while (tokenizer.hasMoreTokens()) {
107 + const nsSubstring& token = tokenizer.nextToken();
108 +
109 +- if (!CodecListContains(supportedCodecs, token)) {
110 ++ if (supportedCodecs == NULL ||
111 ++ !CodecListContains(supportedCodecs, token)) {
112 + // Totally unsupported codec
113 + return CANPLAY_NO;
114 + }
115
116 diff --git a/www-client/firefox/files/firefox-14.0_alpha2-gst-youtube-h264.patch b/www-client/firefox/files/firefox-14.0_alpha2-gst-youtube-h264.patch
117 new file mode 100644
118 index 0000000..c9002c7
119 --- /dev/null
120 +++ b/www-client/firefox/files/firefox-14.0_alpha2-gst-youtube-h264.patch
121 @@ -0,0 +1,26 @@
122 +diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h
123 +--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:48:14.664990120 +0530
124 ++++ mozilla-aurora-7f3c5dd8e78f/content/html/content/public/nsHTMLMediaElement.h 2012-06-04 11:48:43.970988893 +0530
125 +@@ -307,7 +307,7 @@ public:
126 + static bool IsH264Type(const nsACString& aType);
127 + static bool IsSupportedAudioType(const nsACString& aType);
128 + static const char gH264Types[3][17];
129 +- static char const *const gH264Codecs[6];
130 ++ static char const *const gH264Codecs[7];
131 + static const char gSupportedAudioTypes[2][11];
132 + #endif
133 +
134 +diff -urNp mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp
135 +--- mozilla-aurora-7f3c5dd8e78f.old/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:48:14.667990120 +0530
136 ++++ mozilla-aurora-7f3c5dd8e78f/content/html/content/src/nsHTMLMediaElement.cpp 2012-06-04 11:49:18.261987460 +0530
137 +@@ -1856,8 +1856,9 @@ const char nsHTMLMediaElement::gH264Type
138 + "video/quicktime",
139 + };
140 +
141 +-char const *const nsHTMLMediaElement::gH264Codecs[6] = {
142 ++char const *const nsHTMLMediaElement::gH264Codecs[7] = {
143 + "avc1.42E01E",
144 ++ "avc1.42001E",
145 + "avc1.58A01E",
146 + "avc1.4D401E",
147 + "avc1.64001E",
148
149 diff --git a/www-client/firefox/firefox-14.0_alpha2.ebuild b/www-client/firefox/firefox-14.0_alpha2-r1.ebuild
150 similarity index 99%
151 rename from www-client/firefox/firefox-14.0_alpha2.ebuild
152 rename to www-client/firefox/firefox-14.0_alpha2-r1.ebuild
153 index 68683f1..a1e4c76 100644
154 --- a/www-client/firefox/firefox-14.0_alpha2.ebuild
155 +++ b/www-client/firefox/firefox-14.0_alpha2-r1.ebuild
156 @@ -143,6 +143,8 @@ src_prepare() {
157 EPATCH_FORCE="yes" \
158 epatch "${WORKDIR}/firefox"
159
160 + epatch "${FILESDIR}"/${P}-gst-*.patch
161 +
162 # Allow user to apply any additional patches without modifing ebuild
163 epatch_user
164
165 @@ -174,7 +176,7 @@ src_prepare() {
166 -i "${S}"/toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
167 -i "${S}"/config/system-headers \
168 -i "${S}"/js/src/config/system-headers || die "Sed failed"
169 -
170 +
171 eautoreconf
172 }