source: xsoft/graphweb/seamonkey.xml@ 96e0c171

12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 96e0c171 was 96e0c171, checked in by Xi Ruoyao <xry111@…>, 6 months ago

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

  • Property mode set to 100644
File size: 19.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY seamonkey-download-http "&mozilla-http;/seamonkey/releases/&seamonkey-version;/source/seamonkey-&seamonkey-version;.source.tar.xz">
8 <!ENTITY seamonkey-download-ftp " ">
9 <!ENTITY seamonkey-md5sum "15c73a5e725b7f002b2789706ae643d9">
10 <!ENTITY seamonkey-size "254 MB">
11 <!ENTITY seamonkey-buildsize "4.3 GB (159 MB installed)">
12 <!ENTITY seamonkey-time "11 SBU (with parallelism=4)">
13]>
14
15<sect1 id="seamonkey" xreflabel="seamonkey-&seamonkey-version;">
16 <?dbhtml filename="seamonkey.html" ?>
17
18
19 <title>Seamonkey-&seamonkey-version;</title>
20
21 <indexterm zone="seamonkey">
22 <primary sortas="a-seamonkey">seamonkey</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Seamonkey</title>
27
28 <para>
29 <application>Seamonkey</application> is a browser suite, a descendant
30 of <application>Netscape</application>. It includes the browser,
31 composer, mail and news clients, and an IRC client.
32 </para>
33
34 <para>
35 It is the community-driven follow-on to the Mozilla Application Suite,
36 created after Mozilla decided to focus on separate applications for
37 browsing and e-mail. Those applications are
38 <xref linkend="firefox"/> and <xref linkend="thunderbird"/>.
39 </para>
40
41 &lfs120_checked;
42
43 <bridgehead renderas="sect3">Package Information</bridgehead>
44 <itemizedlist spacing="compact">
45 <listitem>
46 <para>
47 Download (HTTP): <ulink url="&seamonkey-download-http;"/>
48 </para>
49 </listitem>
50 <listitem>
51 <para>
52 Download (FTP): <ulink url="&seamonkey-download-ftp;"/>
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Download MD5 sum: &seamonkey-md5sum;
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Download size: &seamonkey-size;
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Estimated disk space required: &seamonkey-buildsize;
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Estimated build time: &seamonkey-time;
73 </para>
74 </listitem>
75 </itemizedlist>
76
77 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
78 <itemizedlist spacing="compact">
79 <listitem>
80 <para>
81 Required patch:
82 <ulink url="&patch-root;/seamonkey-&seamonkey-version;-consolidated_fixes-1.patch"/>
83 </para>
84 </listitem>
85 <listitem>
86 <para>
87 Required Python module:
88 <ulink url="&pymodules-dl;/s/setuptools/setuptools-&setuptools-version;.tar.gz"/>
89 </para>
90 <para>
91 This module has already been installed in LFS, but now we need
92 to rebuild its wheel package for SeaMonkey building system.
93 </para>
94 </listitem>
95 </itemizedlist>
96
97 <note>
98 <para>
99 The tarball
100 <emphasis>seamonkey-&seamonkey-version;.source.tar.xz</emphasis> will
101 untar to <emphasis>seamonkey-&seamonkey-version;</emphasis> directory.
102 </para>
103 </note>
104
105 <bridgehead renderas="sect3">Seamonkey Dependencies</bridgehead>
106
107 <bridgehead renderas="sect4">Required</bridgehead>
108 <para role="required">
109 <!--xref linkend="autoconf213"/-->
110 <xref linkend="cbindgen"/>,
111 <xref linkend="gtk3"/>,
112 <xref linkend="nodejs"/>,
113 <xref linkend="six"/>,
114 <xref linkend="unzip"/>,
115 <xref linkend="yasm"/>, and
116 <xref linkend="zip"/>
117 </para>
118
119 <bridgehead renderas="sect4">Recommended</bridgehead>
120 <para role="recommended">
121 <xref linkend="icu"/>,
122 <xref linkend="libevent"/>,
123 <!--<xref linkend="libvpx"/>, Causes build failures similar to Firefox -->
124 <xref linkend="libwebp"/>,
125 <xref linkend="llvm"/> (with clang),
126 <xref linkend="nasm"/>,
127 <xref linkend="nspr"/>,
128 <xref linkend="nss"/>, and
129 <xref linkend="pulseaudio"/>
130 <!-- <xref linkend="sqlite"/> system version no longer supported -->
131 </para>
132<!--
133 <bridgehead renderas="sect4">Optional</bridgehead>
134 <para role="optional">
135 <xref linkend="sqlite"/> (not recommended due to potential
136 security concerns)
137 </para>
138-->
139 <note>
140 <para>
141 If you don't install recommended dependencies, then internal copies of
142 those packages will be used. They might be tested to work, but they can
143 be out of date or contain security holes.
144 </para>
145 </note>
146
147 <bridgehead renderas="sect4">Optional</bridgehead>
148 <para role="optional">
149 <xref linkend="alsa-lib"/>,
150 <xref linkend="dbus-glib"/>,
151 <xref linkend="startup-notification"/>,
152 <xref linkend="valgrind"/>,
153 <xref linkend="wget"/>,
154 <xref linkend="wireless_tools"/>,
155 <ulink url="https://hunspell.sourceforge.net/">Hunspell</ulink>, and
156 <ulink url="https://facebook.github.io/watchman/">Watchman</ulink>
157 </para>
158
159 <para condition="html" role="usernotes">
160 Editor Notes: <ulink url="&blfs-wiki;/seamonkey"/>
161 </para>
162
163 </sect2>
164
165 <sect2 role="installation">
166 <title>Installation of Seamonkey</title>
167
168 <para>
169 The configuration of <application>Seamonkey</application> is accomplished
170 by creating a <filename>mozconfig</filename> file containing the desired
171 configuration options. A default <filename>mozconfig</filename> file is
172 created below. To see the entire list of available configuration options
173 (and an abbreviated description of each one), issue
174 <command>./configure --help</command>. You may also wish to review the
175 entire file and uncomment any other desired options. Create the file by
176 issuing the following command:
177 </para>
178
179<screen><?dbfo keep-together="auto"?><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
180<literal># If you have a multicore machine, all cores will be used
181
182# If you have installed DBus-Glib comment out this line:
183ac_add_options --disable-dbus
184
185# If you have installed dbus-glib, and you have installed (or will install)
186# wireless-tools, and you wish to use geolocation web services, comment out
187# this line
188ac_add_options --disable-necko-wifi
189
190# Uncomment these lines if you have installed optional dependencies:
191#ac_add_options --enable-system-hunspell
192#ac_add_options --enable-startup-notification
193
194# Uncomment the following option if you have not installed PulseAudio
195#ac_add_options --disable-pulseaudio
196# and uncomment this if you installed alsa-lib instead of PulseAudio
197#ac_add_options --enable-alsa
198<!--
199# Comment out following option if you have gconf installed
200ac_add_options - -disable-gconf
201
202following was for icu in the past seems OK with icu-60, seamonkey-2.49
203line below was with comment and explanation
204# Use the internal version of icu due to execution problems-->
205# Comment out following options if you have not installed
206# recommended dependencies:
207ac_add_options --with-system-icu
208ac_add_options --with-system-libevent
209ac_add_options --with-system-nspr
210ac_add_options --with-system-nss
211ac_add_options --with-system-webp
212
213# Disabling debug symbols makes the build much smaller and a little
214# faster. Comment this if you need to run a debugger. Note: This is
215# required for compilation on i686.
216ac_add_options --disable-debug-symbols
217<!-- With Firefox ESR 128 we'd replace the following part with
218"- -enable-elf-hack=relr", or remove it if relr becomes the default.
219But I've no idea if SeaMonkey will have this change backported. -->
220# The elf-hack is reported to cause failed installs (after successful builds)
221# on some machines. It is supposed to improve startup time and it shrinks
222# libxul.so by a few MB. With recent Binutils releases the linker already
223# supports a much safer and generic way for this.
224ac_add_options --disable-elf-hack
225ac_add_options --enable-linker=bfd
226export LDFLAGS="$LDFLAGS -Wl,-z,pack-relative-relocs"
227
228# Seamonkey has some additional features that are not turned on by default,
229# such as an IRC client, calendar, and DOM Inspector. The DOM Inspector
230# aids with designing web pages. Comment these options if you do not
231# desire these features.
232ac_add_options --enable-calendar
233ac_add_options --enable-dominspector
234ac_add_options --enable-irc
235
236# The BLFS editors recommend not changing anything below this line:
237ac_add_options --prefix=/usr
238ac_add_options --enable-application=comm/suite
239
240ac_add_options --disable-crashreporter
241ac_add_options --disable-updater
242ac_add_options --disable-tests
243
244# The Rust code for SIMD optimization is much more outdated than
245# Firefox and Thunderbird, so it does not build with recent Rustc.
246ac_add_options --disable-rust-simd
247
248ac_add_options --enable-strip
249ac_add_options --enable-install-strip
250
251# You cannot distribute the binary if you do this.
252ac_add_options --enable-official-branding
253
254# The option to use system cairo was removed in 2.53.9.
255ac_add_options --enable-system-ffi
256ac_add_options --enable-system-pixman
257
258ac_add_options --with-system-bz2
259ac_add_options --with-system-jpeg
260ac_add_options --with-system-png
261ac_add_options --with-system-zlib
262
263export CC=clang CXX=clang++</literal>
264EOF</userinput></screen>
265
266 <note>
267 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
268 href="../../xincludes/mozshm.xml"/>
269 </note>
270
271 <para>
272 First, apply a security patch that fixes some problems with
273 Seamonkey's bundled version of libvpx:
274 </para>
275
276<screen><userinput>patch -Np1 -i ../seamonkey-&seamonkey-version;-consolidated_fixes-1.patch</userinput></screen>
277
278 <para>
279 The building system ships several internal copies of the Python 3
280 module <filename>six.py</filename> and wheel packages for
281 <filename>pip</filename> and <filename>setuptools</filename> modules.
282 Theses shipped modules are too old to work well with Python 3.12 or
283 later. Replace the shipped <filename>six.py</filename> copies with
284 the symlinks to <xref linkend='six'/> already installed on the system,
285 link the updated <filename>pip</filename> wheel package shipped
286 as a part of Python 3 in LFS into the building system, and build an
287 updated <filename>setuptools</filename> wheel package. Then adapt
288 the building system for the updated modules. We also need to rewrite
289 the code based on the <filename>imp</filename> module removed in
290 Python 3.12 and later using the <filename>importlib</filename> module:
291 </para>
292
293 <screen><userinput>(for i in $(find -name six.py); do
294 ln -sfv /usr/lib/python3.12/site-packages/six.py $i
295 [ $? = 0 ] || exit $?
296 done) &amp;&amp;
297
298ln -sv /usr/lib/python&python3-majorver;/ensurepip/_bundled/pip-*.whl \
299 third_party/python/virtualenv/virtualenv_support &amp;&amp;
300
301tar xf ../setuptools-&setuptools-version;.tar.gz &amp;&amp;
302pip3 wheel --no-build-isolation --no-deps --no-cache-dir \
303 $PWD/setuptools-&setuptools-version; \
304 -w third_party/python/virtualenv/virtualenv_support &amp;&amp;
305
306sed '/ConfigParser/s/Safe//' \
307 -i testing/mozbase/mozprofile/mozprofile/prefs.py &amp;&amp;
308
309sed 's/distutils/setuptools._&amp;/' \
310 -i python/mozbuild/mozbuild/nodeutil.py &amp;&amp;
311
312sed 's/readfp/read_file/' -i ipc/ipdl/ipdl.py &amp;&amp;
313
314sed -e '/^import/s/imp$/importlib.util/' \
315 -e 's/imp.new_module/__import__/' \
316 -e "s/imp.load_source\(.*\)/spec = \
317 importlib.util.spec_from_file_location\1; \
318 mod = importlib.util.module_from_spec(spec); \
319 spec.loader.exec_module(mod)/" -i python/mach/mach/main.py &amp;&amp;
320
321sed -e '/^import/s/imp$/importlib.util/' \
322 -e '/imp.PY_SOURCE/d' \
323 -e "s/\([a-z_]*\) = imp.load_module([^,]*,[^,]*,\(.*\)/spec = \
324 importlib.util.spec_from_file_location('script', \2); \
325 \1 = importlib.util.module_from_spec(spec); \
326 spec.loader.exec_module(\1)/" \
327 -i netwerk/dns/prepare_tlds.py \
328 python/mozbuild/mozbuild/action/file_generate.py</userinput></screen>
329
330 <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1859752
331 https://hg.mozilla.org/try/rev/d5f3b0c4f08a -->
332 <para>
333 If building with system ICU, adapt the line break mapping for ICU
334 74 or later:
335 </para>
336
337<screen><userinput>(for i in {43..47}; do
338 sed '/ZWJ/s/$/,CLASS_CHARACTER/' -i intl/lwbrk/LineBreaker.cpp || exit $?
339 done)</userinput></screen>
340
341 <para>
342 Fix a problem with the bundled 'distro' python module:
343 </para>
344
345<screen><userinput>sed -e '1012 s/stderr=devnull/stderr=subprocess.DEVNULL/' \
346 -e '1013 s/OSError/(OSError, subprocess.CalledProcessError)/' \
347 -i third_party/python/distro/distro.py</userinput></screen>
348
349 <para>
350 Compile <application>Seamonkey</application> by running the following
351 commands:
352 </para>
353
354<screen><userinput>AUTOCONF=true ./mach configure &amp;&amp;
355./mach build</userinput></screen>
356
357
358 <!-- comment this since llvm must have been installed for rust
359 <note>
360 <para>
361 The CC and CXX variables above are only needed if
362 <xref linkend="llvm"/> is installed and you do not want to use clang.
363 </para>
364 </note>-->
365
366 <para>
367 This package does not come with a test suite.
368 </para>
369
370 <para>
371 Install <application>Seamonkey</application> by issuing the following
372 commands as the <systemitem class="username">root</systemitem> user:
373 </para>
374
375
376<screen role="root"><userinput>./mach install &amp;&amp;
377chown -R 0:0 /usr/lib/seamonkey &amp;&amp;
378
379cp -v $(find -name seamonkey.1 | head -n1) /usr/share/man/man1</userinput></screen>
380
381 </sect2>
382
383 <sect2 role="commands">
384 <title>Command Explanations</title>
385
386 <para>
387 <command>export CC=clang CXX=clang++</command>:
388 With the introduction of <application>gcc-12</application>, many
389 more warnings are generated when compiling mozilla applications
390 and that results in a much slower, and larger, build. Furthermore,
391 building with GCC on i?86 is currently broken.
392 Although upstream mozilla code defaults to using
393 <application>llvm</application> unless overridden, the older configure
394 code in <application>Seamonkey</application> defaults to gcc.
395 </para>
396
397 <para>
398 <command>AUTOCONF=true ./mach configure</command>: This validates
399 the supplied dependencies and the <filename>mozconfig</filename>.
400 The building system always checks for an old version (2.13) of
401 autoconf, but it's not really needed because the necessary
402 <command>configure</command> scripts are already shipped in the
403 tarball and we've not modified the <filename>configure.in</filename>
404 files. So we pass <envar>AUTOCONF=true</envar> so the building system
405 will skip the checking for autoconf-2.13 and allow building this
406 package without autoconf-2.13 installed.
407 </para>
408
409 <para>
410 <option>./mach build --verbose</option>: Use this alternative if you
411 need details of which files are being compiled, together with any C or
412 C++ flags being used. But do not add '--verbose' to the install command,
413 it is not accepted there.
414 </para>
415
416 <para>
417 <option>./mach build -jN</option>: The build should, by default, use
418 all the online CPU cores. If using all the cores causes the build to swap
419 because you have insufficient memory, using fewer cores can be faster.
420 </para>
421
422 </sect2>
423
424 <sect2 role="configuration">
425 <title>Configuring Seamonkey</title>
426
427 <para>
428 For installing various <application>Seamonkey</application> add-ons, refer
429 to <ulink url="https://addons.thunderbird.net/en-US/seamonkey/">Add-ons
430 for Seamonkey</ulink>.
431 </para>
432
433 <para>
434 Along with using the <quote>Preferences</quote> menu to configure
435 <application>Seamonkey</application>'s options and preferences to suit
436 individual tastes, finer grain control of many options is only available
437 using a tool not available from the general menu system. To access this
438 tool, you'll need to open a browser window and enter
439 <systemitem role="url">about:config</systemitem> in the address bar. This
440 will display a list of the configuration preferences and information
441 related to each one. You can use the <quote>Search:</quote> bar to enter
442 search criteria and narrow down the listed items. Changing a preference
443 can be done using two methods. One, if the preference has a boolean value
444 (True/False), simply double-click on the preference to toggle the value
445 and two, for other preferences simply right-click on the desired line,
446 choose <quote>Modify</quote> from the menu and change the value. Creating
447 new preference items is accomplished in the same way, except choose
448 <quote>New</quote> from the menu and provide the desired data into the
449 fields when prompted.
450 </para>
451
452<!-- The URL no longer exists.
453 <tip>
454 <para>
455 There is a multitude of configuration parameters you can tweak to
456 customize <application>SeaMonkey</application>. A very extensive list of
457 these parameters can be found at
458 <ulink url="http://preferential.mozdev.org/preferences.html"/>.
459 </para>
460 </tip>
461-->
462 <para>
463 If you use a desktop environment like <application>Gnome</application> or
464 <application>KDE</application> you may wish to create a
465 <filename>seamonkey.desktop</filename> file so that
466 <application>Seamonkey</application> appears in the panel's menus. If you
467 didn't enable <application>Startup-Notification</application> in your
468 mozconfig change the StartupNotify line to false. As the
469 <systemitem class="username">root</systemitem> user:
470 </para>
471
472<screen role="root"><userinput>mkdir -pv /usr/share/{applications,pixmaps} &amp;&amp;
473
474cat &gt; /usr/share/applications/seamonkey.desktop &lt;&lt; "EOF"
475<literal>[Desktop Entry]
476Encoding=UTF-8
477Type=Application
478Name=Seamonkey
479Comment=The Mozilla Suite
480Icon=seamonkey
481Exec=seamonkey
482Categories=Network;GTK;Application;Email;Browser;WebBrowser;News;
483StartupNotify=true
484Terminal=false</literal>
485EOF
486
487ln -sfv /usr/lib/seamonkey/chrome/icons/default/default128.png \
488 /usr/share/pixmaps/seamonkey.png</userinput></screen>
489 </sect2>
490
491 <sect2 role="content">
492 <title>Contents</title>
493
494 <segmentedlist>
495 <segtitle>Installed Programs</segtitle>
496 <segtitle>Installed Libraries</segtitle>
497 <segtitle>Installed Directory</segtitle>
498
499 <seglistitem>
500 <seg>seamonkey</seg>
501 <seg>
502 Numerous libraries, browser, and email/newsgroup components, plugins,
503 extensions, and helper modules installed in
504 <filename class="directory">/usr/lib/seamonkey</filename>
505 </seg>
506 <seg>
507 /usr/lib/seamonkey
508 </seg>
509 </seglistitem>
510 </segmentedlist>
511
512 <variablelist>
513 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
514 <?dbfo list-presentation="list"?>
515 <?dbhtml list-presentation="table"?>
516
517 <varlistentry id="seamonkey-prog">
518 <term><command>seamonkey</command></term>
519 <listitem>
520 <para>
521 is the Mozilla browser/email/newsgroup/chat client suite
522 </para>
523 <indexterm zone="seamonkey seamonkey-prog">
524 <primary sortas="b-seamonkey">seamonkey</primary>
525 </indexterm>
526 </listitem>
527 </varlistentry>
528 </variablelist>
529 </sect2>
530
531</sect1>
Note: See TracBrowser for help on using the repository browser.