Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. --------------------------------------------------------------------------------
  2.   Build Instructions for GTK NetSurf                              8 April 2010
  3. --------------------------------------------------------------------------------
  4.  
  5.   This document provides instructions for building the GTK version of NetSurf
  6.   and provides guidance on obtaining NetSurf's build dependencies.
  7.  
  8.   GTK NetSurf has been tested on Debian, Ubuntu, Fedora 8, FreeBSD, NetBSD and
  9.   Solaris 10.
  10.  
  11.  
  12.   Building and executing NetSurf
  13. ================================
  14.  
  15.   First of all, you should examine the contents of Makefile.defaults
  16.   and enable and disable relevant features as you see fit by creating
  17.   a Makefile.config file.  Some of these options can be automatically
  18.   detected and used, and where this is the case they are set to such.
  19.   Others cannot be automatically detected from the Makefile, so you
  20.   will either need to install the dependencies, or set them to NO.
  21.  
  22.   You should then obtain NetSurf's dependencies, keeping in mind which options
  23.   you have enabled in the configuration file.  See the next section for
  24.   specifics.
  25.  
  26.   Once done, to build GTK NetSurf on a UNIX-like platform, simply run:
  27.  
  28.       $ make
  29.  
  30.   If that produces errors, you probably don't have some of NetSurf's
  31.   build dependencies installed. See "Obtaining NetSurf's dependencies"
  32.   below. Or turn off the complaining features in a Makefile.config
  33.   file. You may need to "make clean" before attempting to build after
  34.   installing the dependencies.
  35.  
  36.   Run NetSurf by executing the "test-nsgtk" shell script:
  37.  
  38.       $ ./test-nsgtk
  39.  
  40.   This script makes it easy to run the nsgtk binary from the build tree. It
  41.   sets up some environment variables which enable NetSurf to find its
  42.   resources.
  43.  
  44.   If you are packaging NetSurf, see the PACKAGING-GTK document.
  45.  
  46.  
  47.   Obtaining NetSurf's build dependencies
  48. ========================================
  49.  
  50.   Many of NetSurf's dependencies are packaged on various operating systems.
  51.   The remainder must be installed manually.  Currently, some of the libraries
  52.   developed as part of the NetSurf project have not had official releases.
  53.   Hopefully they will soon be released with downloadable tarballs and packaged
  54.   in common distros.  For now, you'll have to make do with Git checkouts.
  55.  
  56.   Some of NetSurf's own libraries will be installed in /usr/local/ by default.
  57.   Fedora, and perhaps some other distributions of Linux, do not ship a
  58.   pkg-config that will search here, so you will either need to change where
  59.   these libraries install, or do the following before building NetSurf itself;
  60.  
  61.       $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
  62.       $ export PKG_CONFIG_PATH
  63.  
  64.   Package installation
  65. ----------------------
  66.  
  67.   Debian-like OS:
  68.  
  69.       $ apt-get install libglade2-dev libcurl3-dev libmng-dev
  70.       $ apt-get install librsvg2-dev liblcms1-dev libjpeg-dev
  71.  
  72.   Recent OS versions might need libcurl4-dev instead of libcurl3-dev but
  73.   note that when it has not been built with OpenSSL, the SSL_CTX is not
  74.   available and results that certification details won't be presented in case
  75.   they are invalid.  But as this is currently unimplemented in the GTK
  76.   flavour of NetSurf, this won't make a difference at all.
  77.  
  78.   For experimental javascript support the mozilla spiermonkey library
  79.   is required:
  80.  
  81.       $ apt-get install libmozjs-dev
  82.  
  83.   Fedora:
  84.  
  85.       $ yum install libglade2-devel curl-devel libmng-devel
  86.       $ yum install librsvg2-devel lcms-devel
  87.  
  88.   Other:
  89.  
  90.   You'll need to install the development resources for libglade2, libcurl3,
  91.   libmng and librsvg.
  92.  
  93.   Note that if you don't require MNG or JNG image support, NetSurf can be
  94.   configured to use libpng instead of libmng. If you wish to do this, install
  95.   the libpng development package instead.
  96.  
  97.   The NetSurf project's libraries
  98. ---------------------------------
  99.  
  100.   The NetSurf project has developed several libraries which are required by
  101.   the browser. These are:
  102.  
  103.   LibParserUtils  --  Parser building utility functions
  104.   LibWapcaplet    --  String internment
  105.   Hubbub          --  HTML5 compliant HTML parser
  106.   LibCSS          --  CSS parser and selection engine
  107.   LibNSGIF        --  GIF format image decoder
  108.   LibNSBMP        --  BMP and ICO format image decoder
  109.   LibROSprite     --  RISC OS Sprite format image decoder
  110.  
  111.   To fetch each of these libraries, run the appropriate commands from the
  112.   Docs/LIBRARIES file.
  113.  
  114.   To build and install these libraries, simply enter each of their directories
  115.   and run:
  116.  
  117.       $ sudo make install
  118.  
  119.   | Note: We advise enabling iconv() support in libparserutils, which vastly
  120.   |       increases the number of supported character sets.  To do this,
  121.   |       create a file called Makefile.config.override in the libparserutils
  122.   |       directory, containing the following line:
  123.   |
  124.   |           CFLAGS += -DWITH_ICONV_FILTER
  125.   |
  126.   |       For more information, consult the libparserutils README file.
  127.  
  128.   Libharu
  129. ---------
  130.  
  131.   NetSurf can use Haru PDF to enable PDF export.  Haru PDF can be obtained
  132.   from http://libharu.org/.  We require libharu 2.2 or later.
  133.  
  134.   | Note: libharu cannot be auto-detected by the Makefile.  If you wish to
  135.   |       enable it, do so by creating a Makefile.config file.
  136.  
  137.   General requirements
  138. ----------------------
  139.  
  140.   NetSurf requires at minimum GTK 2.12. Earlier versions will not work. It also
  141.   depends on Cairo for rendering, but you should have this already with
  142.   versions of GTK 2.12 or later.
  143.  
  144.   This will pull in loads of things, like all the GTK dev libraries, the PNG
  145.   and JPEG libraries, colour management libraries, zlib, OpenSSL etc that
  146.   NetSurf also depends on.
  147.