source: xsoft/graphweb/firefox.xml@ 2e15af7

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 2e15af7 was 2e15af7, checked in by Ken Moffat <ken@…>, 8 years ago

Reinstate building firefox as a normal user, removed in error.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@17503 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 15.6 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 firefox-download-http "&mozilla-http;/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.xz">
8 <!ENTITY firefox-download-ftp " ">
9 <!ENTITY firefox-md5sum "0bd5991a6c821dd1a34ead0f8bbb301a ">
10 <!ENTITY firefox-size "180 MB">
11 <!ENTITY firefox-buildsize "5.3 GB (85 MB installed)">
12 <!ENTITY firefox-time "11.3 SBU (with parallelism=4 on a recent intel i7, much longer on lesser CPUs)">
13]>
14
15<sect1 id="firefox" xreflabel="Firefox-&firefox-version;">
16 <?dbhtml filename="firefox.html" ?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Firefox-&firefox-version;</title>
24
25 <indexterm zone="firefox">
26 <primary sortas="a-Firefox">Firefox</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Firefox</title>
31
32 <para>
33 <application>Firefox</application> is a stand-alone browser based on the
34 <application>Mozilla</application> codebase.
35 </para>
36
37 &lfs79_checked;&gcc6_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>
43 Download (HTTP): <ulink url="&firefox-download-http;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download (FTP): <ulink url="&firefox-download-ftp;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download MD5 sum: &firefox-md5sum;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download size: &firefox-size;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated disk space required: &firefox-buildsize;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated build time: &firefox-time;
69 </para>
70 </listitem>
71 </itemizedlist>
72
73 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
74 <itemizedlist spacing="compact">
75 <listitem>
76 <para>
77 Required patch if using gtk+-3.20 or later (do not use with earlier versions)
78 <ulink url="&patch-root;/firefox-&firefox-version;-gtk320-1.patch"/>
79 </para>
80 </listitem>
81 <listitem>
82 <para>
83 Optional patch to allow system versions of <xref linkend="graphite2"/>
84 and <xref linkend="harfbuzz"/> - this should be regarded as experimental
85 <ulink url="&patch-root;/firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch"/>
86 </para>
87 </listitem>
88 </itemizedlist>
89
90 <note>
91 <para>
92 The tarball <emphasis>firefox-&firefox-version;.source.tar.xz</emphasis>
93 will untar to <emphasis>firefox-&firefox-version;</emphasis> directory.
94 </para>
95 </note>
96
97 <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
98
99 <bridgehead renderas="sect4">Required</bridgehead>
100 <para role="required">
101 <xref linkend="alsa-lib"/>,
102 <xref linkend="autoconf213"/>,
103 <xref linkend="gtk3"/>
104 (or <xref linkend="gtk2"/> if you change the mozconfig where indicated),
105 <xref linkend="nss"/>,
106 <xref linkend="unzip"/>,
107 <xref linkend="yasm"/>, and
108 <xref linkend="zip"/>
109 </para>
110
111 <bridgehead renderas="sect4">Recommended</bridgehead>
112 <para role="recommended">
113 <xref linkend="icu"/>,
114 <xref linkend="libevent"/>,
115 <xref linkend="libvpx"/>, and
116 <xref linkend="sqlite"/>
117 </para>
118
119 <note>
120 <para>
121 If you don't install recommended dependencies, then internal copies of
122 those packages will be used. They might be tested to work, but they can
123 be out of date or contain security holes.
124 </para>
125 </note>
126
127 <note>
128 <para>
129 With <application>Firefox-31.0</application> and later versions, you
130 must have installed <application>Openssl</application> before
131 <application>Python 2</application> or the build system will quickly
132 fail with output including "ImportError: cannot import name
133 HTTPSHandler". If you are in any doubt about this (e.g. upgrading from
134 an older version of Firefox), check if
135 <filename>/usr/lib/python&python2-majorver;/lib-dynload/_ssl.so</filename>
136 exists. If it does not, reinstall <xref linkend="python2"/> (after
137 installing <xref linkend="openssl"/>). The latest version of any
138 <emphasis>currently maintained</emphasis> version of Openssl should be
139 satisfactory if already installed.
140 </para>
141 </note>
142
143 <bridgehead renderas="sect4">Optional</bridgehead>
144 <para role="optional">
145 <xref linkend="curl"/>,
146 <xref linkend="dbus-glib"/>,
147 <xref linkend="doxygen"/>,
148 <xref linkend="GConf"/>,
149 <xref linkend="ffmpeg"/> (runtime) or
150 <xref linkend="gst10-plugins-base"/> (with
151 <xref linkend="gst10-plugins-good"/> and
152 <xref linkend="gst10-libav"/> at runtime),
153 <xref linkend="libwebp"/>,
154 <xref linkend="openjdk"/>,
155 <xref linkend="pulseaudio"/>,
156 <xref linkend="startup-notification"/>,
157 <xref linkend="valgrind"/>,
158 <xref linkend="wget"/>,
159 <xref linkend="wireless_tools"/>,
160 <ulink url="https://hunspell.github.io/">Hunspell</ulink>,
161 <ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink>, and
162 <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>,
163 <ulink url="https://www.rust-lang.org/">Rust</ulink>,
164 and (with the patch)
165 <xref linkend="graphite2"/> and
166 <xref linkend="harfbuzz"/>
167 </para>
168
169 <para condition="html" role="usernotes">
170 User Notes: <ulink url="&blfs-wiki;/firefox"/>
171 </para>
172 </sect2>
173
174 <sect2 role="installation">
175 <title>Installation of Firefox</title>
176
177 <para>
178 The configuration of <application>Firefox</application> is accomplished
179 by creating a <filename>mozconfig</filename> file containing the desired
180 configuration options. A default <filename>mozconfig</filename> is
181 created below. To see the entire list of available configuration options
182 (and an abbreviated description of each one), issue <command>./configure
183 --help</command>. You may also wish to review the entire file and
184 uncomment any other desired options. Create the file by issuing the
185 following command:
186 </para>
187
188<screen><userinput>cat &gt; mozconfig &lt;&lt; "EOF"
189<literal># If you have a multicore machine, all cores will be used by default.
190# If desired, you can reduce the number of cores used, e.g. to 1, by
191# uncommenting the next line and setting a valid number of CPU cores.
192#mk_add_options MOZ_MAKE_FLAGS="-j1"
193
194# If you have installed DBus-Glib comment out this line:
195ac_add_options --disable-dbus
196
197# If you have installed dbus-glib, and you have installed (or will install)
198# wireless-tools, and you wish to use geolocation web services, comment out
199# this line
200ac_add_options --disable-necko-wifi
201
202# GStreamer is necessary for H.264 video playback in HTML5 Video Player if
203# FFmpeg is not found at runtime;
204# to be enabled, also remember to set "media.gstreamer.enabled" to "true"
205# in about:config. If you have GStreamer 1.x.y, comment out this line and
206# uncomment the following one:
207ac_add_options --disable-gstreamer
208#ac_add_options --enable-gstreamer=1.0
209
210# Uncomment this option if you wish to build with gtk+-2
211#ac_add_options --enable-default-toolkit=cairo-gtk2
212
213# Uncomment these lines if you have installed optional dependencies:
214#ac_add_options --enable-system-hunspell
215#ac_add_options --enable-startup-notification
216
217# Comment out following option if you have PulseAudio installed
218ac_add_options --disable-pulseaudio
219
220# If you have installed GConf, comment out this line
221ac_add_options --disable-gconf
222
223# Comment out following options if you have not installed
224# recommended dependencies:
225ac_add_options --enable-system-sqlite
226ac_add_options --with-system-libevent
227ac_add_options --with-system-libvpx
228ac_add_options --with-system-nspr
229ac_add_options --with-system-nss
230ac_add_options --with-system-icu
231
232# If you are going to apply the patch for system graphite
233# and system harfbuzz, uncomment these lines:
234#ac_add_options --with-system-graphite2
235#ac_add_options --with-system-harfbuzz
236
237# Stripping is now enabled by default.
238# Uncomment these lines if you need to run a debugger:
239#ac_add_options --disable-strip
240#ac_add_options --disable-install-strip
241
242# The BLFS editors recommend not changing anything below this line:
243ac_add_options --prefix=/usr
244ac_add_options --enable-application=browser
245
246ac_add_options --disable-crashreporter
247ac_add_options --disable-updater
248ac_add_options --disable-tests
249
250ac_add_options --enable-optimize
251
252ac_add_options --enable-gio
253ac_add_options --enable-official-branding
254ac_add_options --enable-safe-browsing
255ac_add_options --enable-url-classifier
256
257# From firefox-40, using system cairo causes firefox to crash
258# frequently when it is doing background rendering in a tab.
259#ac_add_options --enable-system-cairo
260ac_add_options --enable-system-ffi
261ac_add_options --enable-system-pixman
262
263ac_add_options --with-pthreads
264
265ac_add_options --with-system-bz2
266ac_add_options --with-system-jpeg
267ac_add_options --with-system-png
268ac_add_options --with-system-zlib
269
270mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir</literal>
271EOF</userinput></screen>
272
273 <para>
274 Compile <application>Firefox</application> by issuing the following
275 commands:
276 </para>
277
278 <para>
279 If you are using gtk+-3.20 or later, apply a patch to restore the
280 slider on scrollbars:
281 </para>
282
283<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-gtk320-1.patch</userinput></screen>
284
285 <para>
286 If you have installed system versions of graphite2 and harfbuzz and wish
287 firefox to use those instead of its shipped versions, apply the patch and
288 uncomment the appropriate entries in the <filename>mozconfig</filename>
289 file:
290 </para>
291
292<screen><userinput>patch -Np1 -i ../firefox-&firefox-version;-system_graphite2_harfbuzz-1.patch</userinput></screen>
293
294 <note><para>
295 If you are compiling <application>Firefox</application> in chroot, make
296 sure you have <envar>$SHELL</envar> environment variable set or prepend
297 <envar>SHELL=/bin/sh</envar>.
298 </para></note>
299
300<screen><userinput>sed -e '/#include/i\
301 print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\\n"\;' \
302 -i nsprpub/config/make-system-wrappers.pl
303
304sed -e '/#include/a\
305 print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\\n"\;' \
306 -i nsprpub/config/make-system-wrappers.pl
307
308CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
309CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
310
311make -f client.mk</userinput></screen>
312
313 <para>
314 This package does not come with a test suite.
315 </para>
316
317 <para>
318 Now, as the <systemitem class="username">root</systemitem> user:
319 </para>
320
321<screen role="root"><userinput>make -f client.mk install INSTALL_SDK= &amp;&amp;
322chown -R 0:0 /usr/lib/firefox-&firefox-version; &amp;&amp;
323
324mkdir -pv /usr/lib/mozilla/plugins &amp;&amp;
325ln -sfv ../../mozilla/plugins /usr/lib/firefox-&firefox-version;/browser</userinput></screen>
326
327 </sect2>
328
329 <sect2 role="commands">
330 <title>Command Explanations</title>
331
332 <para>
333 <command>sed ...</command>: These commands correct the source to be
334 compatible with gcc6 by preventing c++ scope errors.
335 </para>
336
337 <para>
338 <command>CFLAGS= ... CXXFLAGS= ...</command>: These settings work around
339 code which gcc6 would otherwise regard as out-of-specification and allow
340 it to produce a working program.
341 </para>
342
343 <para>
344 <command>make -f client.mk ...</command>: Mozilla products are packaged to
345 allow the use of a configuration file which can be used to pass the
346 configuration settings to the <command>configure</command> command.
347 <command>make</command> uses the <filename>client.mk</filename> file to
348 get initial configuration and setup parameters.
349 </para>
350
351 <para>
352 <command>mkdir -p /usr/lib/mozilla/plugins</command>: This checks
353 that <filename class="directory">/usr/lib/mozilla/plugins</filename>
354 exists.
355 </para>
356
357 <para>
358 <command>ln -sv ... /usr/lib/firefox-&firefox-version;/browser</command>:
359 This command creates a symbolic link to <filename
360 class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
361 needed, as <application>Firefox</application> checks <filename
362 class="directory">/usr/lib/mozilla/plugins</filename> by default, but the
363 symbolic link is made to keep all the plugins installed in one folder.
364 </para>
365
366 </sect2>
367
368 <sect2 role="configuration">
369 <title>Configuring Firefox</title>
370
371 <para>
372 If you did not add the <option>--disable-webm</option> option to your
373 <filename>mozconfig</filename>, your <application>Firefox</application>
374 can play most YouTube videos without the need for the Flash plugin.
375 Go to <ulink url="http://www.youtube.com/html5"/> to see which HTML5
376 video features your browser supports on YouTube.
377 </para>
378
379 <para>
380 If you use a desktop environment like <application>Gnome</application> or
381 <application>KDE</application> you may like to create a
382 <filename>firefox.desktop</filename> file so that
383 <application>Firefox</application> appears in the panel's menus. If you
384 didn't enable startup-notification in your mozconfig change the
385 StartupNotify line to false. As the
386 <systemitem class="username">root</systemitem> user:
387 </para>
388
389<screen role="root"><userinput>mkdir -pv /usr/share/applications &amp;&amp;
390mkdir -pv /usr/share/pixmaps &amp;&amp;
391
392cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
393<literal>[Desktop Entry]
394Encoding=UTF-8
395Name=Firefox Web Browser
396Comment=Browse the World Wide Web
397GenericName=Web Browser
398Exec=firefox %u
399Terminal=false
400Type=Application
401Icon=firefox
402Categories=GNOME;GTK;Network;WebBrowser;
403MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
404StartupNotify=true</literal>
405EOF
406
407ln -sfv /usr/lib/firefox-&firefox-version;/browser/icons/mozicon128.png \
408 /usr/share/pixmaps/firefox.png</userinput></screen>
409
410 </sect2>
411
412 <sect2 role="content">
413 <title>Contents</title>
414
415 <segmentedlist>
416 <segtitle>Installed Programs</segtitle>
417 <segtitle>Installed Libraries</segtitle>
418 <segtitle>Installed Directory</segtitle>
419
420 <seglistitem>
421 <seg>
422 firefox
423 </seg>
424 <seg>
425 Numerous libraries, browser components, plugins, extensions, and
426 helper modules installed in /usr/lib/firefox-&firefox-version;
427 </seg>
428 <seg>
429 /usr/lib/firefox-&firefox-version;
430 </seg>
431 </seglistitem>
432 </segmentedlist>
433
434 <variablelist>
435 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
436 <?dbfo list-presentation="list"?>
437 <?dbhtml list-presentation="table"?>
438
439 <varlistentry id="firefox-prog">
440 <term><command>firefox</command></term>
441 <listitem>
442 <para>
443 is a <application>GTK+ 2</application> internet browser that uses the
444 Mozilla Gecko rendering engine.
445 </para>
446 <indexterm zone="firefox firefox-prog">
447 <primary sortas="b-firefox">firefox</primary>
448 </indexterm>
449 </listitem>
450 </varlistentry>
451
452 </variablelist>
453
454 </sect2>
455
456</sect1>
Note: See TracBrowser for help on using the repository browser.