Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/firefox/, www-client/firefox/files/
Date: Sat, 08 Sep 2018 13:34:42
Message-Id: 1536413658.46adb588dc7afaec3745c9672ea481f2302d5e52.whissi@gentoo
1 commit: 46adb588dc7afaec3745c9672ea481f2302d5e52
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 8 13:20:17 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 8 13:34:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46adb588
7
8 www-client/firefox: allow building without TERM being set
9
10 Link 1: https://bugzilla.mozilla.org/show_bug.cgi?id=1432867
11 Link 2: https://github.com/erikrose/blessings/pull/137
12 Closes: https://bugs.gentoo.org/654316
13 Package-Manager: Portage-2.3.49, Repoman-2.3.10
14
15 .../files/firefox-52.9.0-blessings-TERM.patch | 56 ++++++++++++++++++++++
16 .../files/firefox-60.0-blessings-TERM.patch | 56 ++++++++++++++++++++++
17 www-client/firefox/firefox-52.9.0.ebuild | 4 +-
18 www-client/firefox/firefox-60.2.0.ebuild | 3 +-
19 www-client/firefox/firefox-62.0-r1.ebuild | 2 +
20 5 files changed, 119 insertions(+), 2 deletions(-)
21
22 diff --git a/www-client/firefox/files/firefox-52.9.0-blessings-TERM.patch b/www-client/firefox/files/firefox-52.9.0-blessings-TERM.patch
23 new file mode 100644
24 index 00000000000..568651e04fe
25 --- /dev/null
26 +++ b/www-client/firefox/files/firefox-52.9.0-blessings-TERM.patch
27 @@ -0,0 +1,56 @@
28 +https://github.com/erikrose/blessings/pull/137
29 +
30 +Fixes: https://bugs.gentoo.org/654316
31 +
32 +From 5fefc65c306cf9ec492e7b422d6bb4842385afbc Mon Sep 17 00:00:00 2001
33 +From: Jay Kamat <jaygkamat@×××××.com>
34 +Date: Fri, 24 Aug 2018 11:11:57 -0700
35 +Subject: [PATCH 1/2] Fix error when TERM is unset or improperly set
36 +
37 +---
38 + blessings/__init__.py | 9 +++++++--
39 + 1 file changed, 7 insertions(+), 2 deletions(-)
40 +
41 +diff --git a/blessings/__init__.py b/blessings/__init__.py
42 +index 98b75c3..3872b5f 100644
43 +--- a/python/blessings/blessings/__init__.py
44 ++++ b/python/blessings/blessings/__init__.py
45 +@@ -94,8 +94,13 @@ def __init__(self, kind=None, stream=None, force_styling=False):
46 + # init sequences to the stream if it has a file descriptor, and
47 + # send them to stdout as a fallback, since they have to go
48 + # somewhere.
49 +- setupterm(kind or environ.get('TERM', 'unknown'),
50 +- self._init_descriptor)
51 ++ try:
52 ++ setupterm(kind or environ.get('TERM', 'dumb'),
53 ++ self._init_descriptor)
54 ++ except:
55 ++ # There was an error setting up the terminal, either curses is
56 ++ # not supported or TERM is incorrectly set. Fall back to dumb.
57 ++ self._does_styling = False
58 +
59 + self.stream = stream
60 +
61 +
62 +From d885df78c6f931abf3259343aaaa897e16c8cba1 Mon Sep 17 00:00:00 2001
63 +From: Jay Kamat <jaygkamat@×××××.com>
64 +Date: Sat, 1 Sep 2018 13:20:32 -0700
65 +Subject: [PATCH 2/2] Explicitly catch curses.error
66 +
67 +---
68 + blessings/__init__.py | 2 +-
69 + 1 file changed, 1 insertion(+), 1 deletion(-)
70 +
71 +diff --git a/blessings/__init__.py b/blessings/__init__.py
72 +index 3872b5f..fdceb09 100644
73 +--- a/python/blessings/blessings/__init__.py
74 ++++ b/python/blessings/blessings/__init__.py
75 +@@ -97,7 +97,7 @@ def __init__(self, kind=None, stream=None, force_styling=False):
76 + try:
77 + setupterm(kind or environ.get('TERM', 'dumb'),
78 + self._init_descriptor)
79 +- except:
80 ++ except curses.error:
81 + # There was an error setting up the terminal, either curses is
82 + # not supported or TERM is incorrectly set. Fall back to dumb.
83 + self._does_styling = False
84
85 diff --git a/www-client/firefox/files/firefox-60.0-blessings-TERM.patch b/www-client/firefox/files/firefox-60.0-blessings-TERM.patch
86 new file mode 100644
87 index 00000000000..cac03d55643
88 --- /dev/null
89 +++ b/www-client/firefox/files/firefox-60.0-blessings-TERM.patch
90 @@ -0,0 +1,56 @@
91 +https://github.com/erikrose/blessings/pull/137
92 +
93 +Fixes: https://bugs.gentoo.org/654316
94 +
95 +From 5fefc65c306cf9ec492e7b422d6bb4842385afbc Mon Sep 17 00:00:00 2001
96 +From: Jay Kamat <jaygkamat@×××××.com>
97 +Date: Fri, 24 Aug 2018 11:11:57 -0700
98 +Subject: [PATCH 1/2] Fix error when TERM is unset or improperly set
99 +
100 +---
101 + blessings/__init__.py | 9 +++++++--
102 + 1 file changed, 7 insertions(+), 2 deletions(-)
103 +
104 +diff --git a/blessings/__init__.py b/blessings/__init__.py
105 +index 98b75c3..3872b5f 100644
106 +--- a/third_party/python/blessings/blessings/__init__.py
107 ++++ b/third_party/python/blessings/blessings/__init__.py
108 +@@ -94,8 +94,13 @@ def __init__(self, kind=None, stream=None, force_styling=False):
109 + # init sequences to the stream if it has a file descriptor, and
110 + # send them to stdout as a fallback, since they have to go
111 + # somewhere.
112 +- setupterm(kind or environ.get('TERM', 'unknown'),
113 +- self._init_descriptor)
114 ++ try:
115 ++ setupterm(kind or environ.get('TERM', 'dumb'),
116 ++ self._init_descriptor)
117 ++ except:
118 ++ # There was an error setting up the terminal, either curses is
119 ++ # not supported or TERM is incorrectly set. Fall back to dumb.
120 ++ self._does_styling = False
121 +
122 + self.stream = stream
123 +
124 +
125 +From d885df78c6f931abf3259343aaaa897e16c8cba1 Mon Sep 17 00:00:00 2001
126 +From: Jay Kamat <jaygkamat@×××××.com>
127 +Date: Sat, 1 Sep 2018 13:20:32 -0700
128 +Subject: [PATCH 2/2] Explicitly catch curses.error
129 +
130 +---
131 + blessings/__init__.py | 2 +-
132 + 1 file changed, 1 insertion(+), 1 deletion(-)
133 +
134 +diff --git a/blessings/__init__.py b/blessings/__init__.py
135 +index 3872b5f..fdceb09 100644
136 +--- a/third_party/python/blessings/blessings/__init__.py
137 ++++ b/third_party/python/blessings/blessings/__init__.py
138 +@@ -97,7 +97,7 @@ def __init__(self, kind=None, stream=None, force_styling=False):
139 + try:
140 + setupterm(kind or environ.get('TERM', 'dumb'),
141 + self._init_descriptor)
142 +- except:
143 ++ except curses.error:
144 + # There was an error setting up the terminal, either curses is
145 + # not supported or TERM is incorrectly set. Fall back to dumb.
146 + self._does_styling = False
147
148 diff --git a/www-client/firefox/firefox-52.9.0.ebuild b/www-client/firefox/firefox-52.9.0.ebuild
149 index 6cdb136053a..cf34f98b23a 100644
150 --- a/www-client/firefox/firefox-52.9.0.ebuild
151 +++ b/www-client/firefox/firefox-52.9.0.ebuild
152 @@ -33,7 +33,7 @@ MOZCONFIG_OPTIONAL_WIFI=1
153 inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-v6.52 pax-utils xdg-utils autotools virtualx mozlinguas-v2
154
155 DESCRIPTION="Firefox Web Browser"
156 -HOMEPAGE="https://www.mozilla.org/en-US/firefox/"
157 +HOMEPAGE="https://www.mozilla.org/firefox"
158
159 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
160
161 @@ -127,6 +127,8 @@ src_prepare() {
162 rm -f "${WORKDIR}"/firefox/2007_fix_nvidia_latest.patch
163 eapply "${WORKDIR}/firefox"
164
165 + eapply "${FILESDIR}"/${P}-blessings-TERM.patch # 654316
166 +
167 # Enable gnomebreakpad
168 if use debug ; then
169 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \
170
171 diff --git a/www-client/firefox/firefox-60.2.0.ebuild b/www-client/firefox/firefox-60.2.0.ebuild
172 index ea3ee61d1e1..9f2f3d4e3b2 100644
173 --- a/www-client/firefox/firefox-60.2.0.ebuild
174 +++ b/www-client/firefox/firefox-60.2.0.ebuild
175 @@ -125,7 +125,8 @@ src_prepare() {
176 rm "${WORKDIR}/firefox/2005_ffmpeg4.patch"
177 eapply "${WORKDIR}/firefox"
178
179 - eapply "${FILESDIR}/bug_1461221.patch"
180 + eapply "${FILESDIR}"/bug_1461221.patch
181 + eapply "${FILESDIR}"/${PN}-60.0-blessings-TERM.patch # 654316
182
183 # Enable gnomebreakpad
184 if use debug ; then
185
186 diff --git a/www-client/firefox/firefox-62.0-r1.ebuild b/www-client/firefox/firefox-62.0-r1.ebuild
187 index ea15529b6e8..61b4fa49493 100644
188 --- a/www-client/firefox/firefox-62.0-r1.ebuild
189 +++ b/www-client/firefox/firefox-62.0-r1.ebuild
190 @@ -179,6 +179,8 @@ src_unpack() {
191 src_prepare() {
192 eapply "${WORKDIR}/firefox"
193
194 + eapply "${FILESDIR}"/${PN}-60.0-blessings-TERM.patch # 654316
195 +
196 # Enable gnomebreakpad
197 if use debug ; then
198 sed -i -e "s:GNOME_DISABLE_CRASH_DIALOG=1:GNOME_DISABLE_CRASH_DIALOG=0:g" \