Index: xsoft/graphweb/firefox.xml
===================================================================
--- xsoft/graphweb/firefox.xml	(revision 3acf10893caa4bb536acc0cd7895798cabff445d)
+++ xsoft/graphweb/firefox.xml	(revision 5e94b6c34b3aca1a14eb3c2740fc21272a6213ea)
@@ -5,13 +5,12 @@
   %general-entities;
 
-  <!ENTITY firefox-download-http
-           "&mozilla-http;/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.bz2">
+  <!ENTITY firefox-download-http "&mozilla-http;/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.xz">
+<!-- 550 Permission denied.
+  <!ENTITY firefox-download-ftp "&mozilla-ftp;/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.bz2"> -->
   <!ENTITY firefox-download-ftp " ">
-<!--   <!ENTITY firefox-download-ftp
-           "&mozilla-ftp;/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.bz2"> -->
-  <!ENTITY firefox-md5sum        "f9310f4aa96fd9cc74a0fdc6d14ea259">
-  <!ENTITY firefox-size          "170 MB">
-  <!ENTITY firefox-buildsize     "3 GB (73 MB installed)">
-  <!ENTITY firefox-time          "35 SBU">
+  <!ENTITY firefox-md5sum        "66d4810df0b5a6095e2276256bf17675">
+  <!ENTITY firefox-size          "174 MB">
+  <!ENTITY firefox-buildsize     "4.4 GB (79 MB installed)">
+  <!ENTITY firefox-time          "10 SBU (with parallelism=4)">
 ]>
 
@@ -38,5 +37,5 @@
     </para>
 
-    &lfs77_checked;
+    &lfs78_checked;
 
     <bridgehead renderas="sect3">Package Information</bridgehead>
@@ -73,4 +72,11 @@
       </listitem>
     </itemizedlist>
+
+    <note>
+      <para>
+        The tarball <emphasis>firefox-&firefox-version;.source.tar.xz</emphasis>
+        will untar to <emphasis>firefox-&firefox-version;</emphasis> directory.
+      </para>
+    </note>
 
     <bridgehead renderas="sect3">Firefox Dependencies</bridgehead>
@@ -79,7 +85,9 @@
     <para role="required">
       <xref linkend="alsa-lib"/>,
-      <xref linkend="gtk2"/>,
+      <xref linkend="gtk2"/>
+      (or <xref linkend="gtk3"/> if you change the mozconfig where indicated),
+      <xref linkend="nss"/>,
       <xref linkend="unzip"/>,
-      <xref linkend="yasm"/> and
+      <xref linkend="yasm"/>, and
       <xref linkend="zip"/>
     </para>
@@ -89,7 +97,5 @@
       <xref linkend="icu"/>,
       <xref linkend="libevent"/>,
-      <xref linkend="libvpx"/>,
-      <xref linkend="nspr"/>,
-      <xref linkend="nss"/> and
+      <xref linkend="libvpx"/>, and
       <xref linkend="sqlite"/>
     </para>
@@ -105,13 +111,14 @@
     <note>
       <para>
-        You must have installed <application>OpenSSL</application> before
-        <application>Python 2</application>, or the build system will quickly
+        With <application>Firefox-31.0</application> and later versions, you
+        must have installed <application>Openssl</application> before
+        <application>Python 2</application> 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
+        an older version of Firefox), check if
         <filename>/usr/lib/python&python2-majorver;/lib-dynload/_ssl.so</filename>
-        exists. If it does not, reinstall <xref linkend="python2"/> (after
-        installing <xref linkend="openssl"/>. The latest version of any
-        <emphasis>currently maintained</emphasis> version of OpenSSL should be
+        exists.  If it does not, reinstall <xref linkend="python2"/> (after
+        installing <xref linkend="openssl"/>).  The latest version of any
+        <emphasis>currently maintained</emphasis> version of Openssl should be
         satisfactory if already installed.
       </para>
@@ -123,18 +130,20 @@
       <xref linkend="dbus-glib"/>,
       <xref linkend="doxygen"/>,
-      <xref linkend="gst-plugins-base"/> (with
-      <xref linkend="gst-plugins-good"/> and
-      <xref linkend="gst-ffmpeg"/> at runtime), or
+      <xref linkend="GConf"/>,
+      <xref linkend="ffmpeg"/> (runtime) or
       <xref linkend="gst10-plugins-base"/> (with
       <xref linkend="gst10-plugins-good"/> and
       <xref linkend="gst10-libav"/> at runtime),
-      <xref linkend="libnotify"/>,
+      <xref linkend="libwebp"/>,
       <xref linkend="openjdk"/>,
       <xref linkend="pulseaudio"/>,
       <xref linkend="startup-notification"/>,
+      <xref linkend="valgrind"/>,
       <xref linkend="wget"/>,
       <xref linkend="wireless_tools"/>,
-      <ulink url="http://hunspell.sourceforge.net/">Hunspell</ulink> and
-      <ulink url="https://code.google.com/p/libproxy/">libproxy</ulink>
+      <ulink url="https://hunspell.github.io/">Hunspell</ulink>,
+      <ulink url="http://sourceforge.net/projects/liboauth/files/">liboauth</ulink>, and
+      <ulink url="https://github.com/libproxy/libproxy">libproxy</ulink>, and
+      <ulink url="https://www.rust-lang.org/">Rust</ulink>
     </para>
 
@@ -148,12 +157,12 @@
 
     <para>
-      The configuration of <application>Firefox</application> is accomplished by
-      creating a <filename>mozconfig</filename> file containing the desired
-      configuration options. A default <filename>mozconfig</filename> is created
-      below. To see the entire list of available configuration options (and an
-      abbreviated description of each one), issue <command>./configure
+      The configuration of <application>Firefox</application> is accomplished
+      by creating a <filename>mozconfig</filename> file containing the desired
+      configuration options. A default <filename>mozconfig</filename> 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:
+      uncomment any other desired options.  Create the file by issuing the
+      following command:
     </para>
 
@@ -172,22 +181,24 @@
 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:
+# GStreamer is necessary for H.264 video playback in HTML5 Video Player if
+# FFmpeg is not found at runtime;
+# to be enabled, also remember to set "media.gstreamer.enabled" to "true"
+# in about:config. If you have GStreamer 1.x.y, comment out this line and
+# uncomment the following one:
+ac_add_options --disable-gstreamer
 #ac_add_options --enable-gstreamer=1.0
+
+# Uncomment this option if you wish to build with gtk+-3
+#ac_add_options --enable-default-toolkit=cairo-gtk3
 
 # Uncomment these lines if you have installed optional dependencies:
 #ac_add_options --enable-system-hunspell
 #ac_add_options --enable-startup-notification
+
+# Comment out following option if you have PulseAudio installed
+ac_add_options --disable-pulseaudio
+
+# If you have installed GConf, comment out this line
+ac_add_options --disable-gconf
 
 # Comment out following options if you have not installed
@@ -217,5 +228,7 @@
 ac_add_options --enable-url-classifier
 
-ac_add_options --enable-system-cairo
+# From firefox-40, using system cairo causes firefox to crash
+# frequently when it is doing background rendering in a tab.
+#ac_add_options --enable-system-cairo
 ac_add_options --enable-system-ffi
 ac_add_options --enable-system-pixman
@@ -232,14 +245,14 @@
 
     <para>
-      First, fix building with system freetype-2.6 or later:
-    </para>
-
-<screen><userinput>sed -i '/^ftglyph.h/ i ftfntfmt.h' config/system-headers</userinput></screen>
-
-    <para>
       Compile <application>Firefox</application> by issuing the following
       commands:
     </para>
 
+    <note><para>
+      If you are compiling <application>Firefox</application> in chroot, make
+      sure you have <envar>$SHELL</envar> environment variable set or prepend
+      <envar>SHELL=/bin/sh</envar>.
+    </para></note>
+
 <screen><userinput>make -f client.mk</userinput></screen>
 
@@ -249,29 +262,12 @@
 
     <para>
-      Install <application>Firefox</application> by running the following
-      commands as the <systemitem class="username">root</systemitem> user:
+      Now, as the <systemitem class="username">root</systemitem> user:
     </para>
 
 <screen role="root"><userinput>make -f client.mk install INSTALL_SDK= &amp;&amp;
-
-chown -R root:root /usr/lib/firefox-&firefox-version; &amp;&amp;
-
-mkdir -pv /usr/lib/mozilla/plugins &amp;&amp;
-ln -sfv ../../mozilla/plugins /usr/lib/firefox-&firefox-version;/browser</userinput></screen>
-
-    <para>
-      While still as the <systemitem class="username">root</systemitem> user,
-      install the icon files which will be used in the desktop file below:
-    </para>
-
-<screen role="root"><userinput>for s in 16 32 48
-do
-install -v -Dm644 /usr/lib/firefox-&firefox-version;/browser/chrome/icons/default/default${s}.png \
-                  /usr/share/icons/hicolor/${s}x${s}/apps/firefox.png
-done &amp;&amp;
-install -v -Dm644 /usr/lib/firefox-&firefox-version;/browser/icons/mozicon128.png \
-                  /usr/share/icons/hicolor/128x128/apps/firefox.png &amp;&amp;
-gtk-update-icon-cache -qf /usr/share/icons/hicolor &amp;&amp;
-unset s</userinput></screen>
+chown -R 0:0 /usr/lib/firefox-&firefox-version;   &amp;&amp;
+
+mkdir -pv    /usr/lib/mozilla/plugins  &amp;&amp;
+ln    -sfv   ../../mozilla/plugins /usr/lib/firefox-&firefox-version;/browser</userinput></screen>
 
   </sect2>
@@ -288,6 +284,23 @@
     </para>
 
-    <para>
-      <command>ln -sfv ... /usr/lib/firefox-&firefox-version;/browser</command>:
+     <para>
+      <command>make -C firefox-build-dir install</command>: This runs
+      <command>make install</command> in firefox-build-dir.
+    </para>
+
+    <para>
+      <command>ln -sfv ... /usr/bin/firefox</command>: This puts a symbolic link
+      to the <command>firefox</command> executable in your <envar>PATH</envar>
+      variable.
+    </para>
+
+    <para>
+      <command>mkdir -p /usr/lib/mozilla/plugins</command>: This checks
+      that <filename class="directory">/usr/lib/mozilla/plugins</filename>
+      exists.
+    </para>
+
+    <para>
+      <command>ln -sv ... /usr/lib/firefox-&firefox-version;/browser</command>:
       This command creates a symbolic link to <filename
       class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
@@ -303,16 +316,25 @@
 
     <para>
-      If you use a desktop environment such as <application>GNOME</application>
-      or <application>KDE</application>, you may want to create a desktop file
-      in order to be able to launch <application>Firefox</application> from the
-      desktop menus. If you didn't enable
-      <application>Startup Notification</application> support in your mozconfig
-      then change the StartupNotify line to false. Run the following commands
-      as the <systemitem class="username">root</systemitem> user:
+      If you did not add the <option>--disable-webm</option> option to your
+      <filename>mozconfig</filename>, your <application>Firefox</application>
+      can play most YouTube videos without the need for the flash plugin. To
+      enable this, go to <ulink url="http://www.youtube.com/html5"/> and click
+      on 'Join the HTML5 Trial' (needs cookies enabled).
+    </para>
+
+    <para>
+      If you use a desktop environment like <application>Gnome</application> or
+      <application>KDE</application> you may like to create a
+      <filename>firefox.desktop</filename> file so that
+      <application>Firefox</application> appears in the panel's menus. If you
+      didn't enable startup-notification 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 &amp;&amp;
-
-cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF"
+mkdir -pv /usr/share/pixmaps &amp;&amp;
+
+cat &gt; /usr/share/applications/firefox.desktop &lt;&lt; "EOF" &amp;&amp;
 <literal>[Desktop Entry]
 Encoding=UTF-8
@@ -327,5 +349,8 @@
 MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
 StartupNotify=true</literal>
-EOF</userinput></screen>
+EOF
+
+ln -sfv /usr/lib/firefox-&firefox-version;/browser/icons/mozicon128.png \
+        /usr/share/pixmaps/firefox.png</userinput></screen>
 
   </sect2>
@@ -337,5 +362,5 @@
       <segtitle>Installed Programs</segtitle>
       <segtitle>Installed Libraries</segtitle>
-      <segtitle>Installed Directories</segtitle>
+      <segtitle>Installed Directory</segtitle>
 
       <seglistitem>
@@ -344,9 +369,9 @@
         </seg>
         <seg>
-          None
+          Numerous libraries, browser components, plugins, extensions, and
+          helper modules installed in /usr/lib/firefox-&firefox-version;
         </seg>
         <seg>
-          /usr/lib/firefox-&firefox-version; and
-          /usr/lib/mozilla/plugins
+          /usr/lib/firefox-&firefox-version;
         </seg>
       </seglistitem>
