Difference between revisions of "Firefox"
(Update the MimeType and Categories to play nice with Gnome3 so firefox will show up in the list of preferred applications.) |
|||
(50 intermediate revisions by 11 users not shown) | |||
Line 2: | Line 2: | ||
|- | |- | ||
!Download Source: | !Download Source: | ||
− | | http://releases.mozilla.org/pub/mozilla.org/firefox/releases/ | + | | http://releases.mozilla.org/pub/mozilla.org/firefox/releases/{{Firefox-Version}}/source/firefox-{{Firefox-Version}}-source.tar.bz2 |
+ | |- | ||
+ | !Download Source: | ||
+ | | ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/3.5.7/source/firefox-3.5.7-source.tar.bz2 | ||
|} | |} | ||
---- | ---- | ||
+ | |||
+ | {{Package-Introduction|Firefox is a stand-alone browser based on the Mozilla codebase.|http://www.mozilla.com/en-US/firefox/}} | ||
+ | |||
== Dependencies == | == Dependencies == | ||
Line 13: | Line 19: | ||
* [[Zip]] | * [[Zip]] | ||
=== Recommended === | === Recommended === | ||
− | * [[NSS]] | + | * [[NSS]] (on ppc, a separate nss is essential, the version shipped in firefox-3.0 does not build for this architecture) |
+ | * [[Curl]] (Required for Crash Reporter) | ||
+ | * [[XULRunner]] | ||
=== Optional === | === Optional === | ||
+ | * [[Hunspell]] | ||
* [[Unzip]] | * [[Unzip]] | ||
* [[libgnomeui]] | * [[libgnomeui]] | ||
* [[OpenLDAP]] | * [[OpenLDAP]] | ||
− | + | {{Mozilla-mozconfig-base|browser|firefox-{{Firefox-Version}}}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Non-Multilib == | == Non-Multilib == | ||
− | |||
− | |||
Compile the package: | Compile the package: | ||
Line 89: | Line 39: | ||
make -f client.mk install | make -f client.mk install | ||
− | |||
− | |||
− | |||
− | |||
− | |||
=== 50-firefox.sh === | === 50-firefox.sh === | ||
Line 102: | Line 47: | ||
# Begin /etc/profile.d/50-firefox.sh | # Begin /etc/profile.d/50-firefox.sh | ||
− | export PATH="${PATH}:/opt/firefox- | + | export PATH="${PATH}:/opt/firefox-{{Firefox-Version}}/bin" |
− | |||
# End /etc/profile.d/50-firefox.sh | # End /etc/profile.d/50-firefox.sh | ||
Line 109: | Line 53: | ||
== Multilib == | == Multilib == | ||
+ | |||
The order that the builds are displayed on this page isn't neccesarily the order that you install them in. If you would like a 32bit browser but still require the 64bit libraries for other packages build the 32bit version last. | The order that the builds are displayed on this page isn't neccesarily the order that you install them in. If you would like a 32bit browser but still require the 64bit libraries for other packages build the 32bit version last. | ||
Remember, Use a clean source and build directory for each build, Firefox is no exception. | Remember, Use a clean source and build directory for each build, Firefox is no exception. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== 32Bit === | === 32Bit === | ||
Line 142: | Line 72: | ||
EOF | EOF | ||
− | + | Adjust some hardwired paths for arch-dependent config files: | |
− | + | sed -i 's/gre\.d/&-32/g' $(grep -lr 'gre\.d' *) | |
Compile the package: | Compile the package: | ||
− | make -f client.mk | + | make -f client.mk build |
Install the package: | Install the package: | ||
− | make -f client.mk | + | make -f client.mk install |
+ | mv -v /opt/firefox-{{Firefox-Version}}/bin/firefox{,-32} | ||
− | === | + | === N32 === |
− | + | Use the following command to modify your '''.mozconfig''' with 32bit specific flags: | |
− | |||
− | + | sed -i '/libxul-sdk=/s@/lib@&32@' .mozconfig | |
+ | cat >> .mozconfig << EOF | ||
+ | ac_add_options --libdir=/opt/firefox-{{Firefox-Version}}/lib32 | ||
+ | export CC="gcc ${BUILDN32}" | ||
+ | export CXX="g++ ${BUILDN32}" | ||
+ | export PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" | ||
+ | export USE_ARCH=N32 | ||
+ | EOF | ||
+ | |||
+ | Adjust some hardwired paths for arch-dependent config files: | ||
+ | |||
+ | sed -i 's/gre\.d/&-n32/g' $(grep -lr 'gre\.d' *) | ||
− | + | Compile the package: | |
− | + | ||
+ | make -f client.mk build | ||
+ | |||
+ | Install the package: | ||
+ | |||
+ | make -f client.mk install | ||
+ | mv -v /opt/firefox-{{Firefox-Version}}/bin/firefox{,-n32} | ||
=== 64Bit === | === 64Bit === | ||
Line 168: | Line 115: | ||
Use the following command to append your '''.mozconfig''' with 64bit specific flags: | Use the following command to append your '''.mozconfig''' with 64bit specific flags: | ||
+ | sed -i '/libxul-sdk=/s@/lib@&64@' .mozconfig | ||
cat >> .mozconfig << EOF | cat >> .mozconfig << EOF | ||
− | ac_add_options --libdir=/opt/firefox- | + | ac_add_options --libdir=/opt/firefox-{{Firefox-Version}}/lib64 |
export CC="gcc ${BUILD64}" | export CC="gcc ${BUILD64}" | ||
export CXX="g++ ${BUILD64}" | export CXX="g++ ${BUILD64}" | ||
Line 176: | Line 124: | ||
EOF | EOF | ||
− | sed -i | + | {{Note|With PPC64, CFLAGS and CXXFLAGS may need to contain ''-mminimal-toc'' to avoid automatic multiple |
+ | TOCs.}} | ||
+ | |||
+ | Adjust some hardwired paths for arch-dependent config files: | ||
+ | |||
+ | sed -i 's/gre\.d/&-64/g' $(grep -lr 'gre\.d' *) | ||
Compile the package: | Compile the package: | ||
Line 185: | Line 138: | ||
make -f client.mk install && | make -f client.mk install && | ||
− | mv -v /opt/firefox- | + | mv -v /opt/firefox-{{Firefox-Version}}/bin/firefox{,-64} |
− | |||
− | + | === Create a wrapper for firefox === | |
− | + | The multiarch_wrapper program normally used does not work with firefox. Create a shell script to handle switching between firefox architectures: | |
− | |||
− | = Creating the Desktop File = | + | cat >/opt/firefox-{{Firefox-Version}}/bin/firefox <<EOF |
+ | #!/bin/bash | ||
+ | # Simple shell script for multiarch wrapping | ||
+ | if [ "$USE_ARCH" = 32 -o "$BUILDENV" = 32 ]; then | ||
+ | ${0}-32 "$@" | ||
+ | elif [ "$USE_ARCH" = n32 -o "$BUILDENV" = n32 ]; then | ||
+ | ${0}-n32 "$@" | ||
+ | else | ||
+ | ${0}-64 "$@" | ||
+ | fi | ||
+ | EOF | ||
+ | chmod -v 755 /opt/firefox-{{Firefox-Version}}/bin/firefox | ||
+ | |||
+ | === 50-firefox.sh === | ||
+ | |||
+ | If you're using the [[Bash Startup Files]] create an addition for firefox with the following commands, otherwise make sure the enviornment variables are set in your profile: | ||
+ | |||
+ | cat > /etc/profile.d/50-firefox.sh << "EOF" | ||
+ | # Begin /etc/profile.d/50-firefox.sh | ||
+ | |||
+ | export PATH="${PATH}:/opt/firefox-{{Firefox-Version}}/bin" | ||
+ | |||
+ | # End /etc/profile.d/50-firefox.sh | ||
+ | EOF | ||
+ | |||
+ | == Configuring == | ||
+ | |||
+ | === Creating the Desktop File === | ||
Since Firefox does not provide a desktop file by default below is an example one: | Since Firefox does not provide a desktop file by default below is an example one: | ||
Line 201: | Line 179: | ||
Encoding=UTF-8 | Encoding=UTF-8 | ||
Name=Mozilla Firefox Browser | Name=Mozilla Firefox Browser | ||
− | Comment=Lightweight | + | Comment=Lightweight Browser Based on Mozilla |
− | Exec= | + | Exec=firefox %U |
Icon=firefox.png | Icon=firefox.png | ||
Terminal=false | Terminal=false | ||
− | Type=Application | + | Type=Application |
− | Categories= | + | MimeType=x-scheme-handler/http;x-scheme-handler/https;text/html; |
+ | Categories=Network;GNOME;GTK;WebBrowser; | ||
EOF | EOF | ||
− | Grab the Firefox pixmap from http://cross-lfs.org/~jciccone/firefox.png and put it in /usr/share/pixmaps. | + | Grab the Firefox pixmap from http://cross-lfs.org/~jciccone/firefox.png and put it in /usr/share/pixmaps. If you built both a 32-bit and 64-bit version of Firefox, you can grab unofficial Firefox pixmaps that will help you keep track of which one you're launching from http://cross-lfs.org/~arowland/wiki_files/firefox.png for 32-bit and http://cross-lfs.org/~arowland/wiki_files/firefox-64.png for the 64-bit version. These are useful for launchers on your panel. |
+ | |||
+ | == Contents == | ||
+ | {| style="text-align: left;" | ||
+ | |-valign="top" | ||
+ | !Installed Directories: | ||
+ | |/opt/firefox-{{Firefox-Version}}/bin, /opt/firefox-{{Firefox-Version}}/include, /opt/firefox-{{Firefox-Version}}/lib, /opt/firefox-{{Firefox-Version}}/share | ||
+ | |-valign="top" | ||
+ | !Installed Programs: | ||
+ | |firefox, firefox-config | ||
+ | |-valign="top" | ||
+ | !Installed Libraries: | ||
+ | |libappcomps.so, libauth.so, libautoconfig.so, libbrowsercomps.so, libbrowserdirprovider.so, libcaps.so, libchrome.so, libcommandlines.so, libcomposer.so, libcookie.so, libdocshell.so, libeditor.so, libembedcomponents.so, libfileview.so, libgfx_gtk.so, libgfxps.so, libgklayout.so, libgkplugin.so, libhtmlpars.so, libi18n.so, libimgicon.so, libimglib2.so, libjar50.so, libjsd.so, libmork.so, libmozfind.so, libmozgnome.so, libmozldap.so, libmyspell.so, libnecko.so, libnecko2.so, libnkgnomevfs.so, libnsappshell.so, liboji.so, libpermissions.so, libpipboot.so, libpipnss.so, libpippki.so, libpref.so, librdf.so, libremoteservice.so, libsearchservice.so, libspellchecker.so, libstoragecomps.so, libsystem-pref.so, libtoolkitcomps.so, libtransformiix.so, libtxmgr.so, libuconv.so, libucvmath.so, libuniversalchardet.so, libwebbrwsr.so, libwebsrvcs.so, libwidget_gtk2.so, libxmlextras.so, libxpcom_compat_c.so, libxpconnect.so, libxpinstall.so, libfreebl3.so, libgfxpsshar.so, libgkgfx.so, libgtkembedmoz.so, libgtkxtbin.so, libjsj.so, libldap50.so, libmozjs.so, libnspr4.so, libnss3.so, libnssckbi.so, libplc4.so, libplds4.so, libprldap50.so, libsmime3.so, libsoftokn3.so, libssl3.so, libxpcom.so, libxpcom_compat.so, libxpcom_core.so, libxpistub.so, libnullplugin.so, libunixprintplugin.so | ||
+ | |} | ||
+ | |||
+ | [[Category:GUI Clients]] |
Latest revision as of 07:45, 12 June 2011
Contents
Introduction to Firefox
Firefox is a stand-alone browser based on the Mozilla codebase.
Project Homepage: http://www.mozilla.com/en-US/firefox/
Dependencies
Required
Recommended
- NSS (on ppc, a separate nss is essential, the version shipped in firefox-3.0 does not build for this architecture)
- Curl (Required for Crash Reporter)
- XULRunner
Optional
Creating a .mozconfig
The .mozconfig file contains the options that will be used to build firefox.
The first line includes the default configuration for compiling and the second line determines where the build objects are going to reside.
Having --with-system-nss and --with-system-nspr does not mean you *HAVE* to have a system installed version of nss and nspr. It makes the build system prefer to use the system installed version of nss and nspr over the internal version.
--enable-canvas enables support for the <canvas></canvas> tag.
--enable-svg enables support for rendering svg files.
--disable-tests prevents test programs from being built which saves a lot of disk space and time.
--disable-installer prevents the installer from being built. --enable-official-branding causes the installed binaries to have the official Firefox name embedded in them. Due to license restrictions, you may not distribute binaries created using this option.
cat > .mozconfig << "EOF" . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@ ac_add_options --prefix=/opt/firefox-3.5.7 ac_cv_visibility_pragma=no ac_add_options --with-nspr-prefix=/usr ac_add_options --with-nss-prefix=/usr ac_add_options --with-system-nspr ac_add_options --with-system-nss ac_add_options --with-system-bz2 ac_add_options --with-system-jpeg ac_add_options --with-system-png ac_add_options --with-system-zlib ac_add_options --disable-debug ac_add_options --disable-installer ac_add_options --disable-xprint ac_add_options --disable-tests ac_add_options --enable-canvas ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --enable-safe-browsing ac_add_options --enable-svg ac_add_options --enable-system-cairo ac_add_options --enable-system-sqlite EOF
If you have XULRunner installed and you want to use the system installed version, add the following:
cat >> .mozconfig << "EOF" ac_add_options --with-system-libxul --with-libxul-sdk=/opt/xulrunner-1.9.1.16/lib/xulrunner-devel-1.9.1.16 EOF
If you would like dual monitor support, append your your .mozconfig with the following:
cat >> .mozconfig << "EOF" ac_add_options --enable-xinerama EOF
If you would like to render fonts with Pango, append your your .mozconfig with the following. This can significantly slow font rendering.
cat >> .mozconfig << "EOF" ac_add_options --enable-pango EOF
If you do not have JDK installed then add the following to your .mozconfig:
cat >> .mozconfig << "EOF" ac_add_options --disable-javaxpcom EOF
Non-Multilib
Compile the package:
make -f client.mk build
Install the package:
make -f client.mk install
50-firefox.sh
If you're using the Bash Startup Files create an addition for firefox with the following commands, otherwise make sure the enviornment variables are set in your profile:
cat > /etc/profile.d/50-firefox.sh << "EOF" # Begin /etc/profile.d/50-firefox.sh export PATH="${PATH}:/opt/firefox-3.5.7/bin" # End /etc/profile.d/50-firefox.sh EOF
Multilib
The order that the builds are displayed on this page isn't neccesarily the order that you install them in. If you would like a 32bit browser but still require the 64bit libraries for other packages build the 32bit version last.
Remember, Use a clean source and build directory for each build, Firefox is no exception.
32Bit
Use the following command to append your .mozconfig with 32bit specific flags:
cat >> .mozconfig << EOF export CC="gcc ${BUILD32}" export CXX="g++ ${BUILD32}" export PKG_CONFIG_PATH="${PKG_CONFIG_PATH32}" export USE_ARCH=32 ac_add_options --host=$CLFS_TARGET32 ac_add_options --build=$CLFS_TARGET32 mk_add_options CONFIG_GUESS=$CLFS_TARGET32 EOF
Adjust some hardwired paths for arch-dependent config files:
sed -i 's/gre\.d/&-32/g' $(grep -lr 'gre\.d' *)
Compile the package:
make -f client.mk build
Install the package:
make -f client.mk install mv -v /opt/firefox-3.5.7/bin/firefox{,-32}
N32
Use the following command to modify your .mozconfig with 32bit specific flags:
sed -i '/libxul-sdk=/s@/lib@&32@' .mozconfig cat >> .mozconfig << EOF ac_add_options --libdir=/opt/firefox-3.5.7/lib32 export CC="gcc ${BUILDN32}" export CXX="g++ ${BUILDN32}" export PKG_CONFIG_PATH="${PKG_CONFIG_PATHN32}" export USE_ARCH=N32 EOF
Adjust some hardwired paths for arch-dependent config files:
sed -i 's/gre\.d/&-n32/g' $(grep -lr 'gre\.d' *)
Compile the package:
make -f client.mk build
Install the package:
make -f client.mk install mv -v /opt/firefox-3.5.7/bin/firefox{,-n32}
64Bit
Use the following command to append your .mozconfig with 64bit specific flags:
sed -i '/libxul-sdk=/s@/lib@&64@' .mozconfig cat >> .mozconfig << EOF ac_add_options --libdir=/opt/firefox-3.5.7/lib64 export CC="gcc ${BUILD64}" export CXX="g++ ${BUILD64}" export PKG_CONFIG_PATH="${PKG_CONFIG_PATH64}" export USE_ARCH=64 EOF
Adjust some hardwired paths for arch-dependent config files:
sed -i 's/gre\.d/&-64/g' $(grep -lr 'gre\.d' *)
Compile the package:
make -f client.mk build
Install the package:
make -f client.mk install && mv -v /opt/firefox-3.5.7/bin/firefox{,-64}
Create a wrapper for firefox
The multiarch_wrapper program normally used does not work with firefox. Create a shell script to handle switching between firefox architectures:
cat >/opt/firefox-3.5.7/bin/firefox <<EOF #!/bin/bash # Simple shell script for multiarch wrapping if [ "$USE_ARCH" = 32 -o "$BUILDENV" = 32 ]; then ${0}-32 "$@" elif [ "$USE_ARCH" = n32 -o "$BUILDENV" = n32 ]; then ${0}-n32 "$@" else ${0}-64 "$@" fi EOF chmod -v 755 /opt/firefox-3.5.7/bin/firefox
50-firefox.sh
If you're using the Bash Startup Files create an addition for firefox with the following commands, otherwise make sure the enviornment variables are set in your profile:
cat > /etc/profile.d/50-firefox.sh << "EOF" # Begin /etc/profile.d/50-firefox.sh export PATH="${PATH}:/opt/firefox-3.5.7/bin" # End /etc/profile.d/50-firefox.sh EOF
Configuring
Creating the Desktop File
Since Firefox does not provide a desktop file by default below is an example one:
cat > /usr/share/applications/firefox.desktop << "EOF" [Desktop Entry] Encoding=UTF-8 Name=Mozilla Firefox Browser Comment=Lightweight Browser Based on Mozilla Exec=firefox %U Icon=firefox.png Terminal=false Type=Application MimeType=x-scheme-handler/http;x-scheme-handler/https;text/html; Categories=Network;GNOME;GTK;WebBrowser; EOF
Grab the Firefox pixmap from http://cross-lfs.org/~jciccone/firefox.png and put it in /usr/share/pixmaps. If you built both a 32-bit and 64-bit version of Firefox, you can grab unofficial Firefox pixmaps that will help you keep track of which one you're launching from http://cross-lfs.org/~arowland/wiki_files/firefox.png for 32-bit and http://cross-lfs.org/~arowland/wiki_files/firefox-64.png for the 64-bit version. These are useful for launchers on your panel.
Contents
Installed Directories: | /opt/firefox-3.5.7/bin, /opt/firefox-3.5.7/include, /opt/firefox-3.5.7/lib, /opt/firefox-3.5.7/share |
---|---|
Installed Programs: | firefox, firefox-config |
Installed Libraries: | libappcomps.so, libauth.so, libautoconfig.so, libbrowsercomps.so, libbrowserdirprovider.so, libcaps.so, libchrome.so, libcommandlines.so, libcomposer.so, libcookie.so, libdocshell.so, libeditor.so, libembedcomponents.so, libfileview.so, libgfx_gtk.so, libgfxps.so, libgklayout.so, libgkplugin.so, libhtmlpars.so, libi18n.so, libimgicon.so, libimglib2.so, libjar50.so, libjsd.so, libmork.so, libmozfind.so, libmozgnome.so, libmozldap.so, libmyspell.so, libnecko.so, libnecko2.so, libnkgnomevfs.so, libnsappshell.so, liboji.so, libpermissions.so, libpipboot.so, libpipnss.so, libpippki.so, libpref.so, librdf.so, libremoteservice.so, libsearchservice.so, libspellchecker.so, libstoragecomps.so, libsystem-pref.so, libtoolkitcomps.so, libtransformiix.so, libtxmgr.so, libuconv.so, libucvmath.so, libuniversalchardet.so, libwebbrwsr.so, libwebsrvcs.so, libwidget_gtk2.so, libxmlextras.so, libxpcom_compat_c.so, libxpconnect.so, libxpinstall.so, libfreebl3.so, libgfxpsshar.so, libgkgfx.so, libgtkembedmoz.so, libgtkxtbin.so, libjsj.so, libldap50.so, libmozjs.so, libnspr4.so, libnss3.so, libnssckbi.so, libplc4.so, libplds4.so, libprldap50.so, libsmime3.so, libsoftokn3.so, libssl3.so, libxpcom.so, libxpcom_compat.so, libxpcom_core.so, libxpistub.so, libnullplugin.so, libunixprintplugin.so |