Firefox-40.0.2

Introduction to Firefox

Firefox is a stand-alone browser based on the Mozilla codebase.

This package is known to build and work properly using an LFS-7.7 systemd platform.

Package Information

Firefox Dependencies

Required

alsa-lib-1.0.29, GTK+-2.24.28, UnZip-6.0, yasm-1.3.0 and Zip-3.0

Recommended

[Note]

Note

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.

[Note]

Note

You must have installed OpenSSL before Python 2, or the build system will quickly fail with output including "ImportError: cannot import name HTTPSHandler". If you are in any doubt about this (e.g. upgrading from an older version of SeaMonkey), check if /usr/lib/python2.7/lib-dynload/_ssl.so exists. If it does not, reinstall Python-2.7.10 (after installing OpenSSL-1.0.2d. The latest version of any currently maintained version of OpenSSL should be satisfactory if already installed.

Optional

cURL-7.44.0, dbus-glib-0.104, Doxygen-1.8.10, gst-plugins-base-0.10.36 (with gst-plugins-good-0.10.31 and gst-ffmpeg-0.10.13 at runtime), or gst-plugins-base-1.4.5 (with gst-plugins-good-1.4.5 and gst-libav-1.4.5 at runtime), libnotify-0.7.6, OpenJDK-1.8.0.51, PulseAudio-6.0, startup-notification-0.12, Wget-1.16.3, Wireless Tools-29, Hunspell and libproxy

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/firefox

Installation of Firefox

The configuration of Firefox is accomplished by creating a mozconfig file containing the desired configuration options. A default mozconfig is created below. To see the entire list of available configuration options (and an abbreviated description of each one), issue ./configure --help. You may also wish to review the entire file and uncomment any other desired options. Create the file by issuing the following command:

cat > mozconfig << "EOF"
# If you have a multicore machine, all cores will be used by default.
# If desired, you can reduce the number of cores used, e.g. to 1, by
# uncommenting the next line and setting a valid number of CPU cores.
#mk_add_options MOZ_MAKE_FLAGS="-j1"

# 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

# If you have installed libnotify comment out this line:
ac_add_options --disable-libnotify

# Comment out following option if you have PulseAudio installed
ac_add_options --disable-pulseaudio

# GStreamer is necessary for H.264 video playback in HTML5 Video Player.
# To enable it, make sure you also set "media.gstreamer.enabled" to
# "true" in about:config.

# If you don't have GStreamer 0.10.x installed, uncomment this line:
#ac_add_options --disable-gstreamer
# or uncomment this line if you have GStreamer 1.x.y installed:
#ac_add_options --enable-gstreamer=1.0

# Uncomment these lines if you have installed optional dependencies:
#ac_add_options --enable-system-hunspell
#ac_add_options --enable-startup-notification

# Comment out following options if you have not installed
# recommended dependencies:
ac_add_options --enable-system-sqlite
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 BLFS editors recommend not changing anything below this line:
ac_add_options --prefix=/usr
ac_add_options --enable-application=browser

ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-tests

ac_add_options --enable-optimize
ac_add_options --enable-strip
ac_add_options --enable-install-strip

ac_add_options --enable-gio
ac_add_options --enable-official-branding
ac_add_options --enable-safe-browsing
ac_add_options --enable-url-classifier

ac_add_options --enable-system-cairo
ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman

ac_add_options --with-pthreads

ac_add_options --with-system-bz2
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-zlib

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir
EOF

First, fix building with system freetype-2.6 or later:

sed -i '/^ftglyph.h/ i ftfntfmt.h' config/system-headers

Compile Firefox by issuing the following commands:

make -f client.mk

This package does not come with a test suite.

Install Firefox by running the following commands as the root user:

make -f client.mk install INSTALL_SDK= &&

chown -R root:root /usr/lib/firefox-40.0.2 &&

mkdir -pv /usr/lib/mozilla/plugins &&
ln -sfv ../../mozilla/plugins /usr/lib/firefox-40.0.2/browser

While still as the root user, install the icon files which will be used in the desktop file below:

for s in 16 32 48
do
install -v -Dm644 /usr/lib/firefox-40.0.2/browser/chrome/icons/default/default${s}.png \
                  /usr/share/icons/hicolor/${s}x${s}/apps/firefox.png
done &&
install -v -Dm644 /usr/lib/firefox-40.0.2/browser/icons/mozicon128.png \
                  /usr/share/icons/hicolor/128x128/apps/firefox.png &&
gtk-update-icon-cache -qf /usr/share/icons/hicolor &&
unset s

Command Explanations

make -f client.mk ...: Mozilla products are packaged to allow the use of a configuration file which can be used to pass the configuration settings to the configure command. make uses the client.mk file to get initial configuration and setup parameters.

ln -sfv ... /usr/lib/firefox-40.0.2/browser: This command creates a symbolic link to /usr/lib/mozilla/plugins. It's not really needed, as Firefox checks /usr/lib/mozilla/plugins by default, but the symbolic link is made to keep all the plugins installed in one folder.

Configuring Firefox

If you use a desktop environment such as GNOME or KDE, you may want to create a desktop file in order to be able to launch Firefox from the desktop menus. If you didn't enable Startup Notification support in your mozconfig then change the StartupNotify line to false. Run the following commands as the root user:

mkdir -pv /usr/share/applications &&

cat > /usr/share/applications/firefox.desktop << "EOF"
[Desktop Entry]
Encoding=UTF-8
Name=Firefox Web Browser
Comment=Browse the World Wide Web
GenericName=Web Browser
Exec=firefox %u
Terminal=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=application/xhtml+xml;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
EOF

Contents

Installed Programs: firefox
Installed Libraries: None
Installed Directories: /usr/lib/firefox-40.0.2 and /usr/lib/mozilla/plugins

Short Descriptions

firefox

is a GTK+ 2 internet browser that uses the Mozilla Gecko rendering engine.

Last updated on 2014-10-29 19:58:34 +0100