mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-01 02:26:58 +03:00
91bf96fabf
svn path=/trunk/netsurf/; revision=5077
158 lines
5.4 KiB
Plaintext
158 lines
5.4 KiB
Plaintext
--------------------------------------------------------------------------------
|
|
Build Instructions for GTK NetSurf 12 August 2008
|
|
--------------------------------------------------------------------------------
|
|
|
|
This document provides instructions for building the GTK version of NetSurf
|
|
and provides guidance on obtaining NetSurf's build dependencies.
|
|
|
|
GTK NetSurf has been tested on Debian, Ubuntu, Fedora 8, FreeBSD, NetBSD and
|
|
Solaris 10.
|
|
|
|
|
|
Building and executing NetSurf
|
|
=================================
|
|
|
|
First of all, you should examine the contents of Makefile.config and enable
|
|
and disable relevant features as you see fit. Some of these options can be
|
|
automatically detected and used, and where this is the case they are set to
|
|
such. Others cannot be automatically detected from the Makefile, so you will
|
|
either need to install the dependencies, or set them to NO.
|
|
|
|
You should then obtain NetSurf's dependancies, keeping in mind which options
|
|
you have enabled in the configuration file. See the next section for
|
|
specifics.
|
|
|
|
Once done, to build GTK NetSurf on a UNIX-like platform, simply run:
|
|
|
|
$ make
|
|
|
|
If that produces errors, you probably don't have some of NetSurf's build
|
|
dependencies installed. See "Obtaining NetSurf's dependencies" below. Or turn
|
|
off the complaining features in Makefile.config. You may need to "make clean"
|
|
before attempting to build after installing the dependencies.
|
|
|
|
Run NetSurf by executing the "netsurf" shell script:
|
|
|
|
$ ./netsurf
|
|
|
|
This script makes it easy to run the nsgtk binary from the build tree. It
|
|
sets up some environment variables which enable NetSurf to find its
|
|
resources.
|
|
|
|
If you are packaging NetSurf, see the PACKAGING-GTK document.
|
|
|
|
|
|
Obtaining NetSurf's dependencies
|
|
==================================
|
|
|
|
Many of NetSurf's dependencies are packaged on various operating systems.
|
|
The remainder must be installed manually. Hopefully the number of NetSurf-
|
|
related libraries required will have official releases, downloadable tarballs
|
|
and such. But for now, you'll have to do with svn checkouts.
|
|
|
|
|
|
Package installation
|
|
----------------------
|
|
|
|
Debian-like OS:
|
|
|
|
$ apt-get install libglade2-dev libcurl3-dev libxml2-dev libmng-dev
|
|
$ apt-get install librsvg2-dev lemon re2c
|
|
|
|
Fedora:
|
|
|
|
$ yum install libglade2-devel curl-devel libxml2-devel libmng-devel
|
|
$ yum install librsvg2-devel lcms-devel re2c
|
|
|
|
Libnsbmp
|
|
----------
|
|
|
|
NetSurf has its own library for decoding and rendering BMPs, ICOs, etc.
|
|
You can check it out from svn://svn.netsurf-browser.org/trunk/libnsbmp
|
|
|
|
To build and install it:
|
|
|
|
$ sudo make install
|
|
|
|
Libnsgif
|
|
----------
|
|
|
|
NetSurf has its own library for decoding and rendering GIFs. You can check
|
|
it out from svn://svn.netsurf-browser.org/trunk/libnsgif
|
|
|
|
To build and install it:
|
|
|
|
$ sudo make install
|
|
|
|
Hubbub
|
|
--------
|
|
|
|
NetSurf can use Hubbub, the project's HTML parser, instead of using libxml2's
|
|
HTML parser. To build this, you will also require libparserutils. Firstly,
|
|
check out libparserutils from;
|
|
|
|
svn://svn.netsurf-browser.org/trunk/libparserutils
|
|
|
|
and do the usual "sudo make install". Once this is built and installed, you
|
|
can check out and build Hubbub. Check out hubbub from;
|
|
|
|
svn://svn.netsurf-browser.org/trunk/hubbub
|
|
|
|
and again do the usual "sudo make install".
|
|
|
|
Librosprite
|
|
-------------
|
|
|
|
NetSurf uses James Shaw's librosprite for rendering RISC OS Sprite files on
|
|
non-RISC OS platforms. The Makefile will automatically use it if it can find
|
|
it. You can disable it entirely by editing Makefile.config.
|
|
|
|
To build librosprite, check out from svn://svn.rjek.com/jshaw/libsprite/trunk
|
|
Build and install it:
|
|
|
|
$ sudo make install
|
|
|
|
Optionally, specify an install prefix:
|
|
|
|
$ PREFIX=/path/to/install make install
|
|
|
|
Libhpdf
|
|
---------
|
|
|
|
NetSurf can use Haru PDF to enable PDF export and printing in GTK. This
|
|
is currently enabled by default, and cannot be auto-detected by the Makefile.
|
|
If you wish to disable it, do so by editing Makefile.config.
|
|
|
|
Haru PDF can be obtained from http://libharu.sourceforge.net/, although we
|
|
currently depend on features that the official version does not have. You
|
|
can obtain our patched version from the following Subversion address until
|
|
the patches are accepted upstream;
|
|
|
|
svn://svn.netsurf-browser.org/branches/libharu/adamblokus
|
|
|
|
Lemon
|
|
-------
|
|
|
|
If your distribution does not package 'lemon' (Fedora doesn't) then you'll
|
|
need to download it and build it yourself. You may find it comes with the
|
|
SQLite packages (SQLite's parser is built with lemon). If not, try this:
|
|
|
|
$ mkdir -p /usr/local/share/lemon
|
|
$ wget http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lemon.c
|
|
$ wget -O /usr/local/share/lemon/lempar.c http://www.sqlite.org/cvstrac/getfile/sqlite/tool/lempar.c
|
|
$ sed -e's!lempar.c!/usr/local/share/lemon/lempar.c!' lemon.c > lem.c
|
|
$ gcc -o /usr/local/bin/lemon lem.c
|
|
|
|
|
|
General requirements
|
|
----------------------
|
|
|
|
NetSurf requires at minimum GTK 2.10. Earlier versions will not work. It also
|
|
depends on Cairo for rendering, but you should have this already with
|
|
versions of GTK 2.10 or later.
|
|
|
|
This will pull in loads of things, like all the GTK dev libraries, the PNG
|
|
and JPEG libraries, colour management libraries, zlib, OpenSSL etc that
|
|
NetSurf also depends on.
|
|
|