Enabled Wayland support
This commit is contained in:
parent
f15f217198
commit
f9e5809e11
8831
firefox-wayland.patch
Normal file
8831
firefox-wayland.patch
Normal file
File diff suppressed because it is too large
Load Diff
188
thunderbird-dbus-remote.patch
Normal file
188
thunderbird-dbus-remote.patch
Normal file
@ -0,0 +1,188 @@
|
||||
diff -up thunderbird-60.3.0/toolkit/components/remote/nsDBusRemoteService.cpp.old thunderbird-60.3.0/toolkit/components/remote/nsDBusRemoteService.cpp
|
||||
--- thunderbird-60.3.0/toolkit/components/remote/nsDBusRemoteService.cpp.old 2018-10-30 12:45:34.000000000 +0100
|
||||
+++ thunderbird-60.3.0/toolkit/components/remote/nsDBusRemoteService.cpp 2018-11-14 13:37:32.223714689 +0100
|
||||
@@ -174,6 +174,7 @@ nsDBusRemoteService::Startup(const char*
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
dbus_connection_set_exit_on_disconnect(mConnection, false);
|
||||
+ dbus_connection_setup_with_g_main(mConnection, nullptr);
|
||||
|
||||
mAppName = aAppName;
|
||||
ToLowerCase(mAppName);
|
||||
diff -up thunderbird-60.3.0/toolkit/components/remote/nsRemoteService.cpp.old thunderbird-60.3.0/toolkit/components/remote/nsRemoteService.cpp
|
||||
--- thunderbird-60.3.0/toolkit/components/remote/nsRemoteService.cpp.old 2018-11-20 10:55:35.584756422 +0100
|
||||
+++ thunderbird-60.3.0/toolkit/components/remote/nsRemoteService.cpp 2018-11-14 13:37:32.244714628 +0100
|
||||
@@ -34,20 +34,18 @@ NS_IMPL_ISUPPORTS(nsRemoteService,
|
||||
NS_IMETHODIMP
|
||||
nsRemoteService::Startup(const char* aAppName, const char* aProfileName)
|
||||
{
|
||||
-#if 0
|
||||
+#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND)
|
||||
nsresult rv;
|
||||
mDBusRemoteService = new nsDBusRemoteService();
|
||||
rv = mDBusRemoteService->Startup(aAppName, aProfileName);
|
||||
if (NS_FAILED(rv)) {
|
||||
mDBusRemoteService = nullptr;
|
||||
}
|
||||
+#elif !defined(MOZ_WAYLAND)
|
||||
+ mGtkRemoteService = new nsGTKRemoteService();
|
||||
+ mGtkRemoteService->Startup(aAppName, aProfileName);
|
||||
#endif
|
||||
|
||||
- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
|
||||
- mGtkRemoteService = new nsGTKRemoteService();
|
||||
- mGtkRemoteService->Startup(aAppName, aProfileName);
|
||||
- }
|
||||
-
|
||||
if (!mDBusRemoteService && !mGtkRemoteService)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
@@ -73,7 +71,7 @@ nsRemoteService::RegisterWindow(mozIDOMW
|
||||
NS_IMETHODIMP
|
||||
nsRemoteService::Shutdown()
|
||||
{
|
||||
-#if defined(MOZ_ENABLE_DBUS)
|
||||
+#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND)
|
||||
if (mDBusRemoteService) {
|
||||
mDBusRemoteService->Shutdown();
|
||||
mDBusRemoteService = nullptr;
|
||||
diff -up thunderbird-60.3.0/toolkit/components/remote/nsXRemoteService.cpp.old thunderbird-60.3.0/toolkit/components/remote/nsXRemoteService.cpp
|
||||
--- thunderbird-60.3.0/toolkit/components/remote/nsXRemoteService.cpp.old 2018-10-30 12:45:34.000000000 +0100
|
||||
+++ thunderbird-60.3.0/toolkit/components/remote/nsXRemoteService.cpp 2018-10-31 01:08:14.000000000 +0100
|
||||
@@ -192,5 +192,5 @@ nsXRemoteService::EnsureAtoms(void)
|
||||
sMozUserAtom = XAtoms[i++];
|
||||
sMozProfileAtom = XAtoms[i++];
|
||||
sMozProgramAtom = XAtoms[i++];
|
||||
- sMozCommandLineAtom = XAtoms[i++];
|
||||
+ sMozCommandLineAtom = XAtoms[i];
|
||||
}
|
||||
diff -up thunderbird-60.3.0/widget/xremoteclient/DBusRemoteClient.cpp.old thunderbird-60.3.0/widget/xremoteclient/DBusRemoteClient.cpp
|
||||
--- thunderbird-60.3.0/widget/xremoteclient/DBusRemoteClient.cpp.old 2018-10-30 12:45:35.000000000 +0100
|
||||
+++ thunderbird-60.3.0/widget/xremoteclient/DBusRemoteClient.cpp 2018-11-14 13:37:32.224714686 +0100
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "mozilla/Base64.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
||||
+#include <dbus/dbus-glib-lowlevel.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
using mozilla::LogLevel;
|
||||
@@ -43,6 +44,7 @@ DBusRemoteClient::Init()
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
dbus_connection_set_exit_on_disconnect(mConnection, false);
|
||||
+ dbus_connection_setup_with_g_main(mConnection, nullptr);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
diff -up thunderbird-60.3.0/widget/xremoteclient/DBusRemoteClient.h.old thunderbird-60.3.0/widget/xremoteclient/DBusRemoteClient.h
|
||||
diff -up thunderbird-60.3.0/widget/xremoteclient/moz.build.old thunderbird-60.3.0/widget/xremoteclient/moz.build
|
||||
--- thunderbird-60.3.0/widget/xremoteclient/moz.build.old 2018-10-31 01:08:14.000000000 +0100
|
||||
+++ thunderbird-60.3.0/widget/xremoteclient/moz.build 2018-11-14 13:37:32.244714628 +0100
|
||||
@@ -11,7 +11,6 @@ FINAL_LIBRARY = 'xul'
|
||||
|
||||
SOURCES += [
|
||||
'RemoteUtils.cpp',
|
||||
- 'XRemoteClient.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_ENABLE_DBUS'] and CONFIG['MOZ_WAYLAND']:
|
||||
@@ -20,3 +19,7 @@ if CONFIG['MOZ_ENABLE_DBUS'] and CONFIG[
|
||||
]
|
||||
CXXFLAGS += CONFIG['TK_CFLAGS']
|
||||
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
|
||||
+else:
|
||||
+ SOURCES += [
|
||||
+ 'XRemoteClient.cpp',
|
||||
+ ]
|
||||
diff -up thunderbird-60.3.0/widget/xremoteclient/XRemoteClient.cpp.old thunderbird-60.3.0/widget/xremoteclient/XRemoteClient.cpp
|
||||
--- thunderbird-60.3.0/widget/xremoteclient/XRemoteClient.cpp.old 2018-10-30 12:45:37.000000000 +0100
|
||||
+++ thunderbird-60.3.0/widget/xremoteclient/XRemoteClient.cpp 2018-10-31 01:08:15.000000000 +0100
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
#include "mozilla/Sprintf.h"
|
||||
+#include "mozilla/Unused.h"
|
||||
#include "XRemoteClient.h"
|
||||
#include "RemoteUtils.h"
|
||||
#include "plstr.h"
|
||||
@@ -41,7 +42,7 @@
|
||||
#else
|
||||
#define TO_LITTLE_ENDIAN32(x) (x)
|
||||
#endif
|
||||
-
|
||||
+
|
||||
#ifndef MAX_PATH
|
||||
#ifdef PATH_MAX
|
||||
#define MAX_PATH PATH_MAX
|
||||
@@ -51,6 +52,7 @@
|
||||
#endif
|
||||
|
||||
using mozilla::LogLevel;
|
||||
+using mozilla::Unused;
|
||||
|
||||
static mozilla::LazyLogModule sRemoteLm("XRemoteClient");
|
||||
|
||||
@@ -118,7 +120,7 @@ XRemoteClient::Init()
|
||||
mMozUserAtom = XAtoms[i++];
|
||||
mMozProfileAtom = XAtoms[i++];
|
||||
mMozProgramAtom = XAtoms[i++];
|
||||
- mMozCommandLineAtom = XAtoms[i++];
|
||||
+ mMozCommandLineAtom = XAtoms[i];
|
||||
|
||||
mInitialized = true;
|
||||
|
||||
@@ -472,12 +474,12 @@ XRemoteClient::FindBestWindow(const char
|
||||
// pass in a program name and this window doesn't support that
|
||||
// protocol, we don't include it in our list.
|
||||
if (aProgram && strcmp(aProgram, "any")) {
|
||||
- status = XGetWindowProperty(mDisplay, w, mMozProgramAtom,
|
||||
- 0, (65536 / sizeof(long)),
|
||||
- False, XA_STRING,
|
||||
- &type, &format, &nitems, &bytesafter,
|
||||
- &data_return);
|
||||
-
|
||||
+ Unused << XGetWindowProperty(mDisplay, w, mMozProgramAtom,
|
||||
+ 0, (65536 / sizeof(long)),
|
||||
+ False, XA_STRING,
|
||||
+ &type, &format, &nitems, &bytesafter,
|
||||
+ &data_return);
|
||||
+
|
||||
// If the return name is not the same as what someone passed in,
|
||||
// we don't want this window.
|
||||
if (data_return) {
|
||||
@@ -507,11 +509,11 @@ XRemoteClient::FindBestWindow(const char
|
||||
}
|
||||
|
||||
if (username) {
|
||||
- status = XGetWindowProperty(mDisplay, w, mMozUserAtom,
|
||||
- 0, (65536 / sizeof(long)),
|
||||
- False, XA_STRING,
|
||||
- &type, &format, &nitems, &bytesafter,
|
||||
- &data_return);
|
||||
+ Unused << XGetWindowProperty(mDisplay, w, mMozUserAtom,
|
||||
+ 0, (65536 / sizeof(long)),
|
||||
+ False, XA_STRING,
|
||||
+ &type, &format, &nitems, &bytesafter,
|
||||
+ &data_return);
|
||||
|
||||
// if there's a username compare it with what we have
|
||||
if (data_return) {
|
||||
@@ -529,11 +531,11 @@ XRemoteClient::FindBestWindow(const char
|
||||
// there is, then we need to make sure it matches what someone
|
||||
// passed in.
|
||||
if (aProfile) {
|
||||
- status = XGetWindowProperty(mDisplay, w, mMozProfileAtom,
|
||||
- 0, (65536 / sizeof(long)),
|
||||
- False, XA_STRING,
|
||||
- &type, &format, &nitems, &bytesafter,
|
||||
- &data_return);
|
||||
+ Unused << XGetWindowProperty(mDisplay, w, mMozProfileAtom,
|
||||
+ 0, (65536 / sizeof(long)),
|
||||
+ False, XA_STRING,
|
||||
+ &type, &format, &nitems, &bytesafter,
|
||||
+ &data_return);
|
||||
|
||||
// If there's a profile compare it with what we have
|
||||
if (data_return) {
|
||||
|
@ -2,7 +2,7 @@ mk_add_options MOZ_CO_PROJECT=mail
|
||||
ac_add_options --enable-application=comm/mail
|
||||
mk_add_options AUTOCONF=autoconf-2.13
|
||||
|
||||
#ac_add_options --with-system-png
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
|
||||
|
||||
ac_add_options --prefix="$PREFIX"
|
||||
ac_add_options --libdir="$LIBDIR"
|
||||
|
30
thunderbird-wayland.desktop
Normal file
30
thunderbird-wayland.desktop
Normal file
@ -0,0 +1,30 @@
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=Thunderbird on Wayland
|
||||
GenericName=Email
|
||||
Comment=Send and Receive Email
|
||||
Exec=thunderbird %u
|
||||
TryExec=thunderbird-wayland
|
||||
Icon=thunderbird
|
||||
Terminal=false
|
||||
Type=Application
|
||||
MimeType=message/rfc822;x-scheme-handler/mailto;
|
||||
StartupNotify=true
|
||||
Categories=Network;Email;
|
||||
Name[cs]=Poštovní klient Thunderbird
|
||||
Name[ca]=Client de correu Thunderbird
|
||||
Name[fi]=Thunderbird-sähköposti
|
||||
Name[fr]=Messagerie Thunderbird
|
||||
Name[pl]=Klient poczty Thunderbird
|
||||
Name[pt_BR]=Cliente de E-mail Thunderbird
|
||||
Name[sv]=E-postklienten Thunderbird
|
||||
Comment[ca]=Llegiu i escriviu correu
|
||||
Comment[cs]=Čtení a psaní pošty
|
||||
Comment[de]=Emails lesen und verfassen
|
||||
Comment[fi]=Lue ja kirjoita sähköposteja
|
||||
Comment[fr]=Lire et écrire des courriels
|
||||
Comment[it]=Leggere e scrivere email
|
||||
Comment[ja]=メールの読み書き
|
||||
Comment[pl]=Czytanie i wysyłanie e-maili
|
||||
Comment[pt_BR]=Ler e escrever suas mensagens
|
||||
Comment[sv]=Läs och skriv e-post
|
7
thunderbird-wayland.sh.in
Normal file
7
thunderbird-wayland.sh.in
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Run Thunderbird under Wayland
|
||||
#
|
||||
|
||||
export GDK_BACKEND=wayland
|
||||
exec /usr/bin/thunderbird "$@"
|
@ -36,6 +36,13 @@ MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks"
|
||||
MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}"
|
||||
MOZ_LAUNCHER="$MOZ_DIST_BIN/thunderbird"
|
||||
|
||||
##
|
||||
## Enable X11 backend by default?
|
||||
##
|
||||
if ! [ "$GDK_BACKEND" ]; then
|
||||
export GDK_BACKEND=x11
|
||||
fi
|
||||
|
||||
##
|
||||
## Set MOZ_ENABLE_PANGO is no longer used because Pango is enabled by default
|
||||
## you may use MOZ_DISABLE_PANGO=1 to force disabling of pango
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
%define system_sqlite 0
|
||||
%define system_ffi 1
|
||||
%define use_gtk3 0
|
||||
|
||||
%define build_langpacks 1
|
||||
|
||||
@ -55,10 +54,6 @@
|
||||
%define big_endian 1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 26 || 0%{?rhel} > 7
|
||||
%define use_gtk3 1
|
||||
%endif
|
||||
|
||||
%if %{?system_libvpx}
|
||||
%global libvpx_version 1.4.0
|
||||
%endif
|
||||
@ -89,7 +84,7 @@
|
||||
Summary: Mozilla Thunderbird mail/newsgroup client
|
||||
Name: thunderbird
|
||||
Version: 60.3.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
URL: http://www.mozilla.org/projects/thunderbird/
|
||||
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
||||
Group: Applications/Internet
|
||||
@ -106,6 +101,8 @@ Source11: thunderbird-mozconfig-branded
|
||||
Source12: thunderbird-redhat-default-prefs.js
|
||||
Source20: thunderbird.desktop
|
||||
Source21: thunderbird.sh.in
|
||||
Source28: thunderbird-wayland.sh.in
|
||||
Source29: thunderbird-wayland.desktop
|
||||
|
||||
# Mozilla (XULRunner) patches
|
||||
Patch9: mozilla-build-arm.patch
|
||||
@ -129,6 +126,8 @@ Patch309: mozilla-1460871-ldap-query.patch
|
||||
|
||||
# Fedora specific patches
|
||||
Patch310: disable-dbus-remote.patch
|
||||
Patch311: firefox-wayland.patch
|
||||
Patch312: thunderbird-dbus-remote.patch
|
||||
|
||||
# Upstream patches
|
||||
|
||||
@ -155,9 +154,7 @@ BuildRequires: zip
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: libIDL-devel
|
||||
%if %{?use_gtk3}
|
||||
BuildRequires: pkgconfig(gtk+-3.0)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(gtk+-2.0)
|
||||
BuildRequires: krb5-devel
|
||||
BuildRequires: pango-devel
|
||||
@ -203,6 +200,16 @@ Suggests: u2f-hidraw-policy
|
||||
%description
|
||||
Mozilla Thunderbird is a standalone mail and newsgroup client.
|
||||
|
||||
%package wayland
|
||||
Summary: Thunderbird Wayland launcher.
|
||||
Requires: %{name}
|
||||
%description wayland
|
||||
The thunderbird-wayland package contains launcher and desktop file
|
||||
to run Thunderbird natively on Wayland.
|
||||
%files wayland
|
||||
%{_bindir}/thunderbird-wayland
|
||||
%attr(644,root,root) %{_datadir}/applications/mozilla-thunderbird-wayland.desktop
|
||||
|
||||
%if %{enable_mozilla_crashreporter}
|
||||
%global moz_debug_prefix %{_prefix}/lib/debug
|
||||
%global moz_debug_dir %{moz_debug_prefix}%{mozappdir}
|
||||
@ -263,6 +270,11 @@ debug %{name}, you want to install %{name}-debuginfo instead.
|
||||
%endif
|
||||
#cd ..
|
||||
|
||||
# TODO - needs fixes
|
||||
#%patch311 -p1 -b .wayland
|
||||
#%patch312 -p1 -b .thunderbird-dbus-remote
|
||||
|
||||
|
||||
%if %{official_branding}
|
||||
# Required by Mozilla Corporation
|
||||
|
||||
@ -374,11 +386,6 @@ echo "ac_add_options --with-system-libvpx" >> .mozconfig
|
||||
%else
|
||||
echo "ac_add_options --without-system-libvpx" >> .mozconfig
|
||||
%endif
|
||||
%if %{?use_gtk3}
|
||||
echo "ac_add_options --enable-default-toolkit=cairo-gtk3" >> .mozconfig
|
||||
%else
|
||||
echo "ac_add_options --enable-default-toolkit=cairo-gtk2" >> .mozconfig
|
||||
%endif
|
||||
%if %{enable_mozilla_crashreporter}
|
||||
echo "ac_add_options --enable-crashreporter" >> .mozconfig
|
||||
%else
|
||||
@ -488,12 +495,17 @@ done
|
||||
desktop-file-install --vendor mozilla \
|
||||
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
|
||||
%{SOURCE20}
|
||||
desktop-file-install --vendor mozilla \
|
||||
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
|
||||
%{SOURCE29}
|
||||
|
||||
|
||||
# set up the thunderbird start script
|
||||
rm -f $RPM_BUILD_ROOT/%{_bindir}/thunderbird
|
||||
%{__cat} %{SOURCE21} > $RPM_BUILD_ROOT%{_bindir}/thunderbird
|
||||
%{__chmod} 755 $RPM_BUILD_ROOT/%{_bindir}/thunderbird
|
||||
%{__cat} %{SOURCE28} > %{buildroot}%{_bindir}/thunderbird-wayland
|
||||
%{__chmod} 755 %{buildroot}%{_bindir}/thunderbird-wayland
|
||||
|
||||
# set up our default preferences
|
||||
%{__cat} %{SOURCE12} | %{__sed} -e 's,THUNDERBIRD_RPM_VR,%{tb_version}-%{release},g' > \
|
||||
@ -673,19 +685,18 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%endif
|
||||
%{mozappdir}/dependentlibs.list
|
||||
%{mozappdir}/distribution
|
||||
%if !%{?system_libicu}
|
||||
#%{mozappdir}/icudt*.dat
|
||||
%endif
|
||||
%{mozappdir}/fonts
|
||||
%{mozappdir}/chrome.manifest
|
||||
%{mozappdir}/pingsender
|
||||
%if %{?use_gtk3}
|
||||
%{mozappdir}/gtk2/libmozgtk.so
|
||||
%endif
|
||||
|
||||
#===============================================================================
|
||||
|
||||
%changelog
|
||||
* Tue Nov 20 2018 Martin Stransky <stransky@redhat.com> - 60.3.0-4
|
||||
- Build with Wayland support
|
||||
- Enabled DBus remote for Wayland
|
||||
|
||||
* Tue Nov 13 2018 Caolán McNamara <caolanm@redhat.com> - 60.3.0-3
|
||||
- rebuild for hunspell-1.7.0
|
||||
|
||||
@ -1921,4 +1932,3 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
* Mon Sep 01 2003 David Hill <djh[at]ii.net>
|
||||
- initial RPM
|
||||
(based on the fedora MozillaFirebird-0.6.1 specfile)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user