Typo
[linux_from_scratch_hints.git] / OLD / mozfire.txt
blobeb9540e95af1202bccb47560416f56b749f72adb
1 Title:          mozfire.txt
2 LFS Version:    Any
3 Author:         Jeremy Utley <jeremy@jutley.org>
5 Synopsis:
6         How to compile the streamlined Mozilla Firebird browser, either from
7         the source release tarballs or CVS checkout
9 Hint:
11 Changelog:
12 [8/29/2003]
13         Initial Revision
16 First off, some assumptions must be made in this hint.  For the purpose of
17 this hint, I will assume that you have at least the following packages
18 (and their dependencies) installed, according to instructions in the BLFS
19 book:
21 XFree86 4.3.0
22 glib2 2.2.2
23 gtk2 2.2.2
24 libIDL 0.8.0
25 zip 2.3
26 unzip 5.50
27 libjpeg 6b
28 libpng 1.2.5
29 libmng 1.0.5
30 which 2.14
32 (Note these are the same dependencies as the full Mozilla package has.
33 Firebird uses the same code as the full Mozilla, just a different build
34 process.  Also, if you are not going to be building the full GNOME enviornment,
35 you should set the prefix on libIDL to be /usr.)
37 Once these packages and their dependencies are installed, you're ready to
38 get started with Firebird.  You have a choice to make now - you can either
39 install from the latest released source code, or do a CVS checkout of the
40 latest mozilla source tree.
42 Step 1: Setting the Firebird configuration:
44 First we want to set up our mozilla configuration.  Because the Mozilla source
45 package has multiple buildable targets in one source, using the standard
46 configure/make/make install process does not work.  Create our Mozilla
47 configuration with the following commands:
49 mkdir mozilla &&
50 cat > mozilla/.mozconfig << "EOF"
51 export MOZ_PHOENIX=1
52 export MOZ_XUL_APP=1
53 mk_add_options MOZ_PHOENIX=1
54 mk_add_options MOZ_XUL_APP=1
55 ac_add_options --prefix={installation prefix}
56 ac_add_options --with-system-jpeg
57 ac_add_options --with-system-zlib
58 ac_add_options --with-system-png
59 ac_add_options --with-system-mng
60 ac_add_options --enable-toolkit=gtk2
61 ac_add_options --enable-default-toolkit=gtk2
62 ac_add_options --enable-xft
63 ac_add_options --disable-mailnews
64 ac_add_options --disable-ldap
65 ac_add_options --enable-crypto
66 ac_add_options --enable-plaintext-editor-only
67 ac_add_options --disable-composer
68 ac_add_options --enable-extensions="default,-irc,-inspector,-venkman,-content-packs,-help"
69 ac_add_options --disable-tests
70 ac_add_options --disable-debug
71 ac_add_options --enable-reorder
72 ac_add_options --enable-strip
73 ac_add_options --enable-strip-libs
74 ac_add_options --enable-xterm-updates
75 ac_add_options --enable-elf-dynstr-gc
76 ac_add_options --enable-cpp-rtti
77 ac_add_options --enable-optimize="{your options of choice}"
78 ac_add_options --with-x
79 ac_add_options --disable-calendar
80 ac_add_options --disable-pedantic
81 ac_add_options --disable-svg
82 ac_add_options --without-system-nspr
83 ac_add_options --enable-nspr-autoconf
84 ac_add_options --enable-xsl
85 ac_add_options --enable-xinerama=no
86 ac_add_options --with-java-supplement
87 ac_add_options --with-pthreads
88 ac_add_options --disable-jsd
89 ac_add_options --disable-accessibility
90 ac_add_options --disable-dtd-debug
91 ac_add_options --disable-logging
92 ac_add_options --enable-old-abi-compat-wrappers
93 EOF
95 The installation prefix is your choice - for myself, I usually install to
96 /opt/firebird, but you can also easily choose to install to /usr.
98 For optimizations, I've had pretty good luck with the following:
100 -O2 -march=athlon-tbird -fomit-frame-pointer -pipe -s
102 However, I've seen some notes that compiling with -fomit-frame-pointer can
103 cause Firebird to crash on start.
105 Special thanks go out to the guys at Gentoo, who's firebird ebuild provided
106 a lot of the above options.
108 Now you have a choice - you can either use a tarball of released source, or
109 checkout the latest sources from CVS.
111 Step 2a:  Installing from release source
113 The latest source release at the time of this writing was Mozilla
114 Firebird 0.6.1.  Unless the mozilla guys change the structure of their
115 web site, you can find the release tarballs in directories under the following
116 URL:
118 ftp://ftp.mozilla.org/pub/firebird/releases
120 For Firebird 0.6.1, the file you want to download is:
121 MozillaFirebird-source-0.6.1.tar.bz2.  Once you download this, extract it from
122 the same directory in which you created the mozilla directory in the previous
123 step.  It will fill up that mozilla directory with the source code.
125 Once you've extracted the source code, you're ready to build - skip on
126 down to "Step 3: Build the Lizard"!
128 Step 2b: Installing from CVS checkout
130 For this, you will obviously need the CVS client - instructions are in the
131 BLFS book.  Follow these instructions to check out the CVS source (done from
132 the same directory in which we created the mozilla directory above):
134 export CVSROOT=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot"
135 cvs login
136 {for password, use "anonymous"}
137 cvs co mozilla/client.mk
139 Now you've got the one core file that's needed to check out the rest. We also
140 have the configuration file (created in step 1) which this file uses to
141 determine exactly what mozilla modules to check out.  To check out the full
142 source, perform the following:
144 cd mozilla &&
145 make -f client.mk checkout
147 Go make a pot of coffee, or maybe play a few games of frozen-bubble :)
148 The checkout process will take a while.  Once it's finished, you're ready
149 to continue!
151 Step 3: Building the Lizard
153 The hard part is done at this point.  actually building the program is
154 easy.  The command to build is:
156 make -f client.mk build
158 Again, go find yourself something to occupy your time, as the process
159 will take some time.  Once it's complete, a simple "make install" will
160 install Firebird into the prefix you specified.  You can run it with:
162 {prefix}/bin/MozillaFirebird
164 Another little trick I have learned is this - Firebird answers the same
165 command line parameters as Mozilla does, so for programs that expect to
166 call Mozilla, they can easily call Firebird instead by like this:
168 ln -s MozillaFirebird {prefix}/bin/mozilla
171 CLOSING:
173 The most up to date version of this hint will always be located at:
175 http://www.linux-phreak.net/lfs/mozfire.txt
177 I welcome any comments or improvements to this hint.  You can email them
178 to me at the address at the top of this document.