aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2018-08-15 17:09:17 -0400
committerIan Stakenvicius <axs@gentoo.org>2018-08-15 17:09:17 -0400
commit3a1569e99ba430e929e1367ea68f13184f015ab8 (patch)
treef0bc183c924042cd7182918e46204c6f45215d53
parentRevert "mozcoreconf: attempt workaround for occasional setupterm-based build ... (diff)
downloadmozilla-3a1569e99ba430e929e1367ea68f13184f015ab8.tar.gz
mozilla-3a1569e99ba430e929e1367ea68f13184f015ab8.tar.bz2
mozilla-3a1569e99ba430e929e1367ea68f13184f015ab8.zip
thunderbird: attempt to fix setupterm issues by patch
The python lib 'blessings' is what requires setupterm, and it seems to be semi-optional based on the code that loads it; this commit drops the need for blessings by forcing a return of NullTerminal instead of only doing so when blessings.Terminal throws an exception. Note - this is a debug commit, the final fix will involve properly running down why the exception isn't caught, or how to force the disable_colors setting to ensure NullTerminal is always used.
-rw-r--r--mail-client/thunderbird/files/fix-setupterm.patch22
-rw-r--r--mail-client/thunderbird/thunderbird-60.0-r1.ebuild1
2 files changed, 23 insertions, 0 deletions
diff --git a/mail-client/thunderbird/files/fix-setupterm.patch b/mail-client/thunderbird/files/fix-setupterm.patch
new file mode 100644
index 00000000..0928ca0b
--- /dev/null
+++ b/mail-client/thunderbird/files/fix-setupterm.patch
@@ -0,0 +1,22 @@
+--- a/python/mozterm/mozterm/terminal.py 2018-07-31 14:21:02.000000000 -0400
++++ b/python/mozterm/mozterm/terminal.py 2018-08-15 17:00:45.540515437 -0400
+@@ -32,18 +32,9 @@
+ return ''
+ return args[0]
+
+ def __getattr__(self, attr):
+ return self.NullCallableString()
+
+
+ def Terminal(raises=False, disable_styling=False, **kwargs):
+- if disable_styling:
+- return NullTerminal(**kwargs)
+-
+- try:
+- import blessings
+- except Exception:
+- if raises:
+- raise
+- return NullTerminal(**kwargs)
+- return blessings.Terminal(**kwargs)
++ return NullTerminal(**kwargs)
diff --git a/mail-client/thunderbird/thunderbird-60.0-r1.ebuild b/mail-client/thunderbird/thunderbird-60.0-r1.ebuild
index 6b286589..f87cfb29 100644
--- a/mail-client/thunderbird/thunderbird-60.0-r1.ebuild
+++ b/mail-client/thunderbird/thunderbird-60.0-r1.ebuild
@@ -112,6 +112,7 @@ src_prepare() {
"${WORKDIR}"/firefox/2005_ffmpeg4.patch \
|| die
eapply "${WORKDIR}/firefox"
+ eapply "${FILESDIR}"/fix-setupterm.patch
# Ensure that are plugins dir is enabled as default
sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \