1 |
commit: 91705546be499697c47b56a28895a519b7c31444 |
2 |
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 28 14:09:04 2017 +0000 |
4 |
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 28 14:09:04 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=91705546 |
7 |
|
8 |
www-client/firefox: add eme-free use flag to buildtime-disable all DRM plugin loading |
9 |
|
10 |
For those wanting to ensure firefox will never load any closed DRM content plugins |
11 |
or allow any user on the system to do so in their profile, USE="eme-free" now |
12 |
triggers --disable-eme in the build configuration, which entirely removes the |
13 |
capability of DRM plugin loading. This flag nullifies the effect that |
14 |
USE=-gmp-autoupdate performs but a REQUIRED_USE was not implemented as |
15 |
forcing package.use modifications seems overkill for what becomes a do-nothing |
16 |
flag. |
17 |
|
18 |
www-client/firefox/firefox-52.4.0.ebuild | 8 +++++--- |
19 |
www-client/firefox/firefox-56.0.ebuild | 8 +++++--- |
20 |
www-client/firefox/metadata.xml | 1 + |
21 |
3 files changed, 11 insertions(+), 6 deletions(-) |
22 |
|
23 |
diff --git a/www-client/firefox/firefox-52.4.0.ebuild b/www-client/firefox/firefox-52.4.0.ebuild |
24 |
index ab4e45d..ebd29fb 100644 |
25 |
--- a/www-client/firefox/firefox-52.4.0.ebuild |
26 |
+++ b/www-client/firefox/firefox-52.4.0.ebuild |
27 |
@@ -39,7 +39,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-lin |
28 |
|
29 |
SLOT="0" |
30 |
LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
31 |
-IUSE="bindist +gmp-autoupdate hardened hwaccel jack pgo rust selinux test" |
32 |
+IUSE="bindist eme-free +gmp-autoupdate hardened hwaccel jack pgo rust selinux test" |
33 |
RESTRICT="!bindist? ( bindist )" |
34 |
|
35 |
PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/${PATCH}.tar.xz ) |
36 |
@@ -204,6 +204,8 @@ src_configure() { |
37 |
# enable JACK, bug 600002 |
38 |
mozconfig_use_enable jack |
39 |
|
40 |
+ use eme-free && mozconfig_annotate '+eme-free' --disable-eme |
41 |
+ |
42 |
# It doesn't compile on alpha without this LDFLAGS |
43 |
use alpha && append-ldflags "-Wl,--no-relax" |
44 |
|
45 |
@@ -298,7 +300,7 @@ src_install() { |
46 |
|| die |
47 |
|
48 |
local plugin |
49 |
- use gmp-autoupdate || for plugin in "${GMP_PLUGIN_LIST[@]}" ; do |
50 |
+ use gmp-autoupdate || || use eme-free || for plugin in "${GMP_PLUGIN_LIST[@]}" ; do |
51 |
echo "pref(\"media.${plugin}.autoupdate\", false);" >> \ |
52 |
"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
53 |
|| die |
54 |
@@ -386,7 +388,7 @@ pkg_postinst() { |
55 |
xdg_desktop_database_update |
56 |
gnome2_icon_cache_update |
57 |
|
58 |
- if ! use gmp-autoupdate ; then |
59 |
+ if ! use gmp-autoupdate && ! use eme-free ; then |
60 |
elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" |
61 |
elog "installing into new profiles:" |
62 |
local plugin |
63 |
|
64 |
diff --git a/www-client/firefox/firefox-56.0.ebuild b/www-client/firefox/firefox-56.0.ebuild |
65 |
index 144ad8f..b970878 100644 |
66 |
--- a/www-client/firefox/firefox-56.0.ebuild |
67 |
+++ b/www-client/firefox/firefox-56.0.ebuild |
68 |
@@ -38,7 +38,7 @@ KEYWORDS="~amd64 ~x86" |
69 |
|
70 |
SLOT="0" |
71 |
LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
72 |
-IUSE="bindist +gmp-autoupdate hardened hwaccel jack nsplugin pgo selinux test" |
73 |
+IUSE="bindist eme-free +gmp-autoupdate hardened hwaccel jack nsplugin pgo selinux test" |
74 |
RESTRICT="!bindist? ( bindist )" |
75 |
|
76 |
PATCH_URIS=( https://dev.gentoo.org/~{anarchy,axs,polynomial-c}/mozilla/patchsets/${PATCH}.tar.xz ) |
77 |
@@ -195,6 +195,8 @@ src_configure() { |
78 |
# enable JACK, bug 600002 |
79 |
mozconfig_use_enable jack |
80 |
|
81 |
+ use eme-free && mozconfig_annotate '+eme-free' --disable-eme |
82 |
+ |
83 |
# It doesn't compile on alpha without this LDFLAGS |
84 |
use alpha && append-ldflags "-Wl,--no-relax" |
85 |
|
86 |
@@ -292,7 +294,7 @@ src_install() { |
87 |
fi |
88 |
|
89 |
local plugin |
90 |
- use gmp-autoupdate || for plugin in "${GMP_PLUGIN_LIST[@]}" ; do |
91 |
+ use gmp-autoupdate || use eme-free || for plugin in "${GMP_PLUGIN_LIST[@]}" ; do |
92 |
echo "pref(\"media.${plugin}.autoupdate\", false);" >> \ |
93 |
"${BUILD_OBJ_DIR}/dist/bin/browser/defaults/preferences/all-gentoo.js" \ |
94 |
|| die |
95 |
@@ -380,7 +382,7 @@ pkg_postinst() { |
96 |
xdg_desktop_database_update |
97 |
gnome2_icon_cache_update |
98 |
|
99 |
- if ! use gmp-autoupdate ; then |
100 |
+ if ! use gmp-autoupdate && ! use eme-free ; then |
101 |
elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" |
102 |
elog "installing into new profiles:" |
103 |
local plugin |
104 |
|
105 |
diff --git a/www-client/firefox/metadata.xml b/www-client/firefox/metadata.xml |
106 |
index 56f4927..a338b44 100644 |
107 |
--- a/www-client/firefox/metadata.xml |
108 |
+++ b/www-client/firefox/metadata.xml |
109 |
@@ -10,6 +10,7 @@ |
110 |
are not binary-redistributable according to upstream.</flag> |
111 |
<flag name="custom-optimization">Build with user-specified compiler optimizations |
112 |
(-Os, -O0, -O1, -O2, -O3) from CFLAGS (unsupported)</flag> |
113 |
+ <flag name="eme-free">Disable EME (DRM plugin) cabability at build time</flag> |
114 |
<flag name="gtk2">Use the cairo-gtk2 rendering engine</flag> |
115 |
<flag name="gmp-autoupdate">Allow Gecko Media Plugins (binary blobs) to be automatically |
116 |
downloaded and kept up-to-date in user profiles</flag> |