glfs/xsoft/other/thunderbird.xml
Pierre Labastie d7ba6b4ddd Fix sed in mozilla apps
Sorry for forgetting the "xargs"
2022-11-04 15:27:38 +01:00

446 lines
15 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY thunderbird-download-http "&mozilla-http;/thunderbird/releases/&thunderbird-version;/source/thunderbird-&thunderbird-version;.source.tar.xz">
<!ENTITY thunderbird-download-ftp " ">
<!ENTITY thunderbird-md5sum "d4d201b7de12f69346cf23ced927fe00">
<!ENTITY thunderbird-size "485 MB">
<!ENTITY thunderbird-buildsize "7.4 GB (193 MB installed)">
<!ENTITY thunderbird-time "18 SBU (on a 4-core machine)">
<!-- Removed the -j1 time because python and rust do not obey it, although
the C/C++ code appears to obey it.
Version 102.3.3: I disabled all but 4 cores. SBU was 20 (2019 seconds)
-->
]>
<sect1 id="thunderbird" xreflabel="Thunderbird-&thunderbird-version;">
<?dbhtml filename="thunderbird.html" ?>
<sect1info>
<date>$Date$</date>
</sect1info>
<title>Thunderbird-&thunderbird-version;</title>
<indexterm zone="thunderbird">
<primary sortas="a-Thunderbird">Thunderbird</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Thunderbird</title>
<para>
<application>Thunderbird</application> is a stand-alone mail/news client
based on the <application>Mozilla</application> codebase. It uses the
Gecko rendering engine to enable it to display and compose HTML emails.
</para>
&lfs112_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&thunderbird-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&thunderbird-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &thunderbird-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &thunderbird-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &thunderbird-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &thunderbird-time;
</para>
</listitem>
</itemizedlist>
<!--<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Required patch:
<ulink url="&patch-root;/thunderbird-&thunderbird-version;-gcc12_fix-1.patch"/>
</para>
</listitem>
</itemizedlist>-->
<bridgehead renderas="sect3">Thunderbird Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="autoconf213"/>,
<xref linkend="cbindgen"/>,
<xref linkend="dbus-glib"/>,
both <xref linkend="gtk3"/>
and <xref linkend="gtk2"/>,
<xref linkend="llvm"/> including clang, <!-- Searched for and used a few times -->
<xref linkend="nodejs"/>,
<xref linkend="pulseaudio"/> (or <xref linkend="alsa-lib"/> if you edit
the mozconfig; although it is now deprecated by mozilla),
<xref linkend="python3"/> (rebuilt with the sqlite module),
<xref linkend="startup-notification"/>,
<xref linkend="zip"/>,
<xref linkend="unzip"/>, and
<xref linkend="yasm"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="icu"/>,
<xref linkend="libevent"/>,
<xref linkend="libvpx"/>,
<xref linkend="nasm"/>,
<xref linkend="nspr"/>, and
<xref linkend="nss"/>
</para>
<note>
<para>
If you don't install recommended dependencies,
then internal copies of those packages will
be used. They might be tested to work, but
they can be out of date or contain security
holes.
</para>
</note>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="cyrus-sasl"/>,
<xref linkend="doxygen"/>,
<xref linkend="GConf"/>,
<xref linkend="wget"/>,
<xref linkend="wireless_tools"/>, and
<ulink url="https://facebook.github.io/watchman/">watchman</ulink>
</para>
<para condition="html" role="usernotes">
User Notes: <ulink url="&blfs-wiki;/Thunderbird"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of Thunderbird</title>
<note>
<para>
The build process for Thunderbird can use 8GB+ of RAM when linking.
Make sure that you have adequate swap or RAM before continuing.
</para>
</note>
<para>
The configuration of <application>Thunderbird</application> is
accomplished by creating a <filename>mozconfig</filename> file containing
the desired configuration options. A default
<filename>mozconfig</filename> is created below. To see the entire list
of available configuration options (and a brief description of each),
issue <command>mozilla/configure --help</command>. Create the file with
the following command:
</para>
<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
<literal># If you have a multicore machine, all cores will be used.
# If you have installed wireless-tools comment out this line:
ac_add_options --disable-necko-wifi
# Uncomment the following option if you have not installed PulseAudio
#ac_add_options --enable-audio-backends=alsa
# Comment out following options if you have not installed
# recommended dependencies:
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-icu
# The elf-hack causes failed installs on some machines.
# It is supposed to improve startup time and it shrinks libxul.so
# by a few MB - comment this if you know your machine is not affected.
ac_add_options --disable-elf-hack
# The BLFS editors recommend not changing anything below this line:
ac_add_options --prefix=/usr
ac_add_options --enable-application=comm/mail
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-tests
ac_add_options --enable-optimize=-O2
ac_add_options --enable-linker=gold
ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-official-branding
ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-zlib
# Using sandboxed wasm libraries has been moved to all builds instead
# of only mozilla automation builds. It requires extra llvm packages
# and was reported to seriously slow the build. Disable it.
ac_add_options --without-wasm-sandboxed-libraries</literal>
EOF</userinput></screen>
<para>
A change in cbindgen-0.24.2 causes a symbol to now be output by
cbindgen, but it has already been defined in a header. This sed
prevents the build from eventually failing:
</para>
<screen><userinput>sed -i '/ROOT_CLIP_CHAIN/d' gfx/webrender_bindings/webrender_ffi.h</userinput></screen>
<!-- Not needed with clang
https://bugzilla.mozilla.org/show_bug.cgi?id=1729459
<para>
If building on a 32 bit machine, the following sed works around
an issue with an incompatible <quote>double</quote> type in one
header file:
</para>
<screen><userinput>case "$(uname -m)" in
i?86) sed -e '/typedef[ ]*double/s/double/long double/' \
-i modules/fdlibm/src/math_private.h ;;
esac</userinput></screen>
-->
<para>
Now invoke the Python <command>mach</command> script to compile
<application>Thunderbird</application>:
</para>
<note>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/mozshm.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/mozmach.xml"/>
</note>
<para>
First remove an obsolete flag in python code, that has been removed
in python-3.11:
</para>
<screen><userinput>grep -rl \"rU\" | xargs sed -i 's/"rU"/"r"/'</userinput></screen>
<screen><userinput>export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none &amp;&amp;
export MOZBUILD_STATE_PATH=./mozbuild &amp;&amp;
./mach configure &amp;&amp;
./mach build</userinput></screen>
<para>
This package does not come with a test suite.
</para>
<para>
Install <application>Thunderbird</application> by running the following
commands as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none ./mach install</userinput></screen>
<!-- devs: For DESTDIR install, prepend DESTDIR=<dest> to the above -->
<para>
Empty the environment variables which were set above:
</para>
<screen><userinput>unset MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE MOZBUILD_STATE_PATH</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<command>MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none</command>: Use the
system python to create a virtual environment for <command>mach</command>
without downloading any python wheels nor using the system python modules.
This prevent version mismatches between system modules and bundled ones.
</para>
<para>
<command>./mach configure</command>: This validates the supplied
dependencies and the <filename>mozconfig</filename>.
</para>
<para>
<option>./mach build --verbose</option>: Use this alternative if you
need details of which files are being compiled, together with any C or
C++ flags being used.
</para>
<para>
<option>./mach build -jN</option>: The build should, by default, use
all the online CPU cores. If using all the cores causes the build to swap
because you have insufficient memory, using fewer cores can be faster.
</para>
<para>
<option><envar>CC=gcc CXX=g++</envar></option>: BLFS used to
prefer to use gcc and g++ instead of upstream's defaults of the
<application>clang</application> programs. With the release of
gcc-12 the build takes longer with gcc and g++, primarily because
of extra warnings, and is bigger. Set these environment variables
<emphasis>before you run the configure script</emphasis>
if you wish to continue to use gcc, g++. Building
with GCC on i?86 is currently broken.
</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Thunderbird</title>
<sect3><title>Configuration Information</title>
<para>
If your Window or Desktop Manager does not allow you to configure a
default browser, you can add a configuration parameter to
<application>Thunderbird</application> so that a browser will start when
you click on an Internet/intranet/local URL. The procedure to check
or modify any of the configuration parameters is quite simple and the
instructions here can be used to view or modify any of the parameters.
</para>
<para>
First, open the configuration dialog by opening the <quote>Edit</quote>
drop-down menu. Choose <quote>Preferences</quote> and then scroll down
to the bottom of the page. Then, click the <quote>Config Editor</quote>
button. Click on the <quote>I accept the risk!</quote> button.
This will display a list of the configuration preferences and
information related to each one. You can use the <quote>Filter:</quote>
bar to enter search criteria and narrow down the listed items. Changing
a preference can be done using two methods. One, if the preference has a
boolean value (True/False), simply double-click on the preference to
toggle the value and two, for other preferences simply right-click on
the desired line, choose <quote>Modify</quote> from the menu and change
the value. Creating new preference items is accomplished in the same
way, except choose <quote>New</quote> from the menu and provide the
desired data into the fields when prompted.
</para>
<para>
The configuration preference item you need to check so that
<application>Thunderbird</application> uses a specified browser is the
<parameter>network.protocol-handler.app.http</parameter> which should be
set to the path of the desired browser, e.g.
<option>/usr/bin/firefox</option>.
</para>
<tip>
<para>
There is a multitude of configuration parameters you can tweak to
customize <application>Thunderbird</application>. A very extensive,
but not so up-to-date list of these parameters can be found at
<ulink url="http://preferential.mozdev.org/preferences.html"/>.
</para>
</tip>
<para>
If you use a desktop environment such as <application>GNOME</application>
or <application>KDE</application>, a desktop file
<filename>thunderbird.desktop</filename> may be created, in order to
include a <quote><application>Thunderbird</application></quote> entry in
the menu. <!--If you didn't enable
<application>startup-notification</application> in your mozconfig, then
change the StartupNotify line to false.--> Run the following commands as the
<systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>mkdir -pv /usr/share/{applications,pixmaps} &amp;&amp;
cat &gt; /usr/share/applications/thunderbird.desktop &lt;&lt; "EOF" &amp;&amp;
<literal>[Desktop Entry]
Name=Thunderbird Mail
Comment=Send and receive mail with Thunderbird
GenericName=Mail Client
Exec=thunderbird %u
Terminal=false
Type=Application
Icon=thunderbird
Categories=Network;Email;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;x-scheme-handler/mailto;
StartupNotify=true</literal>
EOF
ln -sfv /usr/lib/thunderbird/chrome/icons/default/default256.png \
/usr/share/pixmaps/thunderbird.png</userinput></screen>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Program</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directory</segtitle>
<seglistitem>
<seg>
thunderbird
</seg>
<seg>
Numerous libraries and modules in the /usr/lib/thunderbird directory
</seg>
<seg>
/usr/lib/thunderbird
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="thunderbird-prog">
<term><command>thunderbird</command></term>
<listitem>
<para>
is <application>Mozilla</application>'s email and newsgroup client
</para>
<indexterm zone="thunderbird thunderbird-prog">
<primary sortas="b-thunderbird">thunderbird</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>