firefox3.0.3ビルド
BLFSに載るのを待っていたが未だに無いのでドキュメントを見て一人でビルドしてみることにした。
download
この三ヶ月の間にasahi-netとかもringサーバやめてたのね。速いからよく使ってたのになぁ。残念。
ともかく、http://www.dnsbalance.ring.gr.jp/archives/net/www/mozilla/firefox/releases/3.0.3/source/からfirefox-3.0.3-source.tar.bz2をダウンロード。
extract
アーカイブからmozillaディレクトリが展開されるのでcd。README.txtを読むとBuild DocumentationへのURLがあった。
そことBLFSのFirefox-2.0.0.15と、前回2.x系をビルドした際に残っていた自前.mozconfigを参考に組んでみよう。
configure
.mozconfigの内容
ac_add_options --enable-application=browser mk_add_options MOZ_CO_PROJECT=browser mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../firefox-build ac_add_options --prefix=/usr ac_add_options --enable-optimize="-O2 -fforce-addr -fomit-frame-pointer -funroll-loops -march=athlon -pipe" ac_add_options --disable-debug ac_add_options --enable-default-toolkit=gtk2 ac_add_options --enable-xft ac_add_options --enable-extensions=default ac_add_options --disable-tests ac_add_options --with-system-zlib ac_add_options --with-system-png ac_add_options --with-system-jpeg ac_add_options --enable-system-cairo ac_add_options --enable-official-branding ac_add_options --enable-strip ac_add_options --disable-installer ac_add_options --disable-accessibility ac_add_options --disable-gnomevfs ac_add_options --disable-gnomeui ac_add_options --disable-ldap ac_add_options --disable-pango
BLFSで、
. $topsrcdir/browser/config/mozconfig
となっていたが結局そのファイルには
ac_add_options --enable-application=browser mk_add_options MOZ_CO_PROJECT=browser
しか書かれていなかったから本家Documentation通りの後者の書き方にしてみた。MOZ_OBJDIRはBLFSの書き方で。
build
$ make -f client.mk build
<中略>
configure: error: --with-system-png won't work because the system's libpng doesn't have APNG support
<後略>
エラー。
libpng-1.2.33 APNG対応版インストール
あれ?libpngでつまづくとは思わなかったぞ。ぐぐってみたらアニメーション可能なPNGをfirefox3から実装したからなようだ。
libpngからlibpng-1.2.33.tar.bz2をダウンロード。ここでAPNG対応パッチを当てる。最新のlibpng-1.2.33用はAPNGオフィシャルにはまだないのでここのページのlibpng-1.2.33-apng.patch.gzを使わせてもらった。
BLFSのlibpng-1.2.29を参考にさくっとインストール。
$ gunzip -c /hogehoge/libpng-1.2.33-apng.patch.gz | patch -p1 &&
$ ./configure --prefix=/usr && make
# make install
build再開
configure: error: Toolkit must be cairo-gtk2.
エラー。cairo対応必須ですか。。
cairoと格闘
.mozconfig編集
ac_add_options --enable-default-toolkit=cairo-gtk2
またfirefoxをビルドしようとすると
checking for cairo >= 1.6.0 freetype2 fontconfig... Requested 'cairo >= 1.6.0' but version of cairo is 1.2.6
cairoも古いのでhttp://cairographics.org/releases/から念のためglitz-0.5.6.tar.gzと、cairo-1.8.2.tar.gzをダウンロード&インストール。cairoに要求されたのでpixman-0.12.0.tar.gzも。
cairoは
$ ./configure --prefix=/usr --enable-glitz=yes
<中略>
---- The glitz surface backend feature is still under active development and
---- is included in this release only as a preview. It does NOT fully work yet
---- and incompatible changes may yet be made to glitz surface backend
---- specific API.
しっかりとこんなん言われてしまった。cairo-gtk2激重って噂だから不安なんだもの。少しでも速くなるなら使いますよ。
../doltlibtool: line 11: syntax error near unexpected token `"$arg"'
../doltlibtool: line 11: ` *) args+=("$arg")'
make[3]: *** [libcairo.la] エラー 2
なんと!これもなんとかぐぐって判明。'+='という記法がbash3.0以前では存在しないらしい。bash 3.1 リリース情報にばっちり書いてありますね。俺のは3.0だ。こんな古いものを…。bashまで今入れ替える気はしないのでdoltlibtoolというスクリプトの問題の行から+=を取り除くことで解決。
build再開
今度はうまくいった。
一応今回引っかかった依存関係まとめると、
firefox +libpng | +libpng APNG patch +cairo +glitz +pixman +bash3.1以降
install
# make -f client.mk install
起動
http://www.dnsbalance.ring.gr.jp/archives/net/www/mozilla/firefox/releases/3.0.3/linux-i686/xpi/ ここからja.xpiを一旦ダウンロードしてfile:///から読み出してインストールし日本語化。
addonは整理しfirefox3用のものを探したりしないといけない。
すっごく速いです。cpu変えたんじゃないかというくらい。いまのところ不具合なし。