glfs/xsoft/graphweb/seamonkey.xml
Xi Ruoyao 96e0c17161
mozilla: Drop SHELL=/bin/bash
Note that if you build something relying on $SHELL, it may still fail to
build in chroot.

In the chroot we first use "env -i" to clean the environment variables.
When bash starts with no $SHELL set, it *sets* SHELL=(the login shell
of current user specified in /etc/passwd), but it *does not export this
variable*.

For example:

    $ cat > t.c << EOF
    #include <stdio.h>
    #include <stdlib.h>
    int main() { puts (getenv ("SHELL") ?: "(nullptr)"); }
    $ ./a.out
    /bin/zsh/
    $ cc t.c
    $ env -i bash -c "echo $SHELL"
    /bin/zsh
    $ env -i bash -c "./a.out"
    (nullptr)

We can remove this now only because Mozilla has added a workaround into
their building system at
https://hg.mozilla.org/mozilla-central/rev/5afe7b911f61 for some Mac
builder, inadvertently fixing our issue.

Link: https://lists.linuxfromscratch.org/sympa/arc/blfs-support/2014-11/msg00050.html
Link: https://lists.linuxfromscratch.org/sympa/arc/blfs-dev/2023-11/msg00136.html
2023-11-20 07:01:36 +08:00

532 lines
20 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 seamonkey-download-http "&mozilla-http;/seamonkey/releases/&seamonkey-version;/source/seamonkey-&seamonkey-version;.source.tar.xz">
<!ENTITY seamonkey-download-ftp " ">
<!ENTITY seamonkey-md5sum "15c73a5e725b7f002b2789706ae643d9">
<!ENTITY seamonkey-size "254 MB">
<!ENTITY seamonkey-buildsize "4.3 GB (159 MB installed)">
<!ENTITY seamonkey-time "11 SBU (with parallelism=4)">
]>
<sect1 id="seamonkey" xreflabel="seamonkey-&seamonkey-version;">
<?dbhtml filename="seamonkey.html" ?>
<title>Seamonkey-&seamonkey-version;</title>
<indexterm zone="seamonkey">
<primary sortas="a-seamonkey">seamonkey</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Seamonkey</title>
<para>
<application>Seamonkey</application> is a browser suite, a descendant
of <application>Netscape</application>. It includes the browser,
composer, mail and news clients, and an IRC client.
</para>
<para>
It is the community-driven follow-on to the Mozilla Application Suite,
created after Mozilla decided to focus on separate applications for
browsing and e-mail. Those applications are
<xref linkend="firefox"/> and <xref linkend="thunderbird"/>.
</para>
&lfs120_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&seamonkey-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&seamonkey-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &seamonkey-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &seamonkey-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &seamonkey-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &seamonkey-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Required patch:
<ulink url="&patch-root;/seamonkey-&seamonkey-version;-consolidated_fixes-1.patch"/>
</para>
</listitem>
<listitem>
<para>
Required Python module:
<ulink url="&pymodules-dl;/s/setuptools/setuptools-&setuptools-version;.tar.gz"/>
</para>
<para>
This module has already been installed in LFS, but now we need
to rebuild its wheel package for SeaMonkey building system.
</para>
</listitem>
</itemizedlist>
<note>
<para>
The tarball
<emphasis>seamonkey-&seamonkey-version;.source.tar.xz</emphasis> will
untar to <emphasis>seamonkey-&seamonkey-version;</emphasis> directory.
</para>
</note>
<bridgehead renderas="sect3">Seamonkey Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<!--xref linkend="autoconf213"/-->
<xref linkend="cbindgen"/>,
<xref linkend="gtk3"/>,
<xref linkend="nodejs"/>,
<xref linkend="six"/>,
<xref linkend="unzip"/>,
<xref linkend="yasm"/>, and
<xref linkend="zip"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="icu"/>,
<xref linkend="libevent"/>,
<!--<xref linkend="libvpx"/>, Causes build failures similar to Firefox -->
<xref linkend="libwebp"/>,
<xref linkend="llvm"/> (with clang),
<xref linkend="nasm"/>,
<xref linkend="nspr"/>,
<xref linkend="nss"/>, and
<xref linkend="pulseaudio"/>
<!-- <xref linkend="sqlite"/> system version no longer supported -->
</para>
<!--
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="sqlite"/> (not recommended due to potential
security concerns)
</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="alsa-lib"/>,
<xref linkend="dbus-glib"/>,
<xref linkend="startup-notification"/>,
<xref linkend="valgrind"/>,
<xref linkend="wget"/>,
<xref linkend="wireless_tools"/>,
<ulink url="https://hunspell.sourceforge.net/">Hunspell</ulink>, and
<ulink url="https://facebook.github.io/watchman/">Watchman</ulink>
</para>
<para condition="html" role="usernotes">
Editor Notes: <ulink url="&blfs-wiki;/seamonkey"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of Seamonkey</title>
<para>
The configuration of <application>Seamonkey</application> is accomplished
by creating a <filename>mozconfig</filename> file containing the desired
configuration options. A default <filename>mozconfig</filename> file is
created below. To see the entire list of available configuration options
(and an abbreviated description of each one), issue
<command>./configure --help</command>. You may also wish to review the
entire file and uncomment any other desired options. Create the file by
issuing the following command:
</para>
<screen><?dbfo keep-together="auto"?><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
<literal># If you have a multicore machine, all cores will be used
# If you have installed DBus-Glib comment out this line:
ac_add_options --disable-dbus
# If you have installed dbus-glib, and you have installed (or will install)
# wireless-tools, and you wish to use geolocation web services, comment out
# this line
ac_add_options --disable-necko-wifi
# Uncomment these lines if you have installed optional dependencies:
#ac_add_options --enable-system-hunspell
#ac_add_options --enable-startup-notification
# Uncomment the following option if you have not installed PulseAudio
#ac_add_options --disable-pulseaudio
# and uncomment this if you installed alsa-lib instead of PulseAudio
#ac_add_options --enable-alsa
<!--
# Comment out following option if you have gconf installed
ac_add_options - -disable-gconf
following was for icu in the past seems OK with icu-60, seamonkey-2.49
line below was with comment and explanation
# Use the internal version of icu due to execution problems-->
# Comment out following options if you have not installed
# recommended dependencies:
ac_add_options --with-system-icu
ac_add_options --with-system-libevent
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-webp
# Disabling debug symbols makes the build much smaller and a little
# faster. Comment this if you need to run a debugger. Note: This is
# required for compilation on i686.
ac_add_options --disable-debug-symbols
<!-- With Firefox ESR 128 we'd replace the following part with
"- -enable-elf-hack=relr", or remove it if relr becomes the default.
But I've no idea if SeaMonkey will have this change backported. -->
# The elf-hack is reported to cause failed installs (after successful builds)
# on some machines. It is supposed to improve startup time and it shrinks
# libxul.so by a few MB. With recent Binutils releases the linker already
# supports a much safer and generic way for this.
ac_add_options --disable-elf-hack
ac_add_options --enable-linker=bfd
export LDFLAGS="$LDFLAGS -Wl,-z,pack-relative-relocs"
# Seamonkey has some additional features that are not turned on by default,
# such as an IRC client, calendar, and DOM Inspector. The DOM Inspector
# aids with designing web pages. Comment these options if you do not
# desire these features.
ac_add_options --enable-calendar
ac_add_options --enable-dominspector
ac_add_options --enable-irc
# The BLFS editors recommend not changing anything below this line:
ac_add_options --prefix=/usr
ac_add_options --enable-application=comm/suite
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-tests
# The Rust code for SIMD optimization is much more outdated than
# Firefox and Thunderbird, so it does not build with recent Rustc.
ac_add_options --disable-rust-simd
ac_add_options --enable-strip
ac_add_options --enable-install-strip
# You cannot distribute the binary if you do this.
ac_add_options --enable-official-branding
# The option to use system cairo was removed in 2.53.9.
ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman
ac_add_options --with-system-bz2
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-zlib
export CC=clang CXX=clang++</literal>
EOF</userinput></screen>
<note>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/mozshm.xml"/>
</note>
<para>
First, apply a security patch that fixes some problems with
Seamonkey's bundled version of libvpx:
</para>
<screen><userinput>patch -Np1 -i ../seamonkey-&seamonkey-version;-consolidated_fixes-1.patch</userinput></screen>
<para>
The building system ships several internal copies of the Python 3
module <filename>six.py</filename> and wheel packages for
<filename>pip</filename> and <filename>setuptools</filename> modules.
Theses shipped modules are too old to work well with Python 3.12 or
later. Replace the shipped <filename>six.py</filename> copies with
the symlinks to <xref linkend='six'/> already installed on the system,
link the updated <filename>pip</filename> wheel package shipped
as a part of Python 3 in LFS into the building system, and build an
updated <filename>setuptools</filename> wheel package. Then adapt
the building system for the updated modules. We also need to rewrite
the code based on the <filename>imp</filename> module removed in
Python 3.12 and later using the <filename>importlib</filename> module:
</para>
<screen><userinput>(for i in $(find -name six.py); do
ln -sfv /usr/lib/python3.12/site-packages/six.py $i
[ $? = 0 ] || exit $?
done) &amp;&amp;
ln -sv /usr/lib/python&python3-majorver;/ensurepip/_bundled/pip-*.whl \
third_party/python/virtualenv/virtualenv_support &amp;&amp;
tar xf ../setuptools-&setuptools-version;.tar.gz &amp;&amp;
pip3 wheel --no-build-isolation --no-deps --no-cache-dir \
$PWD/setuptools-&setuptools-version; \
-w third_party/python/virtualenv/virtualenv_support &amp;&amp;
sed '/ConfigParser/s/Safe//' \
-i testing/mozbase/mozprofile/mozprofile/prefs.py &amp;&amp;
sed 's/distutils/setuptools._&amp;/' \
-i python/mozbuild/mozbuild/nodeutil.py &amp;&amp;
sed 's/readfp/read_file/' -i ipc/ipdl/ipdl.py &amp;&amp;
sed -e '/^import/s/imp$/importlib.util/' \
-e 's/imp.new_module/__import__/' \
-e "s/imp.load_source\(.*\)/spec = \
importlib.util.spec_from_file_location\1; \
mod = importlib.util.module_from_spec(spec); \
spec.loader.exec_module(mod)/" -i python/mach/mach/main.py &amp;&amp;
sed -e '/^import/s/imp$/importlib.util/' \
-e '/imp.PY_SOURCE/d' \
-e "s/\([a-z_]*\) = imp.load_module([^,]*,[^,]*,\(.*\)/spec = \
importlib.util.spec_from_file_location('script', \2); \
\1 = importlib.util.module_from_spec(spec); \
spec.loader.exec_module(\1)/" \
-i netwerk/dns/prepare_tlds.py \
python/mozbuild/mozbuild/action/file_generate.py</userinput></screen>
<!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1859752
https://hg.mozilla.org/try/rev/d5f3b0c4f08a -->
<para>
If building with system ICU, adapt the line break mapping for ICU
74 or later:
</para>
<screen><userinput>(for i in {43..47}; do
sed '/ZWJ/s/$/,CLASS_CHARACTER/' -i intl/lwbrk/LineBreaker.cpp || exit $?
done)</userinput></screen>
<para>
Fix a problem with the bundled 'distro' python module:
</para>
<screen><userinput>sed -e '1012 s/stderr=devnull/stderr=subprocess.DEVNULL/' \
-e '1013 s/OSError/(OSError, subprocess.CalledProcessError)/' \
-i third_party/python/distro/distro.py</userinput></screen>
<para>
Compile <application>Seamonkey</application> by running the following
commands:
</para>
<screen><userinput>AUTOCONF=true ./mach configure &amp;&amp;
./mach build</userinput></screen>
<!-- comment this since llvm must have been installed for rust
<note>
<para>
The CC and CXX variables above are only needed if
<xref linkend="llvm"/> is installed and you do not want to use clang.
</para>
</note>-->
<para>
This package does not come with a test suite.
</para>
<para>
Install <application>Seamonkey</application> by issuing the following
commands as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>./mach install &amp;&amp;
chown -R 0:0 /usr/lib/seamonkey &amp;&amp;
cp -v $(find -name seamonkey.1 | head -n1) /usr/share/man/man1</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<command>export CC=clang CXX=clang++</command>:
With the introduction of <application>gcc-12</application>, many
more warnings are generated when compiling mozilla applications
and that results in a much slower, and larger, build. Furthermore,
building with GCC on i?86 is currently broken.
Although upstream mozilla code defaults to using
<application>llvm</application> unless overridden, the older configure
code in <application>Seamonkey</application> defaults to gcc.
</para>
<para>
<command>AUTOCONF=true ./mach configure</command>: This validates
the supplied dependencies and the <filename>mozconfig</filename>.
The building system always checks for an old version (2.13) of
autoconf, but it's not really needed because the necessary
<command>configure</command> scripts are already shipped in the
tarball and we've not modified the <filename>configure.in</filename>
files. So we pass <envar>AUTOCONF=true</envar> so the building system
will skip the checking for autoconf-2.13 and allow building this
package without autoconf-2.13 installed.
</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. But do not add '--verbose' to the install command,
it is not accepted there.
</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>
</sect2>
<sect2 role="configuration">
<title>Configuring Seamonkey</title>
<para>
For installing various <application>Seamonkey</application> add-ons, refer
to <ulink url="https://addons.thunderbird.net/en-US/seamonkey/">Add-ons
for Seamonkey</ulink>.
</para>
<para>
Along with using the <quote>Preferences</quote> menu to configure
<application>Seamonkey</application>'s options and preferences to suit
individual tastes, finer grain control of many options is only available
using a tool not available from the general menu system. To access this
tool, you'll need to open a browser window and enter
<systemitem role="url">about:config</systemitem> in the address bar. This
will display a list of the configuration preferences and information
related to each one. You can use the <quote>Search:</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>
<!-- The URL no longer exists.
<tip>
<para>
There is a multitude of configuration parameters you can tweak to
customize <application>SeaMonkey</application>. A very extensive 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 like <application>Gnome</application> or
<application>KDE</application> you may wish to create a
<filename>seamonkey.desktop</filename> file so that
<application>Seamonkey</application> appears in the panel's menus. If you
didn't enable <application>Startup-Notification</application> in your
mozconfig change the StartupNotify line to false. 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/seamonkey.desktop &lt;&lt; "EOF"
<literal>[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Seamonkey
Comment=The Mozilla Suite
Icon=seamonkey
Exec=seamonkey
Categories=Network;GTK;Application;Email;Browser;WebBrowser;News;
StartupNotify=true
Terminal=false</literal>
EOF
ln -sfv /usr/lib/seamonkey/chrome/icons/default/default128.png \
/usr/share/pixmaps/seamonkey.png</userinput></screen>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directory</segtitle>
<seglistitem>
<seg>seamonkey</seg>
<seg>
Numerous libraries, browser, and email/newsgroup components, plugins,
extensions, and helper modules installed in
<filename class="directory">/usr/lib/seamonkey</filename>
</seg>
<seg>
/usr/lib/seamonkey
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="seamonkey-prog">
<term><command>seamonkey</command></term>
<listitem>
<para>
is the Mozilla browser/email/newsgroup/chat client suite
</para>
<indexterm zone="seamonkey seamonkey-prog">
<primary sortas="b-seamonkey">seamonkey</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>