Gentoo Archives: gentoo-commits

From: Jian Lin <jlin.gentoo@×××××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: app-mobilephone/mobile-config-firefox/files/, ...
Date: Thu, 24 Jun 2021 12:22:45
Message-Id: 1624380409.f5d7f780382d338aec6829152c190506ce8196bc.jian@gentoo
1 commit: f5d7f780382d338aec6829152c190506ce8196bc
2 Author: Marco Scardovi <marco <AT> scardovi <DOT> com>
3 AuthorDate: Tue Jun 22 16:46:49 2021 +0000
4 Commit: Jian Lin <jlin.gentoo <AT> outlook <DOT> com>
5 CommitDate: Tue Jun 22 16:46:49 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f5d7f780
7
8 app-mobilephone/mobile-config-firefox: add package
9
10 this package is for making firefox (non bin) mobile friendly
11
12 Package-Manager: Portage-3.0.20, Repoman-3.0.3
13 Signed-off-by: Marco Scardovi <marco <AT> scardovi.com>
14
15 app-mobilephone/mobile-config-firefox/Manifest | 1 +
16 ...-src-prefs.js-disable-sandbox-for-non-ESR.patch | 27 ++++++++++++++++++++
17 .../files/disable-proton-ui.patch | 12 +++++++++
18 app-mobilephone/mobile-config-firefox/metadata.xml | 11 ++++++++
19 .../mobile-config-firefox-2.1.0.ebuild | 29 ++++++++++++++++++++++
20 5 files changed, 80 insertions(+)
21
22 diff --git a/app-mobilephone/mobile-config-firefox/Manifest b/app-mobilephone/mobile-config-firefox/Manifest
23 new file mode 100644
24 index 000000000..530a6aa6d
25 --- /dev/null
26 +++ b/app-mobilephone/mobile-config-firefox/Manifest
27 @@ -0,0 +1 @@
28 +DIST mobile-config-firefox-2.1.0.tar.gz 20799 BLAKE2B a1ec9526730f6f6acb5a62f6f7c2f7a204eda9b6eb601bfb1b4b9fafdf4d8d9b62e49f9dbf47700f52123f2fce227fc048bba973cdb7e820ef1b36039c7a48cd SHA512 31c17117ef771861704ff985c3c7ae087259107f8f3999d16303608def4a8846f29e6bafb5bdf87d0b7a2ec9e61c6ae426642e4ef783e502cf810fb8b7425a01
29
30 diff --git a/app-mobilephone/mobile-config-firefox/files/0001-src-prefs.js-disable-sandbox-for-non-ESR.patch b/app-mobilephone/mobile-config-firefox/files/0001-src-prefs.js-disable-sandbox-for-non-ESR.patch
31 new file mode 100644
32 index 000000000..f26db650a
33 --- /dev/null
34 +++ b/app-mobilephone/mobile-config-firefox/files/0001-src-prefs.js-disable-sandbox-for-non-ESR.patch
35 @@ -0,0 +1,27 @@
36 +From 953b5e3b6c5b2e2c4518a7af800554b319c69ff1 Mon Sep 17 00:00:00 2001
37 +From: Danct12 <danct12@×××××××.org>
38 +Date: Fri, 12 Feb 2021 13:01:58 +0700
39 +Subject: [PATCH] src/prefs.js: disable sandbox for non-ESR
40 +
41 +https://support.mozilla.org/bm/questions/1236295#answer-1161622
42 +
43 +Signed-off-by: Danct12 <danct12@×××××××.org>
44 +---
45 + src/mobile-config-prefs.js | 1 +
46 + 1 file changed, 1 insertion(+)
47 +
48 +diff --git a/src/mobile-config-prefs.js b/src/mobile-config-prefs.js
49 +index c4a9a77..a32111c 100644
50 +--- a/src/mobile-config-prefs.js
51 ++++ b/src/mobile-config-prefs.js
52 +@@ -4,6 +4,7 @@
53 + // Set up autoconfig (we use it to copy/update userChrome.css into profile dir)
54 + pref('general.config.filename', "mobile-config-autoconfig.js");
55 + pref('general.config.obscure_value', 0);
56 ++pref('general.config.sandbox_enabled', false);
57 +
58 + // Select a mobile user agent for firefox (same as tor browser on android)
59 + pref('general.useragent.override', 'Mozilla/5.0 (Android 9; Mobile; rv:78.0) Gecko/20100101 Firefox/78.0');
60 +--
61 +2.30.0
62 +
63
64 diff --git a/app-mobilephone/mobile-config-firefox/files/disable-proton-ui.patch b/app-mobilephone/mobile-config-firefox/files/disable-proton-ui.patch
65 new file mode 100644
66 index 000000000..1b18ea357
67 --- /dev/null
68 +++ b/app-mobilephone/mobile-config-firefox/files/disable-proton-ui.patch
69 @@ -0,0 +1,12 @@
70 +diff --git a/src/mobile-config-prefs.js b/src/mobile-config-prefs.js
71 +index 6090643..787e48e 100644
72 +--- a/src/mobile-config-prefs.js
73 ++++ b/src/mobile-config-prefs.js
74 +@@ -33,3 +33,7 @@ pref('toolkit.cosmeticAnimations.enabled', false);
75 +
76 + // Disable download animations, save CPU
77 + pref('browser.download.animateNotifications', false);
78 ++
79 ++// Disable the new Proton design
80 ++pref('browser.proton.enabled', false);
81 ++
82
83 diff --git a/app-mobilephone/mobile-config-firefox/metadata.xml b/app-mobilephone/mobile-config-firefox/metadata.xml
84 new file mode 100644
85 index 000000000..a0b29038e
86 --- /dev/null
87 +++ b/app-mobilephone/mobile-config-firefox/metadata.xml
88 @@ -0,0 +1,11 @@
89 +<?xml version='1.0' encoding='UTF-8'?>
90 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
91 +<pkgmetadata>
92 + <maintainer type="person">
93 + <email>marco@××××××××.com</email>
94 + <name>Marco Scardovi</name>
95 + </maintainer>
96 + <upstream>
97 + <remote-id type="github">atom/atom</remote-id>
98 + </upstream>
99 +</pkgmetadata>
100
101 diff --git a/app-mobilephone/mobile-config-firefox/mobile-config-firefox-2.1.0.ebuild b/app-mobilephone/mobile-config-firefox/mobile-config-firefox-2.1.0.ebuild
102 new file mode 100644
103 index 000000000..a6cfe30a2
104 --- /dev/null
105 +++ b/app-mobilephone/mobile-config-firefox/mobile-config-firefox-2.1.0.ebuild
106 @@ -0,0 +1,29 @@
107 +# Copyright 1999-2021 Gentoo Authors
108 +# Distributed under the terms of the GNU General Public License v2
109 +
110 +EAPI=7
111 +
112 +DESCRIPTION="Mobile and privacy friendly configuration for Firefox"
113 +HOMEPAGE="https://gitlab.com/postmarketOS/mobile-config-firefox"
114 +SRC_URI="https://gitlab.com/postmarketOS/mobile-config-firefox/-/archive/${PV}/${P}.tar.gz"
115 +
116 +LICENSE="GPL-3"
117 +SLOT="0"
118 +KEYWORDS="~amd64 ~arm64"
119 +
120 +PATCHES=(
121 + "${FILESDIR}"/0001-src-prefs.js-disable-sandbox-for-non-ESR.patch
122 + "${FILESDIR}"/disable-proton-ui.patch
123 +)
124 +
125 +src_install() {
126 + default
127 + mv "${D}"/usr/lib "${D}"/usr/lib64 || die
128 +}
129 +
130 +pkg_postinst() {
131 + elog "You will need to copy /etc/mobile-config-firefox/userChrome.css file to"
132 + elog "your firefox profile's chrome folder ~/.mozilla/firefox/XXXX/chrome/ "
133 + elog "to enable firefox mobile layout, you might need to create the chrome "
134 + elog "folder if it's not there"
135 +}