mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-03-18 13:02:52 +03:00
Update for "new" buildsystem.
This commit is contained in:
parent
2059787a24
commit
e1045bf64b
@ -6,11 +6,174 @@
|
||||
and provides guidance on obtaining NetSurf's build dependencies.
|
||||
|
||||
GTK NetSurf has been tested on Debian, Ubuntu, Fedora 8, FreeBSD, NetBSD and
|
||||
Solaris 10.
|
||||
Solaris 10. NetSurf requires at minimum GTK 2.12.
|
||||
|
||||
|
||||
Quick Start
|
||||
=============
|
||||
|
||||
See the QUICK-START document, which provides a simple environment with
|
||||
which you can fetch, build and install NetSurf's dependencies.
|
||||
|
||||
Following the QUICK-START is the recommended way to build NetSurf.
|
||||
|
||||
|
||||
Manual building
|
||||
=================
|
||||
|
||||
If you can't follow the quick start instructions, you will have to build
|
||||
NetSurf manually. The instructions for doing this are given below.
|
||||
|
||||
|
||||
Obtaining the build dependencies
|
||||
----------------------------------
|
||||
|
||||
Many of NetSurf's dependencies are packaged on various operating systems.
|
||||
The remainder must be installed manually. Currently, some of the libraries
|
||||
developed as part of the NetSurf project have not had official releases.
|
||||
Hopefully they will soon be released with downloadable tarballs and packaged
|
||||
in common distros. For now, you'll have to make do with Git checkouts.
|
||||
|
||||
Some of NetSurf's own libraries will be installed in /usr/local/ by default.
|
||||
Fedora, and perhaps some other distributions of Linux, do not ship a
|
||||
pkg-config that will search here, so you will either need to change where
|
||||
these libraries install, or do the following before building NetSurf itself;
|
||||
|
||||
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
$ export PKG_CONFIG_PATH
|
||||
|
||||
Package installation
|
||||
--------------------
|
||||
|
||||
Debian-like OS:
|
||||
|
||||
$ apt-get install libgtk2.0-dev libcurl3-dev libpng-dev
|
||||
$ apt-get install librsvg2-dev libjpeg-dev
|
||||
|
||||
If you want to build with gtk 3 replace libgtk2.0-dev with libgtk-3-dev
|
||||
|
||||
Recent OS versions might need libcurl4-dev instead of libcurl3-dev but
|
||||
note that when it has not been built with OpenSSL, the SSL_CTX is not
|
||||
available and results that certification details won't be presented in case
|
||||
they are invalid. But as this is currently unimplemented in the GTK
|
||||
flavour of NetSurf, this won't make a difference at all.
|
||||
|
||||
For experimental javascript support the mozilla spiermonkey library
|
||||
is required:
|
||||
|
||||
$ apt-get install libmozjs-dev
|
||||
|
||||
Fedora:
|
||||
|
||||
$ yum install curl-devel libpng-devel
|
||||
$ yum install librsvg2-devel expat-devel
|
||||
|
||||
Other:
|
||||
|
||||
You'll need to install the development resources for libglade2, libcurl3,
|
||||
libpng and librsvg.
|
||||
|
||||
Libharu
|
||||
-------
|
||||
|
||||
NetSurf can use Haru PDF to enable PDF export. Haru PDF can be obtained
|
||||
from http://libharu.org/. We require libharu 2.2 or later.
|
||||
|
||||
| Note: libharu cannot be auto-detected by the Makefile. If you wish to
|
||||
| enable it, do so by creating a Makefile.config file.
|
||||
|
||||
|
||||
Preparing your workspace
|
||||
--------------------------
|
||||
|
||||
NetSurf has a number of libraries which must be built in-order and
|
||||
installed into your workspace. Each library depends on a core build
|
||||
system which NetSurf projects use. This build system relies on the
|
||||
presence of things like pkg-config to find libraries and also certain
|
||||
environment variables in order to work correctly.
|
||||
|
||||
Assuming you are preparing a workspace in /home/netsurf/workspace then
|
||||
the following steps will set you up:
|
||||
|
||||
Make the workspace directory and change to it
|
||||
---------------------------------------------
|
||||
|
||||
$ mkdir -p ${HOME}/netsurf/workspace
|
||||
$ cd ${HOME}/netsurf/workspace
|
||||
|
||||
Make the temporary install space
|
||||
--------------------------------
|
||||
|
||||
$ mkdir inst
|
||||
|
||||
Make an environment script
|
||||
--------------------------
|
||||
$ cat > env.sh <<'EOF'
|
||||
export PKG_CONFIG_PATH=${HOME}/netsurf/workspace/inst/lib/pkgconfig::
|
||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HOME}/netsurf/workspace/inst/lib
|
||||
export PREFIX=${HOME}/netsurf/workspace/inst
|
||||
EOF
|
||||
|
||||
Change to workspace and source the environment
|
||||
----------------------------------------------
|
||||
|
||||
Whenever you wish to start development in a new shell, run the following:
|
||||
|
||||
$ cd ${HOME}/netsurf/workspace
|
||||
$ source env.sh
|
||||
|
||||
From here on, any commands in this document assume you have sourced your
|
||||
shell environment.
|
||||
|
||||
|
||||
The NetSurf project's libraries
|
||||
---------------------------------
|
||||
|
||||
The NetSurf project has developed several libraries which are required by
|
||||
the browser. These are:
|
||||
|
||||
LibParserUtils -- Parser building utility functions
|
||||
LibWapcaplet -- String internment
|
||||
Hubbub -- HTML5 compliant HTML parser
|
||||
LibCSS -- CSS parser and selection engine
|
||||
LibNSGIF -- GIF format image decoder
|
||||
LibNSBMP -- BMP and ICO format image decoder
|
||||
LibROSprite -- RISC OS Sprite format image decoder
|
||||
|
||||
To fetch each of these libraries, run the appropriate commands from the
|
||||
Docs/LIBRARIES file, from within your workspace directory.
|
||||
|
||||
To build and install these libraries, simply enter each of their directories
|
||||
and run:
|
||||
|
||||
$ make install
|
||||
|
||||
| Note: We advise enabling iconv() support in libparserutils, which vastly
|
||||
| increases the number of supported character sets. To do this,
|
||||
| create a file called Makefile.config.override in the libparserutils
|
||||
| directory, containing the following line:
|
||||
|
|
||||
| CFLAGS += -DWITH_ICONV_FILTER
|
||||
|
|
||||
| For more information, consult the libparserutils README file.
|
||||
|
||||
Now you should have all the NetSurf project libraries built and installed.
|
||||
|
||||
|
||||
Getting the NetSurf source
|
||||
----------------------------
|
||||
|
||||
From your workspace directory, run the following command to get the NetSurf
|
||||
source:
|
||||
|
||||
$ git clone git://git.netsurf-browser.org/netsurf.git
|
||||
|
||||
And change to the 'netsurf' directory:
|
||||
|
||||
$ cd netsurf
|
||||
|
||||
Building and executing NetSurf
|
||||
================================
|
||||
--------------------------------
|
||||
|
||||
First of all, you should examine the contents of Makefile.defaults
|
||||
and enable and disable relevant features as you see fit by creating
|
||||
@ -41,104 +204,9 @@
|
||||
sets up some environment variables which enable NetSurf to find its
|
||||
resources.
|
||||
|
||||
|
||||
Note for packagers
|
||||
====================
|
||||
|
||||
If you are packaging NetSurf, see the PACKAGING-GTK document.
|
||||
|
||||
|
||||
Obtaining NetSurf's build dependencies
|
||||
========================================
|
||||
|
||||
Many of NetSurf's dependencies are packaged on various operating systems.
|
||||
The remainder must be installed manually. Currently, some of the libraries
|
||||
developed as part of the NetSurf project have not had official releases.
|
||||
Hopefully they will soon be released with downloadable tarballs and packaged
|
||||
in common distros. For now, you'll have to make do with Git checkouts.
|
||||
|
||||
Some of NetSurf's own libraries will be installed in /usr/local/ by default.
|
||||
Fedora, and perhaps some other distributions of Linux, do not ship a
|
||||
pkg-config that will search here, so you will either need to change where
|
||||
these libraries install, or do the following before building NetSurf itself;
|
||||
|
||||
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
$ export PKG_CONFIG_PATH
|
||||
|
||||
Package installation
|
||||
----------------------
|
||||
|
||||
Debian-like OS:
|
||||
|
||||
$ apt-get install libgtk2.0-dev libcurl3-dev libpng-dev
|
||||
$ apt-get install librsvg2-dev libjpeg-dev
|
||||
|
||||
If you want to build with gtk 3 replace libgtk2.0-dev with libgtk-3-dev
|
||||
|
||||
Recent OS versions might need libcurl4-dev instead of libcurl3-dev but
|
||||
note that when it has not been built with OpenSSL, the SSL_CTX is not
|
||||
available and results that certification details won't be presented in case
|
||||
they are invalid. But as this is currently unimplemented in the GTK
|
||||
flavour of NetSurf, this won't make a difference at all.
|
||||
|
||||
For experimental javascript support the mozilla spiermonkey library
|
||||
is required:
|
||||
|
||||
$ apt-get install libmozjs-dev
|
||||
|
||||
Fedora:
|
||||
|
||||
$ yum install curl-devel libpng-devel
|
||||
$ yum install librsvg2-devel expat-devel
|
||||
|
||||
Other:
|
||||
|
||||
You'll need to install the development resources for libglade2, libcurl3,
|
||||
libpng and librsvg.
|
||||
|
||||
The NetSurf project's libraries
|
||||
---------------------------------
|
||||
|
||||
The NetSurf project has developed several libraries which are required by
|
||||
the browser. These are:
|
||||
|
||||
LibParserUtils -- Parser building utility functions
|
||||
LibWapcaplet -- String internment
|
||||
Hubbub -- HTML5 compliant HTML parser
|
||||
LibCSS -- CSS parser and selection engine
|
||||
LibNSGIF -- GIF format image decoder
|
||||
LibNSBMP -- BMP and ICO format image decoder
|
||||
LibROSprite -- RISC OS Sprite format image decoder
|
||||
|
||||
To fetch each of these libraries, run the appropriate commands from the
|
||||
Docs/LIBRARIES file.
|
||||
|
||||
To build and install these libraries, simply enter each of their directories
|
||||
and run:
|
||||
|
||||
$ sudo make install
|
||||
|
||||
| Note: We advise enabling iconv() support in libparserutils, which vastly
|
||||
| increases the number of supported character sets. To do this,
|
||||
| create a file called Makefile.config.override in the libparserutils
|
||||
| directory, containing the following line:
|
||||
|
|
||||
| CFLAGS += -DWITH_ICONV_FILTER
|
||||
|
|
||||
| For more information, consult the libparserutils README file.
|
||||
|
||||
Libharu
|
||||
---------
|
||||
|
||||
NetSurf can use Haru PDF to enable PDF export. Haru PDF can be obtained
|
||||
from http://libharu.org/. We require libharu 2.2 or later.
|
||||
|
||||
| Note: libharu cannot be auto-detected by the Makefile. If you wish to
|
||||
| enable it, do so by creating a Makefile.config file.
|
||||
|
||||
General requirements
|
||||
----------------------
|
||||
|
||||
NetSurf requires at minimum GTK 2.12. Earlier versions will not work. It also
|
||||
depends on Cairo for rendering, but you should have this already with
|
||||
versions of GTK 2.12 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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user